1(()=>{var ku=Object.create;var cr=Object.defineProperty;var Cu=Object.getOwnPropertyDescriptor;var Au=Object.getOwnPropertyNames;var Du=Object.getPrototypeOf,Lu=Object.prototype.hasOwnProperty;var Pu=(i,t,e)=>t in i?cr(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var Tu=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var Ou=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Au(t))!Lu.call(i,n)&&n!==e&&cr(i,n,{get:()=>t[n],enumerable:!(s=Cu(t,n))||s.enumerable});return i};var pe=(i,t,e)=>(e=i!=null?ku(Du(i)):{},Ou(t||!i||!i.__esModule?cr(e,"default",{value:i,enumerable:!0}):e,i));var C=(i,t,e)=>Pu(i,typeof t!="symbol"?t+"":t,e);var he=Tu(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});var wo=window,ci=wo.requestAnimationFrame||wo.webkitRequestAnimationFrame||wo.mozRequestAnimationFrame||wo.msRequestAnimationFrame||function(i){return setTimeout(i,16)},pc=window,hr=pc.cancelAnimationFrame||pc.mozCancelAnimationFrame||function(i){clearTimeout(i)};function dr(){for(var i,t,e,s=arguments[0]||{},n=1,o=arguments.length;n<o;n++)if((i=arguments[n])!==null)for(t in i)e=i[t],s!==e&&e!==void 0&&(s[t]=e);return s}function me(i){return["true","false"].indexOf(i)>=0?JSON.parse(i):i}function be(i,t,e,s){if(s)try{i.setItem(t,e)}catch(n){}return e}function Eu(){var i=window.tnsId;return window.tnsId=i?i+1:1,"tns"+window.tnsId}function Mo(){var i=document,t=i.body;return t||(t=i.createElement("body"),t.fake=!0),t}var qs=document.documentElement;function ko(i){var t="";return i.fake&&(t=qs.style.overflow,i.style.background="",i.style.overflow=qs.style.overflow="hidden",qs.appendChild(i)),t}function Co(i,t){i.fake&&(i.remove(),qs.style.overflow=t,qs.offsetHeight)}function Ru(){var i=document,t=Mo(),e=ko(t),s=i.createElement("div"),n=!1;t.appendChild(s);try{for(var o="(10px * 10)",a=["calc"+o,"-moz-calc"+o,"-webkit-calc"+o],r,l=0;l<3;l++)if(r=a[l],s.style.width=r,s.offsetWidth===100){n=r.replace(o,"");break}}catch(c){}return t.fake?Co(t,e):s.remove(),n}function Iu(){var i=document,t=Mo(),e=ko(t),s=i.createElement("div"),n=i.createElement("div"),o="",a=70,r=3,l=!1;s.className="tns-t-subp2",n.className="tns-t-ct";for(var c=0;c<a;c++)o+="<div></div>";return n.innerHTML=o,s.appendChild(n),t.appendChild(s),l=Math.abs(s.getBoundingClientRect().left-n.children[a-r].getBoundingClientRect().left)<2,t.fake?Co(t,e):s.remove(),l}function Fu(){if(window.matchMedia||window.msMatchMedia)return!0;var i=document,t=Mo(),e=ko(t),s=i.createElement("div"),n=i.createElement("style"),o="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",a;return n.type="text/css",s.className="tns-mq-test",t.appendChild(n),t.appendChild(s),n.styleSheet?n.styleSheet.cssText=o:n.appendChild(i.createTextNode(o)),a=window.getComputedStyle?window.getComputedStyle(s).position:s.currentStyle.position,t.fake?Co(t,e):s.remove(),a==="absolute"}function zu(i,t){var e=document.createElement("style");return i&&e.setAttribute("media",i),t&&e.setAttribute("nonce",t),document.querySelector("head").appendChild(e),e.sheet?e.sheet:e.styleSheet}function Ne(i,t,e,s){"insertRule"in i?i.insertRule(t+"{"+e+"}",s):i.addRule(t,e,s)}function Nu(i,t){"deleteRule"in i?i.deleteRule(t):i.removeRule(t)}function De(i){var t="insertRule"in i?i.cssRules:i.rules;return t.length}function Bu(i,t){return Math.atan2(i,t)*(180/Math.PI)}function Wu(i,t){var e=!1,s=Math.abs(90-Math.abs(i));return s>=90-t?e="horizontal":s<=t&&(e="vertical"),e}function hi(i,t,e){for(var s=0,n=i.length;s<n;s++)t.call(e,i[s],s)}var ur="classList"in document.createElement("_"),es=ur?function(i,t){return i.classList.contains(t)}:function(i,t){return i.className.indexOf(t)>=0},_t=ur?function(i,t){es(i,t)||i.classList.add(t)}:function(i,t){es(i,t)||(i.className+=" "+t)},$t=ur?function(i,t){es(i,t)&&i.classList.remove(t)}:function(i,t){es(i,t)&&(i.className=i.className.replace(t,""))};function Vs(i,t){return i.hasAttribute(t)}function So(i,t){return i.getAttribute(t)}function _c(i){return typeof i.item!="undefined"}
1function Zt(i,t){if(i=_c(i)||i instanceof Array?i:[i],Object.prototype.toString.call(t)==="[object Object]")for(var e=i.length;e--;)for(var s in t)i[e].setAttribute(s,t[s])}function di(i,t){i=_c(i)||i instanceof Array?i:[i],t=t instanceof Array?t:[t];for(var e=t.length,s=i.length;s--;)for(var n=e;n--;)i[s].removeAttribute(t[n])}function mc(i){for(var t=[],e=0,s=i.length;e<s;e++)t.push(i[e]);return t}function te(i,t){i.style.display!=="none"&&(i.style.display="none")}function ee(i,t){i.style.display==="none"&&(i.style.display="")}function bc(i){return window.getComputedStyle(i).display!=="none"}function js(i){if(typeof i=="string"){var t=[i],e=i.charAt(0).toUpperCase()+i.substr(1),s=["Webkit","Moz","ms","O"];s.forEach(function(r){(r!=="ms"||i==="transform")&&t.push(r+e)}),i=t}var n=document.createElement("fakeelement");i.length;for(var o=0;o<i.length;o++){var a=i[o];if(n.style[a]!==void 0)return a}return!1}function Hu(i){if(!i||!window.getComputedStyle)return!1;var t=document,e=Mo(),s=ko(e),n=t.createElement("p"),o,a=i.length>9?"-"+i.slice(0,-9).toLowerCase()+"-":"";return a+="transform",e.insertBefore(n,null),n.style[i]="translate3d(1px,1px,1px)",o=window.getComputedStyle(n).getPropertyValue(a),e.fake?Co(e,s):n.remove(),o!==void 0&&o.length>0&&o!=="none"}function yc(i,t){var e=!1;return/^Webkit/.test(i)?e="webkit"+t+"End":/^O/.test(i)?e="o"+t+"End":i&&(e=t.toLowerCase()+"end"),e}var vc=!1;try{xc=Object.defineProperty({},"passive",{get:function(){vc=!0}}),window.addEventListener("test",null,xc)}catch(i){}var xc,wc=vc?{passive:!0}:!1;function yt(i,t,e){for(var s in t){var n=["touchstart","touchmove"].indexOf(s)>=0&&!e?wc:!1;i.addEventListener(s,t[s],n)}}function Pt(i,t){for(var e in t){var s=["touchstart","touchmove"].indexOf(e)>=0?wc:!1;i.removeEventListener(e,t[e],s)}}function Vu(){return{topics:{},on:function(i,t){this.topics[i]=this.topics[i]||[],this.topics[i].push(t)},off:function(i,t){if(this.topics[i]){for(var e=0;e<this.topics[i].length;e++)if(this.topics[i][e]===t){this.topics[i].splice(e,1);break}}},emit:function(i,t){t.type=i,this.topics[i]&&this.topics[i].forEach(function(e){e(t,i)})}}}function ju(i,t,e,s,c,o,a){var r=Math.min(o,10),l=c.indexOf("%")>=0?"%":"px",c=c.replace(l,""),h=Number(i.style[t].replace(e,"").replace(s,"").replace(l,"")),d=(c-h)/o*r;setTimeout(u,r);function u(){o-=r,h+=d,i.style[t]=e+h+l+s,o>0?setTimeout(u,r):a()}}Object.keys||(Object.keys=function(i){var t=[];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&t.push(e);return t});"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var Sc=function(i){i=dr({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:!1,autoWidth:!1,viewportMax:!1,slideBy:1,center:!1,controls:!0,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:!1,prevButton:!1,nextButton:!1,nav:!0,navPosition:"top",navContainer:!1,navAsThumbnails:!1,arrowKeys:!1,speed:300,autoplay:!1,autoplayPosition:"top",autoplayTimeout:5e3,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:!1,autoplayButton:!1,autoplayButtonOutput:!0,autoplayResetOnVisibility:!0,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:!1,loop:!0,rewind:!1,autoHeight:!1,responsive:!1,lazyload:!1,lazyloadSelector:".tns-lazy-img",touch:!0,mouseDrag:!1,swipeAngle:15,nested:!1,preventActionWhenRunning:!1,preventScrollOnTouch:!1,freezable:!0,onInit:!1,useLocalStorage:!0,nonce:!1},i||{});var t=document,e=window,s={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},n={},o=i.useLocalStorage;if(o){var a=navigator.userAgent,r=new Date;try{n=e.localStorage,n?(n.setItem(r,r),o=n.getItem(r)==r,n.removeItem(r)):o=!1,o||(n={})}catch(f){o=!1}o&&(n.tnsApp&&n.tnsApp!==a&&["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(f){n.removeItem(f)}),localStorage.tnsApp=a)}var l=n.tC?me(n.tC):be(n,"tC",Ru(),o),c=n.tPL?me(n.tPL):be(n,"tPL",Iu(),o),h=n.tMQ?me(n.tMQ):be(n,"tMQ",Fu(),o),d=n.tTf?me(n.tTf):be(n,"tTf",js("transform"),o),u=n.t3D?me(n.t3D):be(n,"t3D",Hu(d),o),g=n.tTDu?me(n.tTDu):be(n,"tTDu",js("transitionDuration"),o),p=n.tTDe?me(n.tTDe):be(n,"tTDe",js("transitionDelay"),o),b=n.tADu?me(n.tADu):be(n,"tADu",js("animationDuration"),o),y=n.tADe?me(n.tADe):be(n,"tADe",js("animationDelay"),o),x=n.tTE?me(n.tTE):be(n,"tTE",yc(g,"Transition"),o),v=n.tAE?me(n.tAE):be(n,"tAE",yc(b,"Animation"),o),A=e.console&&typeof e.console.warn=="function",k=["container","controlsContainer","prevButton","
1nextButton","navContainer","autoplayButton"],M={};if(k.forEach(function(f){if(typeof i[f]=="string"){var m=i[f],_=t.querySelector(m);if(M[f]=m,_&&_.nodeName)i[f]=_;else{A&&console.warn("Can't find",i[f]);return}}}),i.container.children.length<1){A&&console.warn("No slides found in",i.container);return}var D=i.responsive,L=i.nested,S=i.mode==="carousel";if(D){0 in D&&(i=dr(i,D[0]),delete D[0]);var R={};for(var j in D){var W=D[j];W=typeof W=="number"?{items:W}:W,R[j]=W}D=R,R=null}function Y(f){for(var m in f)S||(m==="slideBy"&&(f[m]="page"),m==="edgePadding"&&(f[m]=!1),m==="autoHeight"&&(f[m]=!1)),m==="responsive"&&Y(f[m])}if(S||Y(i),!S){i.axis="horizontal",i.slideBy="page",i.edgePadding=!1;var ct=i.animateIn,Lt=i.animateOut,Z=i.animateDelay,X=i.animateNormal}var z=i.axis==="horizontal",ot=t.createElement("div"),tt=t.createElement("div"),xt,O=i.container,we=O.parentNode,Ge=O.outerHTML,q=O.children,E=q.length,Kt,Un=Ll(),ms=!1;D&&Hl(),S&&(O.className+=" tns-vpfix");var V=i.autoWidth,I=N("fixedWidth"),gt=N("edgePadding"),G=N("gutter"),Ct=Tl(),Et=N("center"),U=V?1:Math.floor(N("items")),$i=N("slideBy"),Ta=i.viewportMax||i.fixedWidthViewportWidth,Je=N("arrowKeys"),ae=N("speed"),bs=i.rewind,Rt=bs?!1:i.loop,Vt=N("autoHeight"),Se=N("controls"),Qe=N("controlsText"),Me=N("nav"),Ze=N("touch"),ti=N("mouseDrag"),Nt=N("autoplay"),Oa=N("autoplayTimeout"),ei=N("autoplayText"),ii=N("autoplayHoverPause"),si=N("autoplayResetOnVisibility"),st=zu(null,N("nonce")),ys=i.lazyload,qd=i.lazyloadSelector,vt,Yi=[],It=Rt?Xd():0,et=S?E+It*2:E+It,yl=!!((I||V)&&!Rt),Ui=I?Ja():null,Ea=!S||!Rt,Si=z?"left":"top",ni="",Xi="",xs=(function(){return I?function(){return Et&&!Rt?E-1:Math.ceil(-Ui/(I+G))}:V?function(){for(var f=0;f<et;f++)if(vt[f]>=-Ui)return f}:function(){return Et&&S&&!Rt?E-1:Rt||S?Math.max(0,et-Math.ceil(U)):et-1}})(),P=Al(N("startIndex")),oi=P;Cl();var ke=0,Gt=V?null:xs(),Xn=i.preventActionWhenRunning,Kn=i.swipeAngle,Ce=Kn?"?":!0,ai=!1,Ra=i.onInit,At=new Vu,ri=" tns-slider tns-"+i.mode,ut=O.id||Eu(),jt=N("disable"),_s=!1,Gn=i.freezable,re=Gn&&!V?qa():!1,vs=!1,ws={click:li,keydown:mu},Ia={click:cu,keydown:bu},Ss={mouseover:fu,mouseout:gu},Ms={visibilitychange:uu},ks={keydown:pu},Cs={touchstart:cc,touchmove:hc,touchend:vo,touchcancel:vo},As={mousedown:cc,mousemove:hc,mouseup:vo,mouseleave:vo},Jn=Fe("controls"),Fa=Fe("nav"),Ds=V?!0:i.navAsThumbnails,za=Fe("autoplay"),xl=Fe("touch"),_l=Fe("mouseDrag"),Na="tns-slide-active",vl="tns-slide-cloned",Qn="tns-complete",Zn={load:eu,error:iu},Ba,Wa,Ls=i.preventScrollOnTouch==="force";if(Jn)var wt=i.controlsContainer,wl=i.controlsContainer?i.controlsContainer.outerHTML:"",ht=i.prevButton,dt=i.nextButton,$d=i.prevButton?i.prevButton.outerHTML:"",Yd=i.nextButton?i.nextButton.outerHTML:"",Ps,Ts;if(Fa)var Ft=i.navContainer,Sl=i.navContainer?i.navContainer.outerHTML:"",Jt,le=V?E:uc(),Mi=0,ki=-1,Qt=Dl(),Ki=Qt,to="tns-nav-active",Gi="Carousel Page ",Ha=" (Current Slide)";if(za)var Ml=i.autoplayDirection==="forward"?1:-1,pt=i.autoplayButton,kl=i.autoplayButton?i.autoplayButton.outerHTML:"",Os=["<span class='tns-visually-hidden'>"," animation</span>"],eo,qt,io,Ji,so;if(xl||_l)var Ci={},ge={},no,Ai=!1,ce,Va=z?function(f,m){return f.x-m.x}:function(f,m){return f.y-m.y};V||oo(jt||re),d&&(Si=d,ni="translate",u?(ni+=z?"3d(":"3d(0px, ",Xi=z?", 0px, 0px)":", 0px)"):(ni+=z?"X(":"Y(",Xi=")")),S&&(O.className=O.className.replace("tns-vpfix","")),Gd(),Jd(),Rl();function oo(f){f&&(Se=Me=Ze=ti=Je=Nt=ii=si=!1)}function Cl(){for(var f=S?P-It:P;f<0;)f+=E;return f%E+1}function Al(f){return f=f?Math.max(0,Math.min(Rt?E-1:E-U,f)):0,S?f+It:f}function ao(f){for(f==null&&(f=P),S&&(f-=It);f<0;)f+=E;return Math.floor(f%E)}function Dl(){var f=ao(),m;return m=Ds?f:I||V?Math.ceil((f+1)*le/E-1):Math.floor(f/U),!Rt&&S&&P===Gt&&(m=le-1),m}function Ud(){if(V||I&&!Ta)return E-1;var f=I?"fixedWidth":"items",m=[];if((I||i[f]<E)&&m.push(i[f]),D)for(var _ in D){var w=D[_][f];w&&(I||w<E)&&m.push(w)}return m.length||m.push(0),Math.ceil(I?Ta/Math.min.apply(null,m):Math.max.apply(null,m))}function Xd(){var f=Ud(),m=S?Math.ceil((f*5-E)/2):f*4-E;return m=Math.max(f,m),Fe("edgePadding")?m+1:m}function Ll(){return e.innerWidth||t.documentElement.clientWidth||t.body.clientWidth}function ja(f){return f==="top"?"afterbegin":"beforeend"}function Pl(f){if(f!=null){var m=t.createElement("div"),_,w;return f.appendChild(m),_=m.getBoundingClientRect(),w=_.right-_.left,m.remove(),w||Pl(f.parentNode)}}function Tl(){var f=gt?gt*2-G:0;return Pl(we)-f}function Fe(f){if(i[f])return!0;
1if(D){for(var m in D)if(D[m][f])return!0}return!1}function N(f,m){if(m==null&&(m=Un),f==="items"&&I)return Math.floor((Ct+G)/(I+G))||1;var _=i[f];if(D)for(var w in D)m>=parseInt(w)&&f in D[w]&&(_=D[w][f]);return f==="slideBy"&&_==="page"&&(_=N("items")),!S&&(f==="slideBy"||f==="items")&&(_=Math.floor(_)),_}function Kd(f){return l?l+"("+f*100+"% / "+et+")":f*100/et+"%"}function ro(f,m,_,w,T){var F="";if(f!==void 0){var J=f;m&&(J-=m),F=z?"margin: 0 "+J+"px 0 "+f+"px;":"margin: "+f+"px 0 "+J+"px 0;"}else if(m&&!_){var Dt="-"+m+"px",zt=z?Dt+" 0 0":"0 "+Dt+" 0";F="margin: 0 "+zt+";"}return!S&&T&&g&&w&&(F+=Di(w)),F}function lo(f,m,_){return f?(f+m)*et+"px":l?l+"("+et*100+"% / "+_+")":et*100/_+"%"}function co(f,m,_){var w;if(f)w=f+m+"px";else{S||(_=Math.floor(_));var T=S?et:_;w=l?l+"(100% / "+T+")":100/T+"%"}return w="width:"+w,L!=="inner"?w+";":w+" !important;"}function ho(f){var m="";if(f!==!1){var _=z?"padding-":"margin-",w=z?"right":"bottom";m=_+w+": "+f+"px;"}return m}function Ol(f,m){var _=f.substring(0,f.length-m).toLowerCase();return _&&(_="-"+_+"-"),_}function Di(f){return Ol(g,18)+"transition-duration:"+f/1e3+"s;"}function El(f){return Ol(b,17)+"animation-duration:"+f/1e3+"s;"}function Gd(){var f="tns-outer",m="tns-inner";if(Fe("gutter"),ot.className=f,tt.className=m,ot.id=ut+"-ow",tt.id=ut+"-iw",O.id===""&&(O.id=ut),ri+=c||V?" tns-subpixel":" tns-no-subpixel",ri+=l?" tns-calc":" tns-no-calc",V&&(ri+=" tns-autowidth"),ri+=" tns-"+i.axis,O.className+=ri,S?(xt=t.createElement("div"),xt.id=ut+"-mw",xt.className="tns-ovh",ot.appendChild(xt),xt.appendChild(tt)):ot.appendChild(tt),Vt){var _=xt||tt;_.className+=" tns-ah"}if(we.insertBefore(ot,O),tt.appendChild(O),hi(q,function(St,Zi){_t(St,"tns-item"),St.id||(St.id=ut+"-item"+Zi),!S&&X&&_t(St,X),Zt(St,{"aria-hidden":"true",tabindex:"-1"})}),It){for(var w=t.createDocumentFragment(),T=t.createDocumentFragment(),F=It;F--;){var J=F%E,Dt=q[J].cloneNode(!0);if(_t(Dt,vl),di(Dt,"id"),T.insertBefore(Dt,T.firstChild),S){var zt=q[E-1-J].cloneNode(!0);_t(zt,vl),di(zt,"id"),w.appendChild(zt)}}O.insertBefore(w,O.firstChild),O.appendChild(T),q=O.children}}function Rl(){if(Fe("autoHeight")||V||!z){var f=O.querySelectorAll("img");hi(f,function(m){var _=m.src;ys||(_&&_.indexOf("data:image")<0?(m.src="",yt(m,Zn),_t(m,"loading"),m.src=_):Ul(m))}),ci(function(){go(mc(f),function(){Ba=!0})}),Fe("autoHeight")&&(f=Ka(P,Math.min(P+U-1,et-1))),ys?Il():ci(function(){go(mc(f),Il)})}else S&&Rs(),zl(),Nl()}function Il(){if(V&&E>1){var f=Rt?P:E-1;(function m(){var _=q[f].getBoundingClientRect().left,w=q[f-1].getBoundingClientRect().right;Math.abs(_-w)<=1?Fl():setTimeout(function(){m()},16)})()}else Fl()}function Fl(){(!z||V)&&(Jl(),V?(Ui=Ja(),Gn&&(re=qa()),Gt=xs(),oo(jt||re)):tr()),S&&Rs(),zl(),Nl()}function Jd(){if(!S)for(var f=P,m=P+Math.min(E,U);f<m;f++){var _=q[f];_.style.left=(f-P)*100/U+"%",_t(_,ct),$t(_,X)}if(z&&(c||V?(Ne(st,"#"+ut+" > .tns-item","font-size:"+e.getComputedStyle(q[0]).fontSize+";",De(st)),Ne(st,"#"+ut,"font-size:0;",De(st))):S&&hi(q,function(nr,or){nr.style.marginLeft=Kd(or)})),h){if(g){var w=xt&&i.autoHeight?Di(i.speed):"";Ne(st,"#"+ut+"-mw",w,De(st))}w=ro(i.edgePadding,i.gutter,i.fixedWidth,i.speed,i.autoHeight),Ne(st,"#"+ut+"-iw",w,De(st)),S&&(w=z&&!V?"width:"+lo(i.fixedWidth,i.gutter,i.items)+";":"",g&&(w+=Di(ae)),Ne(st,"#"+ut,w,De(st))),w=z&&!V?co(i.fixedWidth,i.gutter,i.items):"",i.gutter&&(w+=ho(i.gutter)),S||(g&&(w+=Di(ae)),b&&(w+=El(ae))),w&&Ne(st,"#"+ut+" > .tns-item",w,De(st))}else{nu(),tt.style.cssText=ro(gt,G,I,Vt),S&&z&&!V&&(O.style.width=lo(I,G,U));var w=z&&!V?co(I,G,U):"";G&&(w+=ho(G)),w&&Ne(st,"#"+ut+" > .tns-item",w,De(st))}if(D&&h)for(var T in D){T=parseInt(T);var F=D[T],w="",J="",Dt="",zt="",St="",Zi=V?null:N("items",T),zs=N("fixedWidth",T),Pi=N("speed",T),ir=N("edgePadding",T),sr=N("autoHeight",T),ts=N("gutter",T);g&&xt&&N("autoHeight",T)&&"speed"in F&&(J="#"+ut+"-mw{"+Di(Pi)+"}"),("edgePadding"in F||"gutter"in F)&&(Dt="#"+ut+"-iw{"+ro(ir,ts,zs,Pi,sr)+"}"),S&&z&&!V&&("fixedWidth"in F||"items"in F||I&&"gutter"in F)&&(zt="width:"+lo(zs,ts,Zi)+";"),g&&"speed"in F&&(zt+=Di(Pi)),zt&&(zt="#"+ut+"{"+zt+"}"),("fixedWidth"in F||I&&"gutter"in F||!S&&"items"in F)&&(St+=co(zs,ts,Zi)),"gutter"in F&&(St
1+=ho(ts)),!S&&"speed"in F&&(g&&(St+=Di(Pi)),b&&(St+=El(Pi))),St&&(St="#"+ut+" > .tns-item{"+St+"}"),w=J+Dt+zt+St,w&&st.insertRule("@media (min-width: "+T/16+"em) {"+w+"}",st.cssRules.length)}}function zl(){if(Ga(),ot.insertAdjacentHTML("afterbegin",'<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">'+Yl()+"</span> of "+E+"</div>"),Wa=ot.querySelector(".tns-liveregion .current"),za){var f=Nt?"stop":"start";pt?Zt(pt,{"data-action":f}):i.autoplayButtonOutput&&(ot.insertAdjacentHTML(ja(i.autoplayPosition),'<button type="button" data-action="'+f+'">'+Os[0]+f+Os[1]+ei[0]+"</button>"),pt=ot.querySelector("[data-action]")),pt&&yt(pt,{click:oc}),Nt&&(_o(),ii&&yt(O,Ss),si&&yt(O,Ms))}if(Fa){if(Ft)Zt(Ft,{"aria-label":"Carousel Pagination"}),Jt=Ft.children,hi(Jt,function(J,Dt){Zt(J,{"data-nav":Dt,tabindex:"-1","aria-label":Gi+(Dt+1),"aria-controls":ut})});else{for(var m="",_=Ds?"":'style="display:none"',w=0;w<E;w++)m+='<button type="button" data-nav="'+w+'" tabindex="-1" aria-controls="'+ut+'" '+_+' aria-label="'+Gi+(w+1)+'"></button>';m='<div class="tns-nav" aria-label="Carousel Pagination">'+m+"</div>",ot.insertAdjacentHTML(ja(i.navPosition),m),Ft=ot.querySelector(".tns-nav"),Jt=Ft.children}if(er(),g){var T=g.substring(0,g.length-18).toLowerCase(),F="transition: all "+ae/1e3+"s";T&&(F="-"+T+"-"+F),Ne(st,"[aria-controls^="+ut+"-item]",F,De(st))}Zt(Jt[Qt],{"aria-label":Gi+(Qt+1)+Ha}),di(Jt[Qt],"tabindex"),_t(Jt[Qt],to),yt(Ft,Ia)}Jn&&(!wt&&(!ht||!dt)&&(ot.insertAdjacentHTML(ja(i.controlsPosition),'<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="'+ut+'">'+Qe[0]+'</button><button type="button" data-controls="next" tabindex="-1" aria-controls="'+ut+'">'+Qe[1]+"</button></div>"),wt=ot.querySelector(".tns-controls")),(!ht||!dt)&&(ht=wt.children[0],dt=wt.children[1]),i.controlsContainer&&Zt(wt,{"aria-label":"Carousel Navigation",tabindex:"0"}),(i.controlsContainer||i.prevButton&&i.nextButton)&&Zt([ht,dt],{"aria-controls":ut,tabindex:"-1"}),(i.controlsContainer||i.prevButton&&i.nextButton)&&(Zt(ht,{"data-controls":"prev"}),Zt(dt,{"data-controls":"next"})),Ps=Zl(ht),Ts=Zl(dt),ec(),wt?yt(wt,ws):(yt(ht,ws),yt(dt,ws))),Ya()}function Nl(){if(S&&x){var f={};f[x]=Ae,yt(O,f)}Ze&&yt(O,Cs,i.preventScrollOnTouch),ti&&yt(O,As),Je&&yt(t,ks),L==="inner"?At.on("outerResized",function(){Wl(),At.emit("innerLoaded",Bt())}):(D||I||V||Vt||!z)&&yt(e,{resize:Bl}),Vt&&(L==="outer"?At.on("innerLoaded",fo):jt||fo()),Ua(),jt?ql():re&&jl(),At.on("indexChanged",Xl),L==="inner"&&At.emit("innerLoaded",Bt()),typeof Ra=="function"&&Ra(Bt()),ms=!0}function Qd(){if(st.disabled=!0,st.ownerNode&&st.ownerNode.remove(),Pt(e,{resize:Bl}),Je&&Pt(t,ks),wt&&Pt(wt,ws),Ft&&Pt(Ft,Ia),Pt(O,Ss),Pt(O,Ms),pt&&Pt(pt,{click:oc}),Nt&&clearInterval(eo),S&&x){var f={};f[x]=Ae,Pt(O,f)}Ze&&Pt(O,Cs),ti&&Pt(O,As);var m=[Ge,wl,$d,Yd,Sl,kl];k.forEach(function(w,T){var F=w==="container"?ot:i[w];if(typeof F=="object"&&F){var J=F.previousElementSibling?F.previousElementSibling:!1,Dt=F.parentNode;F.outerHTML=m[T],i[w]=J?J.nextElementSibling:Dt.firstElementChild}}),k=ct=Lt=Z=X=z=ot=tt=O=we=Ge=q=E=Kt=Un=V=I=gt=G=Ct=U=$i=Ta=Je=ae=bs=Rt=Vt=st=ys=vt=Yi=It=et=yl=Ui=Ea=Si=ni=Xi=xs=P=oi=ke=Gt=Kn=Ce=ai=Ra=At=ri=ut=jt=_s=Gn=re=vs=ws=Ia=Ss=Ms=ks=Cs=As=Jn=Fa=Ds=za=xl=_l=Na=Qn=Zn=Ba=Se=Qe=wt=wl=ht=dt=Ps=Ts=Me=Ft=Sl=Jt=le=Mi=ki=Qt=Ki=to=Gi=Ha=Nt=Oa=Ml=ei=ii=pt=kl=si=Os=eo=qt=io=Ji=so=Ci=ge=no=Ai=ce=Va=Ze=ti=null;for(var _ in this)_!=="rebuild"&&(this[_]=null);ms=!1}function Bl(f){ci(function(){Wl(ze(f))})}function Wl(f){if(ms){L==="outer"&&At.emit("outerResized",Bt(f)),Un=Ll();var m,_=Kt,w=!1;D&&(Hl(),m=_!==Kt,m&&At.emit("newBreakpointStart",Bt(f)));var T,F,J=U,Dt=jt,zt=re,St=Je,Zi=Se,zs=Me,Pi=Ze,ir=ti,sr=Nt,ts=ii,nr=si,or=P;if(m){var yu=I,xu=Vt,_u=Qe,vu=Et,ar=ei;if(!h)var wu=G,Su=gt}if(Je=N("arrowKeys"),Se=N("controls"),Me=N("nav"),Ze=N("touch"),Et=N("center"),ti=N("mouseDrag"),Nt=N("autoplay"),ii=N("autoplayHoverPause"),si=N("autoplayResetOnVisibility"),m&&(jt=N("disable"),I=N("fixedWidth"),ae=N("speed"),Vt=N("autoHeight"),Qe=N("controlsText"),ei=N("autoplayText"),Oa=N("autoplayTimeout"),h||(gt=N("edgePadding"),G=N("gutter"))),oo(jt),Ct=Tl(),(!z||V)&&!jt&&(Jl(),z||(tr(),w=!0)),(I||V)&&
1(Ui=Ja(),Gt=xs()),(m||I)&&(U=N("items"),$i=N("slideBy"),F=U!==J,F&&(!I&&!V&&(Gt=xs()),$a())),m&&jt!==Dt&&(jt?ql():tu()),Gn&&(m||I||V)&&(re=qa(),re!==zt&&(re?(Qa(bo(Al(0))),jl()):(Zd(),w=!0))),oo(jt||re),Nt||(ii=si=!1),Je!==St&&(Je?yt(t,ks):Pt(t,ks)),Se!==Zi&&(Se?wt?ee(wt):(ht&&ee(ht),dt&&ee(dt)):wt?te(wt):(ht&&te(ht),dt&&te(dt))),Me!==zs&&(Me?(ee(Ft),er()):te(Ft)),Ze!==Pi&&(Ze?yt(O,Cs,i.preventScrollOnTouch):Pt(O,Cs)),ti!==ir&&(ti?yt(O,As):Pt(O,As)),Nt!==sr&&(Nt?(pt&&ee(pt),!qt&&!Ji&&_o()):(pt&&te(pt),qt&&Fs())),ii!==ts&&(ii?yt(O,Ss):Pt(O,Ss)),si!==nr&&(si?yt(t,Ms):Pt(t,Ms)),m){if((I!==yu||Et!==vu)&&(w=!0),Vt!==xu&&(Vt||(tt.style.height="")),Se&&Qe!==_u&&(ht.innerHTML=Qe[0],dt.innerHTML=Qe[1]),pt&&ei!==ar){var rr=Nt?1:0,lr=pt.innerHTML,fc=lr.length-ar[rr].length;lr.substring(fc)===ar[rr]&&(pt.innerHTML=lr.substring(0,fc)+ei[rr])}}else Et&&(I||V)&&(w=!0);if((F||I&&!V)&&(le=uc(),er()),T=P!==or,T?(At.emit("indexChanged",Bt()),w=!0):F?T||Xl():(I||V)&&(Ua(),Ga(),$l()),F&&!S&&ou(),!jt&&!re){if(m&&!h&&((gt!==Su||G!==wu)&&(tt.style.cssText=ro(gt,G,I,ae,Vt)),z)){S&&(O.style.width=lo(I,G,U));var Mu=co(I,G,U)+ho(G);Nu(st,De(st)-1),Ne(st,"#"+ut+" > .tns-item",Mu,De(st))}Vt&&fo(),w&&(Rs(),oi=P)}m&&At.emit("newBreakpointEnd",Bt(f))}}function qa(){if(!I&&!V){var f=Et?U-(U-1)/2:U;return E<=f}var m=I?(I+G)*E:vt[E],_=gt?Ct+gt*2:Ct+G;return Et&&(_-=I?(Ct-I)/2:(Ct-(vt[P+1]-vt[P]-G))/2),m<=_}function Hl(){Kt=0;for(var f in D)f=parseInt(f),Un>=f&&(Kt=f)}var $a=(function(){return Rt?S?function(){var f=ke,m=Gt;f+=$i,m-=$i,gt?(f+=1,m-=1):I&&(Ct+G)%(I+G)&&(m-=1),It&&(P>m?P-=E:P<f&&(P+=E))}:function(){if(P>Gt)for(;P>=ke+E;)P-=E;else if(P<ke)for(;P<=Gt-E;)P+=E}:function(){P=Math.max(ke,Math.min(Gt,P))}})();function Ya(){!Nt&&pt&&te(pt),!Me&&Ft&&te(Ft),Se||(wt?te(wt):(ht&&te(ht),dt&&te(dt)))}function Vl(){Nt&&pt&&ee(pt),Me&&Ft&&ee(Ft),Se&&(wt?ee(wt):(ht&&ee(ht),dt&&ee(dt)))}function jl(){if(!vs){if(gt&&(tt.style.margin="0px"),It)for(var f="tns-transparent",m=It;m--;)S&&_t(q[m],f),_t(q[et-m-1],f);Ya(),vs=!0}}function Zd(){if(vs){if(gt&&h&&(tt.style.margin=""),It)for(var f="tns-transparent",m=It;m--;)S&&$t(q[m],f),$t(q[et-m-1],f);Vl(),vs=!1}}function ql(){if(!_s){if(st.disabled=!0,O.className=O.className.replace(ri.substring(1),""),di(O,["style"]),Rt)for(var f=It;f--;)S&&te(q[f]),te(q[et-f-1]);if((!z||!S)&&di(tt,["style"]),!S)for(var m=P,_=P+E;m<_;m++){var w=q[m];di(w,["style"]),$t(w,ct),$t(w,X)}Ya(),_s=!0}}function tu(){if(_s){if(st.disabled=!1,O.className+=ri,Rs(),Rt)for(var f=It;f--;)S&&ee(q[f]),ee(q[et-f-1]);if(!S)for(var m=P,_=P+E;m<_;m++){var w=q[m],T=m<P+U?ct:X;w.style.left=(m-P)*100/U+"%",_t(w,T)}Vl(),_s=!1}}function $l(){var f=Yl();Wa.innerHTML!==f&&(Wa.innerHTML=f)}function Yl(){var f=uo(),m=f[0]+1,_=f[1]+1;return m===_?m+"":m+" to "+_}function uo(f){f==null&&(f=bo());var m=P,_,w,T;if(Et||gt?(V||I)&&(w=-(parseFloat(f)+gt),T=w+Ct+gt*2):V&&(w=vt[P],T=w+Ct),V)vt.forEach(function(zt,St){St<et&&((Et||gt)&&zt<=w+.5&&(m=St),T-zt>=.5&&(_=St))});else{if(I){var F=I+G;Et||gt?(m=Math.floor(w/F),_=Math.ceil(T/F-1)):_=m+Math.ceil(Ct/F)-1}else if(Et||gt){var J=U-1;if(Et?(m-=J/2,_=P+J/2):_=P+J,gt){var Dt=gt*U/Ct;m-=Dt,_+=Dt}m=Math.floor(m),_=Math.ceil(_)}else _=m+U-1;m=Math.max(m,0),_=Math.min(_,et-1)}return[m,_]}function Ua(){if(ys&&!jt){var f=uo();f.push(qd),Ka.apply(null,f).forEach(function(m){if(!es(m,Qn)){var _={};_[x]=function(T){T.stopPropagation()},yt(m,_),yt(m,Zn),m.src=So(m,"data-src");var w=So(m,"data-srcset");w&&(m.srcset=w),_t(m,"loading")}})}}function eu(f){Ul(Qi(f))}function iu(f){su(Qi(f))}function Ul(f){_t(f,"loaded"),Xa(f)}function su(f){_t(f,"failed"),Xa(f)}function Xa(f){_t(f,Qn),$t(f,"loading"),Pt(f,Zn)}function Ka(f,m,_){var w=[];for(_||(_="img");f<=m;)hi(q[f].querySelectorAll(_),function(T){w.push(T)}),f++;return w}function fo(){var f=Ka.apply(null,uo());ci(function(){go(f,Gl)})}function go(f,m){if(Ba||(f.forEach(function(_,w){!ys&&_.complete&&Xa(_),es(_,Qn)&&f.splice(w,1)}),!f.length))return m();ci(function(){go(f,m)})}function Xl(){Ua(),Ga(),$l(),ec(),au()}function nu(){S&&Vt&&(xt.style[g]=ae/1e3+"s")}function Kl(f,m){for(var _=[],w=f,T=Math.min(f+m,et);w<T;w++)_.push(q[w].offsetHeight);return Math.max.apply(null,_)}
1function Gl(){var f=Vt?Kl(P,U):Kl(It,E),m=xt||tt;m.style.height!==f&&(m.style.height=f+"px")}function Jl(){vt=[0];var f=z?"left":"top",m=z?"right":"bottom",_=q[0].getBoundingClientRect()[f];hi(q,function(w,T){T&&vt.push(w.getBoundingClientRect()[f]-_),T===et-1&&vt.push(w.getBoundingClientRect()[m]-_)})}function Ga(){var f=uo(),m=f[0],_=f[1];hi(q,function(w,T){T>=m&&T<=_?Vs(w,"aria-hidden")&&(di(w,["aria-hidden","tabindex"]),_t(w,Na)):Vs(w,"aria-hidden")||(Zt(w,{"aria-hidden":"true",tabindex:"-1"}),$t(w,Na))})}function ou(){for(var f=P+Math.min(E,U),m=et;m--;){var _=q[m];m>=P&&m<f?(_t(_,"tns-moving"),_.style.left=(m-P)*100/U+"%",_t(_,ct),$t(_,X)):_.style.left&&(_.style.left="",_t(_,X),$t(_,ct)),$t(_,Lt)}setTimeout(function(){hi(q,function(w){$t(w,"tns-moving")})},300)}function au(){if(Me&&(Qt=ki>=0?ki:Dl(),ki=-1,Qt!==Ki)){var f=Jt[Ki],m=Jt[Qt];Zt(f,{tabindex:"-1","aria-label":Gi+(Ki+1)}),$t(f,to),Zt(m,{"aria-label":Gi+(Qt+1)+Ha}),di(m,"tabindex"),_t(m,to),Ki=Qt}}function Ql(f){return f.nodeName.toLowerCase()}function Zl(f){return Ql(f)==="button"}function tc(f){return f.getAttribute("aria-disabled")==="true"}function po(f,m,_){f?m.disabled=_:m.setAttribute("aria-disabled",_.toString())}function ec(){if(!(!Se||bs||Rt)){var f=Ps?ht.disabled:tc(ht),m=Ts?dt.disabled:tc(dt),_=P<=ke,w=!bs&&P>=Gt;_&&!f&&po(Ps,ht,!0),!_&&f&&po(Ps,ht,!1),w&&!m&&po(Ts,dt,!0),!w&&m&&po(Ts,dt,!1)}}function mo(f,m){g&&(f.style[g]=m)}function ru(){return I?(I+G)*et:vt[et]}function Es(f){f==null&&(f=P);var m=gt?G:0;return V?(Ct-m-(vt[f+1]-vt[f]-G))/2:I?(Ct-I)/2:(U-1)/2}function Ja(){var f=gt?G:0,m=Ct+f-ru();return Et&&!Rt&&(m=I?-(I+G)*(et-1)-Es():Es(et-1)-vt[et-1]),m>0&&(m=0),m}function bo(f){f==null&&(f=P);var m;if(z&&!V)if(I)m=-(I+G)*f,Et&&(m+=Es());else{var _=d?et:U;Et&&(f-=Es()),m=-f*100/_}else m=-vt[f],Et&&V&&(m+=Es());return yl&&(m=Math.max(m,Ui)),m+=z&&!V&&!I?"%":"px",m}function Rs(f){mo(O,"0s"),Qa(f)}function Qa(f){f==null&&(f=bo()),O.style[Si]=ni+f+Xi}function ic(f,m,_,w){var T=f+U;Rt||(T=Math.min(T,et));for(var F=f;F<T;F++){var J=q[F];w||(J.style.left=(F-P)*100/U+"%"),Z&&p&&(J.style[p]=J.style[y]=Z*(F-f)/1e3+"s"),$t(J,m),_t(J,_),w&&Yi.push(J)}}var lu=(function(){return S?function(){mo(O,""),g||!ae?(Qa(),(!ae||!bc(O))&&Ae()):ju(O,Si,ni,Xi,bo(),ae,Ae),z||tr()}:function(){Yi=[];var f={};f[x]=f[v]=Ae,Pt(q[oi],f),yt(q[P],f),ic(oi,ct,Lt,!0),ic(P,X,ct),(!x||!v||!ae||!bc(O))&&Ae()}})();function Za(f,m){Ea&&$a(),(P!==oi||m)&&(At.emit("indexChanged",Bt()),At.emit("transitionStart",Bt()),Vt&&fo(),qt&&f&&["click","keydown"].indexOf(f.type)>=0&&Fs(),ai=!0,lu())}function sc(f){return f.toLowerCase().replace(/-/g,"")}function Ae(f){if(S||ai){if(At.emit("transitionEnd",Bt(f)),!S&&Yi.length>0)for(var m=0;m<Yi.length;m++){var _=Yi[m];_.style.left="",y&&p&&(_.style[y]="",_.style[p]=""),$t(_,Lt),_t(_,X)}if(!f||!S&&f.target.parentNode===O||f.target===O&&sc(f.propertyName)===sc(Si)){if(!Ea){var w=P;$a(),P!==w&&(At.emit("indexChanged",Bt()),Rs())}L==="inner"&&At.emit("innerLoaded",Bt()),ai=!1,oi=P}}}function Is(f,m){if(!re)if(f==="prev")li(m,-1);else if(f==="next")li(m,1);else{if(ai){if(Xn)return;Ae()}var _=ao(),w=0;if(f==="first"?w=-_:f==="last"?w=S?E-U-_:E-1-_:(typeof f!="number"&&(f=parseInt(f)),isNaN(f)||(m||(f=Math.max(0,Math.min(E-1,f))),w=f-_)),!S&&w&&Math.abs(w)<U){var T=w>0?1:-1;w+=P+w-E>=ke?E*T:E*2*T*-1}P+=w,S&&Rt&&(P<ke&&(P+=E),P>Gt&&(P-=E)),ao(P)!==ao(oi)&&Za(m)}}function li(f,m){if(ai){if(Xn)return;Ae()}var _;if(!m){f=ze(f);for(var w=Qi(f);w!==wt&&[ht,dt].indexOf(w)<0;)w=w.parentNode;var T=[ht,dt].indexOf(w);T>=0&&(_=!0,m=T===0?-1:1)}if(bs){if(P===ke&&m===-1){Is("last",f);return}else if(P===Gt&&m===1){Is("first",f);return}}m&&(P+=$i*m,V&&(P=Math.floor(P)),Za(_||f&&f.type==="keydown"?f:null))}function cu(f){if(ai){if(Xn)return;Ae()}f=ze(f);for(var m=Qi(f),_;m!==Ft&&!Vs(m,"data-nav");)m=m.parentNode;if(Vs(m,"data-nav")){var _=ki=Number(So(m,"data-nav")),w=I||V?_*E/le:_*U,T=Ds?_:Math.min(Math.ceil(w),E-1);Is(T,f),Qt===_&&(qt&&Fs(),ki=-1)}}function yo(){eo=setInterval(function(){li(null,Ml)},Oa),qt=!0}function xo(){clearInterval(eo),qt=!1}function nc(f,m){Zt(pt,{"data-action":f}),pt.innerHTML=Os[0]+f+Os[1]+m}function _o(){yo(),pt&&nc("stop",ei[1])}function Fs(){xo(),pt&&nc("start",ei[0])}function hu(){Nt&&!qt&&(_o(),Ji=!1)}function du(){qt&&(Fs(),Ji=!0)}function oc(){qt?(Fs(),Ji=!0):(_o(),Ji=!1)}
1function uu(){t.hidden?qt&&(xo(),so=!0):so&&(yo(),so=!1)}function fu(){qt&&(xo(),io=!0)}function gu(){io&&(yo(),io=!1)}function pu(f){f=ze(f);var m=[s.LEFT,s.RIGHT].indexOf(f.keyCode);m>=0&&li(f,m===0?-1:1)}function mu(f){f=ze(f);var m=[s.LEFT,s.RIGHT].indexOf(f.keyCode);m>=0&&(m===0?ht.disabled||li(f,-1):dt.disabled||li(f,1))}function ac(f){f.focus()}function bu(f){f=ze(f);var m=t.activeElement;if(Vs(m,"data-nav")){var _=[s.LEFT,s.RIGHT,s.ENTER,s.SPACE].indexOf(f.keyCode),w=Number(So(m,"data-nav"));_>=0&&(_===0?w>0&&ac(Jt[w-1]):_===1?w<le-1&&ac(Jt[w+1]):(ki=w,Is(w,f)))}}function ze(f){return f=f||e.event,Li(f)?f.changedTouches[0]:f}function Qi(f){return f.target||e.event.srcElement}function Li(f){return f.type.indexOf("touch")>=0}function rc(f){f.preventDefault?f.preventDefault():f.returnValue=!1}function lc(){return Wu(Bu(ge.y-Ci.y,ge.x-Ci.x),Kn)===i.axis}function cc(f){if(ai){if(Xn)return;Ae()}Nt&&qt&&xo(),Ai=!0,ce&&(hr(ce),ce=null);var m=ze(f);At.emit(Li(f)?"touchStart":"dragStart",Bt(f)),!Li(f)&&["img","a"].indexOf(Ql(Qi(f)))>=0&&rc(f),ge.x=Ci.x=m.clientX,ge.y=Ci.y=m.clientY,S&&(no=parseFloat(O.style[Si].replace(ni,"")),mo(O,"0s"))}function hc(f){if(Ai){var m=ze(f);ge.x=m.clientX,ge.y=m.clientY,S?ce||(ce=ci(function(){dc(f)})):(Ce==="?"&&(Ce=lc()),Ce&&(Ls=!0)),(typeof f.cancelable!="boolean"||f.cancelable)&&Ls&&f.preventDefault()}}function dc(f){if(!Ce){Ai=!1;return}if(hr(ce),Ai&&(ce=ci(function(){dc(f)})),Ce==="?"&&(Ce=lc()),Ce){!Ls&&Li(f)&&(Ls=!0);try{f.type&&At.emit(Li(f)?"touchMove":"dragMove",Bt(f))}catch(T){}var m=no,_=Va(ge,Ci);if(!z||I||V)m+=_,m+="px";else{var w=d?_*U*100/((Ct+G)*et):_*100/(Ct+G);m+=w,m+="%"}O.style[Si]=ni+m+Xi}}function vo(f){if(Ai){ce&&(hr(ce),ce=null),S&&mo(O,""),Ai=!1;var m=ze(f);ge.x=m.clientX,ge.y=m.clientY;var _=Va(ge,Ci);if(Math.abs(_)){if(!Li(f)){var w=Qi(f);yt(w,{click:function T(F){rc(F),Pt(w,{click:T})}})}S?ce=ci(function(){if(z&&!V){var T=-_*U/(Ct+G);T=_>0?Math.floor(T):Math.ceil(T),P+=T}else{var F=-(no+_);if(F<=0)P=ke;else if(F>=vt[et-1])P=Gt;else for(var J=0;J<et&&F>=vt[J];)P=J,F>vt[J]&&_<0&&(P+=1),J++}Za(f,_),At.emit(Li(f)?"touchEnd":"dragEnd",Bt(f))}):Ce&&li(f,_>0?-1:1)}}i.preventScrollOnTouch==="auto"&&(Ls=!1),Kn&&(Ce="?"),Nt&&!qt&&yo()}function tr(){var f=xt||tt;f.style.height=vt[P+U]-vt[P]+"px"}function uc(){var f=I?(I+G)*E/Ct:E/U;return Math.min(Math.ceil(f),E)}function er(){if(!(!Me||Ds)&&le!==Mi){var f=Mi,m=le,_=ee;for(Mi>le&&(f=le,m=Mi,_=te);f<m;)_(Jt[f]),f++;Mi=le}}function Bt(f){return{container:O,slideItems:q,navContainer:Ft,navItems:Jt,controlsContainer:wt,hasControls:Jn,prevButton:ht,nextButton:dt,items:U,slideBy:$i,cloneCount:It,slideCount:E,slideCountNew:et,index:P,indexCached:oi,displayIndex:Cl(),navCurrentIndex:Qt,navCurrentIndexCached:Ki,pages:le,pagesCached:Mi,sheet:st,isOn:ms,event:f||{}}}return{version:"2.9.4",getInfo:Bt,events:At,goTo:Is,play:hu,pause:du,isOn:ms,updateSliderHeight:Gl,refresh:Rl,destroy:Qd,rebuild:function(){return Sc(dr(i,M))}}};fr.tns=Sc});var Ns=class{elementExists(t){let e=t!==null&&t!=="undefined";return Promise.resolve(e)}handleScroll(){let t=document.body,e=t.scrollTop;window.addEventListener("scroll",function(){t!==null&&t!=="undefined"&&(window.scrollY>=2?t.classList.add("scrolled"):t.classList.remove("scrolled"))})}headerScroll(){let t=document.querySelector(".header-container"),e;window.addEventListener("scroll",function(){e=window.scrollY,e>0&&!t.classList.contains("active")?t.classList.add("active"):e===0&&t.classList.contains("active")&&t.classList.remove("active")})}topbarShowExtraInfo(){let t=document.querySelector("#show-more-btn"),e=document.querySelector(".collapse-top-bar"),s=document.querySelector(".top-bar");e!==null&&typeof e!="undefined"&&t!==null&&typeof t!="undefined"&&(t.addEventListener("click",n=>{t.classList.toggle("collapse-in"),e.classList.toggle("show");let o=document.querySelector(".top-bar");e.style.top=o+"px"}),e.style.top=s.clientHeight+"px",window.addEventListener("resize",()=>{let n=document.querySelector(".top-bar");e.style.top=n.clientHeight+"px"}))}openModal(){let t=this,e=document.getElementById("modal-overlay"),s=document.querySelectorAll(".modal-trigger");this.elementExists(s).then(n=>n?()=>
1{s.forEach(o=>{o.onclick=function(a){a.preventDefault();let r=o.getAttribute("data-modal-id"),l=document.getElementById(r),c=l.getAttribute("data-form-id");if(c){let d=l.querySelector(".modal-form-image"),u=l.querySelector(".modal-form-content"),g='<div class="modal-content bol-container">';g+='<span class="close">×</span>',d!==null&&typeof d!="undefined"&&(g+=`<div class="modal-form-image">${d.innerHTML}</div>`),u!==null&&typeof u!="undefined"&&(g+=`<div class="modal-form-content">${u.innerHTML}</div>`),g+=`<form id="mktoForm_${c}"></form>`,g+=`<div id="thankyou_${c}"></div>`,g+="</div>",e.innerHTML=g,t.buildMarketoForm(c,e,o)}else e.innerHTML=l.innerHTML;e.querySelector(".close").addEventListener("click",()=>{t.closeModal(e)}),setTimeout(()=>{e.classList.add("modal-visible")},300)}})}:()=>!1).then(n=>n())}buildMarketoForm(t,e,s){let n=this;MktoForms2.loadForm("//info.nowsecure.com","201-XEW-873",t,function(o){let a=JSON.parse(localStorage.getItem("roiForm"));if(o.getId()===2561&&a!==null&&typeof a=="object"){let r={};r.ROI_of_mobile_apps__c=a.apps||0,r.ROI_of_builds_per_week__c=a.builds||0,r.ROI_of_mobile_developers__c=a.developers||0,r.ROI_of_mobile_security_analysts__c=a.msa||0,r.ROI_of_pen_tests_annually__c=a.pen_tests||0,r.ROI_number_of_releases_annually__c=a.releases||0,r.ROI_Do_you_have_formal_mobile_security__c=a.training||"No",r.ROI_automated_testing_types__c=[],r.ROI_of_manual_testing_types__c=[],a.dast_automated==="on"&&r.ROI_automated_testing_types__c.push("DAST"),a.sast_automated==="on"&&r.ROI_automated_testing_types__c.push("SAST"),a.pentest_automated==="on"&&r.ROI_automated_testing_types__c.push("Pen Testing"),a.dast_manual==="on"&&r.ROI_of_manual_testing_types__c.push("DAST"),a.sast_manual==="on"&&r.ROI_of_manual_testing_types__c.push("SAST"),a.pentest_manual==="on"&&r.ROI_of_manual_testing_types__c.push("Pen Testing"),o.setValues(r)}o.onSuccess(function(r,l){if(s!==null&&typeof s!="undefined"&&s.classList.contains("print-button"))return n.closeModal(e),window.print(),!1;{let c=document.querySelector(".modal-form-content");return c!==null&&typeof c!="undefined"&&(c.style.display="none"),o.getFormElem().hide(),document.getElementById(`thankyou_${t}`).innerHTML="<strong>Thank you for contacting us!</strong><br><br>Check your inbox for a confirmation. A representative will reach out to you shortly.<br><br>Please allowlist the domain \u201Cnowsecure.com\u201D to ensure their email reaches your inbox.",!1}})})}triggerClose(){let t=this,e=document.getElementById("modal-overlay");this.elementExists(e).then(s=>s?()=>{e.addEventListener("click",n=>n.target.closest(".modal-content")?null:t.closeModal(e)),window.addEventListener("keydown",n=>n.key==="Escape"?t.closeModal(e):null)}:()=>!1).then(s=>s())}closeModal(t){let e=t.querySelector("iframe");t.classList.remove("modal-visible"),setTimeout(()=>{e!==null&&typeof e!="undefined"&&e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),t.innerHTML=""},500)}initSocialShare(t){let e=this;t.addEventListener("click",function(s){s.preventDefault();let n=t.getAttribute("data-social"),o=e.getSocialUrl(t,n);n==="mail"?window.location.href=o:window.open(o,n+"-share-dialog","width=626,height=436")})}getSocialUrl(t,e){let s=this.getSocialParams(e),n="";for(let o=0;o<s.length;o++){let a=t.getAttribute("data-"+s[o]);s[o]==="hashtags"&&(a=encodeURI(a.replace(/\#| /g,""))),a&&(e==="facebook"?n=n+"u="+encodeURIComponent(a)+"&":n=n+s[o]+"="+encodeURIComponent(a)+"&")}return e==="linkedin"&&(n="mini=true&"+n),t.getAttribute("href")+"?"+n}getSocialParams(t){let e=[];switch(t){case"twitter":e=["text","hashtags"];break;case"facebook":case"linkedin":e=["url"];break}return e}handleMenuMobile(){let t=document.querySelector(".navbar-toggler"),e=document.querySelector(".navbar-collapse"),s=document.querySelector("#search-container"),n=document.querySelector(".menu-header-menu-new-container"),o=document.querySelector("#top-bar");t!==null&&t!=="undefined"&&t.addEventListener("click",a=>{a.preventDefault(),a.stopImmediatePropagation(),document.body.classList.toggle("overflow-class"),t.classList.toggle("open"),s.style.display="none",e!==null&&e!=="undefined"&&e.classList.toggle("collapse");let r=0;o&&(r=o.clientHeight),n&&(n.style.maxHeight=window.innerHeight-150-r+"px")})}handleSubMenuMobile(){window.innerWidth<991&&document.querySelectorAll(".sub-menu > .bol-container > li >
1 .click-data").forEach(e=>{let s=e.nextSibling;e!=="undefined"&&!e.classList.contains("main-menu-item-active")&&e.addEventListener("click",n=>{s.nodeName==="UL"?(e.classList.toggle("sub-menu-item-active"),s.classList.toggle("show"),n.preventDefault(),n.stopImmediatePropagation()):window.location.href=e.getAttribute("href")})})}handleSearchBoxMobile(){let t=document.querySelector("#search-btn"),e=document.querySelector("#search-container"),s=document.querySelector(".navbar-collapse"),n=document.querySelector(".navbar-toggler");t!==null&&t!=="undefined"&&t.addEventListener("click",o=>{o.preventDefault(),o.stopImmediatePropagation(),s.classList.remove("collapse"),n.classList.remove("open"),e!==null&&e!=="undefined"&&(t.classList.toggle("search-container-show"),t.classList.contains("search-container-show")?(t.src="https://www.nowsecure.com/wp-content/themes/nowsecure-2022/assets/dist/images/icon_close2.png",e.style.display="block"):(t.src="https://www.nowsecure.com/wp-content/themes/nowsecure-2022/assets/dist/images/icon-search.png",e.style.display="none"))})}closeTopBar(){let t=document.querySelector("#top-bar"),e=document.querySelector("#collapseTopBar");if(t){let s=t.querySelector(".close-container");s&&s.addEventListener("click",n=>{t.remove(),e&&e.remove()})}}openSubMenu(){let t=this,e=document.querySelector("ul.menu");Object.values(e.children).forEach(n=>{n.querySelector("a").addEventListener("click",function(a){let r=document.querySelectorAll("ul.sub-menu.show");a.preventDefault();let l=n.querySelector("ul");l.classList.contains("show")?(this.classList.remove("main-menu-item-active"),l.classList.remove("show")):(r.forEach(c=>{c.classList.remove("show"),c.previousSibling.classList.remove("main-menu-item-active")}),this.classList.add("main-menu-item-active"),l.classList.add("show"))})}),document.addEventListener("click",function(n){t.closeMenuOutsideClick(n.target)})}openFooterMenuMobile(){document.querySelectorAll(".footer-main-menu-holder .widget_nav_menu .footer-widget-title").forEach(e=>{e.addEventListener("click",function(s){let n=this.nextElementSibling;n.classList.contains("active")?(this.classList.remove("open"),n.classList.remove("active")):(this.classList.add("open"),n.classList.add("active"))})})}closeMenuOutsideClick(t){let e=document.querySelector("header"),s=document.querySelectorAll("ul.sub-menu.show");e.contains(t)||s.forEach(n=>{n.classList.remove("show"),n.previousSibling.classList.remove("main-menu-item-active")})}mainMenuIconMobile(){let t=document.querySelectorAll(".menu .menu-item .sub-menu li > a.click-data");window.innerWidth<992&&t.forEach(e=>{e.nextSibling.nodeName==="UL"&&e.classList.add("with-icon")})}printPage(){let t=document.querySelectorAll(".print-button:not(.modal-trigger)");t.length>0&&t.forEach(e=>{e.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),window.print()})})}forceExternalLinksToOpenInNewTab(){let t="nowsecure",e=document.querySelectorAll('a[href^="http"], a[href^="https"], a[href^="//"]'),s=this;e.forEach(function(n){let o=n.getAttribute("href");o&&!s.isInternalLink(o,t)&&n.setAttribute("target","_blank")})}isInternalLink(t,e){return t.startsWith("//")?t=`https:${t}`:t.includes("://")||(t=`https://${t}`),new URL(t).hostname.replace(/^www\./,"").includes(e)}mktoVerifyDomain(){if(typeof MktoForms2=="undefined")return;let t=["@gmail.","@yahoo.","@hotmail.","@live.","@aol.","@outlook.","@icloud.","myyahoo.com"],e=typeof window!="undefined"&&window.bolMarketoProtection?window.bolMarketoProtection:{},s=Array.isArray(e.invalidDomains)?e.invalidDomains:[],n=s.length>0?s:t,o=Array.from(new Set(n.map(r=>typeof r=="string"?r.trim().toLowerCase():"").filter(r=>r.length>0)));MktoForms2.whenReady(function(r){r.onValidate(function(){let l=r.vals().Email;if(l)if(a(l))r.submitable(!0);else{r.submitable(!1);let c=r.getFormElem().find("#Email");r.showErrorMessage("Must be Business email.",c)}})});function a(r){let l=String(r).toLowerCase();for(let c=0;c<o.length;c++){let h=o[c];if(h&&l.indexOf(h)!==-1)return!1}return!0}}init(){let t=document.getElementsByClassName("js-social-share");if(t.length>0){let e=this;for(let s=0;s<t.length;s++)(function(n){e.initSocialShare(t[n])})(s)}this.handleScroll(),this.topbarShowExtraInfo(),this.openModal(),this.triggerClose(),this.handleMenuMobile(),this.handleSubMenuMobile(),this.handleSearchBoxM
1obile(),this.closeTopBar(),this.openSubMenu(),this.openFooterMenuMobile(),this.headerScroll(),this.mainMenuIconMobile(),this.printPage(),this.forceExternalLinksToOpenInNewTab(),this.mktoVerifyDomain()}};var Bs=class{getElements(){let t={},e=document.querySelector(".tags-dropdown-wrapper");return e!==null&&e!=="undefined"&&(t.nav=e,t.placeholder=t.nav.querySelector(":scope > .nav-link"),t.dropdown=t.nav.querySelector(".nav-links")),t}toggleFilterDropDown(){let t=this.getElements();Object.keys(t).length>0&&document.addEventListener("click",function(e){e.target!==t.placeholder&&e.target.parentNode!==t.placeholder&&t.nav.classList.contains("opened")?t.nav.classList.remove("opened"):(e.target===t.placeholder||e.target.parentNode===t.placeholder)&&(t.nav.classList.contains("opened")?t.nav.classList.remove("opened"):t.nav.classList.add("opened"))})}init(){this.toggleFilterDropDown()}};function gc(i){(document.attachEvent?document.readyState==="complete":document.readyState!=="loading")?i():document.addEventListener("DOMContentLoaded",i)}var Ws=class{setMinHeight(){let t=document.querySelectorAll(".js-set-min-height");t&&t.forEach(e=>{let s=e.querySelector(".js-featured-image-holder");s&&s.offsetHeight<e.offsetHeight&&(s.style.minHeight=e.offsetHeight+"px")})}init(){this.setMinHeight()}};var Hs=class{simpleCollapse(){let t=document.getElementsByClassName("collapsible");t&&[...t].forEach(e=>{e.addEventListener("click",s=>{s.target.classList.toggle("active");let n=s.target.parentElement.nextElementSibling;s.target.classList.contains("active")?n.classList.add("opened"):n.classList.remove("opened")})})}multipleCollapse(){let t=document.getElementsByClassName("multiple-collapsible");t&&[...t].forEach(e=>{e.addEventListener("click",s=>{let n=s.target;n.classList.toggle("active");let o=n.getAttribute("data-toggle"),a=document.querySelector(o);n.classList.contains("active")?a.classList.add("opened"):a.classList.remove("opened"),this.getSiblings(n).forEach(r=>{r.classList.remove("active")}),this.getSiblings(a).forEach(r=>{r.classList.remove("opened")})})})}getSiblings(t){let e=[],s=t.parentNode.firstChild;for(;s;)s.nodeType===1&&s!==t&&e.push(s),s=s.nextSibling;return e}init(){this.simpleCollapse(),this.multipleCollapse()}};var Mc=pe(he(),1),$s=class{getCarouselOptions(t,e){return{autoplay:!1,autoWidth:!1,axis:"horizontal",container:t,controls:!1,items:e,nav:!0,slideBy:e,loop:!0,speed:500,gutter:20}}triggerCarousel(){let t=window.innerWidth<768,e=document.querySelectorAll(".bol-block.cards-photo");e.length&&[...e].forEach(s=>{let n=s.getAttribute("data-cards-per-row"),o=s.querySelector(".cards-holder"),a=this.getCarouselOptions(o,n),r=t?(0,Mc.tns)(a):{}})}init(){this.triggerCarousel()}};var Hb=pe(he(),1),Ys=class{setWheelItemHeights(){window.addEventListener("load",function(){let t=document.querySelectorAll(".wheel-item");t.length>0&&t.forEach(e=>{let s=e.querySelector("img"),n=s.clientHeight,o=s.clientWidth;e.style.height=n+"px",e.style.width=o+"px"})})}toggleActiveOnClick(){let t=this,e=document.querySelectorAll(".wheel-item");e.length>0&&e.forEach(s=>{s.addEventListener("click",function(n){n.preventDefault(),t.setActiveItem(s)})})}setActiveItem(t){let e=document.querySelector(".wheel-item.active"),s=document.querySelector(".wheel-card.active");if(e){e.classList.remove("active");let u=e.querySelector("img.wheel-bg"),g=e.querySelector("img.wheel-icon"),p=u.getAttribute("src"),b=g.getAttribute("src"),y=p.replace("-active",""),x=b.replace("-active","");u.setAttribute("src",y),g.setAttribute("src",x)}s&&s.classList.remove("active"),t.classList.add("active");let n=t.getAttribute("data-wheelitem"),o=t.querySelector("img.wheel-bg"),a=t.querySelector("img.wheel-icon"),r=o.getAttribute("src"),l=a.getAttribute("src"),c=r.replace(".png","-active.png"),h=l.replace(".png","-active.png");o.setAttribute("src",c),a.setAttribute("src",h),document.querySelector('.wheel-card[data-wheelitem="'+n+'"]').classList.add("active")}setupRotateWheel(){let t=document.querySelectorAll(".wheel-item"),e=[],s=0;t.length>0&&(t.forEach(n=>{e.push({top:Math.round(n.getBoundingClientRect().y),right:Math.round(n.getBoundingClientRect().x),element:n}),s++}),e.length>0&&e.sort((n,o)=>
1{if(n.top>e[0].top&&n.right>o.right)return-1})),this.autoRotateWheel(e)}autoRotateWheel(t){let e=this,s=0;setInterval(function(){e.setActiveItem(t[s].element),s==3?s=0:s++},9e3)}init(){this.setWheelItemHeights(),this.toggleActiveOnClick(),this.setupRotateWheel()}};var qb=pe(he(),1),Us=class{getCarouselOptions(t,e){return window.innerWidth>991&&(e=3),window.innerWidth<768&&(e=1),{autoplay:!1,autoWidth:!1,axis:"horizontal",container:t,controls:!1,items:e,nav:!0,slideBy:1,loop:!0,speed:500,gutter:20,mouseDrag:!0}}matchCardsHeight(){}triggerCarousel(){console.log("entraaaaaa a a a a a a a a aa a. a a aa. ")}setShortContentButtonsWidth(){document.querySelectorAll(".cta-holder .card-cta a").forEach(e=>{e.innerHTML.length<=3&&(e.style.width="73px",e.style.textAlign="center")})}init(){this.triggerCarousel(),this.matchCardsHeight(),this.setShortContentButtonsWidth()}};var kc=pe(he(),1),Xs=class{getCarouselOptions(t,e){let s=e<6?e:6;return{autoplay:!0,autoWidth:!1,axis:"horizontal",container:t,controls:!1,items:1,nav:!1,slideBy:2,autoplayButton:!1,autoplayButtonOutput:!1,loop:!0,speed:700,gutter:30,mouseDrag:!0,responsive:{576:{items:2},992:{items:s}}}}triggerCarousel(){let t=document.querySelectorAll(".bol-block.image-slider");t.length&&[...t].forEach(e=>{let s=e.querySelector(".gallery-holder"),n=s.children.length,o=this.getCarouselOptions(s,n),a=(0,kc.tns)(o)})}init(){this.triggerCarousel()}};var Cc=pe(he(),1),Ks=class{getQuotesOptions(t){return{autoplay:!0,axis:"horizontal",center:!0,container:t,controls:!1,items:1,nav:!0,slideBy:1,autoplayButton:!1,autoplayButtonOutput:!1,loop:!0,speed:1e3,mouseDrag:!0,responsive:{576:{items:1},992:{items:1}}}}triggerQuotes(){let t=document.querySelectorAll(".bol-block.quote-slider");t.length&&[...t].forEach(e=>{let s=e.querySelector(".bol-slider"),n=this.getQuotesOptions(s),o=(0,Cc.tns)(n)})}init(){this.triggerQuotes()}};var Ac=pe(he(),1),Gs=class{getCarouselOptions(t){return{autoplay:!0,autoWidth:!1,axis:"horizontal",container:t,controls:!1,items:2,nav:!1,slideBy:2,autoplayButton:!1,autoplayButtonOutput:!1,loop:!0,speed:700,gutter:30,mouseDrag:!0}}triggerCarousel(){let t=document.querySelectorAll(".bol-block.logos");t.length&&[...t].forEach(e=>{let s=e.querySelector(".gallery-holder"),n=this.getCarouselOptions(s),o=(0,Ac.tns)(n)})}init(){this.triggerCarousel()}};var Dc=pe(he(),1),Js=class{getCustomPostsOptions(t){return{autoplay:!1,axis:"horizontal",center:!0,container:t,controls:!1,items:1,nav:!0,slideBy:1,autoplayButton:!1,autoplayButtonOutput:!1,loop:!0,speed:1e3,mouseDrag:!0,responsive:{576:{items:1},992:{items:1}}}}triggerCustomPosts(){let t=document.querySelectorAll(".custom-posts-slider");t.length&&[...t].forEach(e=>{let s=e.querySelector(".bol-slider"),n=this.getCustomPostsOptions(s),o=(0,Dc.tns)(n)})}init(){this.triggerCustomPosts()}};var Qs=class{triggerFade(){let t=document.querySelector(".hero-images-holder");if(t!==null&&t!=="undefined"){let e=0,s=t.getElementsByClassName("bg-image");setInterval(function(){for(let n=0;n<s.length;n++)s[n].style.opacity=0,s[n].style.transform="scale(1.2)";e=e!==s.length-1?e+1:0,s[e].style.opacity=1,s[e].style.transform="scale(1)"},3e3)}}init(){this.triggerFade()}};var Zs=class{getAllStatsBlocks(){return document.querySelectorAll(".bol-block.stats")}getAllStatsInBlock(t){if(t)return t.querySelectorAll(".stats-number")}allowAnimation(t){let e=this;if(t){let s=!1,n=document.querySelector(".site-header").clientHeight,o=e.getAllStatsInBlock(t);o.length>0&&o.forEach(r=>{e.preAnimate(r.children[0])});let a=()=>{let r=t.getBoundingClientRect();r.bottom>0+n&&r.top<window.innerHeight&&!s&&(o.forEach(c=>{e.statAnimate(c.children[0])}),s=!0)};a(),["scroll","resize"].forEach(r=>{window.addEventListener(r,a)})}}formatWithCommas(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}preAnimate(t){if(t){let e=parseFloat(t.innerHTML);e-Math.floor(e)!==0||(e=parseInt(e,10)),t.innerHTML=0,t.setAttribute("data-goalValue",e)}}statAnimate(t){let s=parseFloat(t.getAttribute("data-goalvalue")),n=s/65,o=0,a=setInterval(()=>{if(o<s)if(o+=n,o=o>s?s:o,o>100)t.innerHTML=this.formatWithCommas(Math.trunc(o));else{let r=o-Math.floor(o)!==0;t.innerHTML=r?o.toFixed(1):this.formatWithCommas(Math.trunc(o))}else clearInterval(a)},50)}init(){let t=this,e=this.getAllStatsBlocks();e.length>0&&e.forEach(s=>{t.allowAnimation(s)})}};var tn=class{getSliders(){let t=document.querySelectorAll(".bol-slider");
1t?t.forEach(e=>{let s=e.querySelectorAll(".slide");if(s){s[0].style.display="block";let n=e.querySelector(".navigation"),o=0;s.forEach(a=>{let r=document.createElement("div");r.classList.add("slider-dot"),n.appendChild(r),o==0&&r.classList.add("active"),o++})}else console.error("There are no existing slides for this slider.")}):console.error("There are no sliders that exist on this page")}init(){}};var Lc=pe(he(),1),en=class{getCardsOptions(t){return{autoplay:!1,autoWidth:!1,axis:"horizontal",container:t,controls:!1,items:1,nav:!0,slideBy:1,speed:500,gutter:20,mouseDrag:!0,loop:!1,center:!0}}matchCardsHeight(){let t=document.querySelectorAll(".bol-block.resource-cards");t.length&&setTimeout(()=>{[...t].forEach(e=>{let s=e.querySelectorAll(".card-resource");this.matchHeight(e,s,".card-info"),this.matchHeight(e,s,".card-title")})},200)}matchHeight(t,e,s){let n=[];[...e].forEach(r=>{let l=r.querySelector(s);n.push(l.offsetHeight)});let o=Math.max(...n);t.querySelectorAll(s).forEach(function(r){r.style.height=o+"px"})}triggerCarousel(){let t=document.querySelectorAll(".bol-block.resource-cards");t.length&&[...t].forEach(e=>{let s=e.querySelector(".resources-cards.card-count-4"),n=window.innerWidth<(s?1200:992),o=e.querySelector(".resources-cards"),a=this.getCardsOptions(o),r=n?(0,Lc.tns)(a):{}})}init(){this.triggerCarousel(),this.matchCardsHeight()}};var Pc=pe(he(),1),sn=class{getCardsOptions(t){return{autoplay:!1,autoWidth:!1,axis:"horizontal",container:t,controls:!1,items:1,nav:!0,slideBy:1,speed:500,gutter:20,mouseDrag:!0,loop:!1,center:!0}}triggerCarousel(){let t=window.innerWidth<992,e=document.querySelectorAll(".bol-block.tabs");e.length&&[...e].forEach(s=>{let n=s.querySelectorAll(".resources-cards");n.length&&[...n].forEach(o=>{let a=this.getCardsOptions(o),r=t?(0,Pc.tns)(a):{}})})}init(){this.triggerCarousel()}};var Tc=pe(he(),1),nn=class{getCardsOptions(t){return{autoplay:!1,autoWidth:!1,axis:"horizontal",container:t,controls:!1,items:4,nav:!1,slideBy:1,speed:500,gutter:20,mouseDrag:!0,loop:!1,center:!0}}triggerCarousel(){let t=window.innerWidth<992,e=document.querySelectorAll(".tab-selector");e.length&&[...e].forEach(s=>{let n=s.querySelector("ul.tab-selector-list"),o=this.getCardsOptions(n),a=t?(0,Tc.tns)(o):{}})}init(){this.triggerCarousel()}};var on=class{constructor(){C(this,"form","");C(this,"formInputs","");C(this,"formSteps","");C(this,"formNavigation","");C(this,"range","");C(this,"navigationButtons","");C(this,"navigationSteps","");C(this,"releasesInput","");C(this,"penTestsInput","");C(this,"resultsPage","");let t=this;this.form=document.querySelector(".roi-form"),this.form!==null&&typeof this.form!="undefined"&&(this.formInputs=this.form.querySelectorAll(".form-content input"),this.formSteps=this.form.querySelectorAll(".form-step"),this.formNavigation=this.form.querySelectorAll(".form-steps li"),this.range=this.form.querySelectorAll(".form-box-input-range"),this.navigationButtons=this.form.querySelectorAll(".form-navigation button"),this.navigationSteps=this.form.querySelectorAll(".form-steps li a"),this.releasesInput=this.form.querySelector("#releases"),this.penTestsInput=this.form.querySelector("#pen_tests"),this.resultsPage=this.form.querySelector("#results_page"))}checkLocalStorage(){if(localStorage.getItem("roiForm")){let t=JSON.parse(localStorage.getItem("roiForm"));this.formInputs.length>0&&this.formInputs.forEach(s=>{s.type==="checkbox"?s.checked=t[s.name]==="on":s.type==="radio"?s.checked=s.value===t[s.name]:s.value=t[s.name]});let e=t.step;(e==="4"||e==="submit")&&(e="3"),e&&(this.setActiveStep(e),this.setNavigationActive(e),this.setCompletedNavigation(e))}}setLocalStorage(t){this.formInputs.length>0&&this.formInputs.forEach(s=>{this.setOrUpdateLocalStorage(s)});let e=JSON.parse(localStorage.getItem("roiForm"))||{};e.step=t,localStorage.setItem("roiForm",JSON.stringify(e))}setLocalStorageOnInputChange(){this.formInputs.length>0&&this.formInputs.forEach(t=>{t.addEventListener("change",()=>{this.setOrUpdateLocalStorage(t)})})}setOrUpdateLocalStorage(t){let e=JSON.parse(localStorage.getItem("roiForm"))||{};t.type==="checkbox"?e[t.name]=t.checked?"on":"off":t.type==="radio"?t.checked&&(e[t.name]=t.value):e[t.name]=t.value,localStorage.setItem("roiForm",JSON.stringify(e))}navigateForm(t){let e=t.currentTarget.dataset.step,s=document.querySelector(".form-step.active");if(e&&s){let n=s.dataset.step;this.checkStepValidity(n)&&(this.setLocalStorage(e),this.setActiveStep(e),this.setNavigationActive(e),this.setCompletedNavigation(e),(e==="4"||e==="submit"&&this.checkStepValidity("3"))&&this.redirectToResultsPage())}}checkStepValidity(t){let e=document.querySelector(`.form-step[data-step="${t}"]`);if(!e)return!1;let s=e.querySelectorAll("input"),n=e.querySelectorAll("select"),o=e.querySelector(".form-step-error-message"),a=!0;
1return s.forEach(r=>{r.checkValidity()||(a=!1)}),n.forEach(r=>{r.checkValidity()||(a=!1)}),t==="3"&&(a=Number(this.penTestsInput.value)<=Number(this.releasesInput.value)),a?o.classList.remove("active"):(t==="3"&&(o.textContent="Penetration tests must be less than or equal to releases"),o.classList.add("active")),a}setActiveStep(t){let e=document.querySelector(`.form-step[data-step = "${t}"]`);e&&this.formSteps.length>0&&(this.formSteps.forEach(s=>{s.classList.remove("active")}),e.classList.add("active"),this.setRangeValueOnLoad())}setNavigationActive(t){let e=document.querySelector(`.form-steps li[data-step = "${t}"]`);e&&this.formNavigation.length>0&&(this.formNavigation.forEach(s=>{s.classList.remove("active")}),e.classList.add("active"),e.classList.remove("completed"))}setCompletedNavigation(t){t&&this.formNavigation.length>0&&this.formNavigation.forEach(e=>{e.dataset.step<t?e.classList.add("completed"):e.classList.remove("completed")})}setCurrentRangeValue(){this.range.length>0&&this.range.forEach(t=>{let e=t.nextElementSibling;e.innerHTML=t.value,t.addEventListener("input",()=>{e.innerHTML=t.value,this.setRangeValuePosition(t)})})}setRangeValueOnLoad(){this.range.length>0&&this.range.forEach(t=>{let e=t.nextElementSibling;e.innerHTML=t.value,this.setRangeValuePosition(t,t.value)})}setRangeValuePosition(t,e){e=e||t.value;let s=8,n=t.nextElementSibling,o=t.offsetWidth,a=n.offsetWidth,r=(e-t.min)/(t.max-t.min)*(o-s-s)+s-a/2;n.style.left=`${r}px`}calculateDistanceBetweenNodes(t,e){let s=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=s.left-n.left,a=s.top-n.top;return Math.sqrt(o*o+a*a)}drawLine(){this.formNavigation.length>0&&this.formNavigation.forEach((t,e)=>{if(e<this.formNavigation.length-1){let s=t.querySelector(".step-number"),n=t.dataset.step,o=document.querySelector(`.form-steps li[data-step = "${Number(n)+1}"] .step-number`);if(s&&o){let a=this.calculateDistanceBetweenNodes(s,o),r=s.querySelector("span");r.style.width=`${a-40}px`}}})}redirectToResultsPage(){this.resultsPage&&(window.location.href=this.resultsPage.value)}init(){let t=document.querySelector(".roi-form-block");t!==null&&typeof t!="undefined"&&(this.setCurrentRangeValue(),this.checkLocalStorage(),this.setRangeValueOnLoad(),this.drawLine(),this.setLocalStorageOnInputChange(),this.formInputs.forEach(e=>{e.addEventListener("input",()=>{let s=e.closest(".form-step").dataset.step;this.checkStepValidity(s)})}),this.navigationButtons.length>0&&this.navigationButtons.forEach(e=>{e.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),this.navigateForm(s)})}),this.navigationSteps.length>0&&this.navigationSteps.forEach(e=>{e.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),this.navigateForm(s)})}),window.addEventListener("resize",()=>{this.drawLine()}))}};function ln(i){return i+.5|0}var ui=(i,t,e)=>Math.max(Math.min(i,e),t);function an(i){return ui(ln(i*2.55),0,255)}function fi(i){return ui(ln(i*255),0,255)}function Be(i){return ui(ln(i/2.55)/100,0,1)}function Oc(i){return ui(ln(i*100),0,100)}var de={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},pr=[..."0123456789ABCDEF"],qu=i=>pr[i&15],$u=i=>pr[(i&240)>>4]+pr[i&15],Ao=i=>(i&240)>>4===(i&15),Yu=i=>Ao(i.r)&&Ao(i.g)&&Ao(i.b)&&Ao(i.a);function Uu(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&de[i[1]]*17,g:255&de[i[2]]*17,b:255&de[i[3]]*17,a:t===5?de[i[4]]*17:255}:(t===7||t===9)&&(e={r:de[i[1]]<<4|de[i[2]],g:de[i[3]]<<4|de[i[4]],b:de[i[5]]<<4|de[i[6]],a:t===9?de[i[7]]<<4|de[i[8]]:255})),e}var Xu=(i,t)=>i<255?t(i):"";function Ku(i){var t=Yu(i)?qu:$u;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Xu(i.a,t):void 0}var Gu=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Fc(i,t,e){let s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Ju(i,t,e){let s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function Qu(i,t,e){let s=Fc(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Zu(i,t,e,s,n){return i===n?(t-e)/s+(t<e?6:0):t===n?(e-i)/s+2:(i-t)/s+4}function mr(i){let e=i.r/255,s=i.g/255,n=i.b/255,o=Math.max(e,s,n),a=Math.min(e,s,n),r=(o+a)/2,l,c,h;return o!==a&&(h=o-a,c=r>.5?h/(2-o-a):h/(o+a),l=Zu(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function br(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(fi)}function yr(i,t,e){return br(Fc,i,t,e)}function tf(i,t,e){return br(Qu,i,t,e)}
1function ef(i,t,e){return br(Ju,i,t,e)}function zc(i){return(i%360+360)%360}function sf(i){let t=Gu.exec(i),e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?an(+t[5]):fi(+t[5]));let n=zc(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=tf(n,o,a):t[1]==="hsv"?s=ef(n,o,a):s=yr(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function nf(i,t){var e=mr(i);e[0]=zc(e[0]+t),e=yr(e),i.r=e[0],i.g=e[1],i.b=e[2]}function of(i){if(!i)return;let t=mr(i),e=t[0],s=Oc(t[1]),n=Oc(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${Be(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}var Ec={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Rc={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function af(){let i={},t=Object.keys(Rc),e=Object.keys(Ec),s,n,o,a,r;for(s=0;s<t.length;s++){for(a=r=t[s],n=0;n<e.length;n++)o=e[n],r=r.replace(o,Ec[o]);o=parseInt(Rc[a],16),i[r]=[o>>16&255,o>>8&255,o&255]}return i}var Do;function rf(i){Do||(Do=af(),Do.transparent=[0,0,0,0]);let t=Do[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var lf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function cf(i){let t=lf.exec(i),e=255,s,n,o;if(t){if(t[7]!==s){let a=+t[7];e=t[8]?an(a):ui(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?an(s):ui(s,0,255)),n=255&(t[4]?an(n):ui(n,0,255)),o=255&(t[6]?an(o):ui(o,0,255)),{r:s,g:n,b:o,a:e}}}function hf(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Be(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var gr=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,is=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function df(i,t,e){let s=is(Be(i.r)),n=is(Be(i.g)),o=is(Be(i.b));return{r:fi(gr(s+e*(is(Be(t.r))-s))),g:fi(gr(n+e*(is(Be(t.g))-n))),b:fi(gr(o+e*(is(Be(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Lo(i,t,e){if(i){let s=mr(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=yr(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Nc(i,t){return i&&Object.assign(t||{},i)}function Ic(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=fi(i[3]))):(t=Nc(i,{r:0,g:0,b:0,a:1}),t.a=fi(t.a)),t}
1function uf(i){return i.charAt(0)==="r"?cf(i):sf(i)}var rn=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,s;e==="object"?s=Ic(t):e==="string"&&(s=Uu(t)||rf(t)||uf(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Nc(this._rgb);return t&&(t.a=Be(t.a)),t}set rgb(t){this._rgb=Ic(t)}rgbString(){return this._valid?hf(this._rgb):void 0}hexString(){return this._valid?Ku(this._rgb):void 0}hslString(){return this._valid?of(this._rgb):void 0}mix(t,e){if(t){let s=this.rgb,n=t.rgb,o,a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=df(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=fi(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=ln(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Lo(this._rgb,2,t),this}darken(t){return Lo(this._rgb,2,-t),this}saturate(t){return Lo(this._rgb,1,t),this}desaturate(t){return Lo(this._rgb,1,-t),this}rotate(t){return nf(this._rgb,t),this}};function _e(){}var wr=(()=>{let i=0;return()=>i++})();function H(i){return i==null}function at(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function $(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function ft(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Ht(i,t){return ft(i)?i:t}function B(i,t){return typeof i=="undefined"?t:i}var Sr=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Io=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function it(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function Q(i,t,e,s){let n,o,a;if(at(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;n<o;n++)t.call(e,i[n],n);else if($(i))for(a=Object.keys(i),o=a.length,n=0;n<o;n++)t.call(e,i[a[n]],a[n])}function os(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function hn(i){if(at(i))return i.map(hn);if($(i)){let t=Object.create(null),e=Object.keys(i),s=e.length,n=0;for(;n<s;++n)t[e[n]]=hn(i[e[n]]);return t}return i}function Xc(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Kc(i,t,e,s){if(!Xc(i))return;let n=t[i],o=e[i];$(n)&&$(o)?ie(n,o,s):t[i]=hn(o)}function ie(i,t,e){let s=at(t)?t:[t],n=s.length;if(!$(i))return i;e=e||{};let o=e.merger||Kc,a;for(let r=0;r<n;++r){if(a=s[r],!$(a))continue;let l=Object.keys(a);for(let c=0,h=l.length;c<h;++c)o(l[c],i,a,e)}return i}function Ei(i,t){return ie(i,t,{merger:Gc})}function Gc(i,t,e){if(!Xc(i))return;let s=t[i],n=e[i];$(s)&&$(n)?Ei(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=hn(n))}var Bc={"":i=>i,x:i=>i.x,y:i=>i.y};function Jc(i){let t=i.split("."),e=[],s="";for(let n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function ff(i){let t=Jc(i);return e=>{for(let s of t){if(s==="")break;e=e&&e[s]}return e}}function Te(i,t){return(Bc[t]||(Bc[t]=ff(t)))(i)}function fn(i){return i.charAt(0).toUpperCase()+i.slice(1)}var Ri=i=>typeof i!="undefined",Le=i=>typeof i=="function",Fo=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function Mr(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var K=Math.PI,rt=2*K,Qc=rt+K,dn=Number.POSITIVE_INFINITY,Zc=K/180,mt=K/2,gi=K/4,_r=K*2/3,Pe=Math.log10,ue=Math.sign;function Ii(i,t,e){return Math.abs(i-t)<e}function zo(i){let t=Math.round(i);i=Ii(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(Pe(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function kr(i){let t=[],e=Math.sqrt(i),s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function gf(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function bi(i){return!gf(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Cr(i,t){let e=Math.round(i);return e-t<=i&&e+t>=i}function No(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function se(i){return i*(K/180)}function gn(i){return i*(180/K)}
1function Bo(i){if(!ft(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Wo(i,t){let e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s),o=Math.atan2(s,e);return o<-.5*K&&(o+=rt),{angle:o,distance:n}}function un(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function th(i,t){return(i-t+Qc)%rt-K}function Tt(i){return(i%rt+rt)%rt}function Fi(i,t,e,s){let n=Tt(i),o=Tt(t),a=Tt(e),r=Tt(o-n),l=Tt(a-n),c=Tt(n-o),h=Tt(n-a);return n===o||n===a||s&&o===a||r>l&&c<h}function Mt(i,t,e){return Math.max(t,Math.min(e,i))}function Ar(i){return Mt(i,-32768,32767)}function ve(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function pn(i,t,e){e=e||(a=>i[a]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}var ye=(i,t,e,s)=>pn(i,e,s?n=>{let o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),Dr=(i,t,e)=>pn(i,e,s=>i[s][t]>=e);function Lr(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}var eh=["push","pop","shift","splice","unshift"];function Pr(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),eh.forEach(e=>{let s="_onData"+fn(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){let a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ho(i,t){let e=i._chartjs;if(!e)return;let s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(eh.forEach(o=>{delete i[o]}),delete i._chartjs)}function Vo(i){let t=new Set(i);return t.size===i.length?i:Array.from(t)}var jo=(function(){return typeof window=="undefined"?function(i){return i()}:window.requestAnimationFrame})();function qo(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,jo.call(window,()=>{s=!1,i.apply(t,e)}))}}function Tr(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}var mn=i=>i==="start"?"left":i==="end"?"right":"center",Ot=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Or=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function $o(i,t,e){let s=t.length,n=0,o=s;if(i._sorted){let{iScale:a,vScale:r,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=a.axis,{min:d,max:u,minDefined:g,maxDefined:p}=a.getUserBounds();if(g){if(n=Math.min(ye(l,h,d).lo,e?s:ye(t,h,a.getPixelForValue(d)).lo),c){let b=l.slice(0,n+1).reverse().findIndex(y=>!H(y[r.axis]));n-=Math.max(0,b)}n=Mt(n,0,s-1)}if(p){let b=Math.max(ye(l,a.axis,u,!0).hi+1,e?0:ye(t,h,a.getPixelForValue(u),!0).hi+1);if(c){let y=l.slice(b-1).findIndex(x=>!H(x[r.axis]));b+=Math.max(0,y)}o=Mt(b,n,s)-n}else o=s-n}return{start:n,count:o}}function Yo(i){let{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;let o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}var Po=i=>i===0||i===1,Wc=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*rt/e)),Hc=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*rt/e)+1,Ti={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*mt)+1,easeOutSine:i=>Math.sin(i*mt),easeInOutSine:i=>-.5*(Math.cos(K*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Po(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Po(i)?i:Wc(i,.075,.3),easeOutElastic:i=>Po(i)?i:Hc(i,.075,.3),easeInOutElastic(i){return Po(i)?i:i<.5?.5*Wc(i*2,.1125,.45):.5+.5*Hc(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ti.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ti.easeInBounce(i*2)*.5:Ti.easeOutBounce(i*2-1)*.5+.5};function Uo(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Xo(i){return Uo(i)?i:new rn(i)}function Eo(i){return Uo(i)?i:new rn(i).saturate(.5).darken(.1).hexString()}var pf=["x","y","borderWidth","radius","tension"],mf=["color","borderColor","backgroundColor"];function bf(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:mf},numbers:{type:"number",properties:pf}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function yf(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Vc=new Map;function xf(i,t){t=t||{};let e=i+JSON.stringify(t),s=Vc.get(e);return s||(s=new Intl.NumberFormat(i,t),Vc.set(e,s)),s}function zi(i,t,e){return xf(t,e).format(i)}var ih={values(i){return at(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let s=this.chart.options.locale,n,o=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=_f(i,e)}let a=Pe(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),zi(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";let s=e[t].significand||i/Math.pow(10,Math.floor(Pe(i)));return[1,2,3,5,10,15].includes(s)||t>
1.8*e.length?ih.numeric.call(this,i,t,e):""}};function _f(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var bn={formatters:ih};function vf(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:bn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}var yi=Object.create(null),Ko=Object.create(null);function cn(i,t){if(!t)return i;let e=t.split(".");for(let s=0,n=e.length;s<n;++s){let o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function xr(i,t,e){return typeof t=="string"?ie(cn(i,t),e):ie(cn(i,""),t)}var vr=class{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Eo(n.backgroundColor),this.hoverBorderColor=(s,n)=>Eo(n.borderColor),this.hoverColor=(s,n)=>Eo(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={}
1,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return xr(this,t,e)}get(t){return cn(this,t)}describe(t,e){return xr(Ko,t,e)}override(t,e){return xr(yi,t,e)}route(t,e,s,n){let o=cn(this,t),a=cn(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[r],c=a[n];return $(l)?Object.assign({},c,l):B(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}},lt=new vr({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[bf,yf,vf]);function sh(i){return!i||H(i.size)||H(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ss(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function Er(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0,r=e.length,l,c,h,d,u;for(l=0;l<r;l++)if(d=e[l],d!=null&&!at(d))a=ss(i,n,o,a,d);else if(at(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!at(u)&&(a=ss(i,n,o,a,u));i.restore();let g=o.length/2;if(g>e.length){for(l=0;l<g;l++)delete n[o[l]];o.splice(0,g)}return a}function He(i,t,e){let s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function Go(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function yn(i,t,e,s){Jo(i,t,e,s,null)}function Jo(i,t,e,s,n){let o,a,r,l,c,h,d,u,g=t.pointStyle,p=t.rotation,b=t.radius,y=(p||0)*Zc;if(g&&typeof g=="object"&&(o=g.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(y),i.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),i.restore();return}if(!(isNaN(b)||b<=0)){switch(i.beginPath(),g){default:n?i.ellipse(e,s,n/2,b,0,0,rt):i.arc(e,s,b,0,rt),i.closePath();break;case"triangle":h=n?n/2:b,i.moveTo(e+Math.sin(y)*h,s-Math.cos(y)*b),y+=_r,i.lineTo(e+Math.sin(y)*h,s-Math.cos(y)*b),y+=_r,i.lineTo(e+Math.sin(y)*h,s-Math.cos(y)*b),i.closePath();break;case"rectRounded":c=b*.516,l=b-c,a=Math.cos(y+gi)*l,d=Math.cos(y+gi)*(n?n/2-c:l),r=Math.sin(y+gi)*l,u=Math.sin(y+gi)*(n?n/2-c:l),i.arc(e-d,s-r,c,y-K,y-mt),i.arc(e+u,s-a,c,y-mt,y),i.arc(e+d,s+r,c,y,y+mt),i.arc(e-u,s+a,c,y+mt,y+K),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*b,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}y+=gi;case"rectRot":d=Math.cos(y)*(n?n/2:b),a=Math.cos(y)*b,r=Math.sin(y)*b,u=Math.sin(y)*(n?n/2:b),i.moveTo(e-d,s-r),i.lineTo(e+u,s-a),i.lineTo(e+d,s+r),i.lineTo(e-u,s+a),i.closePath();break;case"crossRot":y+=gi;case"cross":d=Math.cos(y)*(n?n/2:b),a=Math.cos(y)*b,r=Math.sin(y)*b,u=Math.sin(y)*(n?n/2:b),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"star":d=Math.cos(y)*(n?n/2:b),a=Math.cos(y)*b,r=Math.sin(y)*b,u=Math.sin(y)*(n?n/2:b),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a),y+=gi,d=Math.cos(y)*(n?n/2:b),a=Math.cos(y)*b,r=Math.sin(y)*b,u=Math.sin(y)*(n?n/2:b),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"line":a=n?n/2:Math.cos(y)*b,r=Math.sin(y)*b,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(y)*(n?n/2:b),s+Math.sin(y)*b);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function xe(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function as(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function rs(i){i.restore()}function Rr(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){let o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Ir(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function wf(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),H(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function Sf(i,t,e,s,n){if(n.strikethrough||n.underline){let o=i.measureText(s),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(a,h),i.lineTo(r,h),i.stroke()}}function Mf(i,t){let e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Ve(i,t,e,s,n,o={}){let a=at(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(i.save(),i.font=n.string,wf(i,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Mf(i,o.backdrop),r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),H(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),Sf(i,e,s,c,o),s+=Number(n.lineHeight);
1i.restore()}function Ni(i,t){let{x:e,y:s,w:n,h:o,radius:a}=t;i.arc(e+a.topLeft,s+a.topLeft,a.topLeft,1.5*K,K,!0),i.lineTo(e,s+o-a.bottomLeft),i.arc(e+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,K,mt,!0),i.lineTo(e+n-a.bottomRight,s+o),i.arc(e+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,mt,0,!0),i.lineTo(e+n,s+a.topRight),i.arc(e+n-a.topRight,s+a.topRight,a.topRight,0,-mt,!0),i.lineTo(e+a.topLeft,s)}var kf=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Cf=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function nh(i,t){let e=(""+i).match(kf);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}var Af=i=>+i||0;function xn(i,t){let e={},s=$(t),n=s?Object.keys(t):t,o=$(i)?s?a=>B(i[a],i[t[a]]):a=>i[a]:()=>i;for(let a of n)e[a]=Af(o(a));return e}function Qo(i){return xn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function je(i){return xn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function kt(i){let t=Qo(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function bt(i,t){i=i||{},t=t||lt.font;let e=B(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=B(i.style,t.style);s&&!(""+s).match(Cf)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let n={family:B(i.family,t.family),lineHeight:nh(B(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:B(i.weight,t.weight),string:""};return n.string=sh(n),n}function nt(i,t,e,s){let n=!0,o,a,r;for(o=0,a=i.length;o<a;++o)if(r=i[o],r!==void 0&&(t!==void 0&&typeof r=="function"&&(r=r(t),n=!1),e!==void 0&&at(r)&&(r=r[e%r.length],n=!1),r!==void 0))return s&&!n&&(s.cacheable=!1),r}function Fr(i,t,e){let{min:s,max:n}=i,o=Io(t,(n-s)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Oe(i,t){return Object.assign(Object.create(i),t)}function _n(i,t=[""],e,s,n=()=>i[0]){let o=e||i;typeof s=="undefined"&&(s=rh("_fallback",i));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>_n([r,...i],t,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return oh(r,l,()=>If(l,t,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return qc(r).includes(l)},ownKeys(r){return qc(r)},set(r,l,c){let h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function mi(i,t,e,s){let n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Zo(i,s),setContext:o=>mi(i,o,e,s),override:o=>mi(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return oh(o,a,()=>Lf(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function Zo(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:Le(e)?e:()=>e,isIndexable:Le(s)?s:()=>s}}var Df=(i,t)=>i?i+fn(t):t,zr=(i,t)=>$(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function oh(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];let s=e();return i[t]=s,s}function Lf(i,t,e){let{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i,r=s[t];return Le(r)&&a.isScriptable(t)&&(r=Pf(t,r,i,e)),at(r)&&r.length&&(r=Tf(t,r,i,a.isIndexable)),zr(t,r)&&(r=mi(r,n,o&&o[t],a)),r}function Pf(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=t(o,a||s);return r.delete(i),zr(i,l)&&(l=Nr(n._scopes,n,i,l)),l}function Tf(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index!="undefined"&&s(i))return t[o.index%t.length];if($(t[0])){let l=t,c=n._scopes.filter(h=>h!==l);t=[];for(let h of l){let d=Nr(c,n,i,h);t.push(mi(d,o,a&&a[i],r))}}return t}function ah(i,t,e){return Le(i)?i(t,e):i}
1var Of=(i,t)=>i===!0?t:typeof i=="string"?Te(t,i):void 0;function Ef(i,t,e,s,n){for(let o of t){let a=Of(e,o);if(a){i.add(a);let r=ah(a._fallback,e,n);if(typeof r!="undefined"&&r!==e&&r!==s)return r}else if(a===!1&&typeof s!="undefined"&&e!==s)return null}return!1}function Nr(i,t,e,s){let n=t._rootScopes,o=ah(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=jc(r,a,e,o||e,s);return l===null||typeof o!="undefined"&&o!==e&&(l=jc(r,a,o,l,s),l===null)?!1:_n(Array.from(r),[""],n,o,()=>Rf(t,e,s))}function jc(i,t,e,s,n){for(;e;)e=Ef(i,t,e,s,n);return e}function Rf(i,t,e){let s=i._getTarget();t in s||(s[t]={});let n=s[t];return at(n)&&$(e)?e:n||{}}function If(i,t,e,s){let n;for(let o of t)if(n=rh(Df(o,i),e),typeof n!="undefined")return zr(i,n)?Nr(e,s,i,n):n}function rh(i,t){for(let e of t){if(!e)continue;let s=e[i];if(typeof s!="undefined")return s}}function qc(i){let t=i._keys;return t||(t=i._keys=Ff(i._scopes)),t}function Ff(i){let t=new Set;for(let e of i)for(let s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function ta(i,t,e,s){let{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s),r,l,c,h;for(r=0,l=s;r<l;++r)c=r+e,h=t[c],a[r]={r:n.parse(Te(h,o),c)};return a}var zf=Number.EPSILON||1e-14,ns=(i,t)=>t<i.length&&!i[t].skip&&i[t],lh=i=>i==="x"?"y":"x";function ch(i,t,e,s){let n=i.skip?t:i,o=t,a=e.skip?t:e,r=un(o,n),l=un(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Nf(i,t,e){let s=i.length,n,o,a,r,l,c=ns(i,0);for(let h=0;h<s-1;++h)if(l=c,c=ns(i,h+1),!(!l||!c)){if(Ii(t[h],0,zf)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(n,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=n*a*t[h],e[h+1]=o*a*t[h])}}function Bf(i,t,e="x"){let s=lh(e),n=i.length,o,a,r,l=ns(i,0);for(let c=0;c<n;++c){if(a=r,r=l,l=ns(i,c+1),!r)continue;let h=r[e],d=r[s];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${s}`]=d-o*t[c]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${s}`]=d+o*t[c])}}function hh(i,t="x"){let e=lh(t),s=i.length,n=Array(s).fill(0),o=Array(s),a,r,l,c=ns(i,0);for(a=0;a<s;++a)if(r=l,l=c,c=ns(i,a+1),!!l){if(c){let h=c[t]-l[t];n[a]=h!==0?(c[e]-l[e])/h:0}o[a]=r?c?ue(n[a-1])!==ue(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}Nf(i,n,o),Bf(i,o,t)}function To(i,t,e){return Math.max(Math.min(i,e),t)}function Wf(i,t){let e,s,n,o,a,r=xe(i[0],t);for(e=0,s=i.length;e<s;++e)a=o,o=r,r=e<s-1&&xe(i[e+1],t),o&&(n=i[e],a&&(n.cp1x=To(n.cp1x,t.left,t.right),n.cp1y=To(n.cp1y,t.top,t.bottom)),r&&(n.cp2x=To(n.cp2x,t.left,t.right),n.cp2y=To(n.cp2y,t.top,t.bottom)))}function Br(i,t,e,s,n){let o,a,r,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")hh(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,a=i.length;o<a;++o)r=i[o],l=ch(c,r,i[Math.min(o+1,a-(s?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r}t.capBezierPoints&&Wf(i,e)}function vn(){return typeof window!="undefined"&&typeof document!="undefined"}function wn(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ro(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}var ea=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function dh(i,t){return ea(i).getPropertyValue(t)}var Hf=["top","right","bottom","left"];function Oi(i,t,e){let s={};e=e?"-"+e:"";for(let n=0;n<4;n++){let o=Hf[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var Vf=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function jf(i,t){let e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s,a=!1,r,l;if(Vf(n,o,i.target))r=n,l=o;else{let c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function qe(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:s}=t,n=ea(e),o=n.boxSizing==="border-box",a=Oi(n,"padding"),r=Oi(n,"border","width"),{x:l,y:c,box:h}=jf(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:g,height:p}=t;return o&&(g-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/g*e.width/s),y:Math.round((c-u)/p*e.height/s)}}function qf(i,t,e){let s,n;if(t===void 0||e===void 0){let o=i&&wn(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{let a=o.getBoundingClientRect(),r=ea(o),l=Oi(r,"border","width"),c=Oi(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=Ro(r.maxWidth,o,"clientWidth"),n=Ro(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||dn,maxHeight:n||dn}}var pi=i=>Math.round(i*10)/10;function Wr(i,t,e,s){let n=ea(i),o=Oi(n,"margin"),a=Ro(n.maxWidth,i,"clientWidth")||dn,r=Ro(n.maxHeight,i,"clientHeight")||dn,l=qf(i,t,e),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let u=Oi(n,"border","width"),g=Oi(n,"padding");c-=g.width+u.width,h-=g.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=pi(Math.min(c,a,l.maxWidth)),h=pi(Math.min(h,r,l.maxHeight)),c&&!h&&(h=pi(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=pi(Math.floor(h*s))),{width:c,height:h}}function ia(i,t,e){let s=t||1,n=pi(i.height*s),o=pi(i.width*s);i.height=pi(i.height),i.width=pi(i.width);let a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,
10,0,s,0,0),!0):!1}var Hr=(function(){let i=!1;try{let t={get passive(){return i=!0,!1}};vn()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return i})();function sa(i,t){let e=dh(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function We(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Vr(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function jr(i,t,e,s){let n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=We(i,n,e),r=We(n,o,e),l=We(o,t,e),c=We(a,r,e),h=We(r,l,e);return We(c,h,e)}var $f=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Yf=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function xi(i,t,e){return i?$f(t,e):Yf()}function na(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function oa(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function uh(i){return i==="angle"?{between:Fi,compare:th,normalize:Tt}:{between:ve,compare:(t,e)=>t-e,normalize:t=>t}}function $c({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Uf(i,t,e){let{property:s,start:n,end:o}=e,{between:a,normalize:r}=uh(s),l=t.length,{start:c,end:h,loop:d}=i,u,g;if(d){for(c+=l,h+=l,u=0,g=l;u<g&&a(r(t[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function aa(i,t,e){if(!e)return[i];let{property:s,start:n,end:o}=e,a=t.length,{compare:r,between:l,normalize:c}=uh(s),{start:h,end:d,loop:u,style:g}=Uf(i,t,e),p=[],b=!1,y=null,x,v,A,k=()=>l(n,A,x)&&r(n,A)!==0,M=()=>r(o,x)===0||l(o,A,x),D=()=>b||k(),L=()=>!b||M();for(let S=h,R=h;S<=d;++S)v=t[S%a],!v.skip&&(x=c(v[s]),x!==A&&(b=l(x,n,o),y===null&&D()&&(y=r(x,n)===0?S:R),y!==null&&L()&&(p.push($c({start:y,end:S,loop:u,count:a,style:g})),y=null),R=S,A=x));return y!==null&&p.push($c({start:y,end:d,loop:u,count:a,style:g})),p}function ra(i,t){let e=[],s=i.segments;for(let n=0;n<s.length;n++){let o=aa(s[n],i.points,t);o.length&&e.push(...o)}return e}function Xf(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Kf(i,t,e,s){let n=i.length,o=[],a=t,r=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function qr(i,t){let e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];let o=!!i._loop,{start:a,end:r}=Xf(e,n,o,s);if(s===!0)return Yc(i,[{start:a,end:r,loop:o}],e,t);let l=r<a?r+n:r,c=!!i._fullLoop&&a===0&&r===n-1;return Yc(i,Kf(e,a,l,c),e,t)}function Yc(i,t,e,s){return!s||!s.setContext||!e?t:Gf(i,t,e,s)}function Gf(i,t,e,s){let n=i._chart.getContext(),o=Uc(i.options),{_datasetIndex:a,options:{spanGaps:r}}=i,l=e.length,c=[],h=o,d=t[0].start,u=d;function g(p,b,y,x){let v=r?-1:1;if(p!==b){for(p+=l;e[p%l].skip;)p-=v;for(;e[b%l].skip;)b+=v;p%l!==b%l&&(c.push({start:p%l,end:b%l,loop:y,style:x}),h=x,d=b%l)}}for(let p of t){d=r?d:p.start;let b=e[d%l],y;for(u=d+1;u<=p.end;u++){let x=e[u%l];y=Uc(s.setContext(Oe(n,{type:"segment",p0:b,p1:x,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Jf(y,h)&&g(d,u-1,p.loop,h),b=x,h=y}d<u-1&&g(d,u-1,p.loop,h)}return c}function Uc(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Jf(i,t){if(!t)return!1;let e=[],s=function(n,o){return Uo(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,s)!==JSON.stringify(t,s)}function Oo(i,t,e){return i.options.clip?i[e]:t[e]}function Qf(i,t){let{xScale:e,yScale:s}=i;
1return e&&s?{left:Oo(e,t,"left"),right:Oo(e,t,"right"),top:Oo(s,t,"top"),bottom:Oo(s,t,"bottom")}:t}function la(i,t){let e=t._clip;if(e.disabled)return!1;let s=Qf(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}var il=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){let o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=jo.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let o=s.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let s=e.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},$e=new il,fh="transparent",Zf={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let s=Xo(i||fh),n=s.valid&&Xo(t||fh);
1return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}},sl=class{constructor(t,e,s,n){let o=e[s];n=nt([t.to,n,o,t.from]);let a=nt([t.from,o,n]);this._active=!0,this._fn=t.fn||Zf[t.type||typeof a],this._easing=Ti[t.easing]||Ti.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);let n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=nt([t.to,e,n,t.from]),this._from=nt([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||e<s),!this._active){this._target[n]=r,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){let e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}},ba=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!$(t))return;let e=Object.keys(lt.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{let o=t[n];if(!$(o))return;let a={};for(let r of e)a[r]=o[r];(at(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,e){let s=e.options,n=eg(t,s);if(!n)return[];let o=this._createAnimations(n,s);return s.$shared&&tg(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){let s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}let h=e[c],d=o[c],u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new sl(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let s=this._createAnimations(t,e);if(s.length)return $e.add(this._chart,s),!0}};function tg(i,t){let e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){let o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function eg(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function gh(i,t){let e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function ig(i,t,e){if(e===!1)return!1;let s=gh(i,e),n=gh(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function sg(i){let t,e,s,n;return $(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function ud(i,t){let e=[],s=i._getSortedDatasetMetas(t),n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function ph(i,t,e,s={}){let n=i.keys,o=s.mode==="single",a,r,l,c;if(t===null)return;let h=!1;for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===e){if(h=!0,s.all)continue;break}c=i.values[l],ft(c)&&(o||t===0||ue(t)===ue(c))&&(t+=c)}return!h&&!s.all?0:t}function ng(i,t){let{iScale:e,vScale:s}=t,n=e.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",a=Object.keys(i),r=new Array(a.length),l,c,h;for(l=0,c=a.length;l<c;++l)h=a[l],r[l]={[n]:h,[o]:i[h]};return r}function $r(i,t){let e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function og(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function ag(i){let{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function rg(i,t,e){let s=i[t]||(i[t]={});return s[e]||(s[e]={})}function mh(i,t,e,s){for(let n of t.getMatchingVisibleMetas(s).reverse()){let o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function bh(i,t){let{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=og(o,a,s),d=t.length,u;for(let g=0;g<d;++g){let p=t[g],{[l]:b,[c]:y}=p,x=p._stacks||(p._stacks={});u=x[c]=rg(n,h,b),u[r]=y,u._top=mh(u,a,!0,s.type),u._bottom=mh(u,a,!1,s.type);let v=u._visualValues||(u._visualValues={});v[r]=y}}function Yr(i,t){let e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function lg(i,t){return Oe(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function cg(i,t,e){return Oe(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Sn(i,t){let e=i.controller.index,s=i.vScale&&i.vScale.axis;
1if(s){t=t||i._parsed;for(let n of t){let o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}var Ur=i=>i==="reset"||i==="none",yh=(i,t)=>t?i:Object.assign({},i),hg=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:ud(e,!0),values:null},ne=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=$r(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Sn(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,g,p)=>d==="x"?u:d==="r"?p:g,o=e.xAxisID=B(s.xAxisID,Yr(t,"x")),a=e.yAxisID=B(s.yAxisID,Yr(t,"y")),r=e.rAxisID=B(s.rAxisID,Yr(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ho(this._data,this),t._stacked&&Sn(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if($(e)){let n=this._cachedMeta;this._data=ng(e,n)}else if(s!==e){if(s){Ho(s,this);let n=this._cachedMeta;Sn(n),n._parsed=[]}e&&Object.isExtensible(e)&&Pr(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,s=this.getDataset(),n=!1;this._dataCheck();let o=e._stacked;e._stacked=$r(e.vScale,e),e.stack!==s.stack&&(n=!0,Sn(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(bh(this,e._parsed),e._stacked=$r(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis,l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{at(n[t])?u=this.parseArrayData(s,n,t,e):$(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);let g=()=>d[r]===null||c&&d[r]<c[r];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(g()&&(l=!1),c=d);s._sorted=l}a&&bh(this,u)}parsePrimitiveData(t,e,s,n){let{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),h=o===a,d=new Array(n),u,g,p;for(u=0,g=n;u<g;++u)p=u+s,d[u]={[r]:h||o.parse(c[p],p),[l]:a.parse(e[p],p)};return d}parseArrayData(t,e,s,n){let{xScale:o,yScale:a}=t,r=new Array(n),l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],r[l]={x:o.parse(d[0],h),y:a.parse(d[1],h)};return r}parseObjectData(t,e,s,n){let{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(n),h,d,u,g;for(h=0,d=n;h<d;++h)u=h+s,g=e[u],c[h]={x:o.parse(Te(g,r),u),y:a.parse(Te(g,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){let n=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:ud(n,!0),values:e._stacks[t.axis]._visualValues};return ph(r,a,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){let o=s[e.axis],a=o===null?NaN:o,r=n&&s._stacks[e.axis];n&&r&&(n.values=r,a=ph(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){let s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,a=n.length,r=this._getOtherScale(t),l=hg(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=ag(r),u,g;function p(){g=n[u];let b=g[r.axis];return!ft(g[t.axis])||h>b||d<b}for(u=0;
1u<a&&!(!p()&&(this.updateRangeFromParsed(c,t,g,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],ft(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){let e=this._cachedMeta;this.update(t||"default"),e._clip=sg(B(this.options.clip,ig(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||n.length-r,c=this.options.drawActiveElementsOnTop,h;for(s.dataset&&s.dataset.draw(t,o,r,l),h=r;h<r+l;++h){let d=n[h];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){let s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){let n=this.getDataset(),o;if(t>=0&&t<this._cachedMeta.data.length){let a=this._cachedMeta.data[t];o=a.$context||(a.$context=cg(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=lg(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){let n=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&Ri(s);if(r)return yh(r,l);let c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),g=Object.keys(lt.elements[t]),p=()=>this.getContext(s,n,e),b=c.resolveNamedOptions(u,g,p,d);return b.$shared&&(b.$shared=l,o[a]=Object.freeze(yh(b,l))),b}_resolveAnimations(t,e,s){let n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){let h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}let c=new ba(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ur(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){Ur(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Ur(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;let o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,s=this._cachedMeta.data;for(let[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];let n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){let n=this._cachedMeta,o=n.data,a=t+e,r,l=c=>{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){let s=this._cachedMeta;if(this._parsing){let n=s._parsed.splice(t,e);s._stacked&&Sn(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,s,n]=t;this[e](s,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);let s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};C(ne,"defaults",{}),C(ne,"datasetElementType",null),C(ne,"dataElementType",null);function dg(i,t){if(!i._cache.$bar){let e=i.getMatchingVisibleMetas(t),s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=Vo(s.sort((n,o)=>n-o))}return i._cache.$bar}function ug(i){let t=i.iScale,e=dg(t,i.type),s=t._length,n,o,a,r,l=()=>{a===32767||a===-32768||(Ri(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n<o;
1++n)a=t.getPixelForValue(e[n]),l();for(r=void 0,n=0,o=t.ticks.length;n<o;++n)a=t.getPixelForTick(n),l();return s}function fg(i,t,e,s){let n=e.barThickness,o,a;return H(n)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=n*s,a=1),{chunk:o/s,ratio:a,start:t.pixels[i]-o/2}}function gg(i,t,e,s){let n=t.pixels,o=n[i],a=i>0?n[i-1]:null,r=i<n.length-1?n[i+1]:null,l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);let c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/s,ratio:e.barPercentage,start:c}}function pg(i,t,e,s){let n=e.parse(i[0],s),o=e.parse(i[1],s),a=Math.min(n,o),r=Math.max(n,o),l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function fd(i,t,e,s){return at(i)?pg(i,t,e,s):t[e.axis]=e.parse(i,s),t}function xh(i,t,e,s){let n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[],c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=r||n.parse(a[c],c),l.push(fd(u,d,o,c));return l}function Xr(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function mg(i,t,e){return i!==0?ue(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function bg(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function yg(i,t,e,s){let n=t.borderSkipped,o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:a,end:r,reverse:l,top:c,bottom:h}=bg(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[_h(h,a,r,l)]=!0,n=c)),o[_h(n,a,r,l)]=!0,i.borderSkipped=o}function _h(i,t,e,s){return s?(i=xg(i,t,e),i=vh(i,e,t)):i=vh(i,t,e),i}function xg(i,t,e){return i===t?e:i===e?t:i}function vh(i,t,e){return i==="start"?t:i==="end"?e:i}function _g(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}var cs=class extends ne{parsePrimitiveData(t,e,s,n){return xh(t,e,s,n)}parseArrayData(t,e,s,n){return xh(t,e,s,n)}parseObjectData(t,e,s,n){let{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?r:l,h=a.axis==="x"?r:l,d=[],u,g,p,b;for(u=s,g=s+n;u<g;++u)b=e[u],p={},p[o.axis]=o.parse(Te(b,c),u),d.push(fd(Te(b,h),p,a,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);let o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),a=o._custom,r=Xr(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){let o=n==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let g=e;g<e+s;g++){let p=this.getParsed(g),b=o||H(p[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(g),y=this._calculateBarIndexPixels(g,h),x=(p._stacks||{})[r.axis],v={horizontal:c,base:b.base,enableBorderRadius:!x||Xr(p._custom)||a===x._top||a===x._bottom,x:c?b.head:y.center,y:c?y.center:b.head,height:c?y.size:Math.abs(b.size),width:c?Math.abs(b.size):y.size};u&&(v.options=d||this.resolveDataElementOptions(g,t[g].active?"active":n));let A=v.options||t[g].options;yg(v,A,x,a),_g(v,A,h.ratio),this.updateElement(t[g],g,v,n)}}_getStacks(t,e){let{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=s.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(e),l=r&&r[s.axis],c=h=>{let d=h._parsed.find(g=>g[s.axis]===l),u=d&&d[h.vScale.axis];if(H(u)||isNaN(u))return!0};for(let h of n)if(!(e!==void 0&&c(h))&&((o===!1||a.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&a.push(h.stack),h.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let s of this.chart.data.datasets)t[B(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){let n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,s=e.iScale,n=[],o,a;for(o=0,a=e.data.length;o<a;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));let r=t.barThickness;return{min:r||ug(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:s,index:n},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),c=l._custom,h=Xr(c),d=l[e.axis],u=0,g=s?this.applyStack(e,l,s):d,p,b;g!==d&&(u=g-d,g=d),h&&(d=c.barStart,g=c.barEnd-c.barStart,d!==0&&ue(d)!==ue(c.barEnd)&&(u=0),u+=d);let y=!H(o)&&!h?o:u,x=e.getPixelForValue(y);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+g):p=x,b=p-x,Math.abs(b)<a){b=mg(b,e,r)*a,d===r&&(x-=b/2);let v=e.getPixelForDecimal(0),A=e.getPixelForDecimal(1),k=Math.min(v,A),M=Math.max(v,A);x=Math.max(Math.min(x,M),k),p=x+b,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(p)-e.getValueForPixel(x))}if(x===e.getPixelForValue(r)){let v=ue(b)*e.getLineWidthForValue(r)/2;x+=v,b-=v}
1return{size:b,base:x,head:p,center:p+b/2}}_calculateBarIndexPixels(t,e){let s=e.scale,n=this.options,o=n.skipNull,a=B(n.maxBarThickness,1/0),r,l,c=this._getAxisCount();if(e.grouped){let h=o?this._getStackCount(t):e.stackCount,d=n.barThickness==="flex"?gg(t,e,n,h*c):fg(t,e,n,h*c),u=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,g=this._getAxis().indexOf(B(u,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+g;r=d.start+d.chunk*p+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else r=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){let t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length,o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&!s[o].hidden&&s[o].draw(this._ctx)}};C(cs,"id","bar"),C(cs,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),C(cs,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});var hs=class extends ne{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,s,n){let o=super.parsePrimitiveData(t,e,s,n);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+s).radius;return o}parseArrayData(t,e,s,n){let o=super.parseArrayData(t,e,s,n);for(let a=0;a<o.length;a++){let r=e[s+a];o[a]._custom=B(r[2],this.resolveDataElementOptions(a+s).radius)}return o}parseObjectData(t,e,s,n){let o=super.parseObjectData(t,e,s,n);for(let a=0;a<o.length;a++){let r=e[s+a];o[a]._custom=B(r&&r.r&&+r.r,this.resolveDataElementOptions(a+s).radius)}return o}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:s[t]||"",value:"("+r+", "+l+(c?", "+c:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;u<e+s;u++){let g=t[u],p=!o&&this.getParsed(u),b={},y=b[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(p[h]),x=b[d]=o?r.getBasePixel():r.getPixelForValue(p[d]);b.skip=isNaN(y)||isNaN(x),c&&(b.options=l||this.resolveDataElementOptions(u,g.active?"active":n),o&&(b.options.radius=0)),this.updateElement(g,u,b,n)}}resolveDataElementOptions(t,e){let s=this.getParsed(t),n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));let o=n.radius;return e!=="active"&&(n.radius=0),n.radius+=B(s&&s._custom,o),n}};C(hs,"id","bubble"),C(hs,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),C(hs,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function vg(i,t,e){let s=1,n=1,o=0,a=0;if(t<rt){let r=i,l=r+t,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),g=(A,k,M)=>Fi(A,r,l,!0)?1:Math.max(k,k*e,M,M*e),p=(A,k,M)=>Fi(A,r,l,!0)?-1:Math.min(k,k*e,M,M*e),b=g(0,c,d),y=g(mt,h,u),x=p(K,c,d),v=p(K+mt,h,u);s=(b-x)/2,n=(y-v)/2,o=-(b+x)/2,a=-(y+v)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}var Ue=class extends ne{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if($(s[t])){let{key:l="value"}=this._parsing;o=c=>+Te(s[c],l)}let a,r;for(a=t,r=t+e;a<r;++a)n._parsed[a]=o(a)}}_getRotation(){return se(this.options.rotation-90)}_getCircumference(){return se(this.options.circumference)}_getRotationExtents(){let t=rt,e=-rt;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){let n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),a=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){let e=this.chart,{chartArea:s}=e,n=this._cachedMeta,o=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(s.width,s.height)-a)/2,0),l=Math.min(Sr(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:g,offsetX:p,offsetY:b}=vg(d,h,l),y=(s.width-a)/u,x=(s.height-a)/g,v=Math.max(Math.min(y,x)/2,0),A=Io(this.options.radius,v),k=Math.max(A*l,0),M=(A-k)/this._getVisibleDatasetWeightTotal();this.offsetX=p*A,this.offsetY=b*A,n.total=this.calculateTotal(),this.outerRadius=A-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){let s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/rt)}updateElements(t,e,s,n){let o=n==="reset",a=this.chart,r=a.chartArea,c=a.options.animation,h=(r.left+r.right)/2,d=(r.top+r.bottom)/2,u=o&&c.animateScale,g=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:b,includeOptions:y}=this._getSharedOptions(e,n),x=this._getRotation(),v;for(v=0;v<e;++v)x+=this._circumference(v,o);for(v=e;v<e+s;++v){let A=this._circumference(v,o),k=t[v],M={x:h+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+A,circumference:A,outerRadius:p,innerRadius:g};y&&(M.options=b||this.resolveDataElementOptions(v,k.active?"active":n)),x+=A,this.updateElement(k,v,M,n)}}calculateTotal(){let t=this._cachedMeta,e=t.data,s=0,n;for(n=0;n<e.length;n++){let o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?rt*(Math.abs(t)/e):0}
1getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=zi(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0,s=this.chart,n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){a=s.getDatasetMeta(n),t=a.data,r=a.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=r.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){let o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(B(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};C(Ue,"id","doughnut"),C(Ue,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),C(Ue,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),C(Ue,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data,{labels:{pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,c)=>{let d=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:d.backgroundColor,fontColor:o,hidden:!t.getDataVisibility(c),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:n,pointStyle:s,borderRadius:a&&(r||d.borderRadius),index:c}}):[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}});var ds=class extends ne{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled,{start:r,count:l}=$o(e,n,a);this._drawStart=r,this._drawCount=l,Yo(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,g=r.axis,{spanGaps:p,segment:b}=this.options,y=bi(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||n==="none",v=e+s,A=t.length,k=e>0&&this.getParsed(e-1);for(let M=0;M<A;++M){let D=t[M],L=x?D:{};if(M<e||M>=v){L.skip=!0;continue}let S=this.getParsed(M),R=H(S[g]),j=L[u]=a.getPixelForValue(S[u],M),W=L[g]=o||R?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,S,l):S[g],M);L.skip=isNaN(j)||isNaN(W)||R,L.stop=M>0&&Math.abs(S[u]-k[u])>y,b&&(L.parsed=S,L.raw=c.data[M]),d&&(L.options=h||this.resolveDataElementOptions(M,D.active?"active":n)),x||this.updateElement(D,M,L,n),k=S}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;let o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};C(ds,"id","line"),C(ds,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),C(ds,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var Vi=class extends ne{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=zi(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return ta.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{let o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){let o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*K,g=u,p,b=360/this.countVisibleElements();for(p=0;p<e;++p)g+=this._computeAngle(p,n,b);for(p=e;p<e+s;p++){let y=t[p],x=g,v=g+this._computeAngle(p,n,b),A=a.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;g=v,o&&(l.animateScale&&(A=0),l.animateRotate&&(x=v=u));let k={x:h,y:d,innerRadius:0,outerRadius:A,startAngle:x,endAngle:v,options:this.resolveDataElementOptions(p,y.active?"active":n)};this.updateElement(y,p,k,n)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((s,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?se(this.resolveDataElementOptions(t,e).angle||s):0}};C(Vi,"id","polarArea"),C(Vi,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),C(Vi,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,a)=>{let l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update(
1)}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});var Dn=class extends Ue{};C(Dn,"id","pie"),C(Dn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});var us=class extends ne{getLabelAndValue(t){let e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return ta.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){let a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);let r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){let o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r<e+s;r++){let l=t[r],c=this.resolveDataElementOptions(r,l.active?"active":n),h=o.getPointPositionForValue(r,this.getParsed(r).r),d=a?o.xCenter:h.x,u=a?o.yCenter:h.y,g={x:d,y:u,angle:h.angle,skip:isNaN(d)||isNaN(u),options:c};this.updateElement(l,r,g,n)}}};C(us,"id","radar"),C(us,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),C(us,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});var fs=class extends ne{getLabelAndValue(t){let e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:s[t]||"",value:"("+r+", "+l+")"}}update(t){let e=this._cachedMeta,{data:s=[]}=e,n=this.chart._animationsDisabled,{start:o,count:a}=$o(e,s,n);if(this._drawStart=o,this._drawCount=a,Yo(e)&&(o=0,a=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:r,_dataset:l}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!l._decimated,r.points=s;let c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(s,o,a,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(h),u=this.includeOptions(n,d),g=a.axis,p=r.axis,{spanGaps:b,segment:y}=this.options,x=bi(b)?b:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||n==="none",A=e>0&&this.getParsed(e-1);for(let k=e;k<e+s;++k){let M=t[k],D=this.getParsed(k),L=v?M:{},S=H(D[p]),R=L[g]=a.getPixelForValue(D[g],k),j=L[p]=o||S?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,D,l):D[p],k);L.skip=isNaN(R)||isNaN(j)||S,L.stop=k>0&&Math.abs(D[g]-A[g])>x,y&&(L.parsed=D,L.raw=c.data[k]),u&&(L.options=d||this.resolveDataElementOptions(k,M.active?"active":n)),v||this.updateElement(M,k,L,n),A=D}this.updateSharedOptions(d,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}let s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;let o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}};C(fs,"id","scatter"),C(fs,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),C(fs,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var wg=Object.freeze({__proto__:null,BarController:cs,BubbleController:hs,DoughnutController:Ue,LineController:ds,PieController:Dn,PolarAreaController:Vi,RadarController:us,ScatterController:fs});function Bi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var nl=class i{constructor(t){C(this,"options");this.options=t||{}}static override(t){Object.assign(i.prototype,t)}init(){}formats(){return Bi()}parse(){return Bi()}format(){return Bi()}add(){return Bi()}diff(){return Bi()}startOf(){return Bi()}endOf(){return Bi()}},Sg={_date:nl};function Mg(i,t,e,s){let{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(r&&t===r.axis&&t!=="r"&&a&&o.length){let c=r._reversePixels?Dr:ye;if(s){if(n._sharedOptions){let h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){let u=c(o,t,e-d),g=c(o,t,e+d);return{lo:u.lo,hi:g.hi}}}}else{let h=c(o,t,e);if(l){let{vScale:d}=n._cachedMeta,{_parsed:u}=i,g=u.slice(0,h.lo+1).reverse().findIndex(b=>!H(b[d.axis]));h.lo-=Math.max(0,g);let p=u.slice(h.hi).findIndex(b=>!H(b[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Bn(i,t,e,s,n){let o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){let{index:c,data:h}=o[r],{lo:d,hi:u}=Mg(o[r],t,a,n);for(let g=d;g<=u;++g){let p=h[g];p.skip||s(p,c,g)}}}function kg(i){let t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){let o=t?Math.abs(s.x-n.x):0,a=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Kr(i,t,e,s,n){let o=[];return!n&&!i.isPointInArea(t)||Bn(i,e,t,function(r,l,c){!n&&!xe(r,i.chartArea,0)||r.inRange(t.x,t.y,s)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function Cg(i,t,e,s){let n=[];function o(a,r,l){let{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],s),{angle:d}=Wo(a,{x:t.x,y:t.y});Fi(d,c,h)&&n.push({element:a,datasetIndex:r,index:l})}return Bn(i,e,t,o),n}function Ag(i,t,e,s,n,o){let a=[],r=kg(e),l=Number.POSITIVE_INFINITY;function c(h,d,u){let g=h.inRange(t.x,t.y,n);if(s&&!g)return;let p=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(p))&&!g)return;let y=r(t,p);y<l?(a=[{element:h,datasetIndex:d,index:u}],l=y):y===l&&a.push({element:h,datasetIndex:d,index:u})}return Bn(i,e,t,c),a}function Gr(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?Cg(i,t,e,n):Ag(i,t,e,s,n,o)}function wh(i,t,e,s,n){let o=[],a=e==="x"?"inXRange":"inYRange",r=!1;return Bn(i,e,t,(l,c,h)=>
1{l[a]&&l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var Dg={evaluateInteractionItems:Bn,modes:{index(i,t,e,s){let n=qe(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?Kr(i,n,o,s,a):Gr(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){let n=qe(t,i),o=e.axis||"xy",a=e.includeInvisible||!1,r=e.intersect?Kr(i,n,o,s,a):Gr(i,n,o,!1,s,a);if(r.length>0){let l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(i,t,e,s){let n=qe(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return Kr(i,n,o,s,a)},nearest(i,t,e,s){let n=qe(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return Gr(i,n,o,e.intersect,s,a)},x(i,t,e,s){let n=qe(t,i);return wh(i,n,"x",e.intersect,s)},y(i,t,e,s){let n=qe(t,i);return wh(i,n,"y",e.intersect,s)}}},gd=["left","top","right","bottom"];function Mn(i,t){return i.filter(e=>e.pos===t)}function Sh(i,t){return i.filter(e=>gd.indexOf(e.pos)===-1&&e.box.axis===t)}function kn(i,t){return i.sort((e,s)=>{let n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Lg(i){let t=[],e,s,n,o,a,r;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:a,stackWeight:r=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return t}function Pg(i){let t={};for(let e of i){let{stack:s,pos:n,stackWeight:o}=e;if(!s||!gd.includes(n))continue;let a=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Tg(i,t){let e=Pg(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t,o,a,r;for(o=0,a=i.length;o<a;++o){r=i[o];let{fullSize:l}=r.box,c=e[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*s:l&&t.availableWidth,r.height=n):(r.width=s,r.height=h?h*n:l&&t.availableHeight)}return e}function Og(i){let t=Lg(i),e=kn(t.filter(c=>c.box.fullSize),!0),s=kn(Mn(t,"left"),!0),n=kn(Mn(t,"right")),o=kn(Mn(t,"top"),!0),a=kn(Mn(t,"bottom")),r=Sh(t,"x"),l=Sh(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Mn(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function Mh(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function pd(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Eg(i,t,e,s){let{pos:n,box:o}=e,a=i.maxPadding;if(!$(n)){e.size&&(i[n]-=e.size);let d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&pd(a,o.getPadding());let r=Math.max(0,t.outerWidth-Mh(a,i,"left","right")),l=Math.max(0,t.outerHeight-Mh(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Rg(i){let t=i.maxPadding;function e(s){let n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Ig(i,t){let e=t.maxPadding;function s(n){let o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function Ln(i,t,e,s){let n=[],o,a,r,l,c,h;for(o=0,a=i.length,c=0;o<a;++o){r=i[o],l=r.box,l.update(r.width||t.w,r.height||t.h,Ig(r.horizontal,t));let{same:d,other:u}=Eg(t,e,r,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(r)}return c&&Ln(n,t,e,s)||h}function ca(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function kh(i,t,e,s){let n=e.padding,{x:o,y:a}=t;for(let r of i){let l=r.box,c=s[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){let d=t.w*h,u=c.size||l.height;Ri(c.start)&&(a=c.start),l.fullSize?ca(l,n.left,a,e.outerWidth-n.right-n.left,u):ca(l,t.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{let d=t.h*h,u=c.size||l.width;Ri(c.start)&&(o=c.start),l.fullSize?ca(l,o,n.top,u,e.outerHeight-n.bottom-n.top):ca(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var Wt={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){let e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;let n=kt(i.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),r=Og(i.boxes),l=r.vertical,c=r.horizontal;Q(i.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});let h=l.reduce((b,y)=>y.box.options&&y.box.options.display===!1?b:b+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);pd(u,kt(s));let g=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),p=Tg(l.concat(c),d);Ln(r.fullSize,g,d,p),Ln(l,g,d,p),Ln(c,g,d,p)&&Ln(l,g,d,p),Rg(g),kh(r.leftAndTop,g,d,p),g.x+=g.w,g.y+=g.h,kh(r.rightAndBottom,g,d,p),i.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},Q(r.chartArea,b=>{let y=b.box;Object.assign(y,i.chartArea),y.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}},ya=class{acquireContext(t,e){}releaseContext(t){return!1}
1addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}},ol=class extends ya{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},pa="$chartjs",Fg={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ch=i=>i===null||i==="";function zg(i,t){let e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[pa]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ch(n)){let o=sa(i,"width");o!==void 0&&(i.width=o)}if(Ch(s))if(i.style.height==="")i.height=i.width/(t||2);else{let o=sa(i,"height");o!==void 0&&(i.height=o)}return i}var md=Hr?{passive:!0}:!1;function Ng(i,t,e){i&&i.addEventListener(t,e,md)}function Bg(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,md)}function Wg(i,t){let e=Fg[i.type]||i.type,{x:s,y:n}=qe(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function xa(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Hg(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||xa(r.addedNodes,s),a=a&&!xa(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Vg(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||xa(r.removedNodes,s),a=a&&!xa(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var Fn=new Map,Ah=0;function bd(){let i=window.devicePixelRatio;i!==Ah&&(Ah=i,Fn.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function jg(i,t){Fn.size||window.addEventListener("resize",bd),Fn.set(i,t)}function qg(i){Fn.delete(i),Fn.size||window.removeEventListener("resize",bd)}function $g(i,t,e){let s=i.canvas,n=s&&wn(s);if(!n)return;let o=qo((r,l)=>{let c=n.clientWidth;e(r,l),c<n.clientWidth&&e()},window),a=new ResizeObserver(r=>{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),jg(i,o),a}function Jr(i,t,e){e&&e.disconnect(),t==="resize"&&qg(i)}function Yg(i,t,e){let s=i.canvas,n=qo(o=>{i.ctx!==null&&e(Wg(o,i))},i);return Ng(s,t,n),n}var al=class extends ya{acquireContext(t,e){let s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(zg(t,e),s):null}releaseContext(t){let e=t.canvas;if(!e[pa])return!1;let s=e[pa].initial;["height","width"].forEach(o=>{let a=s[o];H(a)?e.removeAttribute(o):e.setAttribute(o,a)});let n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[pa],!0}addEventListener(t,e,s){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),a={attach:Hg,detach:Vg,resize:$g}[e]||Yg;n[e]=a(t,e,s)}removeEventListener(t,e){let s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Jr,detach:Jr,resize:Jr}[e]||Bg)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Wr(t,e,s,n)}isAttached(t){let e=t&&wn(t);return!!(e&&e.isConnected)}};function Ug(i){return!vn()||typeof OffscreenCanvas!="undefined"&&i instanceof OffscreenCanvas?ol:al}var oe=class{constructor(){C(this,"x");C(this,"y");C(this,"active",!1);C(this,"options");C(this,"$animations")}tooltipPosition(t){let{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return bi(this.x)&&bi(this.y)}getProps(t,e){let s=this.$animations;if(!e||!s)return this;let n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};C(oe,"defaults",{}),C(oe,"defaultRoutes");function Xg(i,t){let e=i.options.ticks,s=Kg(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Jg(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return Qg(t,c,o,a/n),c;let h=Gg(o,t,n);if(a>0){let d,u,g=a>1?Math.round((l-r)/(a-1)):null;for(ha(t,c,h,H(g)?0:r-g,r),d=0,u=a-1;d<u;d++)ha(t,c,h,o[d],o[d+1]);return ha(t,c,h,l,H(g)?t.length:l+g),c}return ha(t,c,h),c}function Kg(i){let t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function Gg(i,t,e){let s=Zg(i),n=t.length/e;if(!s)return Math.max(n,1);let o=kr(s);for(let a=0,r=o.length-1;a<r;a++){let l=o[a];if(l>n)return l}return Math.max(n,1)}function Jg(i){let t=[],e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function Qg(i,t,e,s){let n=0,o=e[0],a;for(s=Math.ceil(s),a=0;a<i.length;a++)a===o&&(t.push(i[a]),n++,o=e[n*s])}function ha(i,t,e,s,n){let o=B(s,0),a=Math.min(B(n,i.length),i.length),r=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,e=l/Math.floor(l/e)),h=o;h<0;)r++,h=Math.round(o+r*e);for(c=Math.max(o,0);c<a;c++)c===h&&(t.push(i[c]),r++,h=Math.round(o+r*e))}function Zg(i){let t=i.length,e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}var tp=i=>
1i==="left"?"right":i==="right"?"left":i,Dh=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Lh=(i,t)=>Math.min(t||i,i);function Ph(i,t){let e=[],s=i.length/t,n=i.length,o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function ep(i,t,e){let s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,a=i._endPixel,r=1e-6,l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,a-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-r||l>a+r)))return l}function ip(i,t){Q(i,e=>{let s=e.gc,n=s.length/2,o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Cn(i){return i.drawTicks?i.tickLength:0}function Th(i,t){if(!i.display)return 0;let e=bt(i.font,t),s=kt(i.padding);return(at(i.text)?i.text.length:1)*e.lineHeight+s.height}function sp(i,t){return Oe(i,{scale:t,type:"scale"})}function np(i,t,e){return Oe(i,{tick:e,index:t,type:"tick"})}function op(i,t,e){let s=mn(i);return(e&&t!=="right"||!e&&t==="right")&&(s=tp(s)),s}function ap(i,t,e,s){let{top:n,left:o,bottom:a,right:r,chart:l}=i,{chartArea:c,scales:h}=l,d=0,u,g,p,b=a-n,y=r-o;if(i.isHorizontal()){if(g=Ot(s,o,r),$(e)){let x=Object.keys(e)[0],v=e[x];p=h[x].getPixelForValue(v)+b-t}else e==="center"?p=(c.bottom+c.top)/2+b-t:p=Dh(i,e,t);u=r-o}else{if($(e)){let x=Object.keys(e)[0],v=e[x];g=h[x].getPixelForValue(v)-y+t}else e==="center"?g=(c.left+c.right)/2-y+t:g=Dh(i,e,t);p=Ot(s,a,n),d=e==="left"?-mt:mt}return{titleX:g,titleY:p,maxWidth:u,rotation:d}}var qi=class i extends oe{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=Ht(t,Number.POSITIVE_INFINITY),e=Ht(e,Number.NEGATIVE_INFINITY),s=Ht(s,Number.POSITIVE_INFINITY),n=Ht(n,Number.NEGATIVE_INFINITY),{min:Ht(t,s),max:Ht(e,n),minDefined:ft(t),maxDefined:ft(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),a;if(n&&o)return{min:e,max:s};let r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),n||(e=Math.min(e,a.min)),o||(s=Math.max(s,a.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:Ht(e,Ht(s,e)),max:Ht(s,Ht(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){it(this.options.beforeUpdate,[this])}update(t,e,s){let{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Fr(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r<this.ticks.length;this._convertTicksToLabels(l?Ph(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Xg(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){it(this.options.afterUpdate,[this])}beforeSetDimensions(){it(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){it(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),it(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){it(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e=this.options.ticks,s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=it(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){it(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){it(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,e=t.ticks,s=Lh(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxR
1otation,a=n,r,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,g=Mt(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:g/(s-1),d+6>r&&(r=g/(s-(t.offset?.5:1)),l=this.maxHeight-Cn(t.grid)-e.padding-Th(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=gn(Math.min(Math.asin(Mt((h.highest.height+6)/r,-1,1)),Math.asin(Mt(l/c,-1,1))-Math.asin(Mt(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){it(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){it(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=Th(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Cn(o)+l):(t.height=this.maxHeight,t.width=Cn(o)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),g=s.padding*2,p=se(this.labelRotation),b=Math.cos(p),y=Math.sin(p);if(r){let x=s.mirror?0:y*d.width+b*u.height;t.height=Math.min(this.maxHeight,t.height+x+g)}else{let x=s.mirror?0:b*d.width+y*u.height;t.width=Math.min(this.maxWidth,t.width+x+g)}this._calculatePadding(c,h,y,b)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,g=0;l?c?(u=n*t.width,g=s*e.height):(u=s*t.height,g=n*e.width):o==="start"?g=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,g=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((g-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){it(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e<s;e++)H(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,s=this.ticks;e<s.length&&(s=Ph(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){let{ctx:n,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/Lh(e,s)),c=0,h=0,d,u,g,p,b,y,x,v,A,k,M;for(d=0;d<e;d+=l){if(p=t[d].label,b=this._resolveTickFontOptions(d),n.font=y=b.string,x=o[y]=o[y]||{data:{},gc:[]},v=b.lineHeight,A=k=0,!H(p)&&!at(p))A=ss(n,x.data,x.gc,A,p),k=v;else if(at(p))for(u=0,g=p.length;u<g;++u)M=p[u],!H(M)&&!at(M)&&(A=ss(n,x.data,x.gc,A,M),k+=v);a.push(A),r.push(k),c=Math.max(A,c),h=Math.max(k,h)}ip(o,e);let D=a.indexOf(c),L=r.indexOf(h),S=R=>({width:a[R]||0,height:r[R]||0});return{first:S(0),last:S(e-1),widest:S(D),highest:S(L),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ar(this._alignToPixels?He(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&t<e.length){let s=e[t];return s.$context||(s.$context=np(this.getContext(),t,s))}return this.$context||(this.$context=sp(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,e=se(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*s>r*n?r/s:l/n:l*n<r*s?l/s:r/n}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Cn(o),g=[],p=r.setContext(this.getContext()),b=p.display?p.width:0,y=b/2,x=function(X){return He(s,X,b)},v,A,k,M,D,L,S,R,j,W,Y,ct;if(a==="top")v=x(this.bottom),L=this.bottom-u,R=v-y,W=x(t.top)+y,ct=t.bottom;else if(a==="bottom")v=x(this.top),W=t.top,ct=x(t.bottom)-y,L=v+y,R=this.top+u;
1else if(a==="left")v=x(this.right),D=this.right-u,S=v-y,j=x(t.left)+y,Y=t.right;else if(a==="right")v=x(this.left),j=t.left,Y=x(t.right)-y,D=v+y,S=this.left+u;else if(e==="x"){if(a==="center")v=x((t.top+t.bottom)/2+.5);else if($(a)){let X=Object.keys(a)[0],z=a[X];v=x(this.chart.scales[X].getPixelForValue(z))}W=t.top,ct=t.bottom,L=v+y,R=L+u}else if(e==="y"){if(a==="center")v=x((t.left+t.right)/2);else if($(a)){let X=Object.keys(a)[0],z=a[X];v=x(this.chart.scales[X].getPixelForValue(z))}D=v-y,S=D-u,j=t.left,Y=t.right}let Lt=B(n.ticks.maxTicksLimit,d),Z=Math.max(1,Math.ceil(d/Lt));for(A=0;A<d;A+=Z){let X=this.getContext(A),z=o.setContext(X),ot=r.setContext(X),tt=z.lineWidth,xt=z.color,O=ot.dash||[],we=ot.dashOffset,Ge=z.tickWidth,q=z.tickColor,E=z.tickBorderDash||[],Kt=z.tickBorderDashOffset;k=ep(this,A,l),k!==void 0&&(M=He(s,k,tt),c?D=S=j=Y=M:L=R=W=ct=M,g.push({tx1:D,ty1:L,tx2:S,ty2:R,x1:j,y1:W,x2:Y,y2:ct,width:tt,color:xt,borderDash:O,borderDashOffset:we,tickWidth:Ge,tickColor:q,tickBorderDash:E,tickBorderDashOffset:Kt}))}return this._ticksLength=d,this._borderValue=v,g}_computeLabelItems(t){let e=this.axis,s=this.options,{position:n,ticks:o}=s,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Cn(s.grid),g=u+h,p=d?-h:g,b=-se(this.labelRotation),y=[],x,v,A,k,M,D,L,S,R,j,W,Y,ct="middle";if(n==="top")D=this.bottom-p,L=this._getXAxisLabelAlignment();else if(n==="bottom")D=this.top+p,L=this._getXAxisLabelAlignment();else if(n==="left"){let Z=this._getYAxisLabelAlignment(u);L=Z.textAlign,M=Z.x}else if(n==="right"){let Z=this._getYAxisLabelAlignment(u);L=Z.textAlign,M=Z.x}else if(e==="x"){if(n==="center")D=(t.top+t.bottom)/2+g;else if($(n)){let Z=Object.keys(n)[0],X=n[Z];D=this.chart.scales[Z].getPixelForValue(X)+g}L=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")M=(t.left+t.right)/2-g;else if($(n)){let Z=Object.keys(n)[0],X=n[Z];M=this.chart.scales[Z].getPixelForValue(X)}L=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?ct="top":l==="end"&&(ct="bottom"));let Lt=this._getLabelSizes();for(x=0,v=r.length;x<v;++x){A=r[x],k=A.label;let Z=o.setContext(this.getContext(x));S=this.getPixelForTick(x)+o.labelOffset,R=this._resolveTickFontOptions(x),j=R.lineHeight,W=at(k)?k.length:1;let X=W/2,z=Z.color,ot=Z.textStrokeColor,tt=Z.textStrokeWidth,xt=L;a?(M=S,L==="inner"&&(x===v-1?xt=this.options.reverse?"left":"right":x===0?xt=this.options.reverse?"right":"left":xt="center"),n==="top"?c==="near"||b!==0?Y=-W*j+j/2:c==="center"?Y=-Lt.highest.height/2-X*j+j:Y=-Lt.highest.height+j/2:c==="near"||b!==0?Y=j/2:c==="center"?Y=Lt.highest.height/2-X*j:Y=Lt.highest.height-W*j,d&&(Y*=-1),b!==0&&!Z.showLabelBackdrop&&(M+=j/2*Math.sin(b))):(D=S,Y=(1-W)*j/2);let O;if(Z.showLabelBackdrop){let we=kt(Z.backdropPadding),Ge=Lt.heights[x],q=Lt.widths[x],E=Y-we.top,Kt=0-we.left;switch(ct){case"middle":E-=Ge/2;break;case"bottom":E-=Ge;break}switch(L){case"center":Kt-=q/2;break;case"right":Kt-=q;break;case"inner":x===v-1?Kt-=q:x>0&&(Kt-=q/2);break}O={left:Kt,top:E,width:q+we.width,height:Ge+we.height,color:Z.backdropColor}}y.push({label:k,font:R,textOffset:Y,options:{rotation:b,color:z,strokeColor:ot,strokeWidth:tt,textAlign:xt,textBaseline:ct,translation:[M,D],backdrop:O}})}return y}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-se(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width,c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};
1if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o,a,r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){let l=n[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:t,ctx:e,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),a=s.display?o.width:0;if(!a)return;let r=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,h,d,u;this.isHorizontal()?(c=He(t,this.left,a)-a/2,h=He(t,this.right,r)+r/2,d=u=l):(d=He(t,this.top,a)-a/2,u=He(t,this.bottom,r)+r/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;let s=this.ctx,n=this._computeLabelArea();n&&as(s,n);let o=this.getLabelItems(t);for(let a of o){let r=a.options,l=a.font,c=a.label,h=a.textOffset;Ve(s,c,0,h,l,r)}n&&rs(s)}drawTitle(){let{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;let o=bt(s.font),a=kt(s.padding),r=s.align,l=o.lineHeight/2;e==="bottom"||e==="center"||$(e)?(l+=a.bottom,at(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=a.top;let{titleX:c,titleY:h,maxWidth:d,rotation:u}=ap(this,l,e,r);Ve(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:op(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,s=B(t.grid&&t.grid.z,-1),n=B(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==i.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],o,a;for(o=0,a=e.length;o<a;++o){let r=e[o];r[s]===this.id&&(!t||r.type===t)&&n.push(r)}return n}_resolveTickFontOptions(t){let e=this.options.ticks.setContext(this.getContext(t));return bt(e.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},gs=class{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let e=Object.getPrototypeOf(t),s;cp(e)&&(s=this.register(e));let n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,rp(t,a,s),this.override&<.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){let e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in lt[n]&&(delete lt[n][s],this.override&&delete yi[s])}};function rp(i,t,e){let s=ie(Object.create(null),[e?lt.get(e):{},lt.get(t),i.defaults]);lt.set(t,s),i.defaultRoutes&&lp(t,i.defaultRoutes),i.descriptors&<.describe(t,i.descriptors)}function lp(i,t){Object.keys(t).forEach(e=>{let s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");lt.route(o,n,l,r)})}function cp(i){return"id"in i&&"defaults"in i}var rl=class{constructor(){this.controllers=new gs(ne,"datasets",!0),this.elements=new gs(oe,"elements"),this.plugins=new gs(Object,"plugins"),this.scales=new gs(qi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}
1removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{let o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):Q(n,a=>{let r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){let n=fn(t);it(s["before"+n],[],s),e[t](s),it(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){let n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}},Re=new rl,ll=class{constructor(){this._init=void 0}notify(t,e,s,n){if(e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;let o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,e,s,n){n=n||{};for(let o of t){let a=o.plugin,r=a[s],l=[e,n,o.options];if(it(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){H(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let s=t&&t.config,n=B(s.options&&s.options.plugins,{}),o=hp(s);return n===!1&&!e?[]:up(t,o,n,e)}_notifyStateChanges(t){let e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}};function hp(i){let t={},e=[],s=Object.keys(Re.plugins.items);for(let o=0;o<s.length;o++)e.push(Re.getPlugin(s[o]));let n=i.plugins||[];for(let o=0;o<n.length;o++){let a=n[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function dp(i,t){return!t&&i===!1?null:i===!0?{}:i}function up(i,{plugins:t,localIds:e},s,n){let o=[],a=i.getContext();for(let r of t){let l=r.id,c=dp(s[l],n);c!==null&&o.push({plugin:r,options:fp(i.config,{plugin:r,local:e[l]},c,a)})}return o}function fp(i,{plugin:t,local:e},s,n){let o=i.pluginScopeKeys(t),a=i.getOptionScopes(s,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cl(i,t){let e=lt.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function gp(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function pp(i,t){return i===t?"_index_":"_value_"}function Oh(i){if(i==="x"||i==="y"||i==="r")return i}function mp(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function hl(i,...t){if(Oh(i))return i;for(let e of t){let s=e.axis||mp(e.position)||i.length>1&&Oh(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Eh(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function bp(i,t){if(t.data&&t.data.datasets){let e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return Eh(i,"x",e[0])||Eh(i,"y",e[0])}return{}}function yp(i,t){let e=yi[i.type]||{scales:{}},s=t.scales||{},n=cl(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{let r=s[a];if(!$(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=hl(a,r,bp(a,i),lt.scales[r.type]),c=pp(l,n),h=e.scales||{};o[a]=Ei(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{let r=a.type||i.type,l=a.indexAxis||cl(r,t),h=(yi[r]||{}).scales||{};Object.keys(h).forEach(d=>{let u=gp(d,l),g=a[u+"AxisID"]||u;o[g]=o[g]||Object.create(null),Ei(o[g],[{axis:u},s[g],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];Ei(r,[lt.scales[r.type],lt.scale])}),o}function yd(i){let t=i.options||(i.options={});t.plugins=B(t.plugins,{}),t.scales=yp(i,t)}function xd(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function xp(i){return i=i||{},i.data=xd(i.data),yd(i),i}var Rh=new Map,_d=new Set;function da(i,t){let e=Rh.get(i);return e||(e=t(),Rh.set(i,e),_d.add(e)),e}var An=(i,t,e)=>{let s=Te(t,e);s!==void 0&&i.add(s)},dl=class{constructor(t){this._config=xp(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=xd(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),yd(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return da(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return da(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return da(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,s=this.type;return da(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let s=this._scopeCache,n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){let{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;let l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>An(l,t,d))),h.forEach(d=>An(l,n,d)),h.forEach(d=>An(l,yi[o]||{},d)),h.forEach(d=>An(l,lt,d)),h.forEach(d=>An(l,Ko,d))});let c=Array.from(l);
1return c.length===0&&c.push(Object.create(null)),_d.has(e)&&a.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,yi[e]||{},lt.datasets[e]||{},{type:e},lt,Ko]}resolveNamedOptions(t,e,s,n=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Ih(this._resolverCache,t,n),l=a;if(vp(a,e)){o.$shared=!1,s=Le(s)?s():s;let c=this.createResolver(t,s,r);l=mi(a,s,c)}for(let c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){let{resolver:o}=Ih(this._resolverCache,t,s);return $(e)?mi(o,e,void 0,n):o}};function Ih(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));let n=e.join(),o=s.get(n);return o||(o={resolver:_n(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}var _p=i=>$(i)&&Object.getOwnPropertyNames(i).some(t=>Le(i[t]));function vp(i,t){let{isScriptable:e,isIndexable:s}=Zo(i);for(let n of t){let o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(Le(r)||_p(r))||a&&at(r))return!0}return!1}var wp="4.5.1",Sp=["top","bottom","left","right","chartArea"];function Fh(i,t){return i==="top"||i==="bottom"||Sp.indexOf(i)===-1&&t==="x"}function zh(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Nh(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),it(e&&e.onComplete,[i],t)}function Mp(i){let t=i.chart,e=t.options.animation;it(e&&e.onProgress,[i],t)}function vd(i){return vn()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var ma={},Bh=i=>{let t=vd(i);return Object.values(ma).filter(e=>e.canvas===t).pop()};function kp(i,t,e){let s=Object.keys(i);for(let n of s){let o=+n;if(o>=t){let a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function Cp(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}var fe=class{static register(...t){Re.add(...t),Wh()}static unregister(...t){Re.remove(...t),Wh()}constructor(t,e){let s=this.config=new dl(e),n=vd(t),o=Bh(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Ug(n)),this.platform.updateConfig(s);let r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=wr(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ll,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Tr(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],ma[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}$e.listen(this,"complete",Nh),$e.listen(this,"progress",Mp),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return H(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Re}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ia(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Go(this.canvas,this.ctx),this}stop(){return $e.stop(this),this}resize(t,e){$e.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,ia(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),it(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};Q(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{}),o=[];e&&(o=o.concat(Object.keys(e).map(a=>{let r=e[a],l=hl(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),Q(o,a=>{let r=a.options,l=r.id,c=hl(l,r),h=B(r.type,a.dtype);(r.position===void 0||Fh(r.position,c)!==Fh(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{let u=Re.getScale(h);
1d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),Q(n,(a,r)=>{a||delete s[r]}),Q(s,a=>{Wt.configure(this,a,a.options),Wt.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(zh("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){let o=e[s],a=this.getDatasetMeta(s),r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(s),a=this.getDatasetMeta(s)),a.type=r,a.indexAxis=o.indexAxis||cl(r,this.options),a.order=o.order||0,a.index=s,a.label=""+o.label,a.visible=this.isDatasetVisible(s),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{let l=Re.getController(r),{datasetElementType:c,dataElementType:h}=lt.datasets[r];Object.assign(l,{dataElementType:Re.getElement(h),datasetElementType:c&&Re.getElement(c)}),a.controller=new l(this,s),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Q(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c<h;c++){let{controller:d}=this.getDatasetMeta(c),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),n||Q(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(zh("z","_idx"));let{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){Q(this.scales,t=>{Wt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Fo(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:n,count:o}of e){let a=s==="_removeElements"?-o:o;kp(t,n,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!Fo(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Wt.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],Q(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,Le(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&($e.has(this)?this.attached&&!$e.running(this)&&$e.start(this):(this.draw(),Nh({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:s,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,s=[],n,o;for(n=0,o=e.length;n<o;++n){let a=e[n];(!t||a.visible)&&s.push(a)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=la(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&as(e,n),t.controller.draw(),n&&rs(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return xe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){let o=Dg.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}
1getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){let s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);Ri(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),$e.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Go(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ma[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,s=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};Q(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)},a,r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){Q(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Q(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let n=s?"set":"remove",o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];let c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],s=t.map(({datasetIndex:o,index:a})=>{let r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!os(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){let n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;let o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=Mr(t),c=Cp(t,this._lastEvent,s,l);s&&(this._lastEvent=null,it(o.onHover,[t,r,this],this),l&&it(o.onClick,[t,r,this],this));let h=!os(r,n);
1return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};C(fe,"defaults",lt),C(fe,"instances",ma),C(fe,"overrides",yi),C(fe,"registry",Re),C(fe,"version",wp),C(fe,"getChart",Bh);function Wh(){return Q(fe.instances,i=>i._plugins.invalidate())}function Ap(i,t,e){let{startAngle:s,x:n,y:o,outerRadius:a,innerRadius:r,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/a,Tt(s-e));if(i.beginPath(),i.arc(n,o,a-c/2,s+d/2,e-d/2),r>0){let u=Math.min(c/r,Tt(s-e));i.arc(n,o,r+c/2,e-u/2,s+u/2,!0)}else{let u=Math.min(c/2,a*Tt(s-e));if(h==="round")i.arc(n,o,u,e-K/2,s+K/2,!0);else if(h==="bevel"){let g=2*u*u,p=-g*Math.cos(e+K/2)+n,b=-g*Math.sin(e+K/2)+o,y=g*Math.cos(s+K/2)+n,x=g*Math.sin(s+K/2)+o;i.lineTo(p,b),i.lineTo(y,x)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function Dp(i,t,e){let{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t,c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+mt,s-mt),i.closePath(),i.clip()}function Lp(i){return xn(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Pp(i,t,e,s){let n=Lp(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{let c=(e-Math.min(o,l))*s/2;return Mt(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Mt(n.innerStart,0,a),innerEnd:Mt(n.innerEnd,0,a)}}function ls(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function _a(i,t,e,s,n,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0,g=0,p=n-l;if(s){let Z=h>0?h-s:0,X=d>0?d-s:0,z=(Z+X)/2,ot=z!==0?p*z/(z+s):p;g=(p-ot)/2}let b=Math.max(.001,p*d-e/K)/d,y=(p-b)/2,x=l+y+g,v=n-y-g,{outerStart:A,outerEnd:k,innerStart:M,innerEnd:D}=Pp(t,u,d,v-x),L=d-A,S=d-k,R=x+A/L,j=v-k/S,W=u+M,Y=u+D,ct=x+M/W,Lt=v-D/Y;if(i.beginPath(),o){let Z=(R+j)/2;if(i.arc(a,r,d,R,Z),i.arc(a,r,d,Z,j),k>0){let tt=ls(S,j,a,r);i.arc(tt.x,tt.y,k,j,v+mt)}let X=ls(Y,v,a,r);if(i.lineTo(X.x,X.y),D>0){let tt=ls(Y,Lt,a,r);i.arc(tt.x,tt.y,D,v+mt,Lt+Math.PI)}let z=(v-D/u+(x+M/u))/2;if(i.arc(a,r,u,v-D/u,z,!0),i.arc(a,r,u,z,x+M/u,!0),M>0){let tt=ls(W,ct,a,r);i.arc(tt.x,tt.y,M,ct+Math.PI,x-mt)}let ot=ls(L,x,a,r);if(i.lineTo(ot.x,ot.y),A>0){let tt=ls(L,R,a,r);i.arc(tt.x,tt.y,A,x-mt,R)}}else{i.moveTo(a,r);let Z=Math.cos(R)*d+a,X=Math.sin(R)*d+r;i.lineTo(Z,X);let z=Math.cos(j)*d+a,ot=Math.sin(j)*d+r;i.lineTo(z,ot)}i.closePath()}function Tp(i,t,e,s,n){let{fullCircles:o,startAngle:a,circumference:r}=t,l=t.endAngle;if(o){_a(i,t,e,s,l,n);for(let c=0;c<o;++c)i.fill();isNaN(r)||(l=a+(r%rt||rt))}return _a(i,t,e,s,l,n),i.fill(),l}function Op(i,t,e,s,n){let{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:g}=l,p=l.borderAlign==="inner";if(!c)return;i.setLineDash(d||[]),i.lineDashOffset=u,p?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let b=t.endAngle;if(o){_a(i,t,e,s,b,n);for(let y=0;y<o;++y)i.stroke();isNaN(r)||(b=a+(r%rt||rt))}p&&Dp(i,t,b),l.selfJoin&&b-a>=K&&g===0&&h!=="miter"&&Ap(i,t,b),o||(_a(i,t,e,s,b,n),i.stroke())}var Xe=class extends oe{constructor(e){super();C(this,"circumference");C(this,"endAngle");C(this,"fullCircles");C(this,"innerRadius");C(this,"outerRadius");C(this,"pixelMargin");C(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,s,n){let o=this.getProps(["x","y"],n),{angle:a,distance:r}=Wo(o,{x:e,y:s}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),g=(this.options.spacing+this.options.borderWidth)/2,p=B(u,c-l),b=Fi(a,l,c)&&l!==c,y=p>=rt||b,x=ve(r,h+g,d+g);return y&&x}getCenterPoint(e){let{x:s,y:n,startAngle:o,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,d=(o+a)/2,u=(r+l+h+c)/2;return{x:s+Math.cos(d)*u,y:n+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:s,circumference:n}=this,o=(s.offset||0)/4,a=(s.spacing||0)/2,r=s.circular;if(this.pixelMargin=s.borderAlign==="inner"?.33:0,this.fullCircles=n>rt?Math.floor(n/rt):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);let c=1-Math.sin(Math.min(K,n||0)),h=o*c;e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,Tp(e,this,h,a,r),Op(e,this,h,a,r),e.restore(
1)}};C(Xe,"id","arc"),C(Xe,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),C(Xe,"defaultRoutes",{backgroundColor:"backgroundColor"}),C(Xe,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function wd(i,t,e=t){i.lineCap=B(e.borderCapStyle,t.borderCapStyle),i.setLineDash(B(e.borderDash,t.borderDash)),i.lineDashOffset=B(e.borderDashOffset,t.borderDashOffset),i.lineJoin=B(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=B(e.borderWidth,t.borderWidth),i.strokeStyle=B(e.borderColor,t.borderColor)}function Ep(i,t,e){i.lineTo(e.x,e.y)}function Rp(i){return i.stepped?Rr:i.tension||i.cubicInterpolationMode==="monotone"?Ir:Ep}function Sd(i,t,e={}){let s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=n<a&&o<a||n>r&&o>r;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function Ip(i,t,e,s){let{points:n,options:o}=t,{count:a,start:r,loop:l,ilen:c}=Sd(n,e,s),h=Rp(o),{move:d=!0,reverse:u}=s||{},g,p,b;for(g=0;g<=c;++g)p=n[(r+(u?c-g:g))%a],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,b,p,u,o.stepped),b=p);return l&&(p=n[(r+(u?c:0))%a],h(i,b,p,u,o.stepped)),!!l}function Fp(i,t,e,s){let n=t.points,{count:o,start:a,ilen:r}=Sd(n,e,s),{move:l=!0,reverse:c}=s||{},h=0,d=0,u,g,p,b,y,x,v=k=>(a+(c?r-k:k))%o,A=()=>{b!==y&&(i.lineTo(h,y),i.lineTo(h,b),i.lineTo(h,x))};for(l&&(g=n[v(0)],i.moveTo(g.x,g.y)),u=0;u<=r;++u){if(g=n[v(u)],g.skip)continue;let k=g.x,M=g.y,D=k|0;D===p?(M<b?b=M:M>y&&(y=M),h=(d*h+k)/++d):(A(),i.lineTo(k,M),p=D,d=0,b=y=M),x=M}A()}function ul(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Fp:Ip}function zp(i){return i.stepped?Vr:i.tension||i.cubicInterpolationMode==="monotone"?jr:We}function Np(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),wd(i,t.options),i.stroke(n)}function Bp(i,t,e,s){let{segments:n,options:o}=t,a=ul(t);for(let r of n)wd(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}var Wp=typeof Path2D=="function";function Hp(i,t,e,s){Wp&&!t.options.segment?Np(i,t,e,s):Bp(i,t,e,s)}var Ie=class extends oe{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let n=s.spanGaps?this._loop:this._fullLoop;Br(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=qr(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){let s=this.options,n=t[e],o=this.points,a=ra(this,{property:e,start:n,end:n});if(!a.length)return;let r=[],l=zp(s),c,h;for(c=0,h=a.length;c<h;++c){let{start:d,end:u}=a[c],g=o[d],p=o[u];if(g===p){r.push(g);continue}let b=Math.abs((n-g[e])/(p[e]-g[e])),y=l(g,p,b,s.stepped);y[e]=t[e],r.push(y)}return r.length===1?r[0]:r}pathSegment(t,e,s){return ul(this)(t,this,e,s)}path(t,e,s){let n=this.segments,o=ul(this),a=this._loop;e=e||0,s=s||this.points.length-e;for(let r of n)a&=o(t,this,r,{start:e,end:e+s-1});return!!a}draw(t,e,s,n){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Hp(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};C(Ie,"id","line"),C(Ie,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),C(Ie,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),C(Ie,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Hh(i,t,e,s){let n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}var _i=class extends oe{constructor(e){super();C(this,"parsed");C(this,"skip");C(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,s,n){let o=this.options,{x:a,y:r}=this.getProps(["x","y"],n);
1return Math.pow(e-a,2)+Math.pow(s-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,s){return Hh(this,e,"x",s)}inYRange(e,s){return Hh(this,e,"y",s)}getCenterPoint(e){let{x:s,y:n}=this.getProps(["x","y"],e);return{x:s,y:n}}size(e){e=e||this.options||{};let s=e.radius||0;s=Math.max(s,s&&e.hoverRadius||0);let n=s&&e.borderWidth||0;return(s+n)*2}draw(e,s){let n=this.options;this.skip||n.radius<.1||!xe(this,s,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,yn(e,n,this.x,this.y))}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};C(_i,"id","point"),C(_i,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),C(_i,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Md(i,t){let{x:e,y:s,base:n,width:o,height:a}=i.getProps(["x","y","base","width","height"],t),r,l,c,h,d;return i.horizontal?(d=a/2,r=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,r=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:r,top:c,right:l,bottom:h}}function wi(i,t,e,s){return i?0:Mt(t,e,s)}function Vp(i,t,e){let s=i.options.borderWidth,n=i.borderSkipped,o=Qo(s);return{t:wi(n.top,o.top,0,e),r:wi(n.right,o.right,0,t),b:wi(n.bottom,o.bottom,0,e),l:wi(n.left,o.left,0,t)}}function jp(i,t,e){let{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=je(n),a=Math.min(t,e),r=i.borderSkipped,l=s||$(n);return{topLeft:wi(!l||r.top||r.left,o.topLeft,0,a),topRight:wi(!l||r.top||r.right,o.topRight,0,a),bottomLeft:wi(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:wi(!l||r.bottom||r.right,o.bottomRight,0,a)}}function qp(i){let t=Md(i),e=t.right-t.left,s=t.bottom-t.top,n=Vp(i,e/2,s/2),o=jp(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Qr(i,t,e,s){let n=t===null,o=e===null,r=i&&!(n&&o)&&Md(i,s);return r&&(n||ve(t,r.left,r.right))&&(o||ve(e,r.top,r.bottom))}function $p(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Yp(i,t){i.rect(t.x,t.y,t.w,t.h)}function Zr(i,t,e={}){let s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,a=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+a,radius:i.radius}}var vi=class extends oe{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:a}=qp(this),r=$p(a.radius)?Ni:Yp;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,Zr(a,e,o)),t.clip(),r(t,Zr(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,Zr(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Qr(this,t,e,s)}inXRange(t,e){return Qr(this,t,null,e)}inYRange(t,e){return Qr(this,null,t,e)}getCenterPoint(t){let{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}};C(vi,"id","bar"),C(vi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),C(vi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Up=Object.freeze({__proto__:null,ArcElement:Xe,BarElement:vi,LineElement:Ie,PointElement:_i}),fl=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Vh=fl.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function kd(i){return fl[i%fl.length]}function Cd(i){return Vh[i%Vh.length]}function Xp(i,t){return i.borderColor=kd(t),i.backgroundColor=Cd(t),++t}function Kp(i,t){return i.backgroundColor=i.data.map(()=>kd(t++)),t}function Gp(i,t){return i.backgroundColor=i.data.map(()=>Cd(t++)),t}function Jp(i){let t=0;
1return(e,s)=>{let n=i.getDatasetMeta(s).controller;n instanceof Ue?t=Kp(e,t):n instanceof Vi?t=Gp(e,t):n&&(t=Xp(e,t))}}function jh(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function Qp(i){return i&&(i.borderColor||i.backgroundColor)}function Zp(){return lt.borderColor!=="rgba(0,0,0,0.1)"||lt.backgroundColor!=="rgba(0,0,0,0.1)"}var tm={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;let{data:{datasets:s},options:n}=i.config,{elements:o}=n,a=jh(s)||Qp(n)||o&&jh(o)||Zp();if(!e.forceOverride&&a)return;let r=Jp(i);s.forEach(r)}};function em(i,t,e,s,n){let o=n.samples||s;if(o>=e)return i.slice(t,t+e);let a=[],r=(e-2)/(o-2),l=0,c=t+e-1,h=t,d,u,g,p,b;for(a[l++]=i[h],d=0;d<o-2;d++){let y=0,x=0,v,A=Math.floor((d+1)*r)+1+t,k=Math.min(Math.floor((d+2)*r)+1,e)+t,M=k-A;for(v=A;v<k;v++)y+=i[v].x,x+=i[v].y;y/=M,x/=M;let D=Math.floor(d*r)+1+t,L=Math.min(Math.floor((d+1)*r)+1,e)+t,{x:S,y:R}=i[h];for(g=p=-1,v=D;v<L;v++)p=.5*Math.abs((S-y)*(i[v].y-R)-(S-i[v].x)*(x-R)),p>g&&(g=p,u=i[v],b=v);a[l++]=u,h=b}return a[l++]=i[c],a}function im(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,g,p,b,y=[],x=t+e-1,v=i[t].x,k=i[x].x-v;for(a=t;a<t+e;++a){r=i[a],l=(r.x-v)/k*s,c=r.y;let M=l|0;if(M===h)c<p?(p=c,d=a):c>b&&(b=c,u=a),n=(o*n+r.x)/++o;else{let D=a-1;if(!H(d)&&!H(u)){let L=Math.min(d,u),S=Math.max(d,u);L!==g&&L!==D&&y.push({...i[L],x:n}),S!==g&&S!==D&&y.push({...i[S],x:n})}a>0&&D!==g&&y.push(i[D]),y.push(r),h=M,o=0,p=b=c,d=u=g=a}}return y}function Ad(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function qh(i){i.data.datasets.forEach(t=>{Ad(t)})}function sm(i,t){let e=t.length,s=0,n,{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Mt(ye(t,o.axis,a).lo,0,e-1)),c?n=Mt(ye(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var nm={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){qh(i);return}let s=i.width;i.data.datasets.forEach((n,o)=>{let{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.data;if(nt([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=sm(l,c),g=e.threshold||4*s;if(u<=g){Ad(n);return}H(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(b){this._data=b}}));let p;switch(e.algorithm){case"lttb":p=em(c,d,u,s,e);break;case"min-max":p=im(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=p})},destroy(i){qh(i)}};function om(i,t,e){let s=i.segments,n=i.points,o=t.points,a=[];for(let r of s){let{start:l,end:c}=r;c=Sa(l,c,n);let h=gl(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}let d=ra(t,h);for(let u of d){let g=gl(e,o[u.start],o[u.end],u.loop),p=aa(r,n,g);for(let b of p)a.push({source:b,target:u,start:{[e]:$h(h,g,"start",Math.max)},end:{[e]:$h(h,g,"end",Math.min)}})}}return a}function gl(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=Tt(n),o=Tt(o)),{property:i,start:n,end:o}}function am(i,t){let{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Sa(a,r,n);let l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Sa(i,t,e){for(;t>i;t--){let s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function $h(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function Dd(i,t){let e=[],s=!1;return at(i)?(s=!0,e=i):e=am(i,t),e.length?new Ie({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Yh(i){return i&&i.fill!==!1}function rm(i,t,e){let n=i[t].fill,o=[t],a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!ft(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function lm(i,t,e){let s=um(i);if($(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return ft(n)&&Math.floor(n)===n?cm(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}
1function cm(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function hm(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:$(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function dm(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:$(i)?s=i.value:s=t.getBaseValue(),s}function um(i){let t=i.options,e=t.fill,s=B(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function fm(i){let{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=gm(t,e);r.push(Dd({x:null,y:t.bottom},s));for(let l=0;l<o.length;l++){let c=o[l];for(let h=c.start;h<=c.end;h++)pm(n,a[h],r)}return new Ie({points:n,options:{}})}function gm(i,t){let e=[],s=i.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){let o=s[n];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function pm(i,t,e){let s=[];for(let n=0;n<e.length;n++){let o=e[n],{first:a,last:r,point:l}=mm(o,t,"x");if(!(!l||a&&r)){if(a)s.unshift(l);else if(i.push(l),!r)break}}i.push(...s)}function mm(i,t,e){let s=i.interpolate(t,e);if(!s)return{};let n=s[e],o=i.segments,a=i.points,r=!1,l=!1;for(let c=0;c<o.length;c++){let h=o[c],d=a[h.start][e],u=a[h.end][e];if(ve(n,d,u)){r=n===d,l=n===u;break}}return{first:r,last:l,point:s}}var va=class{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,s){let{x:n,y:o,radius:a}=this;return e=e||{start:0,end:rt},t.arc(n,o,a,e.end,e.start,!0),!s.bounds}interpolate(t){let{x:e,y:s,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:s+Math.sin(o)*n,angle:o}}};function bm(i){let{chart:t,fill:e,line:s}=i;if(ft(e))return ym(t,e);if(e==="stack")return fm(i);if(e==="shape")return!0;let n=xm(i);return n instanceof va?n:Dd(n,s)}function ym(i,t){let e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function xm(i){return(i.scale||{}).getPointPositionForValue?vm(i):_m(i)}function _m(i){let{scale:t={},fill:e}=i,s=hm(e,t);if(ft(s)){let n=t.isHorizontal();return{x:n?s:null,y:n?null:s}}return null}function vm(i){let{scale:t,fill:e}=i,s=t.options,n=t.getLabels().length,o=s.reverse?t.max:t.min,a=dm(e,t,o),r=[];if(s.grid.circular){let l=t.getPointPositionForValue(0,o);return new va({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<n;++l)r.push(t.getPointPositionForValue(l,a));return r}function tl(i,t,e){let s=bm(t),{chart:n,index:o,line:a,scale:r,axis:l}=t,c=a.options,h=c.fill,d=c.backgroundColor,{above:u=d,below:g=d}=h||{},p=n.getDatasetMeta(o),b=la(n,p);s&&a.points.length&&(as(i,e),wm(i,{line:a,target:s,above:u,below:g,area:e,scale:r,axis:l,clip:b}),rs(i))}function wm(i,t){let{line:e,target:s,above:n,below:o,area:a,scale:r,clip:l}=t,c=e._loop?"angle":t.axis;i.save();let h=o;o!==n&&(c==="x"?(Uh(i,s,a.top),el(i,{line:e,target:s,color:n,scale:r,property:c,clip:l}),i.restore(),i.save(),Uh(i,s,a.bottom)):c==="y"&&(Xh(i,s,a.left),el(i,{line:e,target:s,color:o,scale:r,property:c,clip:l}),i.restore(),i.save(),Xh(i,s,a.right),h=n)),el(i,{line:e,target:s,color:h,scale:r,property:c,clip:l}),i.restore()}function Uh(i,t,e){let{segments:s,points:n}=t,o=!0,a=!1;i.beginPath();for(let r of s){let{start:l,end:c}=r,h=n[l],d=n[Sa(l,c,n)];o?(i.moveTo(h.x,h.y),o=!1):(i.lineTo(h.x,e),i.lineTo(h.x,h.y)),a=!!t.pathSegment(i,r,{move:a}),a?i.closePath():i.lineTo(d.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function Xh(i,t,e){let{segments:s,points:n}=t,o=!0,a=!1;i.beginPath();for(let r of s){let{start:l,end:c}=r,h=n[l],d=n[Sa(l,c,n)];o?(i.moveTo(h.x,h.y),o=!1):(i.lineTo(e,h.y),i.lineTo(h.x,h.y)),a=!!t.pathSegment(i,r,{move:a}),a?i.closePath():i.lineTo(e,d.y)}i.lineTo(e,t.first().y),i.closePath(),i.clip()}function el(i,t){let{line:e,target:s,property:n,color:o,scale:a,clip:r}=t,l=om(e,s,n);for(let{source:c,target:h,start:d,end:u}of l){let{style:{backgroundColor:g=o}={}}=c,p=s!==!0;i.save(),i.fillStyle=g,Sm(i,a,r,p&&gl(n,d,u)),i.beginPath();let b=!!e.pathSegment(i,c),y;if(p){b?i.closePath():Kh(i,s,u,n);let x=!!s.pathSegment(i,h,{move:b,reverse:!0});y=b&&x,y||Kh(i,s,d,n)}
1i.closePath(),i.fill(y?"evenodd":"nonzero"),i.restore()}}function Sm(i,t,e,s){let n=t.chart.chartArea,{property:o,start:a,end:r}=s||{};if(o==="x"||o==="y"){let l,c,h,d;o==="x"?(l=a,c=n.top,h=r,d=n.bottom):(l=n.left,c=a,h=n.right,d=r),i.beginPath(),e&&(l=Math.max(l,e.left),h=Math.min(h,e.right),c=Math.max(c,e.top),d=Math.min(d,e.bottom)),i.rect(l,c,h-l,d-c),i.clip()}}function Kh(i,t,e,s){let n=t.interpolate(e,s);n&&i.lineTo(n.x,n.y)}var Mm={id:"filler",afterDatasetsUpdate(i,t,e){let s=(i.data.datasets||[]).length,n=[],o,a,r,l;for(a=0;a<s;++a)o=i.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Ie&&(l={visible:i.isDatasetVisible(a),index:a,fill:lm(r,a,s),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,n.push(l);for(a=0;a<s;++a)l=n[a],!(!l||l.fill===!1)&&(l.fill=rm(n,a,e.propagate))},beforeDraw(i,t,e){let s=e.drawTime==="beforeDraw",n=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let a=n.length-1;a>=0;--a){let r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&tl(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let o=s[n].$filler;Yh(o)&&tl(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){let s=t.meta.$filler;!Yh(s)||e.drawTime!=="beforeDatasetDraw"||tl(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Gh=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},km=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,wa=class extends oe{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=it(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let s=t.labels,n=bt(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Gh(s,o),c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r,d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,g=-h;return this.legendItems.forEach((p,b)=>{let y=s+e/2+o.measureText(p.text).width;(b===0||c[c.length-1]+y+2*r>a)&&(d+=h,c[c.length-(b>0?0:1)]=0,g+=h,u++),l[b]={left:0,top:g,row:u,width:y,height:n},c[c.length-1]+=y+r}),d}_fitCols(t,e,s,n){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t,d=r,u=0,g=0,p=0,b=0;return this.legendItems.forEach((y,x)=>{let{itemWidth:v,itemHeight:A}=Cm(s,e,o,y,n);x>0&&g+A+2*r>h&&(d+=u+r,c.push({width:u,height:g}),p+=u+r,b++,u=g=0),l[x]={left:p,top:g,col:b,width:v,height:A},u=Math.max(u,v),g+=A+r}),d+=u,c.push({width:u,height:g}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=xi(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=Ot(s,this.left+n,this.right-this.lineWidths[r]);for(let c of e)r!==c.row&&(r=c.row,l=Ot(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=Ot(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(let c of e)c.col!==r&&(r=c.col,l=Ot(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;as(t,this),this._draw(),rs(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=lt.color,l=xi(t.rtl,this.left,this.width),c=bt(a.font),{padding:h}=a,d=c.size,u=d/2,g;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:p,boxHeight:b,itemHeight:y}=Gh(a,d),x=function(D,L,S){if(isNaN(p)||p<=0||isNaN(b)||b<0)return;n.save();let R=B(S.lineWidth,1);if(n.fillStyle=B(S.fillStyle,r),n.lineCap=B(S.lineCap,"butt"),n.lineDashOffset=B(S.lineDashOffset,0),n.lineJoin=B(S.lineJoin,"miter"),n.lineWidth=R,n.strokeStyle=B(S.strokeStyle,r),n.setLineDash(B(S.lineDash,[])),a.usePointStyle){let j={radiu
1s:b*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:R},W=l.xPlus(D,p/2),Y=L+u;Jo(n,j,W,Y,a.pointStyleWidth&&p)}else{let j=L+Math.max((d-b)/2,0),W=l.leftForLtr(D,p),Y=je(S.borderRadius);n.beginPath(),Object.values(Y).some(ct=>ct!==0)?Ni(n,{x:W,y:j,w:p,h:b,radius:Y}):n.rect(W,j,p,b),n.fill(),R!==0&&n.stroke()}n.restore()},v=function(D,L,S){Ve(n,S.text,D,L+y/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},A=this.isHorizontal(),k=this._computeTitleHeight();A?g={x:Ot(o,this.left+h,this.right-s[0]),y:this.top+h+k,line:0}:g={x:this.left+h,y:Ot(o,this.top+k+h,this.bottom-e[0].height),line:0},na(this.ctx,t.textDirection);let M=y+h;this.legendItems.forEach((D,L)=>{n.strokeStyle=D.fontColor,n.fillStyle=D.fontColor;let S=n.measureText(D.text).width,R=l.textAlign(D.textAlign||(D.textAlign=a.textAlign)),j=p+u+S,W=g.x,Y=g.y;l.setWidth(this.width),A?L>0&&W+j+h>this.right&&(Y=g.y+=M,g.line++,W=g.x=Ot(o,this.left+h,this.right-s[g.line])):L>0&&Y+M>this.bottom&&(W=g.x=W+e[g.line].width+h,g.line++,Y=g.y=Ot(o,this.top+k+h,this.bottom-e[g.line].height));let ct=l.x(W);if(x(ct,Y,D),W=Or(R,W+p+u,A?W+j:this.right,t.rtl),v(l.x(W),Y,D),A)g.x+=j+h;else if(typeof D.text!="string"){let Lt=c.lineHeight;g.y+=Ld(D,Lt)+h}else g.y+=M}),oa(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,s=bt(e.font),n=kt(e.padding);if(!e.display)return;let o=xi(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=Ot(t.align,d,this.right-u);else{let p=this.columnSizes.reduce((b,y)=>Math.max(b,y.height),0);h=c+Ot(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}let g=Ot(r,d,d+u);a.textAlign=o.textAlign(mn(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,Ve(a,e.text,g,h,s)}_computeTitleHeight(){let t=this.options.title,e=bt(t.font),s=kt(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(ve(t,this.left,this.right)&&ve(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],ve(t,n.left,n.left+n.width)&&ve(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){let e=this.options;if(!Lm(t.type,e))return;let s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let n=this._hoveredItem,o=km(n,s);n&&!o&&it(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&it(e.onHover,[t,s,this],this)}else s&&it(e.onClick,[t,s,this],this)}};function Cm(i,t,e,s,n){let o=Am(s,i,t,e),a=Dm(n,s,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Am(i,t,e,s){let n=i.text;return n&&typeof n!="string"&&(n=n.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+s.measureText(n).width}function Dm(i,t,e){let s=i;return typeof t.text!="string"&&(s=Ld(t,e)),s}function Ld(i,t){let e=i.text?i.text.length:0;return t*e}function Lm(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Pm={id:"legend",_element:wa,start(i,t,e){let s=i.legend=new wa({ctx:i.ctx,options:e,chart:i});Wt.configure(i,s,e),Wt.addBox(i,s)},stop(i){Wt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){let s=i.legend;Wt.configure(i,s,e),s.options=e},afterUpdate(i){let t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){let s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;
1return i._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(e?0:void 0),h=kt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},zn=class extends oe{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let n=at(s.text)?s.text.length:1;this._padding=kt(s.padding);let o=n*bt(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=Ot(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=Ot(r,n,e),l=K*-.5):(h=o-t,d=Ot(r,e,n),l=K*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let s=bt(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Ve(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:mn(e.align),textBaseline:"middle",translation:[a,r]})}};function Tm(i,t){let e=new zn({ctx:i.ctx,options:t,chart:i});Wt.configure(i,e,t),Wt.addBox(i,e),i.titleBlock=e}var Om={id:"title",_element:zn,start(i,t,e){Tm(i,e)},stop(i){let t=i.titleBlock;Wt.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let s=i.titleBlock;Wt.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},ua=new WeakMap,Em={id:"subtitle",start(i,t,e){let s=new zn({ctx:i.ctx,options:e,chart:i});Wt.configure(i,s,e),Wt.addBox(i,s),ua.set(i,s)},stop(i){Wt.removeBox(i,ua.get(i)),ua.delete(i)},beforeUpdate(i,t,e){let s=ua.get(i);Wt.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Pn={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;t<e;++t){let r=i[t].element;if(r&&r.hasValue()){let l=r.tooltipPosition();s.add(l.x),n+=l.y,++o}}return o===0||s.size===0?!1:{x:[...s].reduce((r,l)=>r+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o<a;++o){let l=i[o].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),h=un(t,c);h<n&&(n=h,r=l)}}if(r){let l=r.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function Ee(i,t){return t&&(at(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function Ye(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(` 2`)>-1?i.split(` 3`):i}function Rm(i,t){let{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Jh(i,t){let e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=bt(t.bodyFont),c=bt(t.titleFont),h=bt(t.footerFont),d=o.length,u=n.length,g=s.length,p=kt(t.padding),b=p.height,y=0,x=s.reduce((k,M)=>k+M.before.length+M.lines.length+M.after.length,0);if(x+=i.beforeBody.length+i.afterBody.length,d&&(b+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){let k=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;b+=g*k+(x-g)*l.lineHeight+(x-1)*t.bodySpacing}u&&(b+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let v=0,A=function(k){y=Math.max(y,e.measureText(k).width+v)};return e.save(),e.font=c.string,Q(i.title,A),e.font=l.string,Q(i.beforeBody.concat(i.afterBody),A),v=t.displayColors?a+2+t.boxPadding:0,Q(s,k=>{Q(k.before,A),Q(k.lines,A),Q(k.after,A)}
3),v=0,e.font=h.string,Q(i.footer,A),e.restore(),y+=p.width,{width:y,height:b}}function Im(i,t){let{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function Fm(i,t,e,s){let{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function zm(i,t,e,s){let{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i,c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),Fm(c,i,t,e)&&(c="center"),c}function Qh(i,t,e){let s=e.yAlign||t.yAlign||Im(i,e);return{xAlign:e.xAlign||t.xAlign||zm(i,t,e,s),yAlign:s}}function Nm(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Bm(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Zh(i,t,e,s){let{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:g}=je(a),p=Nm(t,r),b=Bm(t,l,c);return l==="center"?r==="left"?p+=c:r==="right"&&(p-=c):r==="left"?p-=Math.max(h,u)+n:r==="right"&&(p+=Math.max(d,g)+n),{x:Mt(p,0,s.width-t.width),y:Mt(b,0,s.height-t.height)}}function fa(i,t,e){let s=kt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function td(i){return Ee([],Ye(i))}function Wm(i,t,e){return Oe(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ed(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}var Pd={beforeTitle:_e,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:_e,beforeBody:_e,beforeLabel:_e,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");let e=i.formattedValue;return H(e)||(t+=e),t},labelColor(i){let e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){let e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:_e,afterBody:_e,beforeFooter:_e,footer:_e,afterFooter:_e};function Yt(i,t,e,s){let n=i[t].call(e,s);return typeof n=="undefined"?Pd[t].call(e,s):n}var In=class extends oe{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new ba(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Wm(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:s}=e,n=Yt(s,"beforeTitle",this,t),o=Yt(s,"title",this,t),a=Yt(s,"afterTitle",this,t),r=[];return r=Ee(r,Ye(n)),r=Ee(r,Ye(o)),r=Ee(r,Ye(a)),r}getBeforeBody(t,e){return td(Yt(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:s}=e,n=[];return Q(t,o=>{let a={before:[],lines:[],after:[]},r=ed(s,o);Ee(a.before,Ye(Yt(r,"beforeLabel",this,o))),Ee(a.lines,Yt(r,"label",this,o)),Ee(a.after,Ye(Yt(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return td(Yt(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:s}=e,n=Yt(s,"beforeFooter",this,t),o=Yt(s,"footer",this,t),a=Yt(s,"afterFooter",this,t),r=[];
3return r=Ee(r,Ye(n)),r=Ee(r,Ye(o)),r=Ee(r,Ye(a)),r}_createItems(t){let e=this._active,s=this.chart.data,n=[],o=[],a=[],r=[],l,c;for(l=0,c=e.length;l<c;++l)r.push(Rm(this.chart,e[l]));return t.filter&&(r=r.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),Q(r,h=>{let d=ed(t.callbacks,h);n.push(Yt(d,"labelColor",this,h)),o.push(Yt(d,"labelPointStyle",this,h)),a.push(Yt(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){let s=this.options.setContext(this.getContext()),n=this._active,o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{let r=Pn[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);let l=this._size=Jh(this,s),c=Object.assign({},r,l),h=Qh(this.chart,s,c),d=Zh(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){let o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){let{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=je(r),{x:u,y:g}=t,{width:p,height:b}=e,y,x,v,A,k,M;return o==="center"?(k=g+b/2,n==="left"?(y=u,x=y-a,A=k+a,M=k-a):(y=u+p,x=y+a,A=k-a,M=k+a),v=y):(n==="left"?x=u+Math.max(l,h)+a:n==="right"?x=u+p-Math.max(c,d)-a:x=this.caretX,o==="top"?(A=g,k=A-a,y=x-a,v=x+a):(A=g+b,k=A+a,y=x+a,v=x-a),M=A),{x1:y,x2:x,x3:v,y1:A,y2:k,y3:M}}drawTitle(t,e,s){let n=this.title,o=n.length,a,r,l;if(o){let c=xi(s.rtl,this.x,this.width);for(t.x=fa(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=bt(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=s.titleMarginBottom-r)}}_drawColorBox(t,e,s,n,o){let a=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=bt(o.bodyFont),d=fa(this,"left",o),u=n.x(d),g=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+g;if(o.usePointStyle){let b={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},y=n.leftForLtr(u,c)+c/2,x=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,yn(t,b,y,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,yn(t,b,y,x)}else{t.lineWidth=$(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;let b=n.leftForLtr(u,c),y=n.leftForLtr(n.xPlus(u,1),c-2),x=je(a.borderRadius);Object.values(x).some(v=>v!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ni(t,{x:b,y:p,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ni(t,{x:y,y:p+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(b,p,c,l),t.strokeRect(b,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(y,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=bt(s.bodyFont),u=d.lineHeight,g=0,p=xi(s.rtl,this.x,this.width),b=function(S){e.fillText(S,p.x(t.x+g),t.y+u/2),t.y+=u+o},y=p.textAlign(a),x,v,A,k,M,D,L;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=fa(this,y,s),e.fillStyle=s.bodyColor,Q(this.beforeBody,b),g=r&&y!=="right"?a==="center"?c/2+h:c+2+h:0,k=0,D=n.length;k<D;++k){for(x=n[k],v=this.labelTextColors[k],e.fillStyle=v,Q(x.before,b),A=x.lines,r&&A.length&&(this._drawColorBox(e,t,k,p,s),u=Math.max(d.lineHeight,l)),M=0,L=A.length;M<L;++M)b(A[M]),u=d.lineHeight;Q(x.after,b)}g=0,u=d.lineHeight,Q(this.afterBody,b),t.y-=o}drawFooter(t,e,s){let n=this.footer,o=n.length,a,r;if(o){let l=xi(s.rtl,this.x,this.width);for(t.x=fa(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",a=bt(s.footerFont),e.fillStyle=s.footerColor,e.font=a.string,r=0;r<o;
3++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){let{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:g,bottomRight:p}=je(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,s,n),e.lineTo(r+c-u,l),e.quadraticCurveTo(r+c,l,r+c,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(r+c,l+h-p),e.quadraticCurveTo(r+c,l+h,r+c-p,l+h),a==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(r+g,l+h),e.quadraticCurveTo(r,l+h,r,l+h-g),a==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){let a=Pn[t.position].call(this,this._active,this._eventPosition);if(!a)return;let r=this._size=Jh(this,t),l=Object.assign({},a,this._size),c=Qh(e,t,l),h=Zh(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let a=kt(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),na(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),oa(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,n=t.map(({datasetIndex:r,index:l})=>{let c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!os(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!os(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){let o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);let a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:s,caretY:n,options:o}=this,a=Pn[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}};C(In,"positioners",Pn);var Hm={id:"tooltip",_element:In,positioners:Pn,afterInit(i,t,e){e&&(i.tooltip=new In({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Pd},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Vm=Object.freeze({__proto__:null,Colors:tm,Decimation:nm,Filler:Mm,Legend:Pm,SubTitle:Em,Title:Om,Tooltip:Hm}),jm=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function qm(i,t,e,s){let n=i.indexOf(t);if(n===-1)return jm(i,t,e,s);let o=i.lastIndexOf(t);return n!==o?e:n}var $m=(i,t)=>i===null?null:Mt(Math.round(i),0,t);function id(i){let t=this.getLabels();return i>=0&&i<t.length?t[i]:i}var Tn=class extends qi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let s=this.getLabels();for(let{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(H(t))return null;let s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:qm(s,t,B(e,t),this._addedLabels),$m(e,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){let t=this.min,e=this.max,s=this.options.offset,n=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}
3getLabelForValue(t){return id.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};C(Tn,"id","category"),C(Tn,"defaults",{ticks:{callback:id}});function Ym(i,t){let e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,g=o||1,p=h-1,{min:b,max:y}=t,x=!H(a),v=!H(r),A=!H(c),k=(y-b)/(d+1),M=zo((y-b)/p/g)*g,D,L,S,R;if(M<1e-14&&!x&&!v)return[{value:b},{value:y}];R=Math.ceil(y/M)-Math.floor(b/M),R>p&&(M=zo(R*M/p/g)*g),H(l)||(D=Math.pow(10,l),M=Math.ceil(M*D)/D),n==="ticks"?(L=Math.floor(b/M)*M,S=Math.ceil(y/M)*M):(L=b,S=y),x&&v&&o&&Cr((r-a)/o,M/1e3)?(R=Math.round(Math.min((r-a)/M,h)),M=(r-a)/R,L=a,S=r):A?(L=x?a:L,S=v?r:S,R=c-1,M=(S-L)/R):(R=(S-L)/M,Ii(R,Math.round(R),M/1e3)?R=Math.round(R):R=Math.ceil(R));let j=Math.max(Bo(M),Bo(L));D=Math.pow(10,H(l)?j:l),L=Math.round(L*D)/D,S=Math.round(S*D)/D;let W=0;for(x&&(u&&L!==a?(e.push({value:a}),L<a&&W++,Ii(Math.round((L+W*M)*D)/D,a,sd(a,k,i))&&W++):L<a&&W++);W<R;++W){let Y=Math.round((L+W*M)*D)/D;if(v&&Y>r)break;e.push({value:Y})}return v&&u&&S!==r?e.length&&Ii(e[e.length-1].value,r,sd(r,k,i))?e[e.length-1].value=r:e.push({value:r}):(!v||S===r)&&e.push({value:S}),e}function sd(i,t,{horizontal:e,minRotation:s}){let n=se(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}var ps=class extends qi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return H(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds(),{min:n,max:o}=this,a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){let l=ue(n),c=ue(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,s=this.getTickLimit();s=Math.max(2,s);let n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Ym(n,o);return t.bounds==="ticks"&&No(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let t=this.ticks,e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){let n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return zi(t,this.chart.options.locale,this.options.ticks.format)}},On=class extends ps{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=ft(t)?t:0,this.max=ft(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=se(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};C(On,"id","linear"),C(On,"defaults",{ticks:{callback:bn.formatters.numeric}});var Nn=i=>Math.floor(Pe(i)),Wi=(i,t)=>Math.pow(10,Nn(i)+t);
3function nd(i){return i/Math.pow(10,Nn(i))===1}function od(i,t,e){let s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function Um(i,t){let e=t-i,s=Nn(e);for(;od(i,t,s)>10;)s++;for(;od(i,t,s)<10;)s--;return Math.min(s,Nn(i))}function Xm(i,{min:t,max:e}){t=Ht(i.min,t);let s=[],n=Nn(t),o=Um(t,e),a=o<0?Math.pow(10,Math.abs(o)):1,r=Math.pow(10,o),l=n>o?Math.pow(10,n):0,c=Math.round((t-l)*a)/a,h=Math.floor((t-l)/r/10)*r*10,d=Math.floor((c-h)/Math.pow(10,o)),u=Ht(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<e;)s.push({value:u,major:nd(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;let g=Ht(i.max,u);return s.push({value:g,major:nd(g),significand:d}),s}var En=class extends qi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let s=ps.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return ft(s)&&s>0?s:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=ft(t)?Math.max(0,t):null,this.max=ft(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ft(this._userMin)&&(this.min=t===Wi(this.min,0)?Wi(this.min,-1):Wi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,n=this.max,o=r=>s=t?s:r,a=r=>n=e?n:r;s===n&&(s<=0?(o(1),a(10)):(o(Wi(s,-1)),a(Wi(n,1)))),s<=0&&o(Wi(n,-1)),n<=0&&a(Wi(s,1)),this.min=s,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},s=Xm(e,this);return t.bounds==="ticks"&&No(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":zi(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Pe(t),this._valueRange=Pe(this.max)-Pe(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Pe(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};C(En,"id","logarithmic"),C(En,"defaults",{ticks:{callback:bn.formatters.logarithmic,major:{enabled:!0}}});function pl(i){let t=i.ticks;if(t.display&&i.display){let e=kt(t.backdropPadding);return B(t.font&&t.font.size,lt.font.size)+e.height}return 0}function Km(i,t,e){return e=at(e)?e:[e],{w:Er(i,t.string,e),h:e.length*t.lineHeight}}function ad(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:i<s||i>n?{start:t-e,end:t}:{start:t,end:t+e}}function Gm(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?K/o:0;for(let l=0;l<o;l++){let c=a.setContext(i.getPointLabelContext(l));n[l]=c.padding;let h=i.getPointPosition(l,i.drawingArea+n[l],r),d=bt(c.font),u=Km(i.ctx,d,i._pointLabels[l]);s[l]=u;let g=Tt(i.getIndexAngle(l)+r),p=Math.round(gn(g)),b=ad(p,h.x,u.w,0,180),y=ad(p,h.y,u.h,90,270);Jm(e,t,g,b,y)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=tb(i,s,n)}function Jm(i,t,e,s,n){let o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e)),r=0,l=0;s.start<t.l?(r=(t.l-s.start)/o,i.l=Math.min(i.l,t.l-r)):s.end>t.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.start<t.t?(l=(t.t-n.start)/a,i.t=Math.min(i.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Qm(i,t,e){let s=i.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,s+n+a,o),c=Math.round(gn(Tt(l.angle+mt))),h=sb(l.y,r.h,c),d=eb(c),u=ib(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function Zm(i,t){if(!t)return!0;let{left:e,top:s,right:n,bottom:o}=i;return!(xe({x:e,y:s},t)||xe({x:e,y:o},t)||xe({x:n,y:s},t)||xe({x:n,y:o},t))}function tb(i,t,e){let s=[],n=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:pl(o)/2,additionalAngle:a?K/n:0},c;for(let h=0;h<n;h++){l.padding=e[h],l.size=t[h];let d=Qm(i,h,l);s.push(d),r==="auto"&&(d.visible=Zm(d,c),d.visible&&(c=d))}return s}function eb(i){return i===0||i===180?"center":i<180?"left":"right"}function ib(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}
3function sb(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function nb(i,t,e){let{left:s,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!H(r)){let l=je(t.borderRadius),c=kt(t.backdropPadding);i.fillStyle=r;let h=s-c.left,d=n-c.top,u=o-s+c.width,g=a-n+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),Ni(i,{x:h,y:d,w:u,h:g,radius:l}),i.fill()):i.fillRect(h,d,u,g)}}function ob(i,t){let{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){let o=i._pointLabelItems[n];if(!o.visible)continue;let a=s.setContext(i.getPointLabelContext(n));nb(e,a,o);let r=bt(a.font),{x:l,y:c,textAlign:h}=o;Ve(e,i._pointLabels[n],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function Td(i,t,e,s){let{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,rt);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a<s;a++)o=i.getPointPosition(a,t),n.lineTo(o.x,o.y)}}function ab(i,t,e,s,n){let o=i.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!s||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(n.dash||[]),o.lineDashOffset=n.dashOffset,o.beginPath(),Td(i,e,a,s),o.closePath(),o.stroke(),o.restore())}function rb(i,t,e){return Oe(i,{label:e,index:t,type:"pointLabel"})}var Hi=class extends ps{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=kt(pl(this.options)/2),e=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(e,s)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=ft(t)&&!isNaN(t)?t:0,this.max=ft(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/pl(this.options))}generateTickLabels(t){ps.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,s)=>{let n=it(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){let t=this.options;t.display&&t.pointLabels.display?Gm(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){let e=rt/(this._pointLabels.length||1),s=this.options.startAngle||0;return Tt(t*e+se(s))}getDistanceFromCenterForValue(t){if(H(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(H(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t<e.length){let s=e[t];return rb(this.getContext(),t,s)}}getPointPosition(t,e,s=0){let n=this.getIndexAngle(t)-mt+s;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:e,top:s,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:s,right:n,bottom:o}}drawBackground(){let{backgroundColor:t,grid:{circular:e}}=this.options;if(t){let s=this.ctx;s.save(),s.beginPath(),Td(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),s.closePath(),s.fillStyle=t,s.fill(),s.restore()}}drawGrid(){let t=this.ctx,e=this.options,{angleLines:s,grid:n,border:o}=e,a=this._pointLabels.length,r,l,c;if(e.pointLabels.display&&ob(this,a),n.display&&this.ticks.forEach((h,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);let u=this.getContext(d),g=n.setContext(u),p=o.setContext(u);ab(this,g,l,a,p)}}),s.display){for(t.save(),r=a-1;r>=0;r--){let h=s.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}
3t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;let n=this.getIndexAngle(0),o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;let c=s.setContext(this.getContext(l)),h=bt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;let d=kt(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Ve(t,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}};C(Hi,"id","radialLinear"),C(Hi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:bn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),C(Hi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),C(Hi,"descriptors",{angleLines:{_fallback:"grid"}});var Ma={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}},Ut=Object.keys(Ma);function rd(i,t){return i-t}function ld(i,t){if(H(t))return null;let e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts,a=t;return typeof s=="function"&&(a=s(a)),ft(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(bi(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function cd(i,t,e,s){let n=Ut.length;for(let o=Ut.indexOf(i);o<n-1;++o){let a=Ma[Ut[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=s)return Ut[o]}return Ut[n-1]}function lb(i,t,e,s,n){for(let o=Ut.length-1;o>=Ut.indexOf(e);o--){let a=Ut[o];if(Ma[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return Ut[e?Ut.indexOf(e):0]}function cb(i){for(let t=Ut.indexOf(i)+1,e=Ut.length;t<e;++t)if(Ma[Ut[t]].common)return Ut[t]}function hd(i,t,e){if(!e)i[t]=!0;else if(e.length){let{lo:s,hi:n}=pn(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function hb(i,t,e,s){let n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value,r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function dd(i,t,e){let s=[],n={},o=t.length,a,r;for(a=0;a<o;++a)r=t[a],n[r]=a,s.push({value:r,major:!1});return o===0||!e?s:hb(i,s,n,e)}var ji=class extends qi{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let s=t.time||(t.time={}),n=this._adapter=new Sg._date(t.adapters.date);n.init(e),Ei(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ld(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,s=t.time.unit||"day",{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!r&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=ft(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=ft(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){let t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);let o=this.min,a=this.max,r=Lr(n,o,a);return this._unit=e.unit||(s.autoSkip?cd(e.minUnit,this.min,this.max,this._getLabelCapacity(o)
3):lb(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:cb(this._unit),this.initOffsets(n),t.reverse&&r.reverse(),dd(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;e=Mt(e,0,a),s=Mt(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){let t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||cd(o.minUnit,e,s,this._getLabelCapacity(e)),r=B(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=bi(l)||l===!0,h={},d=e,u,g;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);let p=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,g=0;u<s;u=+t.add(u,r,a),g++)hd(h,u,p);return(u===s||n.bounds==="ticks"||g===1)&&hd(h,u,p),Object.keys(h).sort(rd).map(b=>+b)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){let n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,s,n){let o=this.options,a=o.ticks.callback;if(a)return it(a,[t,e,s],this);let r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=s[e],g=c&&d&&u&&u.major;return this._adapter.format(t,n||(g?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){let e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,s=this.ctx.measureText(t).width,n=se(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:s*o+r*a,h:s*a+r*o}}_getLabelCapacity(t){let e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,dd(this,[t],this._majorUnit),n),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,s;if(t.length)return t;let n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(ld(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Vo(t.sort(rd))}};C(ji,"id","time"),C(ji,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ga(i,t,e){let s=0,n=i.length-1,o,a,r,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=ye(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=ye(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);let c=a-o;return c?r+(l-r)*(t-o)/c:r}var Rn=class extends ji{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ga(e,this.min),this._tableRange=ga(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:s}=this,n=[],o=[],a,r,l,c,h;for(a=0,r=t.length;a<r;++a)c=t[a],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a<r;++a)h=n[a+1],l=n[a-1],c=n[a],Math.round((h+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o}_generate(){let t=this.min,e=this.max,s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(ga(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return ga(this._table,s*this._tableRange+this._minPos,!0)}};C(Rn,"id","timeseries"),C(Rn,"defaults",ji.defaults);var db=Object.freeze({__proto__:null,CategoryScale:Tn,LinearScale:On,LogarithmicScale:En,RadialLinearScale:Hi,TimeScale:ji,TimeSeriesScale:Rn}),Od=[wg,Up,Vm,db];fe.register(...Od);var ka=fe;var Ed=(function(){if(typeof window!="undefined"){if(window.devicePixelRatio)return window.devicePixelRatio;var i=window.screen;if(i)return(i.deviceXDPI||1)/(i.logicalXDPI||1)}return 1})(),Hn={toTextLines:function(i){var t=[],e;for(i=[].concat(i);i.length;)e=i.pop(),typeof e=="string"?t.unshift.apply(t,e.split(` 4`)):Array.isArray(e)?i.push.apply(i,e):H(i)||t.unshift(""+e);return t},textSize:function(i,t,e){var s=[].concat(t),n=s.length,o=i.font,a=0,r;for(i.font=e.string,r=0;r<n;++r)a=Math.max(i.measureText(s[r]).width,a);return i.font=o,{height:n*e.lineHeight,width:a}},bound:function(i,t,e){return Math.max(i,Math.min(t,e))},arrayDiff:function(i,t){var e=i.slice(),s=[],n,o,a,r;for(n=0,a=t.length;n<a;++n)r=t[n],o=e.indexOf(r),o===-1?s.push([r,1]):e.splice(o,1);for(n=0,a=e.length;n<a;++n)s.push([e[n],-1]);return s},rasterize:function(i){return Math.round(i*Ed)/Ed}};function ml(i,t){var e=t.x,s=t.y;if(e===null)return{x:0,y:-1};if(s===null)return{x:1,y:0};var n=i.x-e,o=i.y-s,a=Math.sqrt(n*n+o*o);return{x:a?n/a:0,y:a?o/a:-1}}function ub(i,t,e,s,n){switch(n){case"center":e=s=0;break;case"bottom":e=0,s=1;break;case"right":e=1,s=0;break;case"left":e=-1,s=0;break;case"top":e=0,s=-1;break;case"start":e=-e,s=-s;break;case"end":break;default:n*=Math.PI/180,e=Math.cos(n),s=Math.sin(n);break}return{x:i,y:t,vx:e,vy:s}}var fb=0,Id=1,Fd=2,zd=4,Nd=8;function Ca(i,t,e){var s=fb;return i<e.left?s|=Id:i>e.right&&(s|=Fd),t<e.top?s|=Nd:t>e.bottom&&(s|=zd),s}function gb(i,t){for(var e=i.x0,s=i.y0,n=i.x1,o=i.y1,a=Ca(e,s,t),r=Ca(n,o,t),l,c,h;!(!(a|r)||a&r);
4)l=a||r,l&Nd?(c=e+(n-e)*(t.top-s)/(o-s),h=t.top):l&zd?(c=e+(n-e)*(t.bottom-s)/(o-s),h=t.bottom):l&Fd?(h=s+(o-s)*(t.right-e)/(n-e),c=t.right):l&Id&&(h=s+(o-s)*(t.left-e)/(n-e),c=t.left),l===a?(e=c,s=h,a=Ca(e,s,t)):(n=c,o=h,r=Ca(n,o,t));return{x0:e,x1:n,y0:s,y1:o}}function Aa(i,t){var e=t.anchor,s=i,n,o;return t.clamp&&(s=gb(s,t.area)),e==="start"?(n=s.x0,o=s.y0):e==="end"?(n=s.x1,o=s.y1):(n=(s.x0+s.x1)/2,o=(s.y0+s.y1)/2),ub(n,o,i.vx,i.vy,t.align)}var Da={arc:function(i,t){var e=(i.startAngle+i.endAngle)/2,s=Math.cos(e),n=Math.sin(e),o=i.innerRadius,a=i.outerRadius;return Aa({x0:i.x+s*o,y0:i.y+n*o,x1:i.x+s*a,y1:i.y+n*a,vx:s,vy:n},t)},point:function(i,t){var e=ml(i,t.origin),s=e.x*i.options.radius,n=e.y*i.options.radius;return Aa({x0:i.x-s,y0:i.y-n,x1:i.x+s,y1:i.y+n,vx:e.x,vy:e.y},t)},bar:function(i,t){var e=ml(i,t.origin),s=i.x,n=i.y,o=0,a=0;return i.horizontal?(s=Math.min(i.x,i.base),o=Math.abs(i.base-i.x)):(n=Math.min(i.y,i.base),a=Math.abs(i.base-i.y)),Aa({x0:s,y0:n+a,x1:s+o,y1:n,vx:e.x,vy:e.y},t)},fallback:function(i,t){var e=ml(i,t.origin);return Aa({x0:i.x,y0:i.y,x1:i.x+(i.width||0),y1:i.y+(i.height||0),vx:e.x,vy:e.y},t)}},Ke=Hn.rasterize;function pb(i){var t=i.borderWidth||0,e=i.padding,s=i.size.height,n=i.size.width,o=-n/2,a=-s/2;return{frame:{x:o-e.left-t,y:a-e.top-t,w:n+e.width+t*2,h:s+e.height+t*2},text:{x:o,y:a,w:n,h:s}}}function mb(i,t){var e=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!e)return null;if(e.xCenter!==void 0&&e.yCenter!==void 0)return{x:e.xCenter,y:e.yCenter};var s=e.getBasePixel();return i.horizontal?{x:s,y:null}:{x:null,y:s}}function bb(i){return i instanceof Xe?Da.arc:i instanceof _i?Da.point:i instanceof vi?Da.bar:Da.fallback}function yb(i,t,e,s,n,o){var a=Math.PI/2;if(o){var r=Math.min(o,n/2,s/2),l=t+r,c=e+r,h=t+s-r,d=e+n-r;i.moveTo(t,c),l<h&&c<d?(i.arc(l,c,r,-Math.PI,-a),i.arc(h,c,r,-a,0),i.arc(h,d,r,0,a),i.arc(l,d,r,a,Math.PI)):l<h?(i.moveTo(l,e),i.arc(h,c,r,-a,a),i.arc(l,c,r,a,Math.PI+a)):c<d?(i.arc(l,c,r,-Math.PI,0),i.arc(l,d,r,0,Math.PI)):i.arc(l,c,r,-Math.PI,Math.PI),i.closePath(),i.moveTo(t,e)}else i.rect(t,e,s,n)}function xb(i,t,e){var s=e.backgroundColor,n=e.borderColor,o=e.borderWidth;!s&&(!n||!o)||(i.beginPath(),yb(i,Ke(t.x)+o/2,Ke(t.y)+o/2,Ke(t.w)-o,Ke(t.h)-o,e.borderRadius),i.closePath(),s&&(i.fillStyle=s,i.fill()),n&&o&&(i.strokeStyle=n,i.lineWidth=o,i.lineJoin="miter",i.stroke()))}function _b(i,t,e){var s=e.lineHeight,n=i.w,o=i.x,a=i.y+s/2;return t==="center"?o+=n/2:(t==="end"||t==="right")&&(o+=n),{h:s,w:n,x:o,y:a}}function vb(i,t,e){var s=i.shadowBlur,n=e.stroked,o=Ke(e.x),a=Ke(e.y),r=Ke(e.w);n&&i.strokeText(t,o,a,r),e.filled&&(s&&n&&(i.shadowBlur=0),i.fillText(t,o,a,r),s&&n&&(i.shadowBlur=s))}function wb(i,t,e,s){var n=s.textAlign,o=s.color,a=!!o,r=s.font,l=t.length,c=s.textStrokeColor,h=s.textStrokeWidth,d=c&&h,u;if(!(!l||!a&&!d))for(e=_b(e,n,r),i.font=r.string,i.textAlign=n,i.textBaseline="middle",i.shadowBlur=s.textShadowBlur,i.shadowColor=s.textShadowColor,a&&(i.fillStyle=o),d&&(i.lineJoin="round",i.lineWidth=h,i.strokeStyle=c),u=0,l=t.length;u<l;++u)vb(i,t[u],{stroked:d,filled:a,w:e.w,x:e.x,y:e.y+e.h*u})}var Bd=function(i,t,e,s){var n=this;n._config=i,n._index=s,n._model=null,n._rects=null,n._ctx=t,n._el=e};ie(Bd.prototype,{_modelize:function(i,t,e,s){var n=this,o=n._index,a=bt(nt([e.font,{}],s,o)),r=nt([e.color,lt.color],s,o);return{align:nt([e.align,"center"],s,o),anchor:nt([e.anchor,"center"],s,o),area:s.chart.chartArea,backgroundColor:nt([e.backgroundColor,null],s,o),borderColor:nt([e.borderColor,null],s,o),borderRadius:nt([e.borderRadius,0],s,o),borderWidth:nt([e.borderWidth,0],s,o),clamp:nt([e.clamp,!1],s,o),clip:nt([e.clip,!1],s,o),color:r,display:i,font:a,lines:t,offset:nt([e.offset,4],s,o),opacity:nt([e.opacity,1],s,o),origin:mb(n._el,s),padding:kt(nt([e.padding,4],s,o)),positioner:bb(n._el),rotation:nt([e.rotation,0],s,o)*(Math.PI/180),size:Hn.textSize(n._ctx,t,a),textAlign:nt([e.textAlign,"start"],s,o),textShadowBlur:nt([e.textShadowBlur,0],s,o),textShadowColor:nt([e.textShadowColor,r],s,o),textStrokeColor:nt([e.textStrokeColor,r],s,o),textStrokeWidth:nt([e.textStrokeWidth,0],s,o)}},update:function(i){var t=this,e=null,s=null,n=t._index,o=t._config,a,r,l,c=nt([o.display,!0],i,n);c&&(a=i.dataset.data[n],r=B(it(o.formatter,[a,i]),a),l=H(r)?[]:Hn.toTextLines(r),l.length&&(e=t._modelize(c,l,o,i),s=pb(e))),t._model=e,t._rects=s},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(i,t){var e=this,s=i.ctx,n=e._model,o=e._rects,a;this.visible()&&(s.save(),n.clip&&(a=n.area,s.beginPath(),s.rect(a.left,a.top,a.right-a.left,a.bottom-a.top),s.clip()),s.globalAlpha=Hn.bound(0,n.opacity,1),s.translate(Ke(t.x),Ke(t.y)),s.rotate(n.rotation),xb(s,o.frame,n),wb(s,n.lines,o.text,n),s.restore(
4))}});var Sb=Number.MIN_SAFE_INTEGER||-9007199254740991,Mb=Number.MAX_SAFE_INTEGER||9007199254740991;function Wn(i,t,e){var s=Math.cos(e),n=Math.sin(e),o=t.x,a=t.y;return{x:o+s*(i.x-o)-n*(i.y-a),y:a+n*(i.x-o)+s*(i.y-a)}}function Rd(i,t){var e=Mb,s=Sb,n=t.origin,o,a,r,l,c;for(o=0;o<i.length;++o)a=i[o],r=a.x-n.x,l=a.y-n.y,c=t.vx*r+t.vy*l,e=Math.min(e,c),s=Math.max(s,c);return{min:e,max:s}}function La(i,t){var e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);return{vx:(t.x-i.x)/n,vy:(t.y-i.y)/n,origin:i,ln:n}}var Wd=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};ie(Wd.prototype,{center:function(){var i=this._rect;return{x:i.x+i.w/2,y:i.y+i.h/2}},update:function(i,t,e){this._rotation=e,this._rect={x:t.x+i.x,y:t.y+i.y,w:t.w,h:t.h}},contains:function(i){var t=this,e=1,s=t._rect;return i=Wn(i,t.center(),-t._rotation),!(i.x<s.x-e||i.y<s.y-e||i.x>s.x+s.w+e*2||i.y>s.y+s.h+e*2)},intersects:function(i){var t=this._points(),e=i._points(),s=[La(t[0],t[1]),La(t[0],t[3])],n,o,a;for(this._rotation!==i._rotation&&s.push(La(e[0],e[1]),La(e[0],e[3])),n=0;n<s.length;++n)if(o=Rd(t,s[n]),a=Rd(e,s[n]),o.max<a.min||a.max<o.min)return!1;return!0},_points:function(){var i=this,t=i._rect,e=i._rotation,s=i.center();return[Wn({x:t.x,y:t.y},s,e),Wn({x:t.x+t.w,y:t.y},s,e),Wn({x:t.x+t.w,y:t.y+t.h},s,e),Wn({x:t.x,y:t.y+t.h},s,e)]}});function Hd(i,t,e){var s=t.positioner(i,t),n=s.vx,o=s.vy;if(!n&&!o)return{x:s.x,y:s.y};var a=e.w,r=e.h,l=t.rotation,c=Math.abs(a/2*Math.cos(l))+Math.abs(r/2*Math.sin(l)),h=Math.abs(a/2*Math.sin(l))+Math.abs(r/2*Math.cos(l)),d=1/Math.max(Math.abs(n),Math.abs(o));return c*=n*d,h*=o*d,c+=t.offset*n,h+=t.offset*o,{x:s.x+c,y:s.y+h}}function kb(i,t){var e,s,n,o;for(e=i.length-1;e>=0;--e)for(n=i[e].$layout,s=e-1;s>=0&&n._visible;--s)o=i[s].$layout,o._visible&&n._box.intersects(o._box)&&t(n,o);return i}function Cb(i){var t,e,s,n,o,a,r;for(t=0,e=i.length;t<e;++t)s=i[t],n=s.$layout,n._visible&&(r=new Proxy(s._el,{get:(l,c)=>l.getProps([c],!0)[c]}),o=s.geometry(),a=Hd(r,s.model(),o),n._box.update(a,o,s.rotation()));return kb(i,function(l,c){var h=l._hidable,d=c._hidable;h&&d||d?c._visible=!1:h&&(l._visible=!1)})}var Vn={prepare:function(i){var t=[],e,s,n,o,a;for(e=0,n=i.length;e<n;++e)for(s=0,o=i[e].length;s<o;++s)a=i[e][s],t.push(a),a.$layout={_box:new Wd,_hidable:!1,_visible:!0,_set:e,_idx:a._index};return t.sort(function(r,l){var c=r.$layout,h=l.$layout;return c._idx===h._idx?h._set-c._set:h._idx-c._idx}),this.update(t),t},update:function(i){var t=!1,e,s,n,o,a;for(e=0,s=i.length;e<s;++e)n=i[e],o=n.model(),a=n.$layout,a._hidable=o&&o.display==="auto",a._visible=n.visible(),t|=a._hidable;t&&Cb(i)},lookup:function(i,t){var e,s;for(e=i.length-1;e>=0;--e)if(s=i[e].$layout,s&&s._visible&&s._box.contains(t))return i[e];return null},draw:function(i,t){var e,s,n,o,a,r;for(e=0,s=t.length;e<s;++e)n=t[e],o=n.$layout,o._visible&&(a=n.geometry(),r=Hd(n._el,n.model(),a),o._box.update(r,a,n.rotation()),n.draw(i,r))}},Ab=function(i){if(H(i))return null;var t=i,e,s,n;if($(i))if(!H(i.label))t=i.label;else if(!H(i.r))t=i.r;else for(t="",e=Object.keys(i),n=0,s=e.length;n<s;++n)t+=(n!==0?", ":"")+e[n]+": "+i[e[n]];return""+t},Db={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:Ab,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Xt="$datalabels",Vd="$default";function Lb(i,t){var e=i.datalabels,s={},n=[],o,a;return e===!1?null:(e===!0&&(e={}),t=ie({},[t,e]),o=t.labels||{},a=Object.keys(o),delete t.labels,a.length?a.forEach(function(r){o[r]&&n.push(ie({},[t,o[r],{_key:r}]))}):n.push(t),s=n.reduce(function(r,l){return Q(l.listeners||{},function(c,h){r[h]=r[h]||{},r[h][l._key||Vd]=c}),delete l.listeners,r},{}),{labels:n,listeners:s})}function bl(i,t,e,s){if(t){var n=e.$context,o=e.$groups,a;t[o._set]&&(a=t[o._set][o._key],a&&it(a,[n,s])===!0&&(i[Xt]._dirty=!0,e.update(n)))}}function Pb(i,t,e,s,n){var o,a;!e&&!s||(e?s?e!==s&&(a=o=!0):a=!0:o=!0,a&&bl(i,t.leave,e,n),o&&bl(i,t.enter,s,n))}function Tb(i,t){var e=i[Xt],s=e._listeners,n,o;if(!(!s.enter&&!s.leave)){if(t.type==="mousemove")o=Vn.lookup(e._labels,t);else if(t.type!=="mouseout")return;n=e._hovered,e._hovered=o,Pb(i,s,n,o,t)}}function Ob(i,t){var e=i[Xt],s=e._listeners.click,n=s&&Vn.lookup(e._labels,t);n&&bl(i,s,n,t)}var Pa={id:"datalabels",defaults:Db,beforeInit:function(i){i[Xt]={_actives:[]}},beforeUpdate:function(i){var t=i[Xt];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(i,t,e){var s=t.index,n=i[Xt],o=n._datasets[s]=[],a=i.isDatasetVisible(s),r=i.data.datasets[s],l=Lb(r,e),c=t.meta.data||[],h=i.ctx,d,u,g,p,b,y,x,v;for(h.save(),d=0,g=c.length;d<g;++d)if(x=c[d],x[Xt]=[],a&&x&&i.getDataVisibility(d)&&!x.skip)for(u=0,p=l.labels.length;u<p;++u)b=l.labels[u],y=b._key,v=new Bd(b,h,x,d),v.$groups={_set:s,_key:y||Vd},v.$context={active:!1,chart:i,dataIndex:d,dataset:r,datasetIndex:s},v.update(v.$context),x[Xt].push(v),o.push(v);
4h.restore(),ie(n._listeners,l.listeners,{merger:function(A,k,M){k[A]=k[A]||{},k[A][t.index]=M[A],n._listened=!0}})},afterUpdate:function(i){i[Xt]._labels=Vn.prepare(i[Xt]._datasets)},afterDatasetsDraw:function(i){Vn.draw(i,i[Xt]._labels)},beforeEvent:function(i,t){if(i[Xt]._listened){var e=t.event;switch(e.type){case"mousemove":case"mouseout":Tb(i,e);break;case"click":Ob(i,e);break}}},afterEvent:function(i){var t=i[Xt],e=t._actives,s=t._actives=i.getActiveElements(),n=Hn.arrayDiff(e,s),o,a,r,l,c,h,d;for(o=0,a=n.length;o<a;++o)if(c=n[o],c[1])for(d=c[0].element[Xt]||[],r=0,l=d.length;r<l;++r)h=d[r],h.$context.active=c[1]===1,h.update(h.$context);(t._dirty||n.length)&&(Vn.update(t._labels),i.render()),delete t._dirty}};var jn=class{constructor(){C(this,"data",{});C(this,"userData",{});C(this,"config",{});C(this,"htmlLegendPlugin",{});C(this,"nsChart","");C(this,"switchResults","");let t=this;this.userData=JSON.parse(localStorage.getItem("roiForm"))||{},this.userData&&(this.data=this.setChartData()),this.switchResults=document.getElementById("switch_results"),this.htmlLegendPlugin={id:"htmlLegend",afterUpdate(e,s,n){let o=t.getOrCreateLegendList(e,n.containerID);for(;o.firstChild;)o.firstChild.remove();e.options.plugins.legend.labels.generateLabels(e).filter(function(r){return r.text!==""}).forEach(r=>{let l=document.createElement("li"),c=document.createElement("span");c.style.background=r.fillStyle;let h=document.createElement("p"),d=document.createTextNode(r.text);h.appendChild(d),l.appendChild(c),l.appendChild(h),o.appendChild(l)})}},this.config={type:"bar",data:this.data,options:{maintainAspectRatio:!1,responsive:!0,animation:!1,normalized:!0,interaction:{intersect:!1},plugins:{htmlLegend:{containerID:"chart-legend"},legend:{display:!1},datalabels:{color:"white",formatter:function(e,s){return e!==0?s.dataset.barLabel:""},font:{family:"Nunito Sans",size:11,lineHeight:1,weight:"600"},rotation:window.innerWidth<768?-90:0}},scales:{x:{stacked:!0,grid:{display:!1},labels:!1},y:{stacked:!0,beginAtZero:!0,min:0,max:100,ticks:{stepSize:1,callback:function(e,s){if(s===35||s===80||s===100)return""}},grid:{display:!0,tickBorderDash:[2,2]},border:{dash:[2,2]}}}},plugins:[t.htmlLegendPlugin,Pa]}}getSastSettings(){let t=document.getElementById("sast_settings");return{label:t.getAttribute("data-chart-label"),barLabel:t.getAttribute("data-bar-label"),backgroundColor:t.getAttribute("data-bar-color")}}getDastSettings(){let t=document.getElementById("dast_settings");return{label:t.getAttribute("data-chart-label"),barLabel:t.getAttribute("data-bar-label"),backgroundColor:t.getAttribute("data-bar-color")}}getPenTestSettings(){let t=document.getElementById("pen_tests_settings");return{label:t.getAttribute("data-chart-label"),barLabel:t.getAttribute("data-bar-label"),backgroundColor:t.getAttribute("data-bar-color")}}getNoCoverageSettings(){let t=document.getElementById("no_coverage_settings");return{label:t.getAttribute("data-chart-label"),barLabel:t.getAttribute("data-bar-label"),backgroundColor:t.getAttribute("data-bar-color")}}getOrCreateLegendList(t,e){let s=document.getElementById(e),n=s.querySelector("ul");return n||(n=document.createElement("ul"),s.appendChild(n)),n}setChartData(){let t=this.userData.releases,e=this.userData.pen_tests,s={automated:this.userData.sast_automated||"off",manual:this.userData.sast_manual||"off"},n={automated:this.userData.dast_automated||"off",manual:this.userData.dast_manual||"off"},o=[];for(let g=0;g<t;g++)o[g]="Release "+(g+1);let a=this.penTestsCoverage(t,e),r=this.calculateSastCoverage(s,a,t),l=this.calculateSastNoCoverage(r,a,t),c=this.calculateDastCoverage(n,a,t),h=this.calculateDastNoCoverage(c,a,t),d=this.calculateNoCoverage(r,l,c,h,a,t),u=[{label:this.getSastSettings().label,barLabel:this.getSastSettings().barLabel,data:r,backgroundColor:this.getSastSettings().backgroundColor,stack:1},{label:"",barLabel:this.getNoCoverageSettings().barLabel,data:l,backgroundColor:this.getNoCoverageSettings().backgroundColor,stack:1},{label:this.getDastSettings().label,barLabel:this.getDastSettings().barLabel,data:c,backgroundColor:this.getDastSettings().backgroundColor,stack:1},{label:"",barLabel:this.getNoCoverageSettings().barLabel,data:h,backgroundColor:this.getNoCoverageSettings().backgroundColor,stack:1},{label:this.getPenTestSettings().label,barLabel:this.getPenTestSettings().barLabel,data:a,backgroundColor:this.getPenTestSettings().backgroundColor,stack:1},{label:this.getNoCoverageSettings().label,barLabel:this.getNoCoverageSettings().barLabel,data:d,backgroundColor:this.getNoCoverageSettings().backgroundColor,stack:1}];return{labels:o,datasets:u}}setNowSecureChartData(){let t=this.userData?this.userData.releases:12,e=[],s=[],n=[],o=[];for(let r=0;r<t;r++)e[r]="Release "+(r+1),s[r]=20,n[r]=45,o[r]=35;return{labels:e,datasets:[{label:"SAST",barLabel:"SAST",data:o,backgroundColor:"#002e48",stack:1},{label:"DAST",barLabel:"DAST",data:n,backgroundColor:"#0099ff",stack:1},{label:"PTaaS Guided",barLabel:` PTaaS 5Guided`,data:s,backgroundColor:"#33ccff",stack:1}]}}buildChart(){let t=document.getElementById("test-coverage");this.nsChart=new ka(t,this.config);let e=this.data.labels.length,s=e*58;window.innerWidth<768&&(s=e*30),document.querySelector(".chart-container-body").style.width=`${s}px`}penTestsCoverage(t,e){let s=Math.round(t/e),n=t?new Array(Number(t)).fill(0):[],o=1;for(let a=0;a<=t-1;a++){let r=t-1-a,l=e-o;r>l?a%s===0&&(o<=e&&(n[a]=100),o++):(o<=e&&(n[a]=100),o++)}return n}calculateSastCoverage(t,e,s){let n=s?new Array(Number(s)).fill(0):[];if(t.automated==="on"||t.manual==="on"){let o=35;t.automated==="off"&&t.manual==="on"&&(o=o*.6);for(let a=0;a<s;a++)e[a]!==100&&(n[a]=o)}return n}calculateSastNoCoverage(t,e,s){let n=s?new Array(Number(s)).fill(0):[];for(let o=0;o<s;o++)e[o]!==100&&(n[o]=35-t[o]);return n}calculateDastCoverage(t,e,s){let n=s?new Array(Number(s)).fill(0):[];if(t.automated==="on"||t.manual==="on"){let o=45;t.automated==="off"&&t.manual==="on"&&(o=o*.6);for(let a=0;a<s;a++)e[a]!==100&&(n[a]=o)}return n}calculateDastNoCoverage(t,e,s){let n=s?new Array(Number(s)).fill(0):[];for(let o=0;o<s;o++)e[o]!==100&&(n[o]=45-t[o]);return n}calculateNoCoverage(t,e,s,n,o,a){let r=a?new Array(Number(a)).fill(0):[];for(let l=0;l<a;l++)o[l]!==100&&(r[l]=100-(t[l]+e[l]+s[l]+n[l]));return r}
5switchPillars(){document.querySelectorAll(".pillars").forEach(e=>{e.classList.contains("with-nowsecure")&&this.switchResults.checked&&e.classList.add("active"),e.classList.contains("with-nowsecure")&&!this.switchResults.checked&&e.classList.remove("active"),e.classList.contains("without-nowsecure")&&!this.switchResults.checked&&e.classList.add("active"),e.classList.contains("without-nowsecure")&&this.switchResults.checked&&e.classList.remove("active")})}init(){let t=document.querySelector(".roi-test-coverage");t!==null&&typeof t!="undefined"&&(this.buildChart(),this.userData||(this.switchResults.checked=!0,this.switchResults.disabled=!0,this.nsChart.data=this.setNowSecureChartData(),this.nsChart.update()),this.switchResults.addEventListener("change",()=>{this.switchResults.checked?(this.nsChart.data=this.setNowSecureChartData(),this.nsChart.update()):(this.nsChart.data=this.setChartData(),this.nsChart.update()),this.switchPillars()}),this.switchPillars())}};var qn=class{constructor(){C(this,"userData",{});C(this,"sast",{});C(this,"dast",{});C(this,"pentest",null);this.userData=JSON.parse(localStorage.getItem("roiForm"))||{},this.sast={automated:this.userData.sast_automated||"off",manual:this.userData.sast_manual||"off"},this.dast={automated:this.userData.dast_automated||"off",manual:this.userData.dast_manual||"off"},this.pentest={automated:this.userData.pentest_automated||"off",manual:this.userData.pentest_manual||"off"}}showDynamicPillars(){let t=document.querySelectorAll(".time-saving-pillar"),e=document.querySelectorAll(".cost-saving-pillar"),s=document.querySelectorAll(".risk-reduction-pillar");t!==null&&typeof t!="undefined"&&this.loopPillars(t),e!==null&&typeof e!="undefined"&&this.loopPillars(e),s!==null&&typeof s!="undefined"&&this.loopPillars(s)}loopPillars(t){let e="";this.dast&&(e=`dast-${this.dast}`),this.sast&&(e+=`sast-${this.sast}`),this.pentest&&(e+=`pentest-${this.pentest}`),t.forEach(s=>{s.dataset.combination.trim()===e.trim()?(s.classList.remove("d-none"),s.classList.add("d-block"),s.classList.add("active"),t.forEach(n=>{n!==s&&n.remove()})):s.classList.contains("active")||s.remove()})}getChartConfig(t){return{type:"bar",data:t,options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>100-e.formattedValue+"%"}},datalabels:{color:"white",formatter:function(e,s){return s.dataset.label==="With NowSecure"?"NowSecure":"Without"},font:{family:"Nunito Sans",size:11,lineHeight:1,weight:"600"}}},barThickness:70,scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{display:!1}}},plugins:[Pa]}}getChartData(t){let e=this.sast.manual==="on"&&this.sast.automated==="off"?.35:0,s=this.dast.manual==="manual"&&this.dast.automated==="off"?.45:0,n=this.pentest.manual==="on"&&this.pentest.automated==="off"?.2:0,o=this.sast.automated==="on"?.35:0,a=this.dast.automated==="on"?.45:0,r=this.pentest.automated==="on"?.2:0,l=0,c="";return t==="time"||t==="cost"?l=.6-(e+s+n)*.3+(o+a+r)*.35:l=.2+(e+s+n)*.3+(o+a+r)*.65,l=Math.round(l*100),t==="time"&&(c="Save"),t==="cost"&&(c="Save"),t==="risk"&&(c="Reduce"),{labels:[c],datasets:[{label:"Without NowSecure",data:[100],backgroundColor:"#FE941A"},{label:"With NowSecure",data:[l],backgroundColor:"#0099FF"}]}}buildCharts(){[{name:"time",ctx:document.getElementById("time-saving-pillar-chart")},{name:"cost",ctx:document.getElementById("cost-saving-pillar-chart")},{name:"risk",ctx:document.getElementById("risk-reduction-pillar-chart")}].forEach(e=>{let s=this.getChartData(e.name),n=this.getChartConfig(s);e.ctx!==null&&typeof e.ctx!="undefined"&&this.buildChart(e.ctx,n,e.name)})}buildChart(t,e){let s=new ka(t,e)}init(){let t=document.querySelector(".roi-test-coverage");t!==null&&typeof t!="undefined"&&(this.showDynamicPillars(),this.buildCharts())}};var jd=pe(he(),1),$n=class{getSliderOptions(t){let e=t.dataset.autoplay==="true",s=parseInt(t.dataset.autoplayTimeout,10)||7e3,n=t.parentNode.querySelector(".hero-slider-nav"),o=n||!1,a=t.parentNode.querySelector(".hero-slider-controls");return{mode:"gallery",autoplay:e,autoWidth:!1,autoHeight:!1,container:t,controls:!0,controlsContainer:a||!1,nav:!0,navContainer:o,slideBy:1,autoplayButton:!1,autoplayButtonOutput:!1,loop:!0,mouseDrag:!0,lazyload:!0,autoplayTimeout:s}
5}triggerSlider(){let t=document.querySelectorAll(".bol-block.hero-slider");t.length&&[...t].forEach(e=>{let s=e.querySelector(".hero-slider"),n=this.getSliderOptions(s),o=(0,jd.tns)(n)})}init(){this.triggerSlider()}};var Yn=class{constructor(){this.reduceMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches}init(){let t=document.querySelectorAll(".ns-faq");t.length&&t.forEach(e=>{e.addEventListener("click",s=>{let n=s.target.closest(".ns-faq__question button");n&&e.contains(n)&&this.toggle(n)}),e.addEventListener("transitionend",s=>{let n=s.target;s.propertyName!=="max-height"||!n.classList||!n.classList.contains("ns-faq__answer")||(n.dataset.faqState==="open"?n.style.maxHeight="":n.dataset.faqState==="closed"&&(n.hidden=!0,n.style.maxHeight=""))})})}toggle(t){let e=document.getElementById(t.getAttribute("aria-controls"));if(!e)return;let s=t.getAttribute("aria-expanded")==="true";t.setAttribute("aria-expanded",s?"false":"true"),s?this.close(e):this.open(e)}open(t){if(t.dataset.faqState="open",this.reduceMotion){t.hidden=!1,t.style.maxHeight="";return}t.style.maxHeight="0px",t.hidden=!1,t.offsetHeight,t.style.maxHeight=`${t.scrollHeight}px`}close(t){if(t.dataset.faqState="closed",this.reduceMotion){t.hidden=!0,t.style.maxHeight="";return}t.style.maxHeight=`${t.scrollHeight}px`,t.offsetHeight,t.style.maxHeight="0px"}};gc(()=>{new Ns().init(),new Ws().init(),new Hs().init(),new Bs().init(),new $s().init(),new Us().init(),new en().init(),new sn().init(),new nn().init(),new Xs().init(),new Ks().init(),new Gs().init(),new Js().init(),new Qs().init();let p=new Ys;document.querySelector(".animated-wheel")&&p.init(),new tn().init(),new Zs().init(),document.querySelectorAll(".roi-form").length&&new on().init(),document.querySelectorAll(".roi-test-coverage").length&&new jn().init(),new qn().init(),new $n().init(),new Yn().init()});})(); 6/*! Bundled license information: 7 8@kurkle/color/dist/color.esm.js: 9 (*! 10 * @kurkle/color v0.3.2 11 * https://github.com/kurkle/color#readme 12 * (c) 2023 Jukka Kurkela 13 * Released under the MIT License 14 *) 15 16chart.js/dist/chunks/helpers.dataset.js: 17chart.js/dist/chart.js: 18chart.js/dist/helpers.js: 19 (*! 20 * Chart.js v4.5.1 21 * https://www.chartjs.org 22 * (c) 2025 Chart.js Contributors 23 * Released under the MIT License 24 *) 25 26chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js: 27 (*! 28 * chartjs-plugin-datalabels v2.2.0 29 * https://chartjs-plugin-datalabels.netlify.app 30 * (c) 2017-2022 chartjs-plugin-datalabels contributors 31 * Released under the MIT license 32 *) 33*/ 34//# sourceMappingURL=main.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.