diff --git a/passbook/static/static/passbook/main.js b/passbook/static/static/passbook/main.js index 2df1dd81d..e7e310b92 100644 --- a/passbook/static/static/passbook/main.js +++ b/passbook/static/static/passbook/main.js @@ -1,4 +1,4 @@ -document.querySelectorAll("input[type=search]").forEach((t=>{t.addEventListener("search",(e=>{""===t.value&&t.parentElement.submit()}))})),document.querySelectorAll("[data-pb-fetch-fill]").forEach((t=>{const e=t.dataset.pbFetchFill,n=t.dataset.pbFetchKey;fetch(e).then((t=>t.json())).then((e=>{t.textContent=e[n],t.value=e[n]}))})),document.querySelectorAll("[data-target='modal']").forEach((t=>{t.addEventListener("click",(t=>{const e=t.target.closest('[data-target="modal"]').attributes["data-modal"].value;document.querySelector("#"+e).removeAttribute("hidden")}))})),document.querySelectorAll(".pf-c-modal-box [data-modal-close]").forEach((t=>{t.addEventListener("click",(t=>{t.target.closest(".pf-c-backdrop").setAttribute("hidden",!0)}))})),document.querySelectorAll(".pf-c-check__label").forEach((t=>{t.addEventListener("click",(t=>{const e=t.target.parentElement.querySelector("input[type=checkbox]");e.checked=!e.checked}))})),document.querySelectorAll(".codemirror").forEach((t=>{let e="xml";"data-cm-mode"in t.attributes&&(e=t.attributes["data-cm-mode"].value),t.removeAttribute("required"),CodeMirror.fromTextArea(t,{mode:e,theme:"monokai",lineNumbers:!1,readOnly:t.readOnly,autoRefresh:!0})})); +document.querySelectorAll("input[type=search]").forEach((e=>{e.addEventListener("search",(t=>{""===e.value&&e.parentElement.submit()}))})),document.querySelectorAll("[data-pb-fetch-fill]").forEach((e=>{const t=e.dataset.pbFetchFill,n=e.dataset.pbFetchKey;fetch(t).then((e=>e.json())).then((t=>{e.textContent=t[n],e.value=t[n]}))})),document.querySelectorAll("[data-target='modal']").forEach((e=>{e.addEventListener("click",(e=>{const t=e.target.closest('[data-target="modal"]').attributes["data-modal"].value;document.querySelector("#"+t).removeAttribute("hidden")}))})),document.querySelectorAll(".pf-c-modal-box [data-modal-close]").forEach((e=>{e.addEventListener("click",(e=>{e.target.closest(".pf-c-backdrop").setAttribute("hidden",!0)}))})),document.querySelectorAll(".pf-c-check__label").forEach((e=>{e.addEventListener("click",(e=>{const t=e.target.parentElement.querySelector("input[type=checkbox]");t.checked=!t.checked}))})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -13,20 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -function t(t,e,n,i){var r,a=arguments.length,o=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,n,o):r(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o -/** - * @license - * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at - * http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at - * http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at - * http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at - * http://polymer.github.io/PATENTS.txt - */}document.querySelectorAll("input[name=name]").forEach((t=>{t.addEventListener("input",(t=>{const e=t.target.closest("form");if(null===e)return;e.querySelector("input[name=slug]").value=t.target.value.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}))})),document.querySelectorAll(".pf-c-page__header-brand-toggle>button").forEach((t=>{t.addEventListener("click",(t=>{const e=document.querySelector(".pf-c-page__sidebar");e.classList.contains("pf-m-expanded")?(e.classList.remove("pf-m-expanded"),e.style.zIndex=0):(e.classList.add("pf-m-expanded"),e.style.zIndex=200)}))})),document.querySelectorAll(".pf-m-expandable>.pf-c-nav__link").forEach((t=>{t.addEventListener("click",(e=>{e.preventDefault(),t.parentElement.classList.toggle("pf-m-expanded")}))}));const e="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,n=(t,e,n=null)=>{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}},i=`{{lit-${String(Math.random()).slice(2)}}}`,r=`\x3c!--${i}--\x3e`,a=new RegExp(`${i}|${r}`);class o{constructor(t,e){this.parts=[],this.element=e;const n=[],r=[],o=document.createTreeWalker(e.content,133,null,!1);let l=0,u=-1,h=0;const{strings:f,values:{length:p}}=t;for(;h
0;){const e=f[h],n=c.exec(e)[2],i=n.toLowerCase()+"$lit$",r=t.getAttribute(i);t.removeAttribute(i);const o=r.split(a);this.parts.push({type:"attribute",index:u,name:n,strings:o}),h+=o.length-1}}"TEMPLATE"===t.tagName&&(r.push(t),o.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(i)>=0){const i=t.parentNode,r=e.split(a),o=r.length-1;for(let e=0;e 0;){const t=f[h],n=u.exec(t)[2],r=n.toLowerCase()+"$lit$",i=e.getAttribute(r);e.removeAttribute(r);const a=i.split(o);this.parts.push({type:"attribute",index:d,name:n,strings:a}),h+=a.length-1}}"TEMPLATE"===e.tagName&&(i.push(e),a.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(r)>=0){const r=e.parentNode,i=t.split(o),a=i.length-1;for(let t=0;t{const n=e.length-t.length;return n>=0&&e.slice(n)===t},l=e=>-1!==e.index,c=()=>document.createComment(""),u=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function d(e,t){const{element:{content:n},parts:r}=e,i=document.createTreeWalker(n,133,null,!1);let o=f(r),a=r[o],s=-1,l=0;const c=[];let u=null;for(;i.nextNode();){s++;const e=i.currentNode;for(e.previousSibling===u&&(u=null),t.has(e)&&(c.push(e),null===u&&(u=e)),null!==u&&l++;void 0!==a&&a.index===s;)a.index=null!==u?-1:a.index-l,o=f(r,o),a=r[o]}c.forEach((e=>e.parentNode.removeChild(e)))}const h=e=>{let t=11===e.nodeType?0:1;const n=document.createTreeWalker(e,133,null,!1);for(;n.nextNode();)t++;return t},f=(e,t=-1)=>{for(let n=t+1;n \n ${e.message}\n \n ${t.message}\n `}};e([Z()],oe.prototype,"url",void 0),e([Z()],oe.prototype,"messages",void 0),oe=e([$("pb-messages")],oe);const ae=["pf-m-progress","pf-m-in-progress"];let se=class extends ne{constructor(){var e;super(),this.url="",this.isRunning=!1,null===(e=this.querySelector("button"))||void 0===e||e.addEventListener("click",(e=>this.callAction()))}setLoading(){this.isRunning=!0,this.classList.add(...ae)}setDone(e){this.isRunning=!1,this.classList.remove(...ae),this.classList.replace("pf-m-primary",e),ie(),setTimeout((()=>{this.classList.replace(e,"pf-m-primary")}),1e3)}callAction(){if(!0===this.isRunning)return;this.setLoading();const e=function(e){let t=null;if(document.cookie&&""!==document.cookie){const n=document.cookie.split(";");for(let r=0;r
=e[t].length&&e[t].push({}),!e[t][r].type||o.type&&o.type!==e[t][r].type?ot.merge(e[t][r],[xn.getScaleDefaults(a),o]):ot.merge(e[t][r],o)}else ot._merger(t,e,n,i)}})}function Yn(){return ot.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var r=e[t]||Object.create(null),a=n[t];"scales"===t?e[t]=Wn(r,a):"scale"===t?e[t]=ot.merge(r,[xn.getScaleDefaults(a.type),a]):ot._merger(t,e,n,i)}})}function Vn(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Yn(K.global,K[t.type],t.options||{}),t}function zn(t){var e=t.options;ot.each(t.scales,(function(e){Ue.removeBox(t,e)})),e=Yn(K.global,K[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Bn(t,e,n){var i,r=function(t){return t.id===i};do{i=e+n++}while(ot.findIndex(t,r)>=0);return i}function Hn(t){return"top"===t||"bottom"===t}function Un(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}K._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var jn=function(t,e){return this.construct(t,e),this};ot.extend(jn.prototype,{construct:function(t,e){var n=this;e=Vn(e);var i=yn.acquireContext(t,e),r=i&&i.canvas,a=r&&r.height,o=r&&r.width;n.id=ot.uid(),n.ctx=i,n.canvas=r,n.config=e,n.width=o,n.height=a,n.aspectRatio=a?o/a:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,jn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&r?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return _n.notify(t,"beforeInit"),ot.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),_n.notify(t,"afterInit"),t},clear:function(){return ot.canvas.clear(this),this},stop:function(){return vt.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,r=n.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(ot.getMaximumWidth(i))),o=Math.max(0,Math.floor(r?a/r:ot.getMaximumHeight(i)));if((e.width!==a||e.height!==o)&&(i.width=e.width=a,i.height=e.height=o,i.style.width=a+"px",i.style.height=o+"px",ot.retinaScale(e,n.devicePixelRatio),!t)){var s={width:a,height:o};_n.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;ot.each(e.xAxes,(function(t,n){t.id||(t.id=Bn(e.xAxes,"x-axis-",n))})),ot.each(e.yAxes,(function(t,n){t.id||(t.id=Bn(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],r=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ot.each(i,(function(e){var i=e.options,a=i.id,o=En(i.type,e.dtype);Hn(i.position)!==Hn(e.dposition)&&(i.position=e.dposition),r[a]=!0;var s=null;if(a in n&&n[a].type===o)(s=n[a]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=xn.getScaleConstructor(o);if(!l)return;s=new l({id:a,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),ot.each(r,(function(t,e){t||delete n[e]})),t.scales=n,xn.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],r=n.data.datasets;for(t=0,e=r.length;t=0&&(o=t),void 0!==a&&(t=n.indexOf(a))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,i=t.maxIndex;t.ticks=0===n&&i===e.length-1?e:e.slice(n,i+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;vi.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,r,a,o=this;return bi(e)||bi(n)||(t=o.chart.data.datasets[n].data[e]),bi(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(r=o._getLabels(),t=ot.valueOrDefault(i,t),e=-1!==(a=r.indexOf(t))?a:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),xi=yi;_i._defaults=xi;var wi=ot.noop,ki=ot.isNullOrUndef;function Si(t,e){var n,i,r,a,o=[],s=1e-14,l=t.stepSize,d=l||1,c=t.maxTicks-1,u=t.min,h=t.max,f=t.precision,p=e.min,g=e.max,m=ot.niceNum((g-p)/c/d)*d;if(mc&&(m=ot.niceNum(a*m/c/d)*d),l||ki(f)?n=Math.pow(10,ot._decimalPlaces(m)):(n=Math.pow(10,f),m=Math.ceil(m*n)/n),i=Math.floor(p/m)*m,r=Math.ceil(g/m)*m,l&&(!ki(u)&&ot.almostWhole(u/m,m/1e3)&&(i=u),!ki(h)&&ot.almostWhole(h/m,m/1e3)&&(r=h)),a=(r-i)/m,a=ot.almostEquals(a,Math.round(a),m/1e3)?Math.round(a):Math.ceil(a),i=Math.round(i*n)/n,r=Math.round(r*n)/n,o.push(ki(u)?i:u);for(var v=1;v0&&i>0&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,a=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),r!==a&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,i=n.stepSize,r=n.maxTicksLimit;return i?t=Math.ceil(e.max/i)-Math.floor(e.min/i)+1:(t=e._computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wi,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:ot.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=Si(i,t);t.handleDirectionalChanges(),t.max=ot.max(r),t.min=ot.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),vi.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,r=e.max;vi.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(r-i)/Math.max(n.length-1,1)/2,r+=t),e._startValue=i,e._endValue=r,e._valueRange=r-i}}),Ci={position:"left",ticks:{callback:Jn.formatters.linear}},Di=0,Pi=1;function Ti(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}function Ai(t,e,n,i){var r,a,o=t.options,s=Ti(e,o.stacked,n),l=s.pos,d=s.neg,c=i.length;for(r=0;ra.r&&(a.r=c.end,o.r=l),u.start0&&i>0?n:0)},_drawGrid:function(){var t,e,n,i=this,r=i.ctx,a=i.options,o=a.gridLines,s=a.angleLines,l=zi(s.lineWidth,o.lineWidth),d=zi(s.color,o.color);if(a.pointLabels.display&&Ki(i),o.display&&ot.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),Qi(i,o,e,n))})),s.display&&l&&d){for(r.save(),r.lineWidth=l,r.strokeStyle=d,r.setLineDash&&(r.setLineDash(Hi([s.borderDash,o.borderDash,[]])),r.lineDashOffset=Hi([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(a.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),r.beginPath(),r.moveTo(i.xCenter,i.yCenter),r.lineTo(n.x,n.y),r.stroke();r.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,r,a=t.getIndexAngle(0),o=ot.options._parseFont(n),s=zi(n.fontColor,K.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(a),e.textAlign="center",e.textBaseline="middle",ot.each(t.ticks,(function(a,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(r=e.measureText(a).width,e.fillStyle=n.backdropColor,e.fillRect(-r/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,r+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(a,0,-i))})),e.restore()}},_drawTitle:ot.noop}),nr=Ui;er._defaults=nr;var ir=ot._deprecated,rr=ot.options.resolve,ar=ot.valueOrDefault,or=Number.MIN_SAFE_INTEGER||-9007199254740991,sr=Number.MAX_SAFE_INTEGER||9007199254740991,lr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},dr=Object.keys(lr);function cr(t,e){return t-e}function ur(t){var e,n,i,r={},a=[];for(e=0,n=t.length;e1?ur(p).sort(cr):p.sort(cr),h=Math.min(h,p[0]),f=Math.max(f,p[p.length-1])),h=br(s,hr(c))||h,f=br(s,fr(c))||f,h=h===sr?+d.startOf(Date.now(),u):h,f=f===or?+d.endOf(Date.now(),u)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:p,datasets:g,labels:m}},buildTicks:function(){var t,e,n,i=this,r=i.min,a=i.max,o=i.options,s=o.ticks,l=o.time,d=i._timestamps,c=[],u=i.getLabelCapacity(r),h=s.source,f=o.distribution;for(d="data"===h||"auto"===h&&"series"===f?d.data:"labels"===h?d.labels:wr(i,r,a,u),"ticks"===o.bounds&&d.length&&(r=d[0],a=d[d.length-1]),r=br(i,hr(o))||r,a=br(i,fr(o))||a,t=0,e=d.length;t=0;--n)(e=l[n].$filler)&&e.visible&&(r=(i=e.el)._view,a=i._children||[],o=e.mapper,s=r.backgroundColor||K.global.defaultColor,o&&s&&a.length&&(ot.canvas.clipArea(d,t.chartArea),Vr(d,a,o,r,s,i._loop),ot.canvas.unclipArea(d)))}},Br=ot.rtl.getRtlAdapter,Hr=ot.noop,Ur=ot.valueOrDefault;function jr(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}K._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=null===r.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var r=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:r.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:r.borderWidth,strokeStyle:r.borderColor,pointStyle:r.pointStyle,rotation:r.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),a=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,n=a.length;e`}};t([X()],ut.prototype,"url",void 0),t([X()],ut.prototype,"messages",void 0),ut=t([$("pb-messages")],ut);const ht=["pf-m-progress","pf-m-in-progress"];let ft=class extends nt{constructor(){var t;super(),this.url="",this.isRunning=!1,null===(t=this.querySelector("button"))||void 0===t||t.addEventListener("click",(t=>this.callAction()))}setLoading(){this.isRunning=!0,this.classList.add(...ht)}setDone(t){this.isRunning=!1,this.classList.remove(...ht),this.classList.replace("pf-m-primary",t),ct(),setTimeout((()=>{this.classList.replace(t,"pf-m-primary")}),1e3)}callAction(){if(!0===this.isRunning)return;this.setLoading();const t=function(t){let e=null;if(document.cookie&&""!==document.cookie){const n=document.cookie.split(";");for(let i=0;i
\n Whoops!\n
\n \n Something went wrong! Please try again later.\n
\n ${t}
\n =t[e].length&&t[e].push({}),!t[e][i].type||a.type&&a.type!==t[e][i].type?ae.merge(t[e][i],[wn.getScaleDefaults(o),a]):ae.merge(t[e][i],a)}else ae._merger(e,t,n,r)}})}function zn(){return ae.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){var i=t[e]||Object.create(null),o=n[e];"scales"===e?t[e]=En(i,o):"scale"===e?t[e]=ae.merge(i,[wn.getScaleDefaults(o.type),o]):ae._merger(e,t,n,r)}})}function Hn(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=zn(J.global,J[e.type],e.options||{}),e}function Bn(e){var t=e.options;ae.each(e.scales,(function(t){Ut.removeBox(e,t)})),t=zn(J.global,J[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Vn(e,t,n){var r,i=function(e){return e.id===r};do{r=t+n++}while(ae.findIndex(e,i)>=0);return r}function Yn(e){return"top"===e||"bottom"===e}function Un(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}J._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var jn=function(e,t){return this.construct(e,t),this};ae.extend(jn.prototype,{construct:function(e,t){var n=this;t=Hn(t);var r=bn.acquireContext(e,t),i=r&&r.canvas,o=i&&i.height,a=i&&i.width;n.id=ae.uid(),n.ctx=r,n.canvas=i,n.config=t,n.width=a,n.height=o,n.aspectRatio=o?a/o:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,jn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&i?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return xn.notify(e,"beforeInit"),ae.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),xn.notify(e,"afterInit"),e},clear:function(){return ae.canvas.clear(this),this},stop:function(){return ve.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,i=n.maintainAspectRatio&&t.aspectRatio||null,o=Math.max(0,Math.floor(ae.getMaximumWidth(r))),a=Math.max(0,Math.floor(i?o/i:ae.getMaximumHeight(r)));if((t.width!==o||t.height!==a)&&(r.width=t.width=o,r.height=t.height=a,r.style.width=o+"px",r.style.height=a+"px",ae.retinaScale(t,n.devicePixelRatio),!e)){var s={width:o,height:a};xn.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;ae.each(t.xAxes,(function(e,n){e.id||(e.id=Vn(t.xAxes,"x-axis-",n))})),ae.each(t.yAxes,(function(e,n){e.id||(e.id=Vn(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],i=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ae.each(r,(function(t){var r=t.options,o=r.id,a=Wn(r.type,t.dtype);Yn(r.position)!==Yn(t.dposition)&&(r.position=t.dposition),i[o]=!0;var s=null;if(o in n&&n[o].type===a)(s=n[o]).options=r,s.ctx=e.ctx,s.chart=e;else{var l=wn.getScaleConstructor(a);if(!l)return;s=new l({id:o,type:a,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),ae.each(i,(function(e,t){e||delete n[t]})),e.scales=n,wn.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],i=n.data.datasets;for(e=0,t=i.length;e=0&&(a=e),void 0!==o&&(e=n.indexOf(o))>=0&&(s=e),t.minIndex=a,t.maxIndex=s,t.min=n[a],t.max=n[s]},buildTicks:function(){var e=this,t=e._getLabels(),n=e.minIndex,r=e.maxIndex;e.ticks=0===n&&r===t.length-1?t:t.slice(n,r+1)},getLabelForIndex:function(e,t){var n=this,r=n.chart;return r.getDatasetMeta(t).controller._getValueScaleId()===n.id?n.getRightValue(r.data.datasets[t].data[e]):n._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;vr.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,i,o,a=this;return yr(t)||yr(n)||(e=a.chart.data.datasets[n].data[t]),yr(e)||(r=a.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(i=a._getLabels(),e=ae.valueOrDefault(r,e),t=-1!==(o=i.indexOf(e))?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,n=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(n,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}}),wr=br;xr._defaults=wr;var _r=ae.noop,kr=ae.isNullOrUndef;function Sr(e,t){var n,r,i,o,a=[],s=1e-14,l=e.stepSize,c=l||1,u=e.maxTicks-1,d=e.min,h=e.max,f=e.precision,p=t.min,g=t.max,m=ae.niceNum((g-p)/u/c)*c;if(mu&&(m=ae.niceNum(o*m/u/c)*c),l||kr(f)?n=Math.pow(10,ae._decimalPlaces(m)):(n=Math.pow(10,f),m=Math.ceil(m*n)/n),r=Math.floor(p/m)*m,i=Math.ceil(g/m)*m,l&&(!kr(d)&&ae.almostWhole(d/m,m/1e3)&&(r=d),!kr(h)&&ae.almostWhole(h/m,m/1e3)&&(i=h)),o=(i-r)/m,o=ae.almostEquals(o,Math.round(o),m/1e3)?Math.round(o):Math.ceil(o),r=Math.round(r*n)/n,i=Math.round(i*n)/n,a.push(kr(d)?r:d);for(var v=1;vo.r&&(o.r=u.end,a.r=l),d.start0&&r>0?n:0)},_drawGrid:function(){var e,t,n,r=this,i=r.ctx,o=r.options,a=o.gridLines,s=o.angleLines,l=Br(s.lineWidth,a.lineWidth),c=Br(s.color,a.color);if(o.pointLabels.display&&Jr(r),a.display&&ae.each(r.ticks,(function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),Qr(r,a,t,n))})),s.display&&l&&c){for(i.save(),i.lineWidth=l,i.strokeStyle=c,i.setLineDash&&(i.setLineDash(Yr([s.borderDash,a.borderDash,[]])),i.lineDashOffset=Yr([s.borderDashOffset,a.borderDashOffset,0])),e=r.chart.data.labels.length-1;e>=0;e--)t=r.getDistanceFromCenterForValue(o.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(n.x,n.y),i.stroke();i.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,i,o=e.getIndexAngle(0),a=ae.options._parseFont(n),s=Br(n.fontColor,J.global.defaultFontColor);t.save(),t.font=a.string,t.translate(e.xCenter,e.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",ae.each(e.ticks,(function(o,l){(0!==l||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[l]),n.showLabelBackdrop&&(i=t.measureText(o).width,t.fillStyle=n.backdropColor,t.fillRect(-i/2-n.backdropPaddingX,-r-a.size/2-n.backdropPaddingY,i+2*n.backdropPaddingX,a.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(o,0,-r))})),t.restore()}},_drawTitle:ae.noop}),ni=Ur;ti._defaults=ni;var ri=ae._deprecated,ii=ae.options.resolve,oi=ae.valueOrDefault,ai=Number.MIN_SAFE_INTEGER||-9007199254740991,si=Number.MAX_SAFE_INTEGER||9007199254740991,li={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ci=Object.keys(li);function ui(e,t){return e-t}function di(e){var t,n,r,i={},o=[];for(t=0,n=e.length;t1?di(p).sort(ui):p.sort(ui),h=Math.min(h,p[0]),f=Math.max(f,p[p.length-1])),h=yi(s,hi(u))||h,f=yi(s,fi(u))||f,h=h===si?+c.startOf(Date.now(),d):h,f=f===ai?+c.endOf(Date.now(),d)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:p,datasets:g,labels:m}},buildTicks:function(){var e,t,n,r=this,i=r.min,o=r.max,a=r.options,s=a.ticks,l=a.time,c=r._timestamps,u=[],d=r.getLabelCapacity(i),h=s.source,f=a.distribution;for(c="data"===h||"auto"===h&&"series"===f?c.data:"labels"===h?c.labels:_i(r,i,o,d),"ticks"===a.bounds&&c.length&&(i=c[0],o=c[c.length-1]),i=yi(r,hi(a))||i,o=yi(r,fi(a))||o,e=0,t=c.length;e=0;--n)(t=l[n].$filler)&&t.visible&&(i=(r=t.el)._view,o=r._children||[],a=t.mapper,s=i.backgroundColor||J.global.defaultColor,a&&s&&o.length&&(ae.canvas.clipArea(c,e.chartArea),Hi(c,o,a,i,s,r._loop),ae.canvas.unclipArea(c)))}},Vi=ae.rtl.getRtlAdapter,Yi=ae.noop,Ui=ae.valueOrDefault;function ji(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}J._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var i=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),o=e.data.datasets;for(i.setAttribute("class",e.id+"-legend"),t=0,n=o.length;t