vendor: 4,157 bytes, lines 1-2
1/*! For license information please see site.js.LICENSE.txt */ 2!function(){var t={492:function(t,e,i){"use strict";i.r(e),i.d(e,{afterMain:function(){return w},afterRead:function(){return x},afterWrite:function(){return A},applyStyles:function(){return I},arrow:function(){return G},auto:function(){return a},basePlacements:function(){return l},beforeMain:function(){return y},beforeRead:function(){return b},beforeWrite:function(){return S},bottom:function(){return s},clippingParents:function(){return d},computeStyles:function(){return it},createPopper:function(){return Pt},createPopperBase:function(){return Dt},createPopperLite:function(){return It},detectOverflow:function(){return bt},end:function(){return h},eventListeners:function(){return st},flip:function(){return vt},hide:function(){return _t},left:function(){return o},main:function(){return _},modifierPhases:function(){return M},offset:function(){return wt},placements:function(){return m},popper:function(){return f},popperGenerator:function(){return Ot},popperOffsets:function(){return St},preventOverflow:function(){return kt},read:function(){return v},reference:function(){return p},right:function(){return r},start:function(){return c},top:function(){return n},variationPlacements:function(){return g},viewport:function(){return u},write:function(){return k}});var n="top",s="bottom",r="right",o="left",a="auto",l=[n,s,r,o],c="start",h="end",d="clippingParents",u="viewport",f="popper",p="reference",g=l.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+h])}),[]),m=[].concat(l,[a]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+h])}),[]),b="beforeRead",v="read",x="afterRead",y="beforeMain",_="main",w="afterMain",S="beforeWrite",k="write",A="afterWrite",M=[b,v,x,y,_,w,S,k,A];function E(t){return t?(t.nodeName||"").toLowerCase():null}function C(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function O(t){return t instanceof C(t).Element||t instanceof Element}function D(t){return t instanceof C(t).HTMLElement||t instanceof HTMLElement}function P(t){return"undefined"!=typeof ShadowRoot&&(t instanceof C(t).ShadowRoot||t instanceof ShadowRoot)}var I={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];D(s)&&E(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});D(n)&&E(n)&&(Object.assign(n.style,r),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function L(t){return t.split("-")[0]}var T=Math.max,R=Math.min,N=Math.round;function F(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function z(){return!/^((?!chrome|android).)*safari/i.test(F())}function j(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,r=1;e&&D(t)&&(s=t.offsetWidth>0&&N(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&N(n.height)/t.offsetHeight||1);var o=(O(t)?C(t):window).visualViewport,a=!z()&&i,l=(n.left+(a&&o?o.offsetLeft:0))/s,c=(n.top+(a&&o?o.offsetTop:0))/r,h=n.width/s,d=n.height/r;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function V(t){var e=j(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function B(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;
vendor: 8,105 bytes, line 2
2if(i&&P(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function W(t){return C(t).getComputedStyle(t)}function $(t){return["table","td","th"].indexOf(E(t))>=0}function H(t){return((O(t)?t.ownerDocument:t.document)||window.document).documentElement}function q(t){return"html"===E(t)?t:t.assignedSlot||t.parentNode||(P(t)?t.host:null)||H(t)}function U(t){return D(t)&&"fixed"!==W(t).position?t.offsetParent:null}function Y(t){for(var e=C(t),i=U(t);i&&$(i)&&"static"===W(i).position;)i=U(i);return i&&("html"===E(i)||"body"===E(i)&&"static"===W(i).position)?e:i||function(t){var e=/firefox/i.test(F());if(/Trident/i.test(F())&&D(t)&&"fixed"===W(t).position)return null;var i=q(t);for(P(i)&&(i=i.host);D(i)&&["html","body"].indexOf(E(i))<0;){var n=W(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function X(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function K(t,e,i){return T(t,R(e,i))}function J(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var G={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,a=t.name,c=t.options,h=i.elements.arrow,d=i.modifiersData.popperOffsets,u=L(i.placement),f=X(u),p=[o,r].indexOf(u)>=0?"height":"width";if(h&&d){var g=function(t,e){return J("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,l))}(c.padding,i),m=V(h),b="y"===f?n:o,v="y"===f?s:r,x=i.rects.reference[p]+i.rects.reference[f]-d[f]-i.rects.popper[p],y=d[f]-i.rects.reference[f],_=Y(h),w=_?"y"===f?_.clientHeight||0:_.clientWidth||0:0,S=x/2-y/2,k=g[b],A=w-m[p]-g[v],M=w/2-m[p]/2+S,E=K(k,M,A),C=f;i.modifiersData[a]=((e={})[C]=E,e.centerOffset=E-M,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&B(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,a=t.popperRect,l=t.placement,c=t.variation,d=t.offsets,u=t.position,f=t.gpuAcceleration,p=t.adaptive,g=t.roundOffsets,m=t.isFixed,b=d.x,v=void 0===b?0:b,x=d.y,y=void 0===x?0:x,_="function"==typeof g?g({x:v,y:y}):{x:v,y:y};v=_.x,y=_.y;var w=d.hasOwnProperty("x"),S=d.hasOwnProperty("y"),k=o,A=n,M=window;if(p){var E=Y(i),O="clientHeight",D="clientWidth";E===C(i)&&"static"!==W(E=H(i)).position&&"absolute"===u&&(O="scrollHeight",D="scrollWidth"),(l===n||(l===o||l===r)&&c===h)&&(A=s,y-=(m&&E===M&&M.visualViewport?M.visualViewport.height:E[O])-a.height,y*=f?1:-1),l!==o&&(l!==n&&l!==s||c!==h)||(k=r,v-=(m&&E===M&&M.visualViewport?M.visualViewport.width:E[D])-a.width,v*=f?1:-1)}var P,I=Object.assign({position:u},p&&tt),L=!0===g?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:N(i*s)/s||0,y:N(n*s)/s||0}}({x:v,y:y},C(i)):{x:v,y:y};return v=L.x,y=L.y,f?Object.assign({},I,((P={})[A]=S?"0":"",P[k]=w?"0":"",P.transform=(M.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",P)):Object.assign({},I,((e={})[A]=S?y+"px":"",e[k]=w?v+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,r=i.adaptive,o=void 0===r||r,a=i.roundOffsets,l=void 0===a||a,c={placement:L(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},nt={passive:!0},st={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,r=void 0===s||s,o=n.resize,a=void 0===o||o,l=C(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),a&&l.addEventListener("resize",i.update,nt),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),a&&l.removeEventListener("resize",i.update,nt)}},data:{}},rt={left:"right",right:"left",bottom:"top",top:"bottom"};function ot(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var at={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,(function(t){return at[t]}))}function ct(t){var e=C(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ht(t){return j(H(t)).left+ct(t).scrollLeft}function dt(t){var e=W(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function ut(t){return["html","body","#document"].indexOf(E(t))>=0?t.ownerDocument.body:D(t)&&dt(t)?t:ut(q(t))}function ft(t,e){var i;void 0===e&&(e=[]);var n=ut(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),r=C(n),o=s?[r].concat(r.visualViewport||[],dt(n)?n:[]):n,a=e.concat(o);return s?a:a.concat(ft(q(o)))}function pt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===u?pt(function(t,e){var i=C(t),n=H(t),s=i.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=z();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+ht(t),y:l}}(t,i)):O(e)?function(t,e){var i=j(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):pt(function(t){var e,i=H(t),n=ct(t),s=null==(e=t.ownerDocument)?void 0:e.body,r=T(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=T(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ht(t),l=-n.scrollTop;return"rtl"===W(s||i).direction&&(a+=T(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}(H(t)))}function mt(t){var e,i=t.reference,a=t.element,l=t.placement,d=l?L(l):null,u=l?Z(l):null,f=i.x+i.width/2-a.width/2,p=i.y+i.height/2-a.height/2;switch(d){case n:e={x:f,y:i.y-a.height};break;case s:e={x:f,y:i.y+i.height};break;case r:e={x:i.x+i.width,y:p};break;case o:e={x:i.x-a.width,y:p};break;default:e={x:i.x,y:i.y}}var g=d?X(d):null;if(null!=g){var m="y"===g?"height":"width";switch(u){case c:e[g]=e[g]-(i[m]/2-a[m]/2);break;case h:e[g]=e[g]+(i[m]/2-a[m]/2)}}return e}function bt(t,e){void 0===e&&(e={});var i=e,o=i.placement,a=void 0===o?t.placement:o,c=i.strategy,h=void 0===c?t.strategy:c,g=i.boundary,m=void 0===g?d:g,b=i.rootBoundary,v=void 0===b?u:b,x=i.elementContext,y=void 0===x?f:x,_=i.altBoundary,w=void 0!==_&&_,S=i.padding,k=void 0===S?0:S,A=J("number"!=typeof k?k:Q(k,l)),M=y===f?p:f,C=t.rects.popper,P=t.elements[w?M:y],I=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ft(q(t)),i=["absolute","fixed"].indexOf(W(t).position)>=0&&D(t)?Y(t):t;return O(i)?e.filter((function(t){return O(t)&&B(t,i)&&"body"!==E(t)})):[]}(t):[].concat(e),r=[].concat(s,[i]),o=r[0],a=r.reduce((function(e,i){var s=gt(t,i,n);return e.top=T(s.top,e.top),e.right=R(s.right,e.right),e.bottom=R(s.bottom,e.bottom),e.left=T(s.left,e.left),e}),gt(t,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(O(P)?P:P.contextElement||H(t.elements.popper),m,v,h),L=j(t.elements.reference),N=mt({reference:L,element:C,strategy:"absolute",placement:a}),F=pt(Object.assign({}
vendor: 5,223 bytes, line 2
2,C,N)),z=y===f?F:L,V={top:I.top-z.top+A.top,bottom:z.bottom-I.bottom+A.bottom,left:I.left-z.left+A.left,right:z.right-I.right+A.right},$=t.modifiersData.offset;if(y===f&&$){var U=$[a];Object.keys(V).forEach((function(t){var e=[r,s].indexOf(t)>=0?1:-1,i=[n,s].indexOf(t)>=0?"y":"x";V[t]+=U[i]*e}))}return V}var vt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,h=t.name;if(!e.modifiersData[h]._skip){for(var d=i.mainAxis,u=void 0===d||d,f=i.altAxis,p=void 0===f||f,b=i.fallbackPlacements,v=i.padding,x=i.boundary,y=i.rootBoundary,_=i.altBoundary,w=i.flipVariations,S=void 0===w||w,k=i.allowedAutoPlacements,A=e.options.placement,M=L(A),E=b||(M!==A&&S?function(t){if(L(t)===a)return[];var e=ot(t);return[lt(t),e,lt(e)]}(A):[ot(A)]),C=[A].concat(E).reduce((function(t,i){return t.concat(L(i)===a?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,r=i.rootBoundary,o=i.padding,a=i.flipVariations,c=i.allowedAutoPlacements,h=void 0===c?m:c,d=Z(n),u=d?a?g:g.filter((function(t){return Z(t)===d})):l,f=u.filter((function(t){return h.indexOf(t)>=0}));0===f.length&&(f=u);var p=f.reduce((function(e,i){return e[i]=bt(t,{placement:i,boundary:s,rootBoundary:r,padding:o})[L(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:x,rootBoundary:y,padding:v,flipVariations:S,allowedAutoPlacements:k}):i)}),[]),O=e.rects.reference,D=e.rects.popper,P=new Map,I=!0,T=C[0],R=0;R<C.length;R++){var N=C[R],F=L(N),z=Z(N)===c,j=[n,s].indexOf(F)>=0,V=j?"width":"height",B=bt(e,{placement:N,boundary:x,rootBoundary:y,altBoundary:_,padding:v}),W=j?z?r:o:z?s:n;O[V]>D[V]&&(W=ot(W));var $=ot(W),H=[];if(u&&H.push(B[F]<=0),p&&H.push(B[W]<=0,B[$]<=0),H.every((function(t){return t}))){T=N,I=!1;break}P.set(N,H)}if(I)for(var q=function(t){var e=C.find((function(e){var i=P.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=S?3:1;U>0&&"break"!==q(U);U--);e.placement!==T&&(e.modifiersData[h]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function xt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function yt(t){return[n,r,s,o].some((function(e){return t[e]>=0}))}var _t={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=bt(e,{elementContext:"reference"}),a=bt(e,{altBoundary:!0}),l=xt(o,n),c=xt(a,s,r),h=yt(l),d=yt(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,s=t.name,a=i.offset,l=void 0===a?[0,0]:a,c=m.reduce((function(t,i){return t[i]=function(t,e,i){var s=L(t),a=[o,n].indexOf(s)>=0?-1:1,l="function"==typeof i?i(Object.assign({},e,{placement:t})):i,c=l[0],h=l[1];return c=c||0,h=(h||0)*a,[o,r].indexOf(s)>=0?{x:h,y:c}:{x:c,y:h}}(i,e.rects,l),t}),{}),h=c[e.placement],d=h.x,u=h.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=u),e.modifiersData[s]=c}},St={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},kt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,a=t.name,l=i.mainAxis,h=void 0===l||l,d=i.altAxis,u=void 0!==d&&d,f=i.boundary,p=i.rootBoundary,g=i.altBoundary,m=i.padding,b=i.tether,v=void 0===b||b,x=i.tetherOffset,y=void 0===x?0:x,_=bt(e,{boundary:f,rootBoundary:p,padding:m,altBoundary:g}),w=L(e.placement),S=Z(e.placement),k=!S,A=X(w),M="x"===A?"y":"x",E=e.modifiersData.popperOffsets,C=e.rects.reference,O=e.rects.popper,D="function"==typeof y?y(Object.assign({},e.rects,{placement:e.placement})):y,P="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,N={x:0,y:0};if(E){if(h){var F,z="y"===A?n:o,j="y"===A?s:r,B="y"===A?"height":"width",W=E[A],$=W+_[z],H=W-_[j],q=v?-O[B]/2:0,U=S===c?C[B]:O[B],J=S===c?-O[B]:-C[B],Q=e.elements.arrow,G=v&&Q?V(Q):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[z],it=tt[j],nt=K(0,C[B],G[B]),st=k?C[B]/2-q-nt-et-P.mainAxis:U-nt-et-P.mainAxis,rt=k?-C[B]/2+q+nt+it+P.mainAxis:J+nt+it+P.mainAxis,ot=e.elements.arrow&&Y(e.elements.arrow),at=ot?"y"===A?ot.clientTop||0:ot.clientLeft||0:0,lt=null!=(F=null==I?void 0:I[A])?F:0,ct=W+rt-lt,ht=K(v?R($,W+st-lt-at):$,W,v?T(H,ct):H);E[A]=ht,N[A]=ht-W}if(u){var dt,ut="x"===A?n:o,ft="x"===A?s:r,pt=E[M],gt="y"===M?"height":"width",mt=pt+_[ut],vt=pt-_[ft],xt=-1!==[n,o].indexOf(w),yt=null!=(dt=null==I?void 0:I[M])?dt:0,_t=xt?mt:pt-C[gt]-O[gt]-yt+P.altAxis,wt=xt?pt+C[gt]+O[gt]-yt-P.altAxis:vt,St=v&&xt?function(t,e,
vendor: 4,389 bytes, line 2
2i){var n=K(t,e,i);return n>i?i:n}(_t,pt,wt):K(v?_t:mt,pt,v?wt:vt);E[M]=St,N[M]=St-pt}e.modifiersData[a]=N}},requiresIfExists:["offset"]};function At(t,e,i){void 0===i&&(i=!1);var n,s,r=D(e),o=D(e)&&function(t){var e=t.getBoundingClientRect(),i=N(e.width)/t.offsetWidth||1,n=N(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=H(e),l=j(t,o,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(r||!r&&!i)&&(("body"!==E(e)||dt(a))&&(c=(n=e)!==C(n)&&D(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:ct(n)),D(e)?((h=j(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=ht(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Mt(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Et={placement:"bottom",modifiers:[],strategy:"absolute"};function Ct(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ot(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,r=void 0===s?Et:s;return function(t,e,i){void 0===i&&(i=r);var s,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Et,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:O(t)?ft(t):t.contextElement?ft(t.contextElement):[],popper:ft(e)};var o,c,u=function(t){var e=Mt(t);return M.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((o=[].concat(n,a.options.modifiers),c=o.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=u.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var r=s({state:a,name:e,instance:h,options:n});l.push(r||function(){})}})),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(Ct(e,i)){a.rects={reference:At(e,Y(i),"fixed"===a.options.strategy),popper:V(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],r=s.fn,o=s.options,l=void 0===o?{}:o,d=s.name;"function"==typeof r&&(a=r({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return o||(o=new Promise((function(t){Promise.resolve().then((function(){o=void 0,t(s())}))}))),o}),destroy:function(){d(),c=!0}};if(!Ct(t,e))return h;function d(){l.forEach((function(t){return t()})),l=[]}return h.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),h}}var Dt=Ot(),Pt=Ot({defaultModifiers:[st,St,it,I,wt,vt,kt,G,_t]}),It=Ot({defaultModifiers:[st,St,it,I]})},573:function(t){var e;window,e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="./src/index.ts")}({
vendor: 3,062 bytes, line 2
2"./src/index.ts":function(t,e,i){"use strict";i.r(e),i.d(e,"isValidatable",(function(){return o})),i.d(e,"MvcValidationProviders",(function(){return h})),i.d(e,"ValidationService",(function(){return d}));var n=function(t,e,i,n){return new(i||(i=Promise))((function(s,r){function o(t){try{l(n.next(t))}catch(t){r(t)}}function a(t){try{l(n.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((n=n.apply(t,e||[])).next())}))},s=function(t,e){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(o=0)),o;)try{if(i=1,n&&(s=2&a[0]?n.return:a[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;switch(n=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],n=0}finally{i=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},r=new(function(){function t(){this.warn=globalThis.console.warn}return t.prototype.log=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i]},t}()),o=function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement},a=["input","select","textarea"],l=function(t){return a.map((function(e){return"".concat(e).concat(t||"")})).join(",")};function c(t,e){var i=t.name,n=e.substring(2),s=i.lastIndexOf(".");if(s>-1){var r=i.substring(0,s)+"."+n,a=document.getElementsByName(r)[0];if(o(a))return a}return t.form.querySelector(l("[name=".concat(n,"]")))}var h=function(){this.required=function(t,e,i){var n=e.type.toLowerCase();if("checkbox"===n||"radio"===n){for(var s=0,r=Array.from(e.form.querySelectorAll(l("[name='".concat(e.name,"'][type='").concat(n,"']"))));s<r.length;s++){var o=r[s];if(o instanceof HTMLInputElement&&!0===o.checked)return!0}if("checkbox"===n){var a=e.form.querySelector("input[name='".concat(e.name,"'][type='hidden']"));if(a instanceof HTMLInputElement&&"false"===a.value)return!0}return!1}return Boolean(t)},this.stringLength=function(t,e,i){if(!t)return!0;if(i.min){var n=parseInt(i.min);if(t.length<n)return!1}if(i.max){var s=parseInt(i.max);if(t.length>s)return!1}return!0},this.compare=function(t,e,i){if(!i.other)return!0;var n=c(e,i.other);return!n||n.value===t},this.range=function(t,e,i){if(!t)return!0;var n=parseFloat(t);return!(isNaN(n)||i.min&&n<parseFloat(i.min)||i.max&&n>
2parseFloat(i.max))},this.regex=function(t,e,i){return!t||!i.pattern||new RegExp(i.pattern).test(t)},this.email=function(t,e,i){return!t||/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*(\.\w{2,})+$/.test(t)},this.creditcard=function(t,e,i){if(!t)return!0;if(/[^0-9 \-]+/.test(t))return!1;var n,s,r=0,o=0,a=!1;if((t=t.replace(/\D/g,"")).length<13||t.length>19)return!1;for(n=t.length-1;n>=0;n--)s=t.charAt(n),o=parseInt(s,10),a&&(o*=2)>9&&(o-=9),r+=o,a=!a;return r%10==0},this.url=function(t,e,i){if(!t)return!0;var n=t.toLowerCase();return n.indexOf("http://")>-1||n.indexOf("https://")>-1||n.indexOf("ftp://")>-1},this.phone=function(t,e,i){return!t||!/[\+\-\s][\-\s]/g.test(t)&&/^\+?[0-9\-\s]+$/.test(t)},this.remote=function(t,e,i){if(!t)return!0;for(var n=i.additionalfields.split(","),s={},r=0,o=n;r<o.length;r++){var a=o[r],l=a.substr(2),h=c(e,a);Boolean(h&&h.value)&&(h instanceof HTMLInputElement&&("checkbox"===h.type||"radio"===h.type)?s[l]=h.checked?h.value:"":s[l]=h.value)}var d=i.url,u=[];for(var l in s){var f=encodeURIComponent(l)+"="+encodeURIComponent(s[l]);u.push(f)}var p=u.join("&");return new Promise((function(t,e){var n=new XMLHttpRequest;if("Post"===i.type){var r=new FormData;for(var o in s)r.append(o,s[o]);n.open("post",d),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.send(p)}else n.open("get",d+"?"+p),n.send();n.onload=function(i){if(n.status>=200&&n.status<300){var s=JSON.parse(n.responseText);t(s)}else e({status:n.status,statusText:n.statusText,data:n.responseText})},n.onerror=function(t){e({status:n.status,statusText:n.statusText,data:n.responseText})}}))}},d=function(){function t(t){var e=this;this.providers={},this.messageFor={},this.elementUIDs=[],this.elementByUID={},this.formInputs={},this.validators={},this.formEvents={},this.inputEvents={},this.summary={},this.debounce=300,this.allowHiddenFields=!1,this.validateForm=function(t,i){var n=e.getElementUID(t),s=e.formEvents[n];s&&s(void 0,i)},this.validateField=function(t,i){var n=e.getElementUID(t),s=e.inputEvents[n];s&&s(void 0,i)},this.preValidate=function(t){t.preventDefault(),t.stopImmediatePropagation()},this.handleValidated=function(t,i,n){i?n&&e.submitValidForm(t,n):e.focusFirstInvalid(t)},this.submitValidForm=function(t,e){var i=new SubmitEvent("submit",e);if(t.dispatchEvent(i)){var n=e.submitter;if(n){var s=n.getAttribute("name");if(s){var r=document.createElement("input");r.type="hidden",r.name=s,r.value=n.getAttribute("value"),t.appendChild(r)}}t.submit()}},this.focusFirstInvalid=function(t){var i=e.getElementUID(t),n=e.formInputs[i].filter((function(t){return e.summary[t]}));if(n.length>0){var s=e.elementByUID[n[0]];s&&s.focus()}},this.isValid=function(t,i,n){void 0===i&&(i=!0),i&&e.validateForm(t,n);var s=e.getElementUID(t);return 0==e.formInputs[s].filter((function(t){return e.summary[t]})).length},this.isFieldValid=function(t,i,n){void 0===i&&(i=!0),i&&e.validateField(t,n);var s=e.getElementUID(t);return void 0===e.summary[s]},this.options={root:document.body,watch:!1,addNoValidate:!0},this.ValidationInputCssClassName="input-validation-error",this.ValidationInputValidCssClassName="input-validation-valid",this.ValidationMessageCssClassName="field-validation-error",this.ValidationMessageValidCssClassName="field-validation-valid",this.ValidationSummaryCssClassName="validation-summary-errors",this.ValidationSummaryValidCssClassName="validation-summary-valid",this.logger=t||r}return t.prototype.addProvider=function(t,e){this.providers[t]||(this.logger.log("Registered provider: %s",t),this.providers[t]=e)},t.prototype.addMvcProviders=function(){var t=new h;this.addProvider("required",t.required),this.addProvider("length",t.stringLength),this.addProvider("maxlength",t.stringLength),this.addProvider("minlength",t.stringLength),this.addProvider("equalto",t.compare),this.addProvider("range",t.range),this.addProvider("regex",t.regex),this.addProvider("creditcard",t.creditcard),this.addProvider("email",t.email),this.addProvider("url",t.url),this.addProvider("phone",t.ph
2one),this.addProvider("remote",t.remote)},t.prototype.scanMessages=function(t,e){void 0===e&&(e=!1);for(var i=0,n=Array.from(t.querySelectorAll("span[form]"));i<n.length;i++){var s=n[i];(c=document.getElementById(s.getAttribute("form")))&&(e?this.removeValidationMessageSpan(c,s):this.pushValidationMessageSpan(c,s))}var r=Array.from(t.querySelectorAll("form"));t instanceof HTMLFormElement&&r.push(t);var o=t instanceof Element?t.closest("form"):null;o&&r.push(o);for(var a=0,l=r;a<l.length;a++)for(var c=l[a],h=0,d=Array.from(c.querySelectorAll("[data-valmsg-for]"));h<d.length;h++)s=d[h],e?this.removeValidationMessageSpan(c,s):this.pushValidationMessageSpan(c,s)},t.prototype.pushValidationMessageSpan=function(t,e){var i=this.getElementUID(t),n="".concat(i,":").concat(e.getAttribute("data-valmsg-for")),s=this.messageFor[n]||(this.messageFor[n]=[]);s.indexOf(e)<0?s.push(e):this.logger.log("Validation element for '%s' is already tracked",n,e)},t.prototype.removeValidationMessageSpan=function(t,e){var i=this.getElementUID(t),n="".concat(i,":").concat(e.getAttribute("data-valmsg-for")),s=this.messageFor[n];if(s){var r=s.indexOf(e);r>=0?s.splice(r,1):this.logger.log("Validation element for '%s' was already removed",n,e)}},t.prototype.parseDirectives=function(t){for(var e={},i={},n=0;n<t.length;n++){var s=t[n];if(0===s.name.indexOf("data-val-")){var r=s.name.substr(9);i[r]=s.value}}var o=function(t){if(-1===t.indexOf("-")){for(var n=Object.keys(i).filter((function(e){return e!==t&&0===e.indexOf(t)})),s={error:i[t],params:{}},r=(t+"-").length,o=0;o<n.length;o++){var a=i[n[o]],l=n[o].substr(r);s.params[l]=a}e[t]=s}};for(var r in i)o(r);return e},t.prototype.guid4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype.getElementUID=function(t){var e=this.elementUIDs.filter((function(e){return e.node===t}))[0];if(e)return e.uid;var i=this.guid4();return this.elementUIDs.push({node:t,uid:i}),this.elementByUID[i]=t,i},t.prototype.getFormValidationTask=function(t){var e=this.formInputs[t];if(!e||0===e.length)return Promise.resolve(!0);for(var i=[],n=0;n<e.length;n++){var s=e[n],r=this.validators[s];r&&i.push(r)}var o=i.map((function(t){return t()}));return Promise.all(o).then((function(t){return t.every((function(t){return t}))}))},t.prototype.getMessageFor=function(t){if(!t.form)return[];var e=this.getElementUID(t.form),i="".concat(e,":").concat(t.name);return this.messageFor[i]},t.prototype.shouldValidate=function(t){return!(t&&t.submitter&&t.submitter.formNoValidate)},t.prototype.trackFormInput=function(t,e){var i=this,r=this.getElementUID(t);if(this.formInputs[r]||(this.formInputs[r]=[]),-1===this.formInputs[r].indexOf(e)?(this.formInputs[r].push(e),this.options.addNoValidate?(this.logger.log("Setting novalidate on form",t),t.setAttribute("novalidate","novalidate")):this.logger.log("Not setting novalidate on form",t)):this.logger.log("Form input for UID '%s' is already tracked",e),!this.formEvents[r]){var o=!1,a=function(e,a){if(!o&&i.shouldValidate(e)){var l=i.getFormValidationTask(r);l&&(e&&i.preValidate(e),o=!0,i.logger.log("Validating",t),l.then((function(r){return n(i,void 0,void 0,(function(){var i;return s(this,(function(n){switch(n.label){case 0:return this.logger.log("Validated (success = %s)",r,t),a?(a(r),[2]):(i=new CustomEvent("validation",{detail:{valid:r}}),t.dispatchEvent(i),[4,new Promise((function(t){return setTimeout(t,0)}))]);case 1:return n.sent(),this.handleValidated(t,r,e),[2]}}))}))})).catch((function(t){i.logger.log("Validation error",t)})).finally((function(){o=!1})))}};t.addEventListener("submit",a),t.addEventListener("reset",(function(t){for(var e=0,n=i.formInputs[r];e<n.length;e++){var s=n[e],o=i.elementByUID[s];o.classList.contains(i.ValidationInputCssClassName)&&o.classList.remove(i.ValidationInputCssClassName),o.classList.contains(i.ValidationInputValidCssClassName)&&o.classList.remove(i.ValidationInputValidCssClassName);var a=i.getMessageFor(o);if(a)for(var l=0;l<a.length;l++)a[l].innerHTML="";delete i.summary[s]}i.renderSummary()})),this.formEvents[r]=a}},t.prototype.untrackFormInput=function(t,e){var i=this.getElementUID(t);if(this.formInputs[i]){var n=this.formInputs[i].indexOf(e);n>=0?this.formInputs[i].splice(n,1):this.logger.log("Form input for UID '%s' was already removed",e)}},t.prototype.addInput=function(t){var e=this,i=this.getElementUID(t),n=this.parseDirectives(t.attributes);if(this.validators[i]=this.createValidator(t,n),t.form&&this.trackFormInput(t.form,i),!this.inputEvents[i]){var s=0,r=function(t,n){var r=e.validators[i];clearTimeout(s),s=setTimeout((function(){r().then(n).catch((function(t){e.logger.log("Validation error",t)}))}),e.debounce)},o=t.dataset.valEvent;if(o)t.addEventListener(o,r);else{var a=t instanceof HTMLSelectElement?"change":"input";t.addEventListener(a,r)}this.inputEvents[i]=r}},t.prototype.removeInput=function(t){var e=this.getElementUID(t);delete this.summary[e],delete this.inputEvents[e],delete this.validators[e],t.form&&this.untrackFormInput(t.form,e)},t.prototype.scanInputs=function(t,e){void 0===e&&(e=!1);var i=Array.from(t.querySelectorAll(l('[data-val="true"]')));o(t)&&"true"===t.getAttribute("data-val")&&i.push(t);for(var n=0;n<i.length;n++){var s=i[n];e?this.removeInput(s):this.addInput(s)}},t.prototype.createSummaryDOM=function(){if(!Object.keys(this.summary).length)return null;var t=[],e=document.createElement("ul");for(var i in this.summary){var n=this.elementByUID[i];if(!(n instanceof HTMLInputElement&&("checkbox"===n.type||"radio"===n.type)&&n.className===this.ValidationInputValidCssClassName||t.indexOf(this.summary[i])>-1)){var s=document.createElement("li");s.innerHTML=this.summary[i],e.appendChild(s),t.push(this.summary[i])}}return e},t.prototype.renderSummary=function(){var t=document.querySelectorAll('[data-valmsg-summary="true"]');if(t.length){var e=JSON.stringify(this.summary,Object.keys(this.summary).sort());if(e!==this.renderedSummaryJSON){this.renderedSummaryJSON=e;for(var i=this.createSummaryDOM(),n=0;n<t.length;n++){for(var s=t[n],r=s.querySelectorAll("ul"),o=0;o<r.length;o++)r[o].remove();i&&i.hasChildNodes()?(this.swapClasses(s,this.ValidationSummaryCssClassName,this.ValidationSummaryValidCssClassName),s.appendChild(i.cloneNode(!0))):this.swapClasses(s,this.ValidationSummaryValidCssClassName,this.ValidationSummaryCssClassName)}}}},t.prototype.addError=function(t,e){var i=this.getMessageFor(t);if(i)for(var n=0;n<i.length;n++)i[n],i[n].innerHTML=e,this.swapClasses(i[n],this.ValidationMessageCssClassName,this.ValidationMessageValidCssClassName);if(this.swapClasses(t,this.ValidationInputCssClassName,this.ValidationInputValidCssClassName),t.form){var s=t.form.querySelectorAll(l('[name="'.concat(t.name,'"]')));for(n=0;n<s.length;n++){this.swapClasses(s[n],this.ValidationInputCssClassName,this.ValidationInputValidCssClassName);var r=this.getElementUID(s[n]);this.summary[r]=e}}this.renderSummary()},t.prototype.removeError=function(t){var e=this.getMessageFor(t);if(e)for(var i=0;i<e.length;
vendor: 2,968 bytes, line 2
2i++)e[i].innerHTML="",this.swapClasses(e[i],this.ValidationMessageValidCssClassName,this.ValidationMessageCssClassName);if(this.swapClasses(t,this.ValidationInputValidCssClassName,this.ValidationInputCssClassName),t.form){var n=t.form.querySelectorAll(l('[name="'.concat(t.name,'"]')));for(i=0;i<n.length;i++){this.swapClasses(n[i],this.ValidationInputValidCssClassName,this.ValidationInputCssClassName);var s=this.getElementUID(n[i]);delete this.summary[s]}}this.renderSummary()},t.prototype.createValidator=function(t,e){var i=this;return function(){return n(i,void 0,void 0,(function(){var i,n,r,o,a,l,c,h,d,u,f;return s(this,(function(s){switch(s.label){case 0:if(this.isHidden(t))return[3,7];for(r in n=[],i=e)n.push(r);o=0,s.label=1;case 1:return o<n.length?(r=n[o])in i?(l=e[a=r],(c=this.providers[a])?(this.logger.log("Running %s validator on element",a,t),h=c(t.value,t,l.params),d=!1,u=l.error,"boolean"!=typeof h?[3,2]:(d=h,[3,5])):(this.logger.log("aspnet-validation provider not implemented: %s",a),[3,6])):[3,6]:[3,7];case 2:return"string"!=typeof h?[3,3]:(d=!1,u=h,[3,5]);case 3:return[4,h];case 4:"boolean"==typeof(f=s.sent())?d=f:(d=!1,u=f),s.label=5;case 5:if(!d)return this.addError(t,u),[2,!1];s.label=6;case 6:return o++,[3,1];case 7:return this.removeError(t),[2,!0]}}))}))}},t.prototype.isHidden=function(t){return!(this.allowHiddenFields||t.offsetWidth||t.offsetHeight||t.getClientRects().length)},t.prototype.swapClasses=function(t,e,i){e&&!t.classList.contains(e)&&t.classList.add(e),t.classList.contains(i)&&t.classList.remove(i)},t.prototype.bootstrap=function(t){var e=this;Object.assign(this.options,t),this.addMvcProviders();var i=window.document,n=this.options.root,s=function(){e.scan(n),e.options.watch&&e.watch(n)};"complete"===i.readyState||"interactive"===i.readyState?s():i.addEventListener("DOMContentLoaded",s)},t.prototype.scan=function(t){this.logger.log("Scanning",t),this.scanMessages(t),this.scanInputs(t)},t.prototype.remove=function(t){this.logger.log("Removing",t),this.scanMessages(t,!0),this.scanInputs(t,!0)},t.prototype.watch=function(t){var e=this;this.observer=new MutationObserver((function(t){t.forEach((function(t){e.observed(t)}))})),this.observer.observe(t,{attributes:!0,childList:!0,subtree:!0}),this.logger.log("Watching for mutations")},t.prototype.observed=function(t){var e,i,n;if("childList"===t.type){for(var s=0;s<t.addedNodes.length;s++){var r=t.addedNodes[s];this.logger.log("Added node",r),r instanceof HTMLElement&&this.scan(r)}for(s=0;s<t.removedNodes.length;s++)r=t.removedNodes[s],this.logger.log("Removed node",r),r instanceof HTMLElement&&this.remove(r)}else if("attributes"===t.type&&t.target instanceof HTMLElement){var o=null!==(e=t.oldValue)&&void 0!==e?e:"",a=null!==(n=null===(i=t.target.attributes[t.attributeName])||void 0===i?void 0:i.value)&&void 0!==n?n:"";this.logger.log("Attribute '%s' changed from '%s' to '%s'",t.attributeName,o,a,t.target),o!==a&&this.scan(t.target)}},t}()}
vendor: 6,357 bytes, line 2
2})},t.exports=e()},511:function(t,e,i){t.exports=function(t,e,i,n){"use strict";const s=".bs.alert",r=`close${s}`,o=`closed${s}`;class a extends t{static get NAME(){return"alert"}close(){if(e.trigger(this._element,r).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),e.trigger(this._element,o),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=a.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return i.enableDismissTrigger(a,"close"),n.defineJQueryPlugin(a),a}(i(695),i(286),i(127),i(72))},695:function(t,e,i){t.exports=function(t,e,i,n){"use strict";return class extends i{constructor(e,i){super(),(e=n.getElement(e))&&(this._element=e,this._config=this._getConfig(i),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),e.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){n.executeAfterTransition(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(e){return t.get(n.getElement(e),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.2"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}}(i(493),i(286),i(705),i(72))},48:function(t,e,i){t.exports=function(t,e,i,n,s,r){"use strict";const o=".bs.carousel",a=".data-api",l="next",c="prev",h="left",d="right",u=`slide${o}`,f=`slid${o}`,p=`keydown${o}`,g=`mouseenter${o}`,m=`mouseleave${o}`,b=`dragstart${o}`,v=`load${o}${a}`,x=`click${o}${a}`,y="carousel",_="active",w=".active",S=".carousel-item",k=w+S,A={ArrowLeft:d,ArrowRight:h},M={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},E={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class C extends t{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=n.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===y&&this.cycle()}static get Default(){return M}static get DefaultType(){return E}static get NAME(){return"carousel"}next(){this._slide(l)}nextWhenVisible(){!document.hidden&&s.isVisible(this._element)&&this.next()}prev(){this._slide(c)}pause(){this._isSliding&&s.triggerTransitionEnd(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?e.one(this._element,f,(()=>this.cycle())):this.cycle())}to(t){const i=this._getItems();if(t>i.length-1||t<0)return;if(this._isSliding)return void e.one(this._element,f,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const s=t>n?l:c;this._slide(s,i[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&e.on(this._element,p,(t=>this._keydown(t))),"hover"===this._config.pause&&(e.on(this._element,g,(()=>this.pause())),e.on(this._element,m,(()=>this._maybeEnableCycle()))),this._config.touch&&r.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of n.find(".carousel-item img",this._element))e.on(t,b,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(h)),rightCallback:()=>this._slide(this._directionToOrder(d)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new r(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=A[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=n.findOne(w,this._indicatorsElement);e.classList.remove(_),e.removeAttribute("aria-current");const i=n.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(_),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,i=null){if(this._isSliding)return;const n=this._getActive(),r=t===l,o=i||s.getNextActiveElement(this._getItems(),n,r,this._config.wrap);if(o===n)return;const a=this._getItemIndex(o),c=i=>e.trigger(this._element,i,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:a});if(c(u).defaultPrevented)return;if(!n||!o)return;const h=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=o;const d=r?"carousel-item-start":"carousel-item-end",p=r?"carousel-item-next":"carousel-item-prev";o.classList.add(p),s.reflow(o),n.classList.add(d),o.classList.add(d);this._queueCallback((()=>{o.classList.remove(d,p),o.classList.add(_),n.classList.remove(_,p,d),this._isSliding=!1,c(f)}),n,this._isAnimated()),h&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return n.findOne(k,this._element)}_getItems(){return n.find(S,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return s.isRTL()?t===h?c:l:t===h?l:c}_orderToDirection(t){return s.isRTL()?t===c?h:d:t===c?d:h}static jQueryInterface(t){return this.each((function(){const e=C.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
2amed "${t}"`);e[t]()}}else e.to(t)}))}}return e.on(document,x,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=n.getElementFromSelector(this);if(!e||!e.classList.contains(y))return;t.preventDefault();const s=C.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");return r?(s.to(r),void s._maybeEnableCycle()):"next"===i.getDataAttribute(this,"slide")?(s.next(),void s._maybeEnableCycle()):(s.prev(),void s._maybeEnableCycle())})),e.on(window,v,(()=>{const t=n.find('[data-bs-ride="carousel"]');for(const e of t)C.getOrCreateInstance(e)})),s.defineJQueryPlugin(C),C}(i(695),i(286),i(175),i(737),i(72),i(814))},863:function(t,e,i){t.exports=function(t,e,i,n){"use strict";const s=".bs.collapse",r=`show${s}`,o=`shown${s}`,a=`hide${s}`,l=`hidden${s}`,c=`click${s}.data-api`,h="show",d="collapse",u="collapsing",f=`:scope .${d} .${d}`,p='[data-bs-toggle="collapse"]',g={parent:null,toggle:!0},m={parent:"(null|element)",toggle:"boolean"};class b extends t{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=i.find(p);for(const t of n){const e=i.getSelectorFromElement(t),n=i.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return g}static get DefaultType(){return m}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>b.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(e.trigger(this._element,r).defaultPrevented)return;for(const e of t)e.hide();const i=this._getDimension();this._element.classList.remove(d),this._element.classList.add(u),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(u),this._element.classList.add(d,h),this._element.style[i]="",e.trigger(this._element,o)}),this._element,!0),this._element.style[i]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(e.trigger(this._element,a).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,n.reflow(this._element),this._element.classList.add(u),this._element.classList.remove(d,h);for(const t of this._triggerArray){const e=i.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(u),this._element.classList.add(d),e.trigger(this._element,l)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(h)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=n.getElement(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(p);for(const e of t){const t=i.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=i.find(f,this._config.parent);return i.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=b.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}return e.on(document,c,p,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of i.getMultipleElementsFromSelector(this))b.getOrCreateInstance(t,{toggle:!1}).toggle()})),n.defineJQueryPlugin(b),b}(i(695),i(286),i(737),i(72))},493:function(t){t.exports=function(){"use strict";const t=new Map;return{set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get(e,i){return t.has(e)&&t.get(e).get(i)||null},remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}}}()}
2,286:function(t,e,i){t.exports=function(t){"use strict";const e=/[^.]*(?=\..*)\.|.*/,i=/\..*/,n=/::\d+$/,s={};let r=1;const o={mouseenter:"mouseover",mouseleave:"mouseout"},a=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function l(t,e){return e&&`${e}::${r++}`||t.uidEvent||r++}function c(t){const e=l(t);return t.uidEvent=e,s[e]=s[e]||{},s[e]}function h(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function d(t,e,i){const n="string"==typeof e,s=n?i:e||i;let r=g(t);return a.has(r)||(r=t),[n,s,r]}function u(t,i,n,s,r){if("string"!=typeof i||!t)return;let[a,u,f]=d(i,n,s);if(i in o){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};u=t(u)}const p=c(t),g=p[f]||(p[f]={}),v=h(g,u,a?n:null);if(v)return void(v.oneOff=v.oneOff&&r);const x=l(u,i.replace(e,"")),y=a?function(t,e,i){return function n(s){const r=t.querySelectorAll(e);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const a of r)if(a===o)return b(s,{delegateTarget:o}),n.oneOff&&m.off(t,s.type,e,i),i.apply(o,[s])}}(t,n,u):function(t,e){return function i(n){return b(n,{delegateTarget:t}),i.oneOff&&m.off(t,n.type,e),e.apply(t,[n])}}(t,u);y.delegationSelector=a?n:null,y.callable=u,y.oneOff=r,y.uidEvent=x,g[x]=y,t.addEventListener(f,y,a)}function f(t,e,i,n,s){const r=h(e[i],n,s);r&&(t.removeEventListener(i,r,Boolean(s)),delete e[i][r.uidEvent])}function p(t,e,i,n){const s=e[i]||{};for(const[r,o]of Object.entries(s))r.includes(n)&&f(t,e,i,o.callable,o.delegationSelector)}function g(t){return t=t.replace(i,""),o[t]||t}const m={on(t,e,i,n){u(t,e,i,n,!1)},one(t,e,i,n){u(t,e,i,n,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[r,o,a]=d(e,i,s),l=a!==e,h=c(t),u=h[a]||{},g=e.startsWith(".");if(void 0===o){if(g)for(const i of Object.keys(h))p(t,h,i,e.slice(1));for(const[i,s]of Object.entries(u)){const r=i.replace(n,"");l&&!e.includes(r)||f(t,h,a,s.callable,s.delegationSelector)}}else{if(!Object.keys(u).length)return;f(t,h,a,o,r?i:null)}},trigger(e,i,n){if("string"!=typeof i||!e)return null;const s=t.getjQuery();let r=null,o=!0,a=!0,l=!1;i!==g(i)&&s&&(r=s.Event(i,n),s(e).trigger(r),o=!r.isPropagationStopped(),a=!r.isImmediatePropagationStopped(),l=r.isDefaultPrevented());const c=b(new Event(i,{bubbles:o,cancelable:!0}),n);return l&&c.preventDefault(),a&&e.dispatchEvent(c),c.defaultPrevented&&r&&r.preventDefault(),c}};function b(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get(){return n}})}return t}return m}(i(72))},175:function(t){t.exports=function(){"use strict";function t(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function e(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}return{setDataAttribute(t,i,n){t.setAttribute(`data-bs-${e(i)}`,n)},removeDataAttribute(t,i){t.removeAttribute(`data-bs-${e(i)}`)},getDataAttributes(e){if(!e)return{};const i={},n=Object.keys(e.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of n){let n=s.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),i[n]=t(e.dataset[s])}return i},getDataAttribute(i,n){return t(i.getAttribute(`data-bs-${e(n)}`))}}}()},737:function(t,e,i){t.exports=function(t){"use strict";const e=e=>{let i=e.getAttribute("data-bs-target");if(!i||"#"===i){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),i=n&&"#"!==n?t.parseSelector(n.trim()):null}return i},i={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter((t=>t.matches(e)))},parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(i,e).filter((e=>!t.isDisabled(e)&&t.isVisible(e)))},getSelectorFromElement(t){const n=e(t);return n&&i.findOne(n)?n:null},getElementFromSelector(t){const n=e(t);return n?i.findOne(n):null},getMultipleElementsFromSelector(t){const n=e(t);return n?i.find(n):[]}};return i}(i(72))}
vendor: 1,774 bytes, line 2
2,872:function(t,e,i){t.exports=function(t,e,i,n,s,r){"use strict";function o(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const a=o(t),l="dropdown",c=".bs.dropdown",h=".data-api",d="ArrowUp",u="ArrowDown",f=`hide${c}`,p=`hidden${c}`,g=`show${c}`,m=`shown${c}`,b=`click${c}${h}`,v=`keydown${c}${h}`,x=`keyup${c}${h}`,y="show",_='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',w=`${_}.${y}`,S=".dropdown-menu",k=r.isRTL()?"top-end":"top-start",A=r.isRTL()?"top-start":"top-end",M=r.isRTL()?"bottom-end":"bottom-start",E=r.isRTL()?"bottom-start":"bottom-end",C=r.isRTL()?"left-start":"right-start",O=r.isRTL()?"right-start":"left-start",D={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},P={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class I extends e{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=s.next(this._element,S)[0]||s.prev(this._element,S)[0]||s.findOne(S,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return D}static get DefaultType(){return P}static get NAME(){return l}toggle(){return this._isShown()?this.hide():this.show()}show(){if(r.isDisabled(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!i.trigger(this._element,g,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".
2navbar-nav"))for(const t of[].concat(...document.body.children))i.on(t,"mouseover",r.noop);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(y),this._element.classList.add(y),i.trigger(this._element,m,t)}}hide(){if(r.isDisabled(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!i.trigger(this._element,f,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))i.off(t,"mouseover",r.noop);this._popper&&this._popper.destroy(),this._menu.classList.remove(y),this._element.classList.remove(y),this._element.setAttribute("aria-expanded","false"),n.removeDataAttribute(this._menu,"popper"),i.trigger(this._element,p,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r.isElement(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${l.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===a)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:r.isElement(this._config.reference)?t=r.getElement(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=a.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(y)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return C;if(t.classList.contains("dropstart"))return O;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?A:k:e?E:M}
2_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(n.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...r.execute(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=s.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>r.isVisible(t)));i.length&&r.getNextActiveElement(i,e,t===u,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=I.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=s.find(w);for(const i of e){const e=I.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const r={relatedTarget:e._element};"click"===t.type&&(r.clickEvent=t),e._completeHide(r)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[d,u].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const r=this.matches(_)?this:s.prev(this,_)[0]||s.next(this,_)[0]||s.findOne(_,t.delegateTarget.parentNode),o=I.getOrCreateInstance(r);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),r.focus())}}return i.on(document,v,_,I.dataApiKeydownHandler),i.on(document,v,S,I.dataApiKeydownHandler),i.on(document,b,I.clearMenus),i.on(document,x,I.clearMenus),i.on(document,b,_,(function(t){t.preventDefault(),I.getOrCreateInstance(this).toggle()})),r.defineJQueryPlugin(I),I}(i(492),i(695),i(286),i(175),i(737),i(72))},424:function(t,e,i){t.exports=function(t,e,i,n,s,r,o,a){"use strict";const l=".bs.modal",c=`hide${l}`,h=`hidePrevented${l}`,d=`hidden${l}`,u=`show${l}`,f=`shown${l}`,p=`resize${l}`,g=`click.dismiss${l}`,m=`mousedown.dismiss${l}`,b=`keydown.dismiss${l}`,v=`click${l}.data-api`,x="modal-open",y="show",_="modal-static",w={backdrop:!0,focus:!0,keyboard:!0},S={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class k extends t{constructor(t,e){super(t,e),this._dialog=i.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new a,this._addEventListeners()}static get Default(){return w}static get DefaultType(){return S}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||e.trigger(this._element,u,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(x),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(e.trigger(this._element,c).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(y),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){e.off(window,l),e.off(this._dialog,l),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new n({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new r({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=i.findOne(".modal-body",this._dialog);
2n&&(n.scrollTop=0),o.reflow(this._element),this._element.classList.add(y);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,e.trigger(this._element,f,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){e.on(this._element,b,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),e.on(window,p,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),e.on(this._element,m,(t=>{e.one(this._element,g,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(x),this._resetAdjustments(),this._scrollBar.reset(),e.trigger(this._element,d)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(e.trigger(this._element,h).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,i=this._element.style.overflowY;"hidden"===i||this._element.classList.contains(_)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(_),this._queueCallback((()=>{this._element.classList.remove(_),this._queueCallback((()=>{this._element.style.overflowY=i}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=o.isRTL()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=o.isRTL()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=k.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}return e.on(document,v,'[data-bs-toggle="modal"]',(function(t){const n=i.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),e.one(n,u,(t=>{t.defaultPrevented||e.one(n,d,(()=>{o.isVisible(this)&&this.focus()}))}));const s=i.findOne(".modal.show");s&&k.getInstance(s).hide(),k.getOrCreateInstance(n).toggle(this)})),s.enableDismissTrigger(k),o.defineJQueryPlugin(k),k}(i(695),i(286),i(737),i(358),i(127),i(744),i(72),i(810))},169:function(t,e,i){t.exports=function(t,e,i,n,s,r,o,a){"use strict";const l=".bs.offcanvas",c=".data-api",h=`load${l}${c}`,d="show",u="showing",f="hiding",p=".offcanvas.show",g=`show${l}`,m=`shown${l}`,b=`hide${l}`,v=`hidePrevented${l}`,x=`hidden${l}`,y=`resize${l}`,_=`click${l}${c}`,w=`keydown.dismiss${l}`,S={backdrop:!0,keyboard:!0,scroll:!1},k={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class A extends t{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return S}static get DefaultType(){return k}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(e.trigger(this._element,g,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new a).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(u);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(d),this._element.classList.remove(u),e.trigger(this._element,m,{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(e.trigger(this._element,b).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(f),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(d,f),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new a).reset(),e.trigger(this._element,x)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new n({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():e.trigger(this._element,v)}:null})}_initializeFocusTrap(){return new r({trapElement:this._element})}_addEventListeners(){e.on(this._element,w,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():e.trigger(this._element,v))}))}static jQueryInterface(t){return this.each((function(){const e=A.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
2amed "${t}"`);e[t](this)}}))}}return e.on(document,_,'[data-bs-toggle="offcanvas"]',(function(t){const n=i.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),o.isDisabled(this))return;e.one(n,x,(()=>{o.isVisible(this)&&this.focus()}));const s=i.findOne(p);s&&s!==n&&A.getInstance(s).hide(),A.getOrCreateInstance(n).toggle(this)})),e.on(window,h,(()=>{for(const t of i.find(p))A.getOrCreateInstance(t).show()})),e.on(window,y,(()=>{for(const t of i.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&A.getOrCreateInstance(t).hide()})),s.enableDismissTrigger(A),o.defineJQueryPlugin(A),A}(i(695),i(286),i(737),i(358),i(127),i(744),i(72),i(810))},471:function(t,e,i){t.exports=function(t,e,i,n){"use strict";const s=".bs.tab",r=`hide${s}`,o=`hidden${s}`,a=`show${s}`,l=`shown${s}`,c=`click${s}`,h=`keydown${s}`,d=`load${s}`,u="ArrowLeft",f="ArrowRight",p="ArrowUp",g="ArrowDown",m="Home",b="End",v="active",x="fade",y="show",_=".dropdown-toggle",w=`:not(${_})`,S='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',k=`.nav-link${w}, .list-group-item${w}, [role="tab"]${w}, ${S}`,A=`.${v}[data-bs-toggle="tab"], .${v}[data-bs-toggle="pill"], .${v}[data-bs-toggle="list"]`;class M extends t{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),e.on(this._element,h,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const i=this._getActiveElem(),n=i?e.trigger(i,r,{relatedTarget:t}):null;e.trigger(t,a,{relatedTarget:i}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(i,t),this._activate(t,i))}_activate(t,n){if(!t)return;t.classList.add(v),this._activate(i.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),e.trigger(t,l,{relatedTarget:n})):t.classList.add(y)}),t,t.classList.contains(x))}_deactivate(t,n){if(!t)return;t.classList.remove(v),t.blur(),this._deactivate(i.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),e.trigger(t,o,{relatedTarget:n})):t.classList.remove(y)}),t,t.classList.contains(x))}_keydown(t){if(![u,f,p,g,m,b].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!n.isDisabled(t)));let i;if([m,b].includes(t.key))i=e[t.key===m?0:e.length-1];else{const s=[f,g].includes(t.key);i=n.getNextActiveElement(e,t.target,s,!0)}i&&(i.focus({preventScroll:!0}),M.getOrCreateInstance(i).show())}_getChildren(){return i.find(k,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=i.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains("dropdown"))return;const s=(t,s)=>{const r=i.findOne(t,n);r&&r.classList.toggle(s,e)};s(_,v),s(".dropdown-menu",y),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(v)}_getInnerElement(t){return t.matches(k)?t:i.findOne(k,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=M.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
2amed "${t}"`);e[t]()}}))}}return e.on(document,c,S,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),n.isDisabled(this)||M.getOrCreateInstance(this).show()})),e.on(window,d,(()=>{for(const t of i.find(A))M.getOrCreateInstance(t)})),n.defineJQueryPlugin(M),M}(i(695),i(286),i(737),i(72))},358:function(t,e,i){t.exports=function(t,e,i){"use strict";const n="backdrop",s="show",r=`mousedown.bs.${n}`,o={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},a={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};return class extends e{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return o}static get DefaultType(){return a}static get NAME(){return n}show(t){if(!this._config.isVisible)return void i.execute(t);this._append();const e=this._getElement();this._config.isAnimated&&i.reflow(e),e.classList.add(s),this._emulateAnimation((()=>{i.execute(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(s),this._emulateAnimation((()=>{this.dispose(),i.execute(t)}))):i.execute(t)}dispose(){this._isAppended&&(t.off(this._element,r),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=i.getElement(t.rootElement),t}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),t.on(e,r,(()=>{i.execute(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){i.executeAfterTransition(t,this._getElement(),this._config.isAnimated)}}}(i(286),i(705),i(72))},127:function(t,e,i){!function(t,e,i,n){"use strict";t.enableDismissTrigger=(t,s="hide")=>{const r=`click.dismiss${t.EVENT_KEY}`,o=t.NAME;e.on(document,r,`[data-bs-dismiss="${o}"]`,(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),n.isDisabled(this))return;const r=i.getElementFromSelector(this)||this.closest(`.${o}`);t.getOrCreateInstance(r)[s]()}))},Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e,i(286),i(737),i(72))},705:function(t,e,i){t.exports=function(t,e){"use strict";return class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(i,n){const s=e.isElement(n)?t.getDataAttribute(n,"config"):{};return{...this.constructor.Default,..."object"==typeof s?s:{},...e.isElement(n)?t.getDataAttributes(n):{},..."object"==typeof i?i:{}}}_typeCheckConfig(t,i=this.constructor.DefaultType){for(const[n,s]of Object.entries(i)){const i=t[n],r=e.isElement(i)?"element":e.toType(i);if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}}}}(i(175),i(72))},744:function(t,e,i){t.exports=function(t,e,i){"use strict";const n=".bs.focustrap",s=`focusin${n}`,r=`keydown.tab${n}`,o="backward",a={autofocus:!0,trapElement:null},l={autofocus:"boolean",trapElement:"element"};return class extends i{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return a}static get DefaultType(){return l}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),t.off(document,n),t.on(document,s,(t=>this._handleFocusin(t))),t.on(document,r,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,t.off(document,n))}_handleFocusin(t){const{trapElement:i}=this._config;if(t.target===document||t.target===i||i.contains(t.target))return;const n=e.focusableChildren(i);0===n.length?i.focus():this._lastTabNavDirection===o?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?o:"forward")}}}(i(286),i(737),i(705))},72:function(t,e){!function(t){"use strict";const e="transitionend",i=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),n=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0},s=t=>{t.dispatchEvent(new Event(e))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),o=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?o(t.parentNode):null},a=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,l=[],c=t=>{"loading"===document.readyState?(l.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of l)t()})),l.push(t)):t()},h=(t,e=[],i=t)=>"function"==typeof t?t(...e):i;t.defineJQueryPlugin=t=>{c((()=>{const e=a();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}}))},t.execute=h,t.executeAfterTransition=(t,i,r=!0)=>
2{if(!r)return void h(t);const o=n(i)+5;let a=!1;const l=({target:n})=>{n===i&&(a=!0,i.removeEventListener(e,l),h(t))};i.addEventListener(e,l),setTimeout((()=>{a||s(i)}),o)},t.findShadowRoot=o,t.getElement=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(i(t)):null,t.getNextActiveElement=(t,e,i,n)=>{const s=t.length;let r=t.indexOf(e);return-1===r?!i&&n?t[s-1]:t[0]:(r+=i?1:-1,n&&(r=(r+s)%s),t[Math.max(0,Math.min(r,s-1))])},t.getTransitionDurationFromElement=n,t.getUID=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},t.getjQuery=a,t.isDisabled=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),t.isElement=r,t.isRTL=()=>"rtl"===document.documentElement.dir,t.isVisible=t=>{if(!r(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},t.noop=()=>{},t.onDOMContentLoaded=c,t.parseSelector=i,t.reflow=t=>{t.offsetHeight},t.toType=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),t.triggerTransitionEnd=s,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e)},810:function(t,e,i){t.exports=function(t,e,i){"use strict";const n=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",s=".sticky-top",r="padding-right",o="margin-right";return class{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,r,(e=>e+t)),this._setElementAttributes(n,r,(e=>e+t)),this._setElementAttributes(s,o,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,r),this._resetElementAttributes(n,r),this._resetElementAttributes(s,o)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(e,i){const n=e.style.getPropertyValue(i);n&&t.setDataAttribute(e,i,n)}_resetElementAttributes(e,i){this._applyManipulationCallback(e,(e=>{const n=t.getDataAttribute(e,i);null!==n?(t.removeDataAttribute(e,i),e.style.setProperty(i,n)):e.style.removeProperty(i)}))}_applyManipulationCallback(t,n){if(i.isElement(t))n(t);else for(const i of e.find(t,this._element))n(i)}}}(i(175),i(737),i(72))},814:function(t,e,i){t.exports=function(t,e,i){"use strict";const n=".bs.swipe",s=`touchstart${n}`,r=`touchmove${n}`,o=`touchend${n}`,a=`pointerdown${n}`,l=`pointerup${n}`,c={endCallback:null,leftCallback:null,rightCallback:null},h={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class d extends e{constructor(t,e){super(),this._element=t,t&&d.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return c}static get DefaultType(){return h}static get NAME(){return"swipe"}dispose(){t.off(this._element,n)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),i.execute(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&i.execute(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(t.on(this._element,a,(t=>this._start(t))),t.on(this._element,l,(t=>this._end(t))),this._element.classList.add("pointer-event")):(t.on(this._element,s,(t=>this._start(t))),t.on(this._element,r,(t=>this._move(t))),t.on(this._element,o,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}return d}(i(286),i(705),i(72))}
2,90:function(t){!function(e,i){var n=function(t,e,i){"use strict";var n,s;if(function(){var e,i={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in s=t.lazySizesConfig||t.lazysizesConfig||{},i)e in s||(s[e]=i[e])}(),!e||!e.getElementsByClassName)return{init:function(){},cfg:s,noSupport:!0};var r,o,a,l,c,h,d,u,f,p,g,m,b,v,x,y,_,w,S,k,A,M,E,C,O,D,P,I,L,T,R,N,F,z,j,V,B,W,$,H,q,U,Y,X,K=e.documentElement,J=t.HTMLPictureElement,Q="addEventListener",G="getAttribute",Z=t[Q].bind(t),tt=t.setTimeout,et=t.requestAnimationFrame||tt,it=t.requestIdleCallback,nt=/^picture$/i,st=["load","error","lazyincluded","_lazyloaded"],rt={},ot=Array.prototype.forEach,at=function(t,e){return rt[e]||(rt[e]=new RegExp("(\\s|^)"+e+"(\\s|$)")),rt[e].test(t[G]("class")||"")&&rt[e]},lt=function(t,e){at(t,e)||t.setAttribute("class",(t[G]("class")||"").trim()+" "+e)},ct=function(t,e){var i;(i=at(t,e))&&t.setAttribute("class",(t[G]("class")||"").replace(i," "))},ht=function(t,e,i){var n=i?Q:"removeEventListener";i&&ht(t,e),st.forEach((function(i){t[n](i,e)}))},dt=function(t,i,s,r,o){var a=e.createEvent("Event");return s||(s={}),s.instance=n,a.initEvent(i,!r,!o),a.detail=s,t.dispatchEvent(a),a},ut=function(e,i){var n;!J&&(n=t.picturefill||s.pf)?(i&&i.src&&!e[G]("srcset")&&e.setAttribute("srcset",i.src),n({reevaluate:!0,elements:[e]})):i&&i.src&&(e.src=i.src)},ft=function(t,e){return(getComputedStyle(t,null)||{})[e]},pt=function(t,e,i){for(i=i||t.offsetWidth;i<s.minSize&&e&&!t._lazysizesWidth;)i=e.offsetWidth,e=e.parentNode;return i},gt=(q=[],U=H=[],X=function(t,i){W&&!i?t.apply(this,arguments):(U.push(t),$||($=!0,(e.hidden?tt:et)(Y)))},X._lsFlush=Y=function(){var t=U;for(U=H.length?q:H,W=!0,$=!1;t.length;)t.shift()();W=!1},X),mt=function(t,e){return e?function(){gt(t)}:function(){var e=this,i=arguments;gt((function(){t.apply(e,i)}))}},bt=function(t){var e,n,s=function(){e=null,t()},r=function(){var t=i.now()-n;t<99?tt(r,99-t):(it||s)(s)};return function(){n=i.now(),e||(e=tt(r,99))}},vt=(_=/^img$/i,w=/^iframe$/i,S="onscroll"in t&&!/(gle|ing)bot/.test(navigator.userAgent),0,k=0,A=0,M=-1,E=function(t){A--,(!t||A<0||!t.target)&&(A=0)},C=function(t){return null==y&&(y="hidden"==ft(e.body,"visibility")),y||!("hidden"==ft(t.parentNode,"visibility")&&"hidden"==ft(t,"visibility"))},O=function(t,i){var n,s=t,r=C(t);for(m-=i,x+=i,b-=i,v+=i;r&&(s=s.offsetParent)&&s!=e.body&&s!=K;)(r=(ft(s,"opacity")||1)>0)&&"visible"!=ft(s,"overflow")&&(n=s.getBoundingClientRect(),r=v>n.left&&b<n.right&&x>n.top-1&&m<n.bottom+1);return r},P=function(t){var e,n=0,r=s.throttleDelay,o=s.ricTimeout,a=function(){e=!1,n=i.now(),t()},l=it&&o>49?function(){it(a,{timeout:o}),o!==s.ricTimeout&&(o=s.ricTimeout)}:mt((function(){tt(a)}),!0);return function(t){var s;(t=!0===t)&&(o=33),e||(e=!0,(s=r-(i.now()-n))<0&&(s=0),t||s<9?l():tt(l,s))}}(D=function(){var t,i,r,o,a,l,d,f,_,w,E,D,P=n.elements;if((u=s.loadMode)&&A<8&&(t=P.length)){for(i=0,M++;i<t;i++)if(P[i]&&!P[i]._lazyRace)if(!S||n.prematureUnveil&&n.prematureUnveil(P[i]))z(P[i]);else if((f=P[i][G]("data-expand"))&&(l=1*f)||(l=k),w||(w=!s.expand||s.expand<1?K.clientHeight>500&&K.clientWidth>500?500:370:s.expand,n._defEx=w,E=w*s.expFactor,D=s.hFac,y=null,k<E&&A<1&&M>2&&u>2&&!e.hidden?(k=E,M=0):k=u>1&&M>1&&A<6?w:0),_!==l&&(p=innerWidth+l*D,g=innerHeight+l,d=-1*l,_=l),r=P[i].getBoundingClientRect(),(x=r.bottom)>=d&&(m=r.top)<=g&&(v=r.right)>=d*D&&(b=r.left)<=p&&(x||v||b||m)&&(s.loadHidden||C(P[i]))&&(h&&A<3&&!f&&(u<3||M<4)||O(P[i],l))){if(z(P[i]),a=!0,A>9)break}else!a&&h&&!o&&A<4&&M<4&&u>2&&(c[0]||s.preloadAfterLoad)&&(c[0]||!f&&(x||v||b||m||"auto"!=P[i][G](s.sizesAttr)))&&(o=c[0]||P[i]);o&&!a&&z(o)}}),L=mt(I=function(t){var e=t.target;e._lazyCache?delete e._lazyCache:(E(t),lt(e,s.loadedClass),ct(e,s.loadingClass),ht(e,T),dt(e,"lazyloaded"))}),T=function(t){L({target:t.target})},R=function(t,e){var i=t.getAttribute("data-load-mode")||s.iframeLoadMode;0==i?t.contentWindow.location.replace(e):1==i&&(t.src=e)},N=function(t){var e,i=t[G](s.srcsetAttr);(e=s.customMedia[t[G]("data-media")||t[G]("media")])&&t.setAttribute("media",e),i&&t.setAttribute("srcset",i)}
2,F=mt((function(t,e,i,n,r){var o,a,l,c,h,u;(h=dt(t,"lazybeforeunveil",e)).defaultPrevented||(n&&(i?lt(t,s.autosizesClass):t.setAttribute("sizes",n)),a=t[G](s.srcsetAttr),o=t[G](s.srcAttr),r&&(c=(l=t.parentNode)&&nt.test(l.nodeName||"")),u=e.firesLoad||"src"in t&&(a||o||c),h={target:t},lt(t,s.loadingClass),u&&(clearTimeout(d),d=tt(E,2500),ht(t,T,!0)),c&&ot.call(l.getElementsByTagName("source"),N),a?t.setAttribute("srcset",a):o&&!c&&(w.test(t.nodeName)?R(t,o):t.src=o),r&&(a||c)&&ut(t,{src:o})),t._lazyRace&&delete t._lazyRace,ct(t,s.lazyClass),gt((function(){var e=t.complete&&t.naturalWidth>1;u&&!e||(e&<(t,s.fastLoadedClass),I(h),t._lazyCache=!0,tt((function(){"_lazyCache"in t&&delete t._lazyCache}),9)),"lazy"==t.loading&&A--}),!0)})),z=function(t){if(!t._lazyRace){var e,i=_.test(t.nodeName),n=i&&(t[G](s.sizesAttr)||t[G]("sizes")),r="auto"==n;(!r&&h||!i||!t[G]("src")&&!t.srcset||t.complete||at(t,s.errorClass)||!at(t,s.lazyClass))&&(e=dt(t,"lazyunveilread").detail,r&&xt.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,A++,F(t,e,r,n,i))}},j=bt((function(){s.loadMode=3,P()})),B=function(){h||(i.now()-f<999?tt(B,999):(h=!0,s.loadMode=3,P(),Z("scroll",V,!0)))},{_:function(){f=i.now(),n.elements=e.getElementsByClassName(s.lazyClass),c=e.getElementsByClassName(s.lazyClass+" "+s.preloadClass),Z("scroll",P,!0),Z("resize",P,!0),Z("pageshow",(function(t){if(t.persisted){var i=e.querySelectorAll("."+s.loadingClass);i.length&&i.forEach&&et((function(){i.forEach((function(t){t.complete&&z(t)}))}
2))}})),t.MutationObserver?new MutationObserver(P).observe(K,{childList:!0,subtree:!0,attributes:!0}):(K[Q]("DOMNodeInserted",P,!0),K[Q]("DOMAttrModified",P,!0),setInterval(P,999)),Z("hashchange",P,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(t){e[Q](t,P,!0)})),/d$|^c/.test(e.readyState)?B():(Z("load",B),e[Q]("DOMContentLoaded",P),tt(B,2e4)),n.elements.length?(D(),gt._lsFlush()):P()},checkElems:P,unveil:z,_aLSL:V=function(){3==s.loadMode&&(s.loadMode=2),j()}}),xt=(o=mt((function(t,e,i,n){var s,r,o;if(t._lazysizesWidth=n,n+="px",t.setAttribute("sizes",n),nt.test(e.nodeName||""))for(r=0,o=(s=e.getElementsByTagName("source")).length;r<o;r++)s[r].setAttribute("sizes",n);i.detail.dataAttr||ut(t,i.detail)})),a=function(t,e,i){var n,s=t.parentNode;s&&(i=pt(t,s,i),(n=dt(t,"lazybeforesizes",{width:i,dataAttr:!!e})).defaultPrevented||(i=n.detail.width)&&i!==t._lazysizesWidth&&o(t,s,n,i))},{_:function(){r=e.getElementsByClassName(s.autosizesClass),Z("resize",l)},checkElems:l=bt((function(){var t,e=r.length;if(e)for(t=0;t<e;t++)a(r[t])})),updateElem:a}),yt=function(){!yt.i&&e.getElementsByClassName&&(yt.i=!0,xt._(),vt._())};return tt((function(){s.init&&yt()})),n={cfg:s,autoSizer:xt,loader:vt,init:yt,uP:ut,aC:lt,rC:ct,hC:at,fire:dt,gW:pt,rAF:gt}}(e,e.document,Date);e.lazySizes=n,t.exports&&(t.exports=n)}("undefined"!=typeof window?window:{})}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){"use strict";class t{static awaitingLoader=null;static addLoader(t){let e=t.querySelector(".ajax-partials-loader");if(e)return;let i="span";"UL"===t.tagName&&(i="li"),e=document.createElement(i),e.classList.add("ajax-partials-loader");const n=t.getAttribute("data-ajax-loader-text");n&&n.length>0&&(e.innerText=n),clearTimeout(this.awaitingLoader),this.awaitingLoader=window.setTimeout((function(){t.classList.add("ajax-partials-loading"),t.appendChild(e)}),500)}static removeLoader(t){clearTimeout(this.awaitingLoader);const e=t.querySelector(".ajax-partials-loader");e&&e.remove(),t.classList.remove("ajax-partials-loading")}}class e{static makeRequest(e,i){const n=e.getAttribute("data-ajax-url");n&&n.length>0&&(t.addLoader(e),fetch(n).then((function(t){return t.text()})).then((function(n){t.removeLoader(e),e.innerHTML=n,i&&"function"==typeof i&&i()})).catch((function(i){console.warn("Something went wrong.",i),t.removeLoader(e)})))}static init(t){t.querySelectorAll("div[data-ajax-url],nav[data-ajax-url],ul[data-ajax-url]").forEach((t=>{const e=t.getAttribute("data-ajax-autoload");e&&"true"!==e||this.makeRequest(t)}))}}class n{static makeRequest(e){const i=e.getAttribute("action"),n=e.getAttribute("method"),s=document.querySelector(e.getAttribute("data-ajax-update")),r=new FormData(e);i&&n&&s&&(e.querySelectorAll(".field-validation-error").forEach((t=>{t.classList.add("field-validation-valid"),t.classList.remove("field-validation-error");const i=e.querySelector('[name="'+t.getAttribute("data-valmsg-for")+'"]');if(!i)return!0;i.classList.add("valid"),i.classList.remove("input-validation-error")})),t.addLoader(s),fetch(i,{method:n,mode:"same-origin",cache:"no-cache",body:r}).then((t=>400===t.status?(t.json().then((t=>function(t){t&&t.errors&&0!==t.errors.length&&t.errors.forEach((t=>{const i=e.querySelector('[data-valmsg-for="'+t.propertyName+'"]');if(!i)return console.warn("Validation error for property "+t.propertyName+" ("+t.errorMessage+") but no validator element found!"),!0;"true"===i.getAttribute("data-valmsg-replace")&&(i.innerText=t.errorMessage),i.classList.remove("field-validation-valid"),i.classList.add("field-validation-error");const n=e.querySelector('[name="'+i.getAttribute("data-valmsg-for")+'"]');if(!n)return!0;n.classList.remove("valid"),n.classList.add("input-validation-error")}))}(t))),null):t.text())).then((e=>{t.removeLoader(s),e&&(s.innerHTML=e)})).catch((function(e){console.warn("Something went wrong.",e),t.removeLoader(s)})))}static init(t){const e=this;t.querySelectorAll('form[data-ajax="true"]').forEach((t=>{t.addEventListener("submit",(t=>
2{t.preventDefault(),e.makeRequest(t.target)}))}))}}class s{static set(t,e,i,n="/"){const s=new Date;s.setTime(s.getTime()+24*i*60*60*1e3),document.cookie=t+"="+e+"; expires="+s.toUTCString()+"; path="+n}static get(t){const e=t+"=",i=document.cookie.split(";");for(let t=0;t<i.length;t++){const n=i[t].trim();if(0===n.indexOf(e))return n.substring(e.length,n.length)}return null}}function r(){var t={},e=!1,i=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],i++);const n=function(i){for(let n in i)i.hasOwnProperty(n)&&(e&&"[object Object]"===Object.prototype.toString.call(i[n])?t[n]=r(t[n],i[n]):t[n]=i[n])};for(;i<arguments.length;i++)n(arguments[i]);return t}function o(t,e=2,i="sv-SE"){return new Intl.NumberFormat(i,{maximumFractionDigits:e,minimumFractionDigits:e}).format(t)}function a(t,e){const i=function(t){var i=null;return t.parentNode.querySelectorAll(e).forEach((e=>e!==t||(i=e,!1))),i};for(var n=t.parentNode;n!==document&&null==i(n);)n=n.parentNode;return n}class l{constructor(t,e){const i={listWrapper:t.nextElementSibling,onFiltered:function(){},autoInit:!0};this._element=t,this._allowMultiple="true"===t.getAttribute("data-filter-allow-multiple"),this._matchAll="true"===t.getAttribute("data-filter-match-all"),this._serverSide="true"===t.getAttribute("data-filter-server-side"),this._options=r(i,e),this.activeFilters={tags:[],markets:[],categories:[],calendar:[],isEmpty:function(){return 0===this.tags.length&&0===this.markets.length&&0===this.categories.length&&0===this.calendar.length},clear:function(){this.tags=[],this.markets=[],this.categories=[],this.calendar=[]}},this._options.autoInit&&this.init()}init(){const t=this;t._element.querySelectorAll('.dropdown-menu input[type="checkbox"]').forEach((e=>{e.addEventListener("click",(e=>{if(t.toggleCheckbox(e.target),t._serverSide){let e=window.location.href.replace(window.location.search,""),i=new URLSearchParams(window.location.search);return i.has("p")&&i.delete("p"),i.has("tags")&&i.delete("tags"),i.has("markets")&&i.delete("markets"),i.has("categories")&&i.delete("categories"),i.has("calendar")&&i.delete("calendar"),i=t.getCombinedHash(i),i.size>0&&(e+="?"+i.toString().replace("%7C","|")),void(window.location.href=e)}t.filterList()}))})),t._element.querySelectorAll(".dropdown-menu .dropdown-item").forEach((e=>{e.addEventListener("click",(e=>{if("INPUT"===e.target.nodeName)return;const i=e.target.parentElement.querySelector('input[type="checkbox"]');i&&(e.preventDefault(),i.checked=!i.checked,t.toggleCheckbox(i),t.filterList())}))})),t._element.querySelector(".tag-filters-active button:not([value])").addEventListener("click",(e=>{t.activeFilters.clear(),t._serverSide||window.history.pushState("",document.title,window.location.pathname+"#"+t.getCombinedHash()),t.filterList()})),window.addEventListener("pageshow",(e=>{t.filterList()}))}toggleCheckbox(t){const e=this,i=t.value,n=t.getAttribute("data-filter");t.checked?(e._allowMultiple||(e.activeFilters[n]=[]),e.activeFilters[n].push(i)):e.activeFilters[n]=e.activeFilters[n].filter((function(t){return t!==i})),e._serverSide||window.history.pushState("",document.title,window.location.pathname+"#"+e.getCombinedHash())}getCombinedHash(t){const e=this;return e.activeFilters.isEmpty()?"":(t||(t=new URLSearchParams),e.activeFilters.tags.length>0&&(1===e.activeFilters.tags.length?t.set("tags",e.activeFilters.tags[0]):t.set("tags",e.activeFilters.tags.join("|"))),e.activeFilters.markets.length>0&&(1===e.activeFilters.markets.length?t.set("markets",e.activeFilters.markets[0]):t.set("markets",e.activeFilters.markets.join("|"))),e.activeFilters.categories.length>0&&(1===e.activeFilters.categories.length?t.set("categories",e.activeFilters.categories[0]):t.set("categories",e.activeFilters.categories.join("|"))),e.activeFilters.calendar.length>0&&(1===e.activeFilters.calendar.length?t.set("calendar",e.activeFilters.calendar[0]):t.set("calendar",e.activeFilters.calendar.join("|"))),t.toString().replace("%7C","|"))}filterList(){const t=this;if(t.activeFilters.isEmpty()){let n=null;if(t._serverSide)n=new URLSearchParams(window.location.search);else{var e=decodeURIComponent(window.location.hash);e&&e.length>0&&(n=new URLSearchParams(e.replace("#","")))}if(n&&n.size>0){if(n.has("tags")){const e=n.get("tags").split("|");for(var i=0;i<e.length;i++)t.activeFilters.tags.push(e[i])}if(n.has("markets")){const e=n.get("markets").split("|");for(i=0;i<e.length;i++)t.activeFilters.markets.push(e[i])}if(n.has("categories")){const e=n.get("categories").split("|");for(i=0;i<e.length;i++)t.activeFilters.categories.push(e[i])}if(n.has("calendar")){const e=n.get("calendar").split("|");for(i=0;i<e.length;i++)t.activeFilters.calendar.push(e[i])}}}t._element.querySelector(".tag-filters-empty").classList.add("d-none");const n=t._element.querySelector(".tag-filters-active"),s=n.querySelector("button:not([value])");if(n.classList.add("d-none"),n.querySelectorAll("button[value]").forEach((t=>{t.remove()})),t._element.querySelectorAll('input[type="checkbox"]').forEach((e=>{e.checked=!1;const i=e.getAttribute("data-filter");for(var r=0;r<t.activeFilters[i].length;r++)if(e.value===t.activeFilters[i][r]){e.checked=!0;const r=e.nextElementSibling.textContent.trim();let o=document.createElement("button");
2o.type="button",o.value=e.value,o.setAttribute("data-filter",i),o.title="Ta bort filter '"+r+"'.",o.textContent=r,o.classList.add("btn","btn-sm","btn-outline-dark","me-1","mb-1"),o.addEventListener("click",(e=>{const i=e.target.value,n=e.target.getAttribute("data-filter"),s=t._element.querySelector('input[type="checkbox"][value="'+i+'"][data-filter="'+n+'"]');s.checked=!1,t.toggleCheckbox(s),t.filterList()})),n.insertBefore(o,s)}})),n.querySelectorAll("button[value]").length>0&&n.classList.remove("d-none"),t.activeFilters.isEmpty())return t._options.listWrapper.querySelectorAll("*[data-tags],*[data-market],*[data-categories],*[data-calendar]").forEach((t=>{let e=a(t,".umb-block-grid__layout-item");e||(e=t),e.classList.remove("d-none")})),void t._options.onFiltered();if(t._serverSide)return;const r=function(e,i){const n=t.activeFilters[i];if(0===n.length)return!0;let s=!1;for(var r=0;r<n.length;r++){let o=n[r].replace("#","");if(e.getAttribute("data-"+i).indexOf(o)>-1){if(s=!0,!t._matchAll)break}else if(t._matchAll){s=!1;break}}return s};t._options.listWrapper.querySelectorAll("*[data-tags],*[data-market],*[data-categories],*[data-calendar]").forEach((t=>{let e=a(t,".umb-block-grid__layout-item");e||(e=t),e.classList.add("d-none"),r(t,"tags")&&r(t,"markets")&&r(t,"categories")&&r(t,"calendar")&&e.classList.remove("d-none")})),0===t._options.listWrapper.querySelectorAll(".umb-block-grid__layout-item:not(.d-none)").length&&t._element.querySelector(".tag-filters-empty").classList.remove("d-none"),t._options.onFiltered()}}var c=i(872),h=i.n(c);i(424);var d=i(48),u=i.n(d);i(863),i(169),i(511),i(471),i(90);class f{constructor(t,e){this.element=t,this.step=parseInt(t.getAttribute("data-contract-module-step")),this.options=r({},e),this.init()}stepOne(){const t=this,e=t.element.querySelector(".choices"),i=t.element.querySelector(".consumption input");e.querySelectorAll("button[data-consumption]").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault();let n=t.target;"BUTTON"!==n.tagName&&(n=a(n,"button")),e.querySelectorAll("button[data-consumption]").forEach((t=>{t.classList.remove("active")})),n.classList.add("active"),i.value=parseFloat(n.getAttribute("data-consumption")),document.getElementById("Order_Contract_ConsumptionName").value=n.getAttribute("data-consumption-name")}))}));const n=t.element.querySelector('input[type="date"]');n.disabled=!0;const s=n.parentNode.getAttribute("data-min"),r=n.parentNode.getAttribute("data-max");n.setAttribute("min",s),n.setAttribute("max",r),n.disabled=!1}stepTwo(){const t=this,e=a(t.element,"form"),i=function(t,e,i){t.querySelector(".card-text").innerHTML='<div class="alert '+i+'">'+e+"</div>",t.querySelector(".card-footer .btn-primary").remove()},n=function(t,e){let i={id:0,name:"",extra:""},n=e?"true":"false";const s=t.querySelector('.contract-addons input[type="radio"][data-isfixedprice="'+n+'"]:checked');if(!s)return i;i.id=parseInt(s.getAttribute("data-addonid")),i.name=t.querySelector('.contract-addons label[for="'+s.getAttribute("id")+'"]').textContent,isNaN(i.id)&&(i.id=0),i.name||(i.name="");var r=s.parentNode.querySelector("select:not(d-none)");return r&&(i.extra=r.value),i},s=function(t){let e={id:0,name:""};const i=t.querySelector('.contract-periods input[type="radio"]:checked');return i?(e.id=parseInt(i.getAttribute("data-periodid")),e.name=t.querySelector('.contract-periods label[for="'+i.getAttribute("id")+'"]').textContent,isNaN(e.id)&&(e.id=0),e.name||(e.name=""),e):e},r=function(e){let r={contentId:parseInt(t.element.getAttribute("data-contentid")),contractId:parseInt(e.getAttribute("data-contractid")),periodId:s(e).id,addOnId:n(e,!1).id,fixedAddOnId:n(e,!0).id,contractStart:document.getElementById("Order_Contract_RequestedContractStart").value,consumptionKwh:parseFloat(document.getElementById("Order_Contract_ConsumptionKwh").value)};fetch("/api/contractmodule/prices",{method:"POST",mode:"same-origin",cache:"no-cache",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r)}).then((t=>500===t.status?(t.text().then((t=>i(e,t,"alert-danger"))),null):406===t.status?(t.text().then((t=>i(e,t,"alert-info"))),null):t.json())).then((t=>{if(!t)return;e.querySelector(".contract-prices .price-data").innerHTML=t.contractPriceSummaryHtml;for(var i=0;i<t.priceData.addOnPrices.length;i++){let n=t.priceData.addOnPrices[i],s=e.querySelector('.contract-addons .form-check span[data-addonid="'+n.id+'"]');s&&(s.textContent="("+n.pricePerKwhFormatted+")")}e.querySelector(".compare-price span.sek").textContent=t.priceData.unitPriceComparisonFormatted,e.querySelector(".compare-price span.kwh").textContent=t.priceData.unitPriceComparisonKwhFormatted;const n=e.querySelector(".contract-prices > div > .monthly-price > span"),s=e.querySelector(".contract-prices > .price-per-kwh > span");
2n&&s&&(n.innerHTML=t.priceData.pricePerMonthFormatted,s.innerHTML=t.priceData.pricePerKwhFormatted)})).catch((function(t){console.warn("Something went wrong.",t)}))},o=function(t){if(a(t,".contract-addons").querySelectorAll('input[type="radio"]:not(:checked) ~ select').forEach((t=>{t.value="",t.classList.add("d-none")})),t.checked){var e=t.parentNode.querySelector("select");e&&e.classList.remove("d-none")}};t.element.querySelectorAll("div[data-contractid]").forEach((t=>{t.querySelectorAll('.contract-addons input[type="radio"]').forEach((t=>{t.addEventListener("click",(t=>{let e=t.target;const i=e.getAttribute("name"),n=a(e,".contract-addons").querySelectorAll('input[type="radio"][name="'+i+'"]');let s=!0;if(n.forEach((t=>{if("true"===t.getAttribute("data-ispreselected"))return s=!1,!1})),e.hasAttribute("data-checked")){if(!s)return;return e.removeAttribute("data-checked"),e.checked=!1,o(e),void r(a(e,"div[data-contractid]"))}n.forEach((t=>{t.removeAttribute("data-checked")})),e.setAttribute("data-checked","true"),o(e),r(a(e,"div[data-contractid]"))}))})),t.querySelectorAll('.contract-periods input[type="radio"]').forEach((t=>{t.addEventListener("change",(t=>{let e=t.target;r(a(e,"div[data-contractid]"))}))})),t.querySelectorAll(".contract-prices > a").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault();let e=t.target;"false"!==e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","false"):e.setAttribute("aria-expanded","true")}))})),t.querySelector(".card-footer button.btn-primary").addEventListener("click",(i=>{i.preventDefault(),document.getElementById("Order_Contract_SelectedContractId").value=t.getAttribute("data-contractid");var r=s(t);document.getElementById("Order_Contract_SelectedPeriodId").value=r.id,document.getElementById("Order_Contract_ContractPeriod").value=r.name;var o=n(t,!1);document.getElementById("Order_Contract_SelectedAddOnId").value=o.id,document.getElementById("Order_Contract_AddOn").value=o.name,document.getElementById("Order_Contract_AddOnExtra").value=o.extra;var a=n(t,!0);document.getElementById("Order_Contract_SelectedFixedAddOnId").value=a.id,document.getElementById("Order_Contract_FixedAddOn").value=a.name,e.submit()})),r(t)}))}stepThree(){const t=a(this.element,"form");document.getElementById("submit-campaign")?.addEventListener("click",(e=>{t.action=t.action.replace("steg-4","steg-3"),t.submit()}))}init(){const t=this;switch(t.step){case 1:t.stepOne();break;case 2:t.stepTwo();break;case 3:t.stepThree()}const e=a(t.element,"form");e.action=e.action+"?id="+t.element.getAttribute("data-order-key")}}function p(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function m(t){return g(p(2.55*t),0,255)}function b(t){return g(p(255*t),0,255)}function v(t){return g(p(t/2.55)/100,0,1)}function x(t){return g(p(100*t),0,100)}const y={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},_=[..."0123456789ABCDEF"],w=t=>_[15&t],S=t=>_[(240&t)>>4]+_[15&t],k=t=>(240&t)>>4==(15&t);const A=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function M(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function E(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function C(t,e,i){const n=M(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function O(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),r=Math.min(e,i,n),o=(s+r)/2;let a,l,c;return s!==r&&(c=s-r,l=o>.5?c/(2-s-r):c/(s+r),a=function(t,e,i,n,s){return t===s?(e-i)/n+(e<i?6:0):e===s?(i-t)/n+2:(t-e)/n+4}(e,i,n,c,s),a=60*a+.5),[0|a,l||0,o]}function D(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(b)}function P(t,e,i){return D(M,t,e,i)}function I(t){return(t%360+360)%360}const L={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"},T={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",K
2ocTate:"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"};let R;const N=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,F=t=>
vendor: 11,275 bytes, line 2
2t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,z=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function j(t,e,i){if(t){let n=O(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function V(t,e){return t?Object.assign(e||{},t):t}function B(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=b(t[3]))):(e=V(t,{r:0,g:0,b:0,a:1})).a=b(e.a),e}function W(t){return"r"===t.charAt(0)?function(t){const e=N.exec(t);let i,n,s,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?m(t):g(255*t,0,255)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?m(i):g(i,0,255)),n=255&(e[4]?m(n):g(n,0,255)),s=255&(e[6]?m(s):g(s,0,255)),{r:i,g:n,b:s,a:r}}}(t):function(t){const e=A.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?m(+e[5]):b(+e[5]));const s=I(+e[2]),r=+e[3]/100,o=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return D(C,t,e,i)}(s,r,o):"hsv"===e[1]?function(t,e,i){return D(E,t,e,i)}(s,r,o):P(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class ${constructor(t){if(t instanceof $)return t;const e=typeof t;let i;var n,s,r;"object"===e?i=B(t):"string"===e&&(r=(n=t).length,"#"===n[0]&&(4===r||5===r?s={r:255&17*y[n[1]],g:255&17*y[n[2]],b:255&17*y[n[3]],a:5===r?17*y[n[4]]:255}:7!==r&&9!==r||(s={r:y[n[1]]<<4|y[n[2]],g:y[n[3]]<<4|y[n[4]],b:y[n[5]]<<4|y[n[6]],a:9===r?y[n[7]]<<4|y[n[8]]:255})),i=s||function(t){R||(R=function(){const t={},e=Object.keys(T),i=Object.keys(L);let n,s,r,o,a;for(n=0;n<e.length;n++){for(o=a=e[n],s=0;s<i.length;s++)r=i[s],a=a.replace(r,L[r]);r=parseInt(T[o],16),t[a]=[r>>16&255,r>>8&255,255&r]}return t}(),R.transparent=[0,0,0,0]);const e=R[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||W(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=V(this._rgb);return t&&(t.a=v(t.a)),t}set rgb(t){this._rgb=B(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${v(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>k(t.r)&&k(t.g)&&k(t.b)&&k(t.a))(t)?w:S,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=O(t),i=e[0],n=x(e[1]),s=x(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${v(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const r=e===s?.5:e,o=2*r-1,a=i.a-n.a,l=((o*a==-1?o:(o+a)/(1+o*a))+1)/2;s=1-l,i.r=255&l*i.r+s*n.r+.5,i.g=255&l*i.g+s*n.g+.5,i.b=255&l*i.b+s*n.b+.5,i.a=r*i.a+(1-r)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=z(v(t.r)),s=z(v(t.g)),r=z(v(t.b));return{r:b(F(n+i*(z(v(e.r))-n))),g:b(F(s+i*(z(v(e.g))-s))),b:b(F(r+i*(z(v(e.b))-r))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new $(this.rgb)}alpha(t){return this._rgb.a=b(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=p(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return j(this._rgb,2,t),this}darken(t){return j(this._rgb,2,-t),this}saturate(t){return j(this._rgb,1,t),this}desaturate(t){return j(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=O(t);i[0]=I(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function H(){}const q=(()=>{let t=0;return()=>t++})();function U(t){return null==t}function Y(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function X(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function K(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function J(t,e){return K(t)?t:e}function Q(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Z(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function tt(t,e,i,n){let s,r,o;if(Y(t))if(r=t.length,n)for(s=r-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<r;s++)e.call(i,t[s],s);else if(X(t))for(o=Object.keys(t),r=o.length,s=0;s<r;s++)e.call(i,t[o[s]],o[s])}function et(t,e){let i,n,s,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],r=e[i],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function it(t){if(Y(t))return t.map(it);if(X(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let s=0;for(;s<n;++s)e[i[s]]=it(t[i[s]]);return e}return t}function nt(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function st(t,e,i,n){if(!nt(t))return;const s=e[t],r=i[t];X(s)&&X(r)?rt(s,r,n):e[t]=it(r)}function rt(t,e,i){const n=Y(e)?e:[e],s=n.length;if(!X(t))return t;const r=(i=i||{}).merger||st;let o;for(let e=0;e<s;++e){if(o=n[e],!X(o))continue;const s=Object.keys(o);for(let e=0,n=s.length;e<n;++e)r(s[e],t,o,i)}return t}function ot(t,e){return rt(t,e,{merger:at})}function at(t,e,i){if(!nt(t))return;const n=e[t],s=i[t];X(n)&&X(s)?ot(n,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=it(s))}const lt={"":t=>t,x:t=>t.x,y:t=>t.y};function ct(t,e){const i=lt[e]||(lt[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function ht(t){return t.charAt(0).toUpperCase()+t.slice(1)}const dt=t=>void 0!==t,ut=t=>"function"==typeof t,ft=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},pt=Math.PI,gt=2*pt,mt=gt+pt,bt=Number.POSITIVE_INFINITY,vt=pt/180,xt=pt/2,yt=pt/4,_t=2*pt/3,wt=Math.log10,St=Math.sign;function kt(t,e,i){return Math.abs(t-e)<i}function At(t){const e=Math.round(t);t=kt(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(wt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Mt(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Et(t){return t*(pt/180)}function Ct(t){if(!K(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ot(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);let r=Math.atan2(n,i);return r<-.5*pt&&(r+=gt),{angle:r,distance:s}}function Dt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Pt(t,e){return(t-e+mt)%gt-pt}function It(t){return(t%gt+gt)%gt}function Lt(t,e,i,n){const s=It(t),r=It(e),o=It(i),a=It(r-s),l=It(o-s),c=It(s-r),h=It(s-o);return s===r||s===o||n&&r===o||a>l&&c<h}function Tt(t,e,i){return Math.max(e,Math.min(i,t))}function Rt(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function Nt(t,e,i){i=i||(i=>t[i]<e);let n,s=t.length-1,r=0;for(;s-r>1;)n=r+s>>1,i(n)?r=n:s=n;return{lo:r,hi:s}}const Ft=(t,e,i,n)=>Nt(t,i,n?n=>{const s=t[n][e];return s<i||s===i&&t[n+1][e]===i}:n=>t[n][e]<i),zt=(t,e,i)=>Nt(t,i,(n=>t[n][e]>=i)),jt=["push","pop","shift","splice","unshift"];function Vt(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(jt.forEach((e=>{delete t[e]})),delete t._chartjs)}const Bt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Wt(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,Bt.call(window,(()=>{n=!1,t.apply(e,i)})))}}const $t=t=>"start"===t?"left":"end"===t?"right":"center",Ht=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;const qt=t=>0===t||1===t,Ut=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*gt/i),Yt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*gt/i)+1,Xt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*xt),easeOutSine:t=>Math.sin(t*xt),easeInOutSine:t=>-.5*(Math.cos(pt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>qt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>qt(t)?t:Ut(t,.075,.3),easeOutElastic:t=>qt(t)?t:Yt(t,.075,.3),easeInOutElastic(t){const e=.1125;return qt(t)?t:t<.5?.5*Ut(2*t,e,.45):.5+.5*Yt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Xt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Xt.easeInBounce(2*t):.5*Xt.easeOutBounce(2*t-1)+.5};function Kt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Jt(t){return Kt(t)?t:new $(t)}function Qt(t){return Kt(t)?t:new $(t).saturate(.5).darken(.1).hexString()}const Gt=["x","y","borderWidth","radius","tension"],Zt=["color","borderColor","backgroundColor"],te=new Map;function ee(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=te.get(i);return n||(n=new Intl.NumberFormat(t,e),te.set(i,n)),n}(e,i).format(t)}const ie={values(t){return Y(t)?t:""+t},numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,r=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),r=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const o=wt(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ee(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(wt(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?ie.numeric.call(this,t,e,i):""}};var ne={formatters:ie};const se=Object.create(null),re=Object.create(null);function oe(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function ae(t,e,i){return"string"==typeof e?rt(oe(t,e),i):rt(oe(t,""),e)}class le{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=t=>t.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={}
vendor: 4,183 bytes, line 2
2,this.hoverBackgroundColor=(t,e)=>Qt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Qt(e.borderColor),this.hoverColor=(t,e)=>Qt(e.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={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ae(this,t,e)}get(t){return oe(this,t)}describe(t,e){return ae(re,t,e)}override(t,e){return ae(se,t,e)}route(t,e,i,n){const s=oe(this,t),r=oe(this,i),o="_"+e;Object.defineProperties(s,{[o]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=r[n];return X(t)?Object.assign({},e,t):Q(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ce=new le({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Zt},numbers:{type:"number",properties:Gt}}),t.describe("animations",{_fallback:"animation"}),t.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=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.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:ne.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function he(t,e,i,n,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,i.push(s)),r>n&&(n=r),n}function de(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function ue(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function fe(t,e,i,n){pe(t,e,i,n,null)}function pe(t,e,i,n,s){let r,o,a,l,c,h,d,u;const f=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*vt;if(f&&"object"==typeof f&&(r=f.toString(),"[object HTMLImageElement]"===r||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(i,n),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:s?t.ellipse(i,n,s/2,g,0,0,gt):t.arc(i,n,g,0,gt),t.closePath();break;case"triangle":h=s?s/2:g,t.moveTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=_t,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=_t,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,o=Math.cos(m+yt)*l,d=Math.cos(m+yt)*(s?s/2-c:l),a=Math.sin(m+yt)*l,u=Math.sin(m+yt)*(s?s/2-c:l),t.arc(i-d,n-a,c,m-pt,m-xt),t.arc(i+u,n-o,c,m-xt,m),t.arc(i+d,n+a,c,m,m+xt),t.arc(i-u,n+o,c,m+xt,m+pt),t.closePath();break;
vendor: 4,052 bytes, line 2
2case"rect":if(!p){l=Math.SQRT1_2*g,h=s?s/2:l,t.rect(i-h,n-l,2*h,2*l);break}m+=yt;case"rectRot":d=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+u,n-o),t.lineTo(i+d,n+a),t.lineTo(i-u,n+o),t.closePath();break;case"crossRot":m+=yt;case"cross":d=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+d,n+a),t.moveTo(i+u,n-o),t.lineTo(i-u,n+o);break;case"star":d=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+d,n+a),t.moveTo(i+u,n-o),t.lineTo(i-u,n+o),m+=yt,d=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+d,n+a),t.moveTo(i+u,n-o),t.lineTo(i-u,n+o);break;case"line":o=s?s/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(i-o,n-a),t.lineTo(i+o,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ge(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function me(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function be(t){t.restore()}function ve(t,e,i,n,s){if(!e)return t.lineTo(i.x,i.y);if("middle"===s){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===s!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function xe(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ye(t,e,i,n,s){if(s.strikethrough||s.underline){const r=t.measureText(n),o=e-r.actualBoundingBoxLeft,a=e+r.actualBoundingBoxRight,l=i-r.actualBoundingBoxAscent,c=i+r.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}}function _e(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function we(t,e,i,n,s,r={}){const o=Y(e)?e:[e],a=r.strokeWidth>0&&""!==r.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),U(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),l=0;l<o.length;++l)c=o[l],r.backdrop&&_e(t,r.backdrop),a&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),U(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(c,i,n,r.maxWidth)),t.fillText(c,i,n,r.maxWidth),ye(t,i,n,c,r),n+=Number(s.lineHeight);t.restore()}function Se(t,e){const{x:i,y:n,w:s,h:r,radius:o}=e;t.arc(i+o.topLeft,n+o.topLeft,o.topLeft,1.5*pt,pt,!0),t.lineTo(i,n+r-o.bottomLeft),t.arc(i+o.bottomLeft,n+r-o.bottomLeft,o.bottomLeft,pt,xt,!0),t.lineTo(i+s-o.bottomRight,n+r),t.arc(i+s-o.bottomRight,n+r-o.bottomRight,o.bottomRight,xt,0,!0),t.lineTo(i+s,n+o.topRight),t.arc(i+s-o.topRight,n+o.topRight,o.topRight,0,-xt,!0),t.lineTo(i+o.topLeft,n)}const ke=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ae=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Me(t,e){const i=(""+t).match(ke);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const Ee=t=>+t||0;function Ce(t,e){const i={},n=X(e),s=n?Object.keys(e):e,r=X(t)?n?i=>Q(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=Ee(r(t));return i}function Oe(t){return Ce(t,{top:"y",right:"x",bottom:"y",left:"x"})}function De(t){return Ce(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Pe(t){const e=Oe(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ie(t,e){t=t||{},e=e||ce.font;let i=Q(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=Q(t.style,e.style);n&&!(""+n).match(Ae)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:Q(t.family,e.family),lineHeight:Me(Q(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:Q(t.weight,e.weight),string:""};
vendor: 4,653 bytes, line 2
2return s.string=function(t){return!t||U(t.size)||U(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function Le(t,e,i,n){let s,r,o,a=!0;for(s=0,r=t.length;s<r;++s)if(o=t[s],void 0!==o&&(void 0!==e&&"function"==typeof o&&(o=o(e),a=!1),void 0!==i&&Y(o)&&(o=o[i%o.length],a=!1),void 0!==o))return n&&!a&&(n.cacheable=!1),o}function Te(t,e){return Object.assign(Object.create(t),e)}function Re(t,e=[""],i,n,s=(()=>t[0])){const r=i||t;void 0===n&&(n=Ue("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:n,_getTarget:s,override:i=>Re([i,...t],e,r,n)};return new Proxy(o,{deleteProperty(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get(i,n){return Ve(i,n,(()=>function(t,e,i,n){let s;for(const r of e)if(s=Ue(ze(r,t),i),void 0!==s)return je(t,s)?He(i,n,t,s):s}(n,e,t,i)))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return Ye(t).includes(e)},ownKeys(t){return Ye(t)},set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Ne(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Fe(t,n),setContext:e=>Ne(t,e,i,n),override:s=>Ne(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty(e,i){return delete e[i],delete t[i],!0},get(t,e,i){return Ve(t,e,(()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:r,_descriptors:o}=t;let a=n[e];return ut(a)&&o.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(r,o||n);return a.delete(t),je(t,l)&&(l=He(s._scopes,s,t,l)),l}(e,a,t,i)),Y(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=i;if(void 0!==r.index&&n(t))return e[r.index%e.length];if(X(e[0])){const i=e,n=s._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,s,t,l);e.push(Ne(i,r,o&&o[t],a))}}return e}(e,a,t,o.isIndexable)),je(e,a)&&(a=Ne(a,s,r&&r[e],o)),a}(t,e,i)))},getOwnPropertyDescriptor(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(e,i,n){return t[i]=n,delete e[i],!0}})}function Fe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:ut(i)?i:()=>i,isIndexable:ut(n)?n:()=>n}}const ze=(t,e)=>t?t+ht(e):e,je=(t,e)=>X(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ve(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function Be(t,e,i){return ut(t)?t(e,i):t}const We=(t,e)=>!0===t?e:"string"==typeof t?ct(e,t):void 0;function $e(t,e,i,n,s){for(const r of e){const e=We(i,r);if(e){t.add(e);const r=Be(e._fallback,i,s);if(void 0!==r&&r!==i&&r!==n)return r}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function He(t,e,i,n){const s=e._rootScopes,r=Be(e._fallback,i,n),o=[...t,...s],a=new Set;a.add(n);let l=qe(a,o,i,r||i,n);return null!==l&&(void 0===r||r===i||(l=qe(a,o,r,l,n),null!==l))&&Re(Array.from(a),[""],s,r,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return Y(s)&&X(i)?i:s||{}}(e,i,n)))}function qe(t,e,i,n,s){for(;i;)i=$e(t,e,i,n,s);return i}function Ue(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function Ye(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const Xe=Number.EPSILON||1e-14,Ke=(t,e)=>e<t.length&&!t[e].skip&&t[e],Je=t=>"x"===t?"y":"x";function Qe(t,e,i,n){const s=t.skip?e:t,r=e,o=i.skip?e:i,a=Dt(r,s),l=Dt(o,r);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+u*(o.x-s.x),y:r.y+u*(o.y-s.y)}}}function Ge(t,e,i){return Math.max(Math.min(t,i),e)}function Ze(t,e,i,n,s){let r,o,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Je(e),n=t.length,s=Array(n).fill(0),r=Array(n);let o,a,l,c=Ke(t,0);for(o=0;o<n;++o)if(a=l,l=c,c=Ke(t,o+1),l){if(c){const t=c[e]-l[e];s[o]=0!==t?(c[i]-l[i])/t:0}r[o]=a?c?St(s[o-1])!==St(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}
2!function(t,e,i){const n=t.length;let s,r,o,a,l,c=Ke(t,0);for(let h=0;h<n-1;++h)l=c,c=Ke(t,h+1),l&&c&&(kt(e[h],0,Xe)?i[h]=i[h+1]=0:(s=i[h]/e[h],r=i[h+1]/e[h],a=Math.pow(s,2)+Math.pow(r,2),a<=9||(o=3/Math.sqrt(a),i[h]=s*o*e[h],i[h+1]=r*o*e[h])))}(t,s,r),function(t,e,i="x"){const n=Je(i),s=t.length;let r,o,a,l=Ke(t,0);for(let c=0;c<s;++c){if(o=a,a=l,l=Ke(t,c+1),!a)continue;const s=a[i],h=a[n];o&&(r=(s-o[i])/3,a[`cp1${i}`]=s-r,a[`cp1${n}`]=h-r*e[c]),l&&(r=(l[i]-s)/3,a[`cp2${i}`]=s+r,a[`cp2${n}`]=h+r*e[c])}}(t,r,e)}(t,s);else{let i=n?t[t.length-1]:t[0];for(r=0,o=t.length;r<o;++r)a=t[r],l=Qe(i,a,t[Math.min(r+1,o-(n?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,s,r,o,a=ge(t[0],e);for(i=0,n=t.length;i<n;++i)o=r,r=a,a=i<n-1&&ge(t[i+1],e),r&&(s=t[i],o&&(s.cp1x=Ge(s.cp1x,e.left,e.right),s.cp1y=Ge(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=Ge(s.cp2x,e.left,e.right),s.cp2y=Ge(s.cp2y,e.top,e.bottom)))}(t,i)}function ti(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ei(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ii(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const ni=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),si=["top","right","bottom","left"];function ri(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const r=si[s];n[r]=parseFloat(t[e+"-"+r+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const oi=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function ai(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=ni(i),r="border-box"===s.boxSizing,o=ri(s,"padding"),a=ri(s,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:r}=n;let o,a,l=!1;if(oi(s,r,t.target))o=s,a=r;else{const t=e.getBoundingClientRect();o=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:o,y:a,box:l}}(t,i),d=o.left+(h&&a.left),u=o.top+(h&&a.top);let{width:f,height:p}=e;return r&&(f-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/p*i.height/n)}}const li=t=>Math.round(10*t)/10;function ci(t,e,i){const n=e||1,s=Math.floor(t.height*n),r=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||o.height!==s||o.width!==r)&&(t.currentDevicePixelRatio=n,o.height=s,o.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)}const hi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ti()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function di(t,e){const i=function(t,e){return ni(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ui(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function fi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function pi(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=ui(t,s,i),a=ui(s,r,i),l=ui(r,e,i),c=ui(o,a,i),h=ui(a,l,i);return ui(c,h,i)}function gi(t,e,i){return t?function(t,e){return{x(i){return t+t+e-i},setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}}(e,i):{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}}function mi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function bi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function vi(t){return"angle"===t?{between:Lt,compare:Pt,normalize:It}:{between:Rt,compare:(t,e)=>t-e,normalize:t=>t}}function xi({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}
vendor: 5,124 bytes, line 2
2function yi(t,e,i){if(!i)return[t];const{property:n,start:s,end:r}=i,o=e.length,{compare:a,between:l,normalize:c}=vi(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:s,end:r}=i,{between:o,normalize:a}=vi(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&o(a(e[d%l][n]),s,r);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),p=[];let g,m,b,v=!1,x=null;for(let t=h,i=h;t<=d;++t)m=e[t%o],m.skip||(g=c(m[n]),g!==b&&(v=l(g,s,r),null===x&&(v||l(s,b,g)&&0!==a(s,b))&&(x=0===a(g,s)?t:i),null!==x&&(!v||0===a(r,g)||l(r,b,g))&&(p.push(xi({start:x,end:t,loop:u,count:o,style:f})),x=null),i=t,b=g));return null!==x&&p.push(xi({start:x,end:d,loop:u,count:o,style:f})),p}function _i(t,e){const i=[],n=t.segments;for(let s=0;s<n.length;s++){const r=yi(n[s],t.points,e);r.length&&i.push(...r)}return i}function wi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Si(t,e){if(!e)return!1;const i=[],n=function(t,e){return Kt(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}function ki(t,e,i){return t.options.clip?t[i]:e[i]}function Ai(t,e){const i=e._clip;if(i.disabled)return!1;const n=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:ki(i,e,"left"),right:ki(i,e,"right"),top:ki(n,e,"top"),bottom:ki(n,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:n.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:n.right+(!0===i.right?0:i.right),top:!1===i.top?0:n.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:n.bottom+(!0===i.bottom?0:i.bottom)}}class Mi{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const s=e.listeners[n],r=e.duration;s.forEach((n=>n({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)})))}_refresh(){this._request||(this._running=!0,this._request=Bt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let r,o=s.length-1,a=!1;for(;o>=0;--o)r=s[o],r._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ei=new Mi;const Ci="transparent",Oi={boolean(t,e,i){return i>.5?e:t},color(t,e,i){const n=Jt(t||Ci),s=n.valid&&Jt(e||Ci);return s&&s.valid?s.mix(n,i).hexString():e},number(t,e,i){return t+(e-t)*i}};class Di{constructor(t,e,i,n){const s=e[i];n=Le([t.to,n,s,t.from]);const r=Le([t.from,s,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof r],this._easing=Xt[t.easing]||Xt.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=i,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,r=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Le([t.to,e,n,t.from]),this._from=Le([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,r=this._loop,o=this._to;let a;if(this._active=s!==o&&(r||e<i),!this._active)return this._target[n]=o,void this._notify(!0);e<0?this._target[n]=s:(a=e/i%2,a=r&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(s,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class Pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!X(t))return;const e=Object.keys(ce.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((n=>{const s=t[n];if(!X(s))return;const r={};for(const t of e)r[t]=s[t];
vendor: 4,153 bytes, line 2
2(Y(s.properties)&&s.properties||[n]).forEach((t=>{t!==n&&i.has(t)||i.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const s=t[n[e]];s&&s.active()&&i.push(s.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),r=Object.keys(e),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const l=r[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=s[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,o);continue}h.cancel()}d&&d.duration?(s[l]=h=new Di(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Ei.add(this._chart,i),!0):void 0}}function Ii(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:s,end:n?s:r}}function Li(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,r;for(s=0,r=n.length;s<r;++s)i.push(n[s].index);return i}function Ti(t,e,i,n={}){const s=t.keys,r="single"===n.mode;let o,a,l,c;if(null===e)return;let h=!1;for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===i){if(h=!0,n.all)continue;break}c=t.values[l],K(c)&&(r||0===e||St(e)===St(c))&&(e+=c)}return h||n.all?e:0}function Ri(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Ni(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Fi(t,e,i,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const e=t[s.index];if(i&&e>0||!i&&e<0)return s.index}return null}function zi(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:r,vScale:o,index:a}=n,l=r.axis,c=o.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(r,o,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:r,[c]:d}=i;u=(i._stacks||(i._stacks={}))[c]=Ni(s,h,r),u[a]=d,u._top=Fi(u,o,!0,n.type),u._bottom=Fi(u,o,!1,n.type),(u._visualValues||(u._visualValues={}))[a]=d}}function ji(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Vi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const Bi=t=>"reset"===t||"none"===t,Wi=(t,e)=>e?t:Object.assign({},t);class $i{static defaults={};static datasetElementType=null;static dataElementType=null;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(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ri(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&&Vi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=Q(i.xAxisID,ji(t,"x")),r=e.yAxisID=Q(i.yAxisID,ji(t,"y")),o=e.rAxisID=Q(i.rAxisID,ji(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,s,r,o),c=e.vAxisID=n(a,r,s,o);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(o),e.
vendor: 4,169 bytes, line 2
2iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Vt(this._data,this),t._stacked&&Vi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(X(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,s="x"===i.axis?"x":"y",r="x"===n.axis?"x":"y",o=Object.keys(t),a=new Array(o.length);let l,c,h;for(l=0,c=o.length;l<c;++l)h=o[l],a[l]={[s]:h,[r]:t[h]};return a}(e,t)}else if(i!==e){if(i){Vt(i,this);const t=this._cachedMeta;Vi(t),t._parsed=[]}e&&Object.isExtensible(e)&&(this,(n=e)._chartjs?n._chartjs.listeners.push(this):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),jt.forEach((t=>{const e="_onData"+ht(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),s}})})))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=Ri(e.vScale,e),e.stack!==i.stack&&(n=!0,Vi(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&(zi(this,e._parsed),e._stacked=Ri(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:r}=i,o=s.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=Y(n[t])?this.parseArrayData(i,n,t,e):X(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===l[o]||d&&l[o]<d[o];for(a=0;a<e;++a)i._parsed[a+t]=l=c[a],h&&(s()&&(h=!1),d=l);i._sorted=h}r&&zi(this,c)}parsePrimitiveData(t,e,i,n){const{iScale:s,vScale:r}=t,o=s.axis,a=r.axis,l=s.getLabels(),c=s===r,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[o]:c||s.parse(l[f],f),[a]:r.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:s,yScale:r}=t,o=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=e[c],o[a]={x:s.parse(h[0],c),y:r.parse(h[1],c)};return o}parseObjectData(t,e,i,n){const{xScale:s,yScale:r}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:s.parse(ct(u,o),d),y:r.parse(ct(u,a),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,s=this._cachedMeta,r=e[t.axis];return Ti({keys:Li(n,!0),values:e._stacks[t.axis]._visualValues},r,s.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const s=i[e.axis];let r=null===s?NaN:s;const o=n&&i._stacks[e.axis];n&&o&&(n.values=o,r=Ti(n,s,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,s=i._sorted&&t===i.iScale,r=n.length,o=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Li(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(o);let d,u;function f(){u=n[d];const e=u[o.axis];return!K(u[t.axis])||c>e||h<e}for(d=0;d<r&&(f()||(this.updateRangeFromParsed(l,t,u,a),!s));++d);if(s)for(d=r-1;d>=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,r;for(n=0,s=e.length;n<s;++n)r=e[n][t.axis],K(r)&&i.push(r);return i}getMaxOverflow(){return!1}
vendor: 5,564 bytes, line 2
2getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:n?""+n.getLabelForValue(s[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,s;return X(t)?(e=t.top,i=t.right,n=t.bottom,s=t.left):e=i=n=s=t,{top:e,right:i,bottom:n,left:s,disabled:!1===t}}(Q(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=Ii(t,i),s=Ii(e,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],s=e.chartArea,r=[],o=this._drawStart||0,a=this._drawCount||n.length-o,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,s,o,a),c=o;c<o+a;++c){const e=n[c];e.hidden||(e.active&&l?r.push(e):e.draw(t,s))}for(c=0;c<r.length;++c)r[c].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Te(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=n.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return Te(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=n,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,s=this._cachedDataOpts,r=t+"-"+e,o=s[r],a=this.enableOptionSharing&&dt(i);if(o)return Wi(o,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),h=n?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),c),u=Object.keys(ce.elements[t]),f=l.resolveNamedOptions(d,u,(()=>this.getContext(i,n,e)),h);return f.$shared&&(f.$shared=a,s[r]=Object.freeze(Wi(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,r=`animation-${e}`,o=s[r];if(o)return o;let a;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),r=n.getOptionScopes(this.getDataset(),s);a=n.createResolver(r,this.getContext(t,i,e))}const l=new Pi(n,a&&a.animations);return a&&a._cacheable&&(s[r]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Bi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),r=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:r}}updateElement(t,e,i,n){Bi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Bi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,r=Math.min(s,n);r&&this.parse(0,r),s>n?this._insertElements(n,s-n,t):s<n&&this._removeElements(s,n-s)}_insertElements(t,e,i=!0){const n=this._cachedMeta,s=n.data,r=t+e;let o;const a=t=>{for(t.length+=e,o=t.length-1;o>=r;o--)t[o]=t[o-e]};for(a(s),o=t;o<r;++o)s[o]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&Vi(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const 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]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Hi(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,s=i.length;e<s;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=function(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,s,r,o,a=e._length;const l=()=>{32767!==r&&-32768!==r&&(dt(o)&&(a=Math.min(a,Math.abs(r-o)||a)),o=r)};for(n=0,s=i.length;n<s;++n)r=e.getPixelForValue(i[n]),l();for(o=void 0,n=0,s=e.ticks.length;n<s;++n)r=e.getPixelForTick(n),l();return a}
vendor: 5,207 bytes, line 2
2function qi(t,e,i,n){return Y(t)?function(t,e,i,n){const s=i.parse(t[0],n),r=i.parse(t[1],n),o=Math.min(s,r),a=Math.max(s,r);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Ui(t,e,i,n){const s=t.iScale,r=t.vScale,o=s.getLabels(),a=s===r,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[s.axis]=a||s.parse(o[c],c),l.push(qi(u,d,r,c));return l}function Yi(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Xi(t,e,i,n){let s=e.borderSkipped;const r={};if(!s)return void(t.borderSkipped=r);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:a,reverse:l,top:c,bottom:h}=function(t){let e,i,n,s,r;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(s="end",r="start"):(s="start",r="end"),{start:i,end:n,reverse:e,top:s,bottom:r}}(t);"middle"===s&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?s=c:(i._bottom||0)===n?s=h:(r[Ki(h,o,a,l)]=!0,s=c)),r[Ki(s,o,a,l)]=!0,t.borderSkipped=r}function Ki(t,e,i,n){var s,r,o;return n?(o=i,t=Ji(t=(s=t)===(r=e)?o:s===o?r:s,i,e)):t=Ji(t,e,i),t}function Ji(t,e,i){return"start"===t?e:"end"===t?i:t}function Qi(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class Gi extends $i{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return Ui(t,e,i,n)}parseArrayData(t,e,i,n){return Ui(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:s,vScale:r}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l="x"===s.axis?o:a,c="x"===r.axis?o:a,h=[];let d,u,f,p;for(d=i,u=i+n;d<u;++d)p=e[d],f={},f[s.axis]=s.parse(ct(p,l),d),h.push(qi(ct(p,c),f,r,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,s=this.getParsed(t),r=s._custom,o=Yi(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(s[n.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const s="reset"===n,{index:r,_cachedMeta:{vScale:o}}=this,a=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n);for(let u=e;u<e+i;u++){const e=this.getParsed(u),i=s||U(e[o.axis])?{base:a,head:a}:this._calculateBarValuePixels(u),f=this._calculateBarIndexPixels(u,c),p=(e._stacks||{})[o.axis],g={horizontal:l,base:i.base,enableBorderRadius:!p||Yi(e._custom)||r===p._top||r===p._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};d&&(g.options=h||this.resolveDataElementOptions(u,t[u].active?"active":n));const m=g.options||t[u].options;Xi(g,m,p,r),Qi(g,m,c.ratio),this.updateElement(t[u],u,g,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),s=i.options.stacked,r=[],o=this._cachedMeta.controller.getParsed(e),a=o&&o[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===a)),n=e&&e[t.vScale.axis];if(U(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!l(i))&&((!1===s||-1===r.indexOf(i.stack)||void 0===s&&void 0===i.stack)&&r.push(i.stack),i.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[Q("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,r;for(s=0,r=e.data.length;s<r;++s)n.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const o=t.barThickness;return{min:o||Hi(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:s,minBarLength:r}}=this,o=s||0,a=this.getParsed(t),l=a._custom,c=Yi(l);let h,d,u=a[e.axis],f=0,p=i?this.applyStack(e,a,i):u;p!==u&&(f=p-u,p=u),c&&(u=l.barStart,p=l.barEnd-l.barStart,0!==u&&St(u)!==St(l.barEnd)&&(f=0),f+=u);const g=U(s)||c?f:s;let m=e.getPixelForValue(g);if(h=this.chart.getDataVisibility(t)?e.getPixelForValue(f+p):m,d=h-m,Math.abs(d)<r){d=function(t,e,
vendor: 9,973 bytes, line 2
2i){return 0!==t?St(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,e,o)*r,u===o&&(m-=d/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),l=Math.min(t,s),f=Math.max(t,s);m=Math.max(Math.min(m,f),l),h=m+d,i&&!c&&(a._stacks[e.axis]._visualValues[n]=e.getValueForPixel(h)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const t=St(d)*e.getLineWidthForValue(o)/2;m+=t,d-=t}return{size:d,base:m,head:h,center:h+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,r=Q(n.maxBarThickness,1/0);let o,a;const l=this._getAxisCount();if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,c="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,r=s[t];let o=t>0?s[t-1]:null,a=t<s.length-1?s[t+1]:null;const l=i.categoryPercentage;null===o&&(o=r-(null===a?e.end-e.start:a-r)),null===a&&(a=r+r-o);const c=r-(r-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,n,i*l):function(t,e,i,n){const s=i.barThickness;let r,o;return U(s)?(r=e.min*i.categoryPercentage,o=i.barPercentage):(r=s*n,o=1),{chunk:r/n,ratio:o,start:e.pixels[t]-r/2}}(t,e,n,i*l),h="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,d=this._getAxis().indexOf(Q(h,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+d;o=c.start+c.chunk*u+c.chunk/2,a=Math.min(r,c.chunk*c.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(r,e.min*e.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let s=0;for(;s<n;++s)null===this.getParsed(s)[e.axis]||i[s].hidden||i[s].draw(this._ctx)}}class Zi extends $i{static id="doughnut";static 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"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,s)=>{const r=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};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){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let s,r,o=t=>+i[t];if(X(i[t])){const{key:t="value"}=this._parsing;o=e=>+ct(i[e],t)}for(s=t,r=t+e;s<r;++s)n._parsed[s]=o(s)}}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=gt,e=-gt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,s=n._getRotation(),r=n._getCircumference();t=Math.min(t,s),e=Math.max(e,s+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,s=n.data,r=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-r)/2,0),a=Math.min((c=o,"string"==typeof(l=this.options.cutout)&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const h=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,i){let n=1,s=1,r=0,o=0;if(e<gt){const a=t,l=a+e,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Lt(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>Lt(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,d),m=f(xt,h,u),b=p(pt,c,d),v=p(pt+xt,h,u);n=(g-b)/2,s=(m-v)/2,r=-(g+b)/2,o=-(m+v)/2}return{ratioX:n,ratioY:s,offsetX:r,offsetY:o}}(u,d,a),b=(i.width-r)/f,v=(i.height-r)/p,x=Math.max(Math.min(b,v)/2,0),y=G(this.options.radius,x),_=(y-Math.max(y*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*y,this.offsetY=m*y,n.total=this.calculateTotal(),this.outerRadius=y-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*s/gt)}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,o=r.chartArea,a=r.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,h=s&&a.animateScale,d=h?0:this.innerRadius,u=h?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,n);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,s);for(g=e;g<e+i;++g){const e=this._circumference(g,s),i=t[g],r={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:u,innerRadius:d};p&&(r.options=f||this.resolveDataElementOptions(g,i.active?"active":n)),m+=e,this.updateElement(i,g,r,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(s))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?gt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=ee(e._parsed[t],i.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,r,o,a;if(!t)for(n=0,s=i.data.datasets.length;n<s;++n)if(i.isDatasetVisible(n)){r=i.getDatasetMeta(n),t=r.data,o=r.controller;break}if(!t)return 0;for(n=0,s=t.length;n<s;++n)a=o.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Q(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class tn extends $i{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,r=this.chart._animationsDisabled;let{start:o,count:a}=function(t,e,i){const n=e.length;let s=0,r=n;if(t._sorted){const{iScale:o,vScale:a,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,h=o.axis,{min:d,max:u,minDefined:f,maxDefined:p}=o.getUserBounds();if(f){if(s=Math.min(Ft(l,h,d).lo,i?n:Ft(e,h,o.getPixelForValue(d)).lo),c){const t=l.slice(0,s+1).reverse().findIndex((t=>!U(t[a.axis])));s-=Math.max(0,t)}s=Tt(s,0,n-1)}if(p){let t=Math.max(Ft(l,o.axis,u,!0).hi+1,i?0:Ft(e,h,o.getPixelForValue(u),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!U(t[a.axis])));t+=Math.max(0,e)}r=Tt(t,s,n)-s}else r=n-s}return{start:s,count:r}}(e,n,r);this._drawStart=o,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const r=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),r}(e)&&(o=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:l},t),this.updateElements(n,o,a,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(e,n),d=r.axis,u=o.axis,{spanGaps:f,segment:p}=this.options,g=Mt(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||"none"===n,b=e+i,v=t.length;let x=e>0&&this.getParsed(e-1);for(let i=0;i<v;++i){const f=t[i],v=m?f:{};if(i<e||i>=b){v.skip=!0;continue}const y=this.getParsed(i),_=U(y[u]),w=v[d]=r.getPixelForValue(y[d],i),S=v[u]=s||_?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,y,a):y[u],i);v.skip=isNaN(w)||isNaN(S)||_,v.stop=i>0&&Math.abs(y[d]-x[d])>g,p&&(v.parsed=y,v.raw=l.data[i]),h&&(v.options=c||this.resolveDataElementOptions(i,f.active?"active":n)),m||this.updateElement(f,i,v,n),x=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function en(t,e,i,n){const{controller:s,data:r,_sorted:o}=t,a=s._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&"r"!==e&&o&&r.length){const o=a._reversePixels?zt:Ft;if(!n){const n=o(r,e,i);if(l){const{vScale:e}=s._cachedMeta,{_parsed:i}=t,r=i.slice(0,n.lo+1).reverse().findIndex((t=>!U(t[e.axis])));n.lo-=Math.max(0,r);const o=i.slice(n.hi).findIndex((t=>
vendor: 1,049 bytes, line 2
2!U(t[e.axis])));n.hi+=Math.max(0,o)}return n}if(s._sharedOptions){const t=r[0],n="function"==typeof t.getRange&&t.getRange(e);if(n){const t=o(r,e,i-n),s=o(r,e,i+n);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:r.length-1}}function nn(t,e,i,n,s){const r=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=r.length;t<i;++t){const{index:i,data:a}=r[t],{lo:l,hi:c}=en(r[t],e,o,s);for(let t=l;t<=c;++t){const e=a[t];e.skip||n(e,i,t)}}}function sn(t,e,i,n,s){const r=[];return s||t.isPointInArea(e)?(nn(t,i,e,(function(i,o,a){(s||ge(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&r.push({element:i,datasetIndex:o,index:a})}),!0),r):r}function rn(t,e,i,n,s,r){return r||t.isPointInArea(e)?"r"!==i||n?function(t,e,i,n,s,r){let o=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const s=e?Math.abs(t.x-n.x):0,r=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(r,2))}}(i);let l=Number.POSITIVE_INFINITY;return nn(t,i,e,(function(i,c,h){const d=i.inRange(e.x,e.y,s);if(n&&!d)return;const u=i.getCenterPoint(s);
vendor: 4,261 bytes, line 2
2if(!r&&!t.isPointInArea(u)&&!d)return;const f=a(e,u);f<l?(o=[{element:i,datasetIndex:c,index:h}],l=f):f===l&&o.push({element:i,datasetIndex:c,index:h})})),o}(t,e,i,n,s,r):function(t,e,i,n){let s=[];return nn(t,i,e,(function(t,i,r){const{startAngle:o,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:l}=Ot(t,{x:e.x,y:e.y});Lt(l,o,a)&&s.push({element:t,datasetIndex:i,index:r})})),s}(t,e,i,s):[]}function on(t,e,i,n,s){const r=[],o="x"===i?"inXRange":"inYRange";let a=!1;return nn(t,i,e,((t,n,l)=>{t[o]&&t[o](e[i],s)&&(r.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,s))})),n&&!a?[]:r}var an={evaluateInteractionItems:nn,modes:{index(t,e,i,n){const s=ai(e,t),r=i.axis||"x",o=i.includeInvisible||!1,a=i.intersect?sn(t,s,r,n,o):rn(t,s,r,!1,n,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,n){const s=ai(e,t),r=i.axis||"xy",o=i.includeInvisible||!1;let a=i.intersect?sn(t,s,r,n,o):rn(t,s,r,!1,n,o);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point(t,e,i,n){return sn(t,ai(e,t),i.axis||"xy",n,i.includeInvisible||!1)},nearest(t,e,i,n){const s=ai(e,t),r=i.axis||"xy",o=i.includeInvisible||!1;return rn(t,s,r,i.intersect,n,o)},x(t,e,i,n){return on(t,ai(e,t),"x",i.intersect,n)},y(t,e,i,n){return on(t,ai(e,t),"y",i.intersect,n)}}};const ln=["left","top","right","bottom"];function cn(t,e){return t.filter((t=>t.pos===e))}function hn(t,e){return t.filter((t=>-1===ln.indexOf(t.pos)&&t.box.axis===e))}function dn(t,e){return t.sort(((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight}))}function un(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function fn(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function pn(t,e,i,n){const{pos:s,box:r}=i,o=t.maxPadding;if(!X(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?r.height:r.width),i.size=e.size/e.count,t[s]+=i.size}r.getPadding&&fn(o,r.getPadding());const a=Math.max(0,e.outerWidth-un(o,t,"left","right")),l=Math.max(0,e.outerHeight-un(o,t,"top","bottom")),c=a!==t.w,h=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function gn(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function mn(t,e,i,n){const s=[];let r,o,a,l,c,h;for(r=0,o=t.length,c=0;r<o;++r){a=t[r],l=a.box,l.update(a.width||e.w,a.height||e.h,gn(a.horizontal,e));const{same:o,other:d}=pn(e,i,a,n);c|=o&&s.length,h=h||d,l.fullSize||s.push(a)}return c&&mn(s,e,i,n)||h}function bn(t,e,i,n,s){t.top=i,t.left=e,t.right=e+n,t.bottom=i+s,t.width=n,t.height=s}function vn(t,e,i,n){const s=i.padding;let{x:r,y:o}=e;for(const a of t){const t=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const n=e.w*c,r=l.size||t.height;dt(l.start)&&(o=l.start),t.fullSize?bn(t,s.left,o,i.outerWidth-s.right-s.left,r):bn(t,e.left+l.placed,o,n,r),l.start=o,l.placed+=n,o=t.bottom}else{const n=e.h*c,o=l.size||t.width;dt(l.start)&&(r=l.start),t.fullSize?bn(t,r,s.top,o,i.outerHeight-s.bottom-s.top):bn(t,r,e.top+l.placed,o,n),l.start=r,l.placed+=n,r=t.right}}e.x=r,e.y=o}var xn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const s=Pe(t.options.layout.padding),r=Math.max(e-s.width,0),o=Math.max(i-s.height,0),a=function(t){const e=function(t){const e=[];let i,n,s,r,o,a;for(i=0,n=(t||[]).length;i<n;++i)s=t[i],({position:r,options:{stack:o,stackWeight:a=1}}=s),e.push({index:i,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&r+o,stackWeight:a});return e}
vendor: 7,321 bytes, line 2
2(t),i=dn(e.filter((t=>t.box.fullSize)),!0),n=dn(cn(e,"left"),!0),s=dn(cn(e,"right")),r=dn(cn(e,"top"),!0),o=dn(cn(e,"bottom")),a=hn(e,"x"),l=hn(e,"y");return{fullSize:i,leftAndTop:n.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:cn(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;tt(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),u=Object.assign({},s);fn(u,Pe(n));const f=Object.assign({maxPadding:u,w:r,h:o,x:s.left,y:s.top},s),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!ln.includes(n))continue;const r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let r,o,a;for(r=0,o=t.length;r<o;++r){a=t[r];const{fullSize:o}=a.box,l=i[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*n:o&&e.availableWidth,a.height=s):(a.width=n,a.height=c?c*s:o&&e.availableHeight)}return i}(l.concat(c),d);mn(a.fullSize,f,d,p),mn(l,f,d,p),mn(c,f,d,p)&&mn(l,f,d,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),vn(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,vn(a.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},tt(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class yn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class _n extends yn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wn="$chartjs",Sn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},kn=t=>null===t||""===t,An=!!hi&&{passive:!0};function Mn(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,An)}function En(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Cn(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||En(i.addedNodes,n),e=e&&!En(i.removedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}function On(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||En(i.removedNodes,n),e=e&&!En(i.addedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}const Dn=new Map;let Pn=0;function In(){const t=window.devicePixelRatio;t!==Pn&&(Pn=t,Dn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Ln(t,e,i){const n=t.canvas,s=n&&ei(n);if(!s)return;const r=Wt(((t,e)=>{const n=s.clientWidth;i(t,e),n<s.clientWidth&&i()}),window),o=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||r(i,n)}));return o.observe(s),function(t,e){Dn.size||window.addEventListener("resize",In),Dn.set(t,e)}(t,r),o}function Tn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Dn.delete(t),Dn.size||window.removeEventListener("resize",In)}(t)}function Rn(t,e,i){const n=t.canvas,s=Wt((e=>{null!==t.ctx&&i(function(t,e){const i=Sn[t.type]||t.type,{x:n,y:s}=ai(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,An)}(n,e,s),s}class Nn extends yn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t[wn]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",kn(s)){const e=di(t,"width");void 0!==e&&(t.width=e)}if(kn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=di(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[wn])return!1;const i=e[wn].initial;["height","width"].forEach((t=>{const n=i[t];U(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[wn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:Cn,detach:On,resize:Ln}[e]||Rn;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Tn,detach:Tn,resize:Tn}[e]||Mn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const s=ni(t),r=ri(s,"margin"),o=ii(s.maxWidth,t,"clientWidth")||bt,a=ii(s.maxHeight,t,"clientHeight")||bt,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const r=t&&ei(t);if(r){const t=r.getBoundingClientRect(),o=ni(r),a=ri(o,"border","width"),l=ri(o,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=ii(o.maxWidth,r,"clientWidth"),s=ii(o.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||bt,maxHeight:s||bt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===s.boxSizing){const t=ri(s,"border","width"),e=ri(s,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-r.width),h=Math.max(0,n?c/n:h-r.height),c=li(Math.min(c,o,l.maxWidth)),h=li(Math.min(h,a,l.maxHeight)),c&&!h&&(h=li(c/2)),(void 0!==e||void 0!==i)&&n&&l.height&&h>l.height&&(h=l.height,c=li(Math.floor(h*n))),{width:c,height:h}}(t,e,i,n)}isAttached(t){const e=t&&ei(t);return!(!e||!e.isConnected)}}class Fn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Mt(this.x)&&Mt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}function zn(t,e,i,n,s){const r=Q(n,0),o=Math.min(Q(s,t.length),t.length);let a,l,c,h=0;for(i=Math.ceil(i),s&&(a=s-n,i=a/Math.floor(a/i)),c=r;c<0;)h++,c=Math.round(r+h*i);for(l=Math.max(r,0);l<o;l++)l===c&&(e.push(t[l]),h++,c=Math.round(r+h*i))}const jn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Vn=(t,e)=>Math.min(e||t,t);function Bn(t,e){const i=[],n=t.length/e,s=t.length;let r=0;for(;r<s;r+=n)i.push(t[Math.floor(r)]);return i}function Wn(t,e,i){const n=t.ticks.length,s=Math.min(e,n-1),r=t._startPixel,o=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(s);if(!(i&&(l=1===n?Math.max(c-r,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(s-1))/2,c+=s<e?l:-l,c<r-a||c>o+a)))return c}function $n(t){return t.drawTicks?t.tickLength:0}function Hn(t,e){if(!t.display)return 0;const i=Ie(t.font,e),n=Pe(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function qn(t,e,i){let n=$t(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>
vendor: 21,168 bytes, line 2
2"left"===t?"right":"right"===t?"left":t)(n)),n}class Un extends Fn{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:i,_suggestedMax:n}=this;return t=J(t,Number.POSITIVE_INFINITY),e=J(e,Number.NEGATIVE_INFINITY),i=J(i,Number.POSITIVE_INFINITY),n=J(n,Number.NEGATIVE_INFINITY),{min:J(t,i),max:J(e,n),minDefined:K(t),maxDefined:K(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:r}=this.getUserBounds();if(s&&r)return{min:i,max:n};const o=this.getMatchingVisibleMetas();for(let a=0,l=o.length;a<l;++a)e=o[a].controller.getMinMax(this,t),s||(i=Math.min(i,e.min)),r||(n=Math.max(n,e.max));return i=r&&i>n?n:i,n=s&&i>n?i:n,{min:J(i,J(n,i)),max:J(n,J(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const 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(){Z(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:r}=this.options,o=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,r=G(e,(s-n)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(n,-Math.abs(r)),max:o(s,r)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o<this.ticks.length;this._convertTicksToLabels(a?Bn(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),s=t._maxLength/i;return Math.floor(Math.min(n,s))}(t),s=Math.min(i.maxTicksLimit||n,n),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return function(t,e,i,n){let s,r=0,o=i[0];for(n=Math.ceil(n),s=0;s<t.length;s++)s===o&&(e.push(t[s]),r++,o=i[r*n])}(e,c,r,o/s),c;const h=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),s=e.length/i;if(!n)return Math.max(s,1);const r=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(n);for(let t=0,e=r.length-1;t<e;t++){const e=r[t];if(e>s)return e}return Math.max(s,1)}(r,e,s);if(o>0){let t,i;const n=o>1?Math.round((l-a)/(o-1)):null;for(zn(e,c,h,U(n)?0:a-n,a),t=0,i=o-1;t<i;t++)zn(e,c,h,r[t],r[t+1]);return zn(e,c,h,l,U(n)?e.length:l+n),c}return zn(e,c,h),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Z(this.options.afterUpdate,[this])}beforeSetDimensions(){Z(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(){Z(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Z(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Z(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,s;for(i=0,n=t.length;i<n;i++)s=t[i],s.label=Z(e.callback,[s.value,i,t],this)}afterTickToLabelConversion(){Z(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Z(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Vn(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,s=e.maxRotation;let r,o,a,l=n;if(!this._isVisible()||!e.display||n>=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=Tt(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/i:u/(i-1),h+6>r&&(r=u/(i-(t.offset?.5:1)),o=this.maxHeight-$n(t.grid)-e.padding-Hn(t.title,this.chart.options.font),a=Math.sqrt(h*h+d*d),l=Math.min(Math.asin(Tt((c.highest.height+6)/r,-1,1)),Math.asin(Tt(o/a,-1,1))-Math.asin(Tt(d/a,-1,1)))*(180/pt),l=Math.max(n,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){Z(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Z(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){const r=Hn(n,e.options.font);if(o?(t.width=this.maxWidth,t.height=$n(s)+r):(t.height=this.maxHeight,t.width=$n(s)+r),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:r}=this._getLabelSizes(),a=2*i.padding,l=Et(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(o){const e=i.mirror?0:h*s.width+c*r.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*s.width+h*r.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),o?(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,i,n){const{ticks:{align:s,padding:r},position:o}=this.options,a=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;a?l?(h=n*t.width,d=i*e.height):(h=i*t.height,d=n*e.width):"start"===s?d=e.width:"end"===s?h=t.width:"inner"!==s&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-o+r)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-c+r)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+r,this.paddingBottom=n+r}}_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(){Z(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)U(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Bn(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:s}=this,r=[],o=[],a=Math.floor(e/Vn(e,i));let l,c,h,d,u,f,p,g,m,b,v,x=0,y=0;for(l=0;l<e;l+=a){if(d=t[l].label,u=this._resolveTickFontOptions(l),n.font=f=u.string,p=s[f]=s[f]||{data:{},gc:[]},g=u.lineHeight,m=b=0,U(d)||Y(d)){if(Y(d))for(c=0,h=d.length;c<h;++c)v=d[c],U(v)||Y(v)||(m=he(n,p.data,p.gc,m,v),b+=g)}else m=he(n,p.data,p.gc,m,d),b=g;r.push(m),o.push(b),x=Math.max(m,x),y=Math.max(b,y)}!function(t,e){tt(t,(t=>{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s<n;++s)delete t.data[i[s]];i.splice(0,n)}}))}(s,e);const _=r.indexOf(x),w=o.indexOf(y),S=t=>({width:r[t]||0,height:o[t]||0});return{first:S(0),last:S(e-1),widest:S(_),highest:S(w),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Tt(this._alignToPixels?de(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Te(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Te(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Et(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),s=this._getLabelSizes(),r=t.autoSkipPadding||0,o=s?s.widest.width+r:0,a=s?s.highest.height+r:0;return this.isHorizontal()?a*i>o*n?o/i:a/n:a*n<o*i?a/i:o/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:r,border:o}=n,a=s.offset,l=this.isHorizontal(),c=this.ticks.length+(a?1:0),h=$n(s),d=[],u=o.setContext(this.getContext()),f=u.display?u.width:0,p=f/2,g=function(t){return de(i,t,f)};let m,b,v,x,y,_,w,S,k,A,M,E;if("top"===r)m=g(this.bottom),_=this.bottom-h,S=m-p,A=g(t.top)+p,E=t.bottom;else if("bottom"===r)m=g(this.top),A=t.top,E=g(t.bottom)-p,_=m+p,S=this.top+h;else if("left"===r)m=g(this.right),y=this.right-h,w=m-p,k=g(t.left)+p,M=t.right;else if("right"===r)m=g(this.left),k=t.left,M=g(t.right)-p,y=m+p,w=this.left+h;else if("x"===e){if("center"===r)m=g((t.top+t.bottom)/2+.5);else if(X(r)){const t=Object.keys(r)[0],e=r[t];m=g(this.chart.scales[t].getPixelForValue(e))}A=t.top,E=t.bottom,_=m+p,S=_+h}else if("y"===e){if("center"===r)m=g((t.left+t.right)/2);else if(X(r)){const t=Object.keys(r)[0],e=r[t];m=g(this.chart.scales[t].getPixelForValue(e))}y=m-p,w=y-h,k=t.left,M=t.right}const C=Q(n.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/C));for(b=0;b<c;b+=O){const t=this.getContext(b),e=s.setContext(t),n=o.setContext(t),r=e.lineWidth,c=e.color,h=n.dash||[],u=n.dashOffset,f=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],m=e.tickBorderDashOffset;v=Wn(this,b,a),void 0!==v&&(x=de(i,v,r),l?y=w=k=M=x:_=S=A=E=x,d.push({tx1:y,ty1:_,tx2:w,ty2:S,x1:k,y1:A,x2:M,y2:E,width:r,color:c,borderDash:h,borderDashOffset:u,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=m,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:s}=i,r=this.isHorizontal(),o=this.ticks,{align:a,crossAlign:l,padding:c,mirror:h}=s,d=$n(i.grid),u=d+c,f=h?-c:u,p=-Et(this.labelRotation),g=[];let m,b,v,x,y,_,w,S,k,A,M,E,C="middle";if("top"===n)_=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===n)_=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,y=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,y=t.x}else if("x"===e){if("center"===n)_=(t.top+t.bottom)/2+u;else if(X(n)){const t=Object.keys(n)[0],e=n[t];_=this.chart.scales[t].getPixelForValue(e)+u}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)y=(t.left+t.right)/2-u;else if(X(n)){const t=Object.keys(n)[0],e=n[t];y=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===a?C="top":"end"===a&&(C="bottom"));const O=this._getLabelSizes();for(m=0,b=o.length;m<b;++m){v=o[m],x=v.label;const t=s.setContext(this.getContext(m));S=this.getPixelForTick(m)+s.labelOffset,k=this._resolveTickFontOptions(m),A=k.lineHeight,M=Y(x)?x.length:1;const e=M/2,i=t.color,a=t.textStrokeColor,c=t.textStrokeWidth;let d,u=w;if(r?(y=S,"inner"===w&&(u=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),E="top"===n?"near"===l||0!==p?-M*A+A/2:"center"===l?-O.highest.height/2-e*A+A:-O.highest.height+A/2:"near"===l||0!==p?A/2:"center"===l?O.highest.height/2-e*A:O.highest.height-M*A,h&&(E*=-1),0===p||t.showLabelBackdrop||(y+=A/2*Math.sin(p))):(_=S,E=(1-M)*A/2),t.showLabelBackdrop){const e=Pe(t.backdropPadding),i=O.heights[m],n=O.widths[m];let s=E-e.top,r=0-e.left;switch(C){case"middle":s-=i/2;break;case"bottom":s-=i}switch(w){case"center":r-=n/2;break;case"right":r-=n;break;case"inner":m===b-1?r-=n:m>0&&(r-=n/2)}d={left:r,top:s,width:n+e.width,height:i+e.height,color:t.backdropColor}}g.push({label:x,font:k,textOffset:E,options:{rotation:p,color:i,strokeColor:a,strokeWidth:c,textAlign:u,textBaseline:C,translation:[y,_],backdrop:d}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Et(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,r=t+s,o=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+s,"near"===i?a="left":"center"===i?(a="center",l+=o/2):(a="right",l+=o)):(l=this.right-r,"near"===i?a="right":"center"===i?(a="center",l-=o/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+s,"near"===i?a="right":"center"===i?(a="center",l-=o/2):(a="left",l-=o)):(l=this.left+r,"near"===i?a="left":"center"===i?(a="center",l+=o/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,r;const o=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,r=n.length;s<r;++s){const t=n[s];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,s=i.setContext(this.getContext()),r=i.display?s.width:0;if(!r)return;const o=n.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,h,d;this.isHorizontal()?(l=de(t,this.left,r)-r/2,c=de(t,this.right,o)+o/2,h=d=a):(h=de(t,this.top,r)-r/2,d=de(t,this.bottom,o)+o/2,l=c=a),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(l,h),e.lineTo(c,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&me(e,i);const n=this.getLabelItems(t);for(const t of n){const i=t.options,n=t.font;we(e,t.label,0,t.textOffset,n,i)}i&&be(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Ie(i.font),r=Pe(i.padding),o=i.align;let a=s.lineHeight/2;"bottom"===e||"center"===e||X(e)?(a+=r.bottom,Y(i.text)&&(a+=s.lineHeight*(i.text.length-1))):a+=r.top;const{titleX:l,titleY:c,maxWidth:h,rotation:d}=function(t,e,i,n){const{top:s,left:r,bottom:o,right:a,chart:l}=t,{chartArea:c,scales:h}=l;let d,u,f,p=0;const g=o-s,m=a-r;if(t.isHorizontal()){if(u=Ht(n,r,a),X(i)){const t=Object.keys(i)[0],n=i[t];f=h[t].getPixelForValue(n)+g-e}else f="center"===i?(c.bottom+c.top)/2+g-e:jn(t,i,e);d=a-r}else{if(X(i)){const t=Object.keys(i)[0],n=i[t];u=h[t].getPixelForValue(n)-m+e}else u="center"===i?(c.left+c.right)/2-m+e:jn(t,i,e);f=Ht(n,o,s),p="left"===i?-xt:xt}return{titleX:u,titleY:f,maxWidth:d,rotation:p}}(this,a,e,o);we(t,i.text,0,0,s,{color:i.color,maxWidth:h,rotation:d,textAlign:qn(o,e,n),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=Q(t.grid&&t.grid.z,-1),n=Q(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Un.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,r;for(s=0,r=e.length;s<r;++s){const r=e[s];r[i]!==this.id||t&&r.type!==t||n.push(r)}return n}_resolveTickFontOptions(t){return Ie(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Yn{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,s=t.id,r=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in n||(n[s]=t,function(t,e,i){const n=rt(Object.create(null),[i?ce.get(i):{},ce.get(e),t.defaults]);ce.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),s=n.pop(),r=[t].concat(n).join("."),o=e[i].split("."),a=o.pop(),l=o.join(".");ce.route(r,s,l,a)}))}(e,t.defaultRoutes),t.descriptors&&ce.describe(e,t.descriptors)}(t,r,i),this.override&&ce.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in ce[n]&&(delete ce[n][i],this.override&&delete se[i])}}class Xn{constructor(){this.controllers=new Yn($i,"datasets",!0),this.elements=new Yn(Fn,"elements"),this.plugins=new Yn(Object,"plugins"),this.scales=new Yn(Un,"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")}
vendor: 4,268 bytes, line 2
2removeControllers(...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,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):tt(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=ht(t);Z(i["before"+n],[],i),e[t](i),Z(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var Kn=new Xn;class Jn{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,n){n=n||{};for(const s of t){const t=s.plugin;if(!1===Z(t[i],[e,n,s.options],t)&&n.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=Q(i.options&&i.options.plugins,{}),s=function(t){const e={},i=[],n=Object.keys(Kn.plugins.items);for(let t=0;t<n.length;t++)i.push(Kn.getPlugin(n[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const n=s[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,s){const r=[],o=t.getContext();for(const a of e){const e=a.id,l=Qn(n[e],s);null!==l&&r.push({plugin:a,options:Gn(t.config,{plugin:a,local:i[e]},l,o)})}return r}(t,s,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Qn(t,e){return e||!1!==t?!0===t?{}:t:null}function Gn(t,{plugin:e,local:i},n,s){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(n,r);return i&&e.defaults&&o.push(e.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Zn(t,e){const i=ce.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ts(t){if("x"===t||"y"===t||"r"===t)return t}function es(t,...e){if(ts(t))return t;for(const n of e){const e=n.axis||("top"===(i=n.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&ts(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function is(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function ns(t){const e=t.options||(t.options={});e.plugins=Q(e.plugins,{}),e.scales=function(t,e){const i=se[t.type]||{scales:{}},n=e.scales||{},s=Zn(t.type,e),r=Object.create(null);return Object.keys(n).forEach((e=>{const o=n[e];if(!X(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const a=es(e,o,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return is(t,"x",i[0])||is(t,"y",i[0])}return{}}(e,t),ce.scales[o.type]),l=function(t,e){return t===e?"_index_":"_value_"}(a,s),c=i.scales||{};r[e]=ot(Object.create(null),[{axis:a},o,c[a],c[l]])})),t.data.datasets.forEach((i=>{const s=i.type||t.type,o=i.indexAxis||Zn(s,e),a=(se[s]||{}).scales||{};Object.keys(a).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),s=i[e+"AxisID"]||e;r[s]=r[s]||Object.create(null),ot(r[s],[{axis:e},n[s],a[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];ot(e,[ce.scales[e.type],ce.scale])})),r}(t,e)}function ss(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const rs=new Map,os=new Set;function as(t,e){let i=rs.get(t);
vendor: 6,501 bytes, line 2
2return i||(i=e(),rs.set(t,i),os.add(i)),i}const ls=(t,e,i)=>{const n=ct(e,i);void 0!==n&&t.add(n)};class cs{constructor(t){this._config=function(t){return(t=t||{}).data=ss(t.data),ns(t),t}(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=ss(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ns(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return as(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return as(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return as(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return as(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,r=this._cachedScopes(t,i),o=r.get(e);if(o)return o;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>ls(a,t,e)))),e.forEach((t=>ls(a,n,t))),e.forEach((t=>ls(a,se[s]||{},t))),e.forEach((t=>ls(a,ce,t))),e.forEach((t=>ls(a,re,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),os.has(e)&&r.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,se[e]||{},ce.datasets[e]||{},{type:e},ce,re]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:r,subPrefixes:o}=hs(this._resolverCache,t,n);let a=r;(function(t,e){const{isScriptable:i,isIndexable:n}=Fe(t);for(const s of e){const e=i(s),r=n(s),o=(r||e)&&t[s];if(e&&(ut(o)||ds(o))||r&&Y(o))return!0}return!1})(r,e)&&(s.$shared=!1,a=Ne(r,i=ut(i)?i():i,this.createResolver(t,i,o)));for(const t of e)s[t]=a[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=hs(this._resolverCache,t,i);return X(e)?Ne(s,e,void 0,n):s}}function hs(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let r=n.get(s);return r||(r={resolver:Re(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(s,r)),r}const ds=t=>X(t)&&Object.getOwnPropertyNames(t).some((e=>ut(t[e]))),us=["top","bottom","left","right","chartArea"];function fs(t,e){return"top"===t||"bottom"===t||-1===us.indexOf(t)&&"x"===e}function ps(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function gs(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Z(i&&i.onComplete,[t],e)}function ms(t){const e=t.chart,i=e.options.animation;Z(i&&i.onProgress,[t],e)}function bs(t){return ti()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const vs={},xs=t=>{const e=bs(t);return Object.values(vs).filter((t=>t.canvas===e)).pop()};function ys(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const r=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=r)}}}class _s{static defaults=ce;static instances=vs;static overrides=se;static registry=Kn;static version="4.5.0";static getChart=xs;static register(...t){Kn.add(...t),ws()}static unregister(...t){Kn.remove(...t),ws()}constructor(t,e){const i=this.config=new cs(e),n=bs(t),s=xs(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!ti()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?_n:Nn}(n)),this.platform.updateConfig(i);const o=this.platform.acquireContext(n,r.aspectRatio),a=o&&o.canvas,l=a&&a.height,c=a&&a.width;this.id=q(),this.ctx=o,this.canvas=a,this.width=c,this.height=l,this._options=r,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 Jn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),r.resizeDelay||0),this._dataChanges=[],vs[this.id]=this,o&&a?(Ei.listen(this,"complete",gs),Ei.listen(this,"progress",ms),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return U(t)?e&&s?s:n?i/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 Kn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ci(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ue(this.canvas,this.ctx),this}stop(){return Ei.stop(this),this}resize(t,e){Ei.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,s),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,ci(this,o,!0)&&(this.notifyPlugins("resize",{size:r}),Z(i.onResize,[this,r],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){tt(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];e&&(s=s.concat(Object.keys(e).map((t=>{const i=e[t],n=es(t,i),s="r"===n,r="x"===n;return{options:i,dposition:s?"chartArea":r?"bottom":"left",dtype:s?"radialLinear":r?"category":"linear"}})))),tt(s,(e=>{const s=e.options,r=s.id,o=es(r,s),a=Q(s.type,e.dtype);void 0!==s.position&&fs(s.position,o)===fs(e.dposition)||(s.position=e.dposition),n[r]=!0;let l=null;
vendor: 6,043 bytes, line 2
2r in i&&i[r].type===a?l=i[r]:(l=new(Kn.getScale(a))({id:r,type:a,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(s,t)})),tt(n,((t,e)=>{t||delete i[e]})),tt(i,(t=>{xn.configure(this,t,t.options),xn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ps("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let s=this.getDatasetMeta(i);const r=n.type||this.config.type;if(s.type&&s.type!==r&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=r,s.indexAxis=n.indexAxis||Zn(r,this.options),s.order=n.order||0,s.index=i,s.label=""+n.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const e=Kn.getController(r),{datasetElementType:n,dataElementType:o}=ce.datasets[r];Object.assign(e,{dataElementType:Kn.getElement(o),datasetElementType:n&&Kn.getElement(n)}),s.controller=new e(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){tt(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===s.indexOf(e);e.buildOrUpdateElements(i),r=Math.max(+e.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),n||tt(s,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ps("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){tt(this.scales,(t=>{xn.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);ft(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)ys(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;t<e;t++)if(!ft(n,i(t)))return;return Array.from(n).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;xn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],tt(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,ut(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Ei.has(this)?this.attached&&!Ei.running(this)&&Ei.start(this):(this.draw(),gs({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const 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){const e=this._sortedMetasets,i=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];t&&!s.visible||i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},n=Ai(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&me(e,n),t.controller.draw(),n&&be(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return ge(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=an.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._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},i.push(n)),n}getContext(){return this.$context||(this.$context=Te(null,{chart:this,type:"chart"}))}
vendor: 4,410 bytes, line 2
2getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),r=s.controller._resolveAnimations(void 0,n);dt(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(s,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Ei.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ue(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete vs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};tt(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let r;const o=()=>{n("attach",o),this.attached=!0,this.resize(),i("resize",s),i("detach",r)};r=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():r()}unbindEvents(){tt(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},tt(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,r,o,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),o=0,a=t.length;o<a;++o){r=t[o];const e=r&&this.getDatasetMeta(r.datasetIndex).controller;e&&e[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!et(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),r=s(e,t),o=i?t:s(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,r=e,o=this._getActiveElements(t,n,i,r),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,Z(s.onHover,[t,o,this],this),a&&Z(s.onClick,[t,o,this],this));const c=!et(o,n);return(c||e)&&(this._active=o,this._updateHoverStyles(o,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}function ws(){return tt(_s.instances,(t=>t._plugins.invalidate()))}
vendor: 3,627 bytes, line 2
2function Ss(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function ks(t,e,i,n,s,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=e,d=Math.max(e.outerRadius+n+i-c,0),u=h>0?h+n+i+c:0;let f=0;const p=s-l;if(n){const t=((h>0?h-n:0)+(d>0?d-n:0))/2;f=(p-(0!==t?p*t/(t+n):p))/2}const g=(p-Math.max(.001,p*d-i/pt)/d)/2,m=l+g+f,b=s-g-f,{outerStart:v,outerEnd:x,innerStart:y,innerEnd:_}=function(t,e,i,n){const s=Ce(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),r=(i-e)/2,o=Math.min(r,n*e/2),a=t=>{const e=(i-Math.min(r,t))*n/2;return Tt(t,0,Math.min(r,e))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Tt(s.innerStart,0,o),innerEnd:Tt(s.innerEnd,0,o)}}(e,u,d,b-m),w=d-v,S=d-x,k=m+v/w,A=b-x/S,M=u+y,E=u+_,C=m+y/M,O=b-_/E;if(t.beginPath(),r){const e=(k+A)/2;if(t.arc(o,a,d,k,e),t.arc(o,a,d,e,A),x>0){const e=Ss(S,A,o,a);t.arc(e.x,e.y,x,A,b+xt)}const i=Ss(E,b,o,a);if(t.lineTo(i.x,i.y),_>0){const e=Ss(E,O,o,a);t.arc(e.x,e.y,_,b+xt,O+Math.PI)}const n=(b-_/u+(m+y/u))/2;if(t.arc(o,a,u,b-_/u,n,!0),t.arc(o,a,u,n,m+y/u,!0),y>0){const e=Ss(M,C,o,a);t.arc(e.x,e.y,y,C+Math.PI,m-xt)}const s=Ss(w,m,o,a);if(t.lineTo(s.x,s.y),v>0){const e=Ss(w,k,o,a);t.arc(e.x,e.y,v,m-xt,k)}}else{t.moveTo(o,a);const e=Math.cos(k)*d+o,i=Math.sin(k)*d+a;t.lineTo(e,i);const n=Math.cos(A)*d+o,s=Math.sin(A)*d+a;t.lineTo(n,s)}t.closePath()}class As extends Fn{static id="arc";static 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};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),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,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:s,distance:r}=Ot(n,{x:t,y:e}),{startAngle:o,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,u=Q(h,a-o),f=Lt(s,o,a)&&o!==a,p=u>=gt||f,g=Rt(r,l+d,c+d);return p&&g}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:r,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,c=(n+s)/2,h=(r+o+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/4,s=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>gt?Math.floor(i/gt):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*n,Math.sin(o)*n);const a=n*(1-Math.sin(Math.min(pt,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,n,s){const{fullCircles:r,startAngle:o,circumference:a}=e;let l=e.endAngle;if(r){ks(t,e,i,n,l,s);for(let e=0;e<r;++e)t.fill();isNaN(a)||(l=o+(a%gt||gt))}ks(t,e,i,n,l,s),t.fill()}(t,this,a,s,r),function(t,e,i,n,s){const{fullCircles:r,startAngle:o,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,p="inner"===l.borderAlign;if(!c)return;t.setLineDash(d||[]),t.lineDashOffset=u,p?(t.lineWidth=2*c,t.lineJoin=
vendor: 4,613 bytes, line 2
2h||"round"):(t.lineWidth=c,t.lineJoin=h||"bevel");let g=e.endAngle;if(r){ks(t,e,i,n,g,s);for(let e=0;e<r;++e)t.stroke();isNaN(a)||(g=o+(a%gt||gt))}p&&function(t,e,i){const{startAngle:n,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(r,o,a,n-c,i+c),l>s?(c=s/l,t.arc(r,o,l,i+c,n-c,!0)):t.arc(r,o,s,i+xt,n-xt),t.closePath(),t.clip()}(t,e,g),l.selfJoin&&g-o>=pt&&0===f&&"miter"!==h&&function(t,e,i){const{startAngle:n,x:s,y:r,outerRadius:o,innerRadius:a,options:l}=e,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/o,It(n-i));if(t.beginPath(),t.arc(s,r,o-c/2,n+d/2,i-d/2),a>0){const e=Math.min(c/a,It(n-i));t.arc(s,r,a+c/2,i-e/2,n+e/2,!0)}else{const e=Math.min(c/2,o*It(n-i));if("round"===h)t.arc(s,r,e,i-pt/2,n+pt/2,!0);else if("bevel"===h){const o=2*e*e,a=-o*Math.cos(i+pt/2)+s,l=-o*Math.sin(i+pt/2)+r,c=o*Math.cos(n+pt/2)+s,h=o*Math.sin(n+pt/2)+r;t.lineTo(a,l),t.lineTo(c,h)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,g),r||(ks(t,e,i,n,g,s),t.stroke())}(t,this,a,s,r),t.restore()}}function Ms(t,e,i=e){t.lineCap=Q(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Q(i.borderDash,e.borderDash)),t.lineDashOffset=Q(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Q(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Q(i.borderWidth,e.borderWidth),t.strokeStyle=Q(i.borderColor,e.borderColor)}function Es(t,e,i){t.lineTo(i.x,i.y)}function Cs(t,e,i={}){const n=t.length,{start:s=0,end:r=n-1}=i,{start:o,end:a}=e,l=Math.max(s,o),c=Math.min(r,a),h=s<o&&r<o||s>a&&r>a;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function Os(t,e,i,n){const{points:s,options:r}=e,{count:o,start:a,loop:l,ilen:c}=Cs(s,i,n),h=function(t){return t.stepped?ve:t.tension||"monotone"===t.cubicInterpolationMode?xe:Es}(r);let d,u,f,{move:p=!0,reverse:g}=n||{};for(d=0;d<=c;++d)u=s[(a+(g?c-d:d))%o],u.skip||(p?(t.moveTo(u.x,u.y),p=!1):h(t,f,u,g,r.stepped),f=u);return l&&(u=s[(a+(g?c:0))%o],h(t,f,u,g,r.stepped)),!!l}function Ds(t,e,i,n){const s=e.points,{count:r,start:o,ilen:a}=Cs(s,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,p,g,m=0,b=0;const v=t=>(o+(c?a-t:t))%r,x=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(d=s[v(0)],t.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=s[v(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>p&&(p=i),m=(b*m+e)/++b):(x(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}x()}function Ps(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?Os:Ds}const Is="function"==typeof Path2D;class Ls extends Fn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};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){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ze(this._points,i,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=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=function(t,e,i,n){let s=0,r=e-1;if(i&&!n)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,i&&(r+=s);r>s&&t[r%e].skip;)r--;return r%=e,{start:s,end:r}}(i,s,r,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),r=wi(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=i.length,c=[];let h=r,d=e[0].start,u=d;function f(t,e,n,s){const r=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=r;for(;i[e%l].skip;)e+=r;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:n,style:s}),h=s,d=e%l)}}for(const t of e){d=a?d:t.start;let e,r=i[d%l];for(u=d+1;u<=t.end;u++){const a=i[u%l];e=wi(n.setContext(Te(s,{type:"segment",p0:r,p1:a,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:o}))),Si(e,h)&&f(d,u-1,t.loop,h),r=a,h=e}d<u-1&&f(d,u-1,t.loop,h)}return c}(t,e,i,n):e}(t,!0===n?[{start:o,end:a,loop:r}
vendor: 4,188 bytes, line 2
2]:function(t,e,i,n){const s=t.length,r=[];let o,a=e,l=t[e];for(o=e+1;o<=i;++o){const i=t[o%s];i.skip||i.stop?l.skip||(n=!1,r.push({start:e%s,end:(o-1)%s,loop:n}),e=a=i.stop?o:null):(a=o,l.skip&&(e=o)),l=i}return null!==a&&r.push({start:e%s,end:a%s,loop:n}),r}(i,o,a<o?a+s:a,!!t._fullLoop&&0===o&&a===s-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],s=this.points,r=_i(this,{property:e,start:n,end:n});if(!r.length)return;const o=[],a=function(t){return t.stepped?fi:t.tension||"monotone"===t.cubicInterpolationMode?pi:ui}(i);let l,c;for(l=0,c=r.length;l<c;++l){const{start:c,end:h}=r[l],d=s[c],u=s[h];if(d===u){o.push(d);continue}const f=a(d,u,Math.abs((n-d[e])/(u[e]-d[e])),i.stepped);f[e]=t[e],o.push(f)}return 1===o.length?o[0]:o}pathSegment(t,e,i){return Ps(this)(t,this,e,i)}path(t,e,i){const n=this.segments,s=Ps(this);let r=this._loop;e=e||0,i=i||this.points.length-e;for(const o of n)r&=s(t,this,o,{start:e,end:e+i-1});return!!r}draw(t,e,i,n){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),function(t,e,i,n){Is&&!e.options.segment?function(t,e,i,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,n)&&s.closePath()),Ms(t,e.options),t.stroke(s)}(t,e,i,n):function(t,e,i,n){const{segments:s,options:r}=e,o=Ps(e);for(const a of s)Ms(t,r,a.style),t.beginPath(),o(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ts(t,e,i,n){const s=t.options,{[i]:r}=t.getProps([i],n);return Math.abs(e-r)<s.radius+s.hitRadius}class Rs extends Fn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:r}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ts(this,t,"x",e)}inYRange(t,e){return Ts(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!ge(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,fe(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ns(t,e){const{x:i,y:n,base:s,width:r,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,c,h,d;return t.horizontal?(d=o/2,a=Math.min(i,s),l=Math.max(i,s),c=n-d,h=n+d):(d=r/2,a=i-d,l=i+d,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function Fs(t,e,i,n){return t?0:Tt(e,i,n)}function zs(t,e,i,n){const s=null===e,r=null===i,o=t&&!(s&&r)&&Ns(t,n);return o&&(s||Rt(e,o.left,o.right))&&(r||Rt(i,o.top,o.bottom))}function js(t,e){t.rect(e.x,e.y,e.w,e.h)}function Vs(t,e,i={}){const n=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-n,o=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+n,y:t.y+s,w:t.w+r,h:t.h+o,radius:t.radius}}class Bs extends Fn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};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){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:s,outer:r}=function(t){const e=Ns(t),i=e.right-e.left,n=e.bottom-e.top,s=function(t,e,i){const n=t.options.borderWidth,s=t.borderSkipped,r=Oe(n);return{t:Fs(s.top,r.top,0,i),r:Fs(s.right,r.right,0,e),b:Fs(s.bottom,r.bottom,0,i),l:Fs(s.left,r.left,0,e)}}
vendor: 13,665 bytes, line 2
2(t,i/2,n/2),r=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,r=De(s),o=Math.min(e,i),a=t.borderSkipped,l=n||X(s);return{topLeft:Fs(!l||a.top||a.left,r.topLeft,0,o),topRight:Fs(!l||a.top||a.right,r.topRight,0,o),bottomLeft:Fs(!l||a.bottom||a.left,r.bottomLeft,0,o),bottomRight:Fs(!l||a.bottom||a.right,r.bottomRight,0,o)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:r},inner:{x:e.left+s.l,y:e.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,r.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(s.b,s.r))}}}}(this),o=(a=r.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?Se:js;var a;t.save(),r.w===s.w&&r.h===s.h||(t.beginPath(),o(t,Vs(r,e,s)),t.clip(),o(t,Vs(s,-e,r)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Vs(s,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return zs(this,t,e,i)}inXRange(t,e){return zs(this,t,null,e)}inYRange(t,e){return zs(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}function Ws(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function $s(t){t.data.datasets.forEach((t=>{Ws(t)}))}var Hs={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void $s(t);const n=t.width;t.data.datasets.forEach(((e,s)=>{const{_data:r,indexAxis:o}=e,a=t.getDatasetMeta(s),l=r||e.data;if("y"===Le([o,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let h,{start:d,count:u}=function(t,e){const i=e.length;let n,s=0;const{iScale:r}=t,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(s=Tt(Ft(e,r.axis,o).lo,0,i-1)),n=c?Tt(Ft(e,r.axis,a).hi+1,s,i)-s:i-s,{start:s,count:n}}(a,l);if(u<=(i.threshold||4*n))Ws(e);else{switch(U(r)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":h=function(t,e,i,n,s){const r=s.samples||n;if(r>=i)return t.slice(e,e+i);const o=[],a=(i-2)/(r-2);let l=0;const c=e+i-1;let h,d,u,f,p,g=e;for(o[l++]=t[g],h=0;h<r-2;h++){let n,s=0,r=0;const c=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,i)+e,b=m-c;for(n=c;n<m;n++)s+=t[n].x,r+=t[n].y;s/=b,r/=b;const v=Math.floor(h*a)+1+e,x=Math.min(Math.floor((h+1)*a)+1,i)+e,{x:y,y:_}=t[g];for(u=f=-1,n=v;n<x;n++)f=.5*Math.abs((y-s)*(t[n].y-_)-(y-t[n].x)*(r-_)),f>u&&(u=f,d=t[n],p=n);o[l++]=d,g=p}return o[l++]=t[c],o}(l,d,u,n,i);break;case"min-max":h=function(t,e,i,n){let s,r,o,a,l,c,h,d,u,f,p=0,g=0;const m=[],b=e+i-1,v=t[e].x,x=t[b].x-v;for(s=e;s<e+i;++s){r=t[s],o=(r.x-v)/x*n,a=r.y;const e=0|o;if(e===l)a<u?(u=a,c=s):a>f&&(f=a,h=s),p=(g*p+r.x)/++g;else{const i=s-1;if(!U(c)&&!U(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:p}),n!==d&&n!==i&&m.push({...t[n],x:p})}s>0&&i!==d&&m.push(t[i]),m.push(r),l=e,g=0,u=f=a,c=h=d=s}}return m}(l,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=h}}))},destroy(t){$s(t)}};function qs(t,e,i,n){if(n)return;let s=e[t],r=i[t];return"angle"===t&&(s=It(s),r=It(r)),{property:t,start:s,end:r}}function Us(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Ys(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Xs(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},s=e.points,r=[];return e.segments.forEach((({start:t,end:e})=>{e=Us(t,e,s);const o=s[t],a=s[e];null!==n?(r.push({x:o.x,y:n}),r.push({x:a.x,y:n})):null!==i&&(r.push({x:i,y:o.y}),r.push({x:i,y:a.y}))})),r}(t,e),i.length?new Ls({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Ks(t){return t&&!1!==t.fill}function Js(t,e,i){let n=t[e].fill;const s=[e];let r;if(!i)return n;for(;!1!==n&&-1===s.indexOf(n);){if(!K(n))return n;if(r=t[n],!r)return!1;if(r.visible)return n;s.push(n),n=r.fill}return!1}function Qs(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=Q(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(X(n))return!isNaN(n.value)&&n;let s=parseFloat(n);return K(s)&&Math.floor(s)===s?function(t,e,i,n){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=n)&&i}(n[0],e,s,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Gs(t,e,i){const n=[];for(let s=0;s<i.length;s++){const r=i[s],{first:o,last:a,point:l}=Zs(r,e,"x");if(!(!l||o&&a))if(o)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function Zs(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const s=n[i],r=t.segments,o=t.points;let a=!1,l=!1;for(let t=0;t<r.length;t++){const e=r[t],n=o[e.start][i],c=o[e.end][i];if(Rt(s,n,c)){a=s===n,l=s===c;break}}return{first:a,last:l,point:n}}class tr{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:s,radius:r}=this;return e=e||{start:0,end:gt},t.arc(n,s,r,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function er(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(K(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,s=[],r=n.segments,o=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const s=n[t];if(s.index===e)break;s.hidden||i.unshift(s.dataset)}return i}(e,i);a.push(Xs({x:null,y:e.bottom},n));for(let t=0;t<r.length;t++){const e=r[t];for(let t=e.start;t<=e.end;t++)Gs(s,o[t],a)}return new Ls({points:s,options:{}})}(t);if("shape"===i)return!0;const s=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,s=e.getLabels().length,r=n.reverse?e.max:e.min,o=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:X(t)?t.value:e.getBaseValue(),n}(i,e,r),a=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,r);return new tr({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(o)})}for(let t=0;t<s;++t)a.push(e.getPointPositionForValue(t,o));return a}(t):function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:X(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(K(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return s instanceof tr?s:Xs(s,n)}(e),{chart:s,index:r,line:o,scale:a,axis:l}=e,c=o.options,h=c.fill,d=c.backgroundColor,{above:u=d,below:f=d}=h||{},p=s.getDatasetMeta(r),g=Ai(s,p);n&&o.points.length&&(me(t,i),function(t,e){const{line:i,target:n,above:s,below:r,area:o,scale:a,clip:l}=e,c=i._loop?"angle":e.axis;t.save();let h=r;r!==s&&("x"===c?(ir(t,n,o.top),sr(t,{line:i,target:n,color:s,scale:a,property:c,clip:l}),t.restore(),t.save(),ir(t,n,o.bottom)):"y"===c&&(nr(t,n,o.left),sr(t,{line:i,target:n,color:r,scale:a,property:c,clip:l}),t.restore(),t.save(),nr(t,n,o.right),h=s)),sr(t,{line:i,target:n,color:h,scale:a,property:c,clip:l}),t.restore()}(t,{line:o,target:n,above:u,below:f,area:i,scale:a,axis:l,clip:g}),be(t))}function ir(t,e,i){const{segments:n,points:s}=e;let r=!0,o=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=s[n],h=s[Us(n,l,s)];r?(t.moveTo(c.x,c.y),r=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function nr(t,e,i){const{segments:n,points:s}=e;let r=!0,o=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=s[n],h=s[Us(n,l,s)];r?(t.moveTo(c.x,c.y),r=!1):(t.lineTo(i,c.y),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(i,h.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function sr(t,e){const{line:i,target:n,property:s,color:r,scale:o,clip:a}=e,l=function(t,e,i){const n=t.segments,s=t.points,r=e.points,o=[];for(const t of n){let{start:n,end:a}=t;a=Us(n,a,s);const l=qs(i,s[n],s[a],t.loop);if(!e.segments){o.push({source:t,target:l,start:s[n],end:s[a]});continue}const c=_i(e,l);for(const e of c){const n=qs(i,r[e.start],r[e.end],e.loop),a=yi(t,s,n);for(const t of a)o.push({source:t,target:e,start:{[i]:Ys(l,n,"start",Math.max)},end:{[i]:Ys(l,n,"end",Math.min)}})}}return o}(i,n,s);for(const{source:e,target:c,start:h,end:d}of l){const{style:{backgroundColor:l=r}={}}=e,u=!0!==n;t.save(),t.fillStyle=l,rr(t,o,a,u&&qs(s,h,d)),t.beginPath();const f=!!i.pathSegment(t,e);let p;if(u){f?t.closePath():or(t,n,d,s);const e=!!n.pathSegment(t,c,{move:f,reverse:!0});p=f&&e,p||or(t,n,h,s)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function rr(t,e,i,n){const s=e.chart.chartArea,{property:r,start:o,end:a}=n||{};if("x"===r||"y"===r){let e,n,l,c;"x"===r?(e=o,n=s.top,l=a,c=s.bottom):(e=s.left,n=o,l=s.right,c=a),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),n=Math.max(n,i.top),c=Math.min(c,i.bottom)),t.rect(e,n,l-e,c-n),t.clip()}}function or(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}var ar={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let r,o,a,l;for(o=0;o<n;++o)r=t.getDatasetMeta(o),a=r.dataset,l=null,a&&a.options&&a instanceof Ls&&(l={visible:t.isDatasetVisible(o),index:o,fill:Qs(a,o,n),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=l,s.push(l);for(o=0;o<n;++o)l=s[o],l&&!1!==l.fill&&(l.fill=Js(s,o,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,s=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;i&&(i.line.updateControlPoints(r,i.axis),n&&i.fill&&er(t.ctx,i,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Ks(i)&&er(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Ks(n)&&"beforeDatasetDraw"===i.drawTime&&er(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const lr=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class cr extends Fn{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,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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(){const t=this.options.labels||{};let e=Z(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=Ie(i.font),s=n.size,r=this._computeTitleHeight(),{boxWidth:o,itemHeight:a}=lr(i,s);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(r,s,o,a)+10):(c=this.maxHeight,l=this._fitCols(r,n,o,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:s,maxWidth:r,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+o;let h=t;s.textAlign="left",s.textBaseline="middle";let d=-1,u=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+s.measureText(t.text).width;(0===f||l[l.length-1]+p+2*o>r)&&(h+=c,l[l.length-(f>0?0:1)]=0,u+=c,d++),a[f]={left:0,top:u,row:d,width:p,height:n},l[l.length-1]+=p+o})),h}_fitCols(t,e,i,n){const{ctx:s,maxHeight:r,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=r-t;let h=o,d=0,u=0,f=0,p=0;return this.legendItems.forEach(((t,r)=>{const{itemWidth:g,itemHeight:m}=function(t,e,i,n,s){const r=function(t,e,i,n){let s=t.text;return s&&"string"!=typeof s&&(s=s.reduce(((t,e)=>t.length>e.length?t:e))),e+i.size/2+n.measureText(s).width}(n,t,e,i),o=function(t,e,i){let n=t;return"string"!=typeof e.text&&(n=hr(e,i)),n}(s,n,e.lineHeight);return{itemWidth:r,itemHeight:o}}(i,e,s,t,n);r>0&&u+m+2*o>c&&(h+=d+o,l.push({width:d,height:u}),f+=d+o,p++,d=u=0),a[r]={left:f,top:u,col:p,width:g,height:m},d=Math.max(d,g),u+=m+o})),h+=d,l.push({width:d,height:u}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:s}}=this,r=gi(s,this.left,this.width);if(this.isHorizontal()){let s=0,o=Ht(i,this.left+n,this.right-this.lineWidths[s]);for(const a of e)s!==a.row&&(s=a.row,o=Ht(i,this.left+n,this.right-this.lineWidths[s])),a.top+=this.top+t+n,a.left
vendor: 4,374 bytes, line 2
2=r.leftForLtr(r.x(o),a.width),o+=a.width+n}else{let s=0,o=Ht(i,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const a of e)a.col!==s&&(s=a.col,o=Ht(i,this.top+t+n,this.bottom-this.columnSizes[s].height)),a.top=o,a.left+=this.left+n,a.left=r.leftForLtr(r.x(a.left),a.width),o+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;me(t,this),this._draw(),be(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:s,labels:r}=t,o=ce.color,a=gi(t.rtl,this.left,this.width),l=Ie(r.font),{padding:c}=r,h=l.size,d=h/2;let u;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:g}=lr(r,h),m=this.isHorizontal(),b=this._computeTitleHeight();u=m?{x:Ht(s,this.left+c,this.right-i[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:Ht(s,this.top+b+c,this.bottom-e[0].height),line:0},mi(this.ctx,t.textDirection);const v=g+c;this.legendItems.forEach(((x,y)=>{n.strokeStyle=x.fontColor,n.fillStyle=x.fontColor;const _=n.measureText(x.text).width,w=a.textAlign(x.textAlign||(x.textAlign=r.textAlign)),S=f+d+_;let k=u.x,A=u.y;if(a.setWidth(this.width),m?y>0&&k+S+c>this.right&&(A=u.y+=v,u.line++,k=u.x=Ht(s,this.left+c,this.right-i[u.line])):y>0&&A+v>this.bottom&&(k=u.x=k+e[u.line].width+c,u.line++,A=u.y=Ht(s,this.top+b+c,this.bottom-e[u.line].height)),function(t,e,i){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;n.save();const s=Q(i.lineWidth,1);if(n.fillStyle=Q(i.fillStyle,o),n.lineCap=Q(i.lineCap,"butt"),n.lineDashOffset=Q(i.lineDashOffset,0),n.lineJoin=Q(i.lineJoin,"miter"),n.lineWidth=s,n.strokeStyle=Q(i.strokeStyle,o),n.setLineDash(Q(i.lineDash,[])),r.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:s},l=a.xPlus(t,f/2);pe(n,o,l,e+d,r.pointStyleWidth&&f)}else{const r=e+Math.max((h-p)/2,0),o=a.leftForLtr(t,f),l=De(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?Se(n,{x:o,y:r,w:f,h:p,radius:l}):n.rect(o,r,f,p),n.fill(),0!==s&&n.stroke()}n.restore()}(a.x(k),A,x),k=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(w,k+f+d,m?k+S:this.right,t.rtl),function(t,e,i){we(n,i.text,t,e+g/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(k),A,x),m)u.x+=S+c;else if("string"!=typeof x.text){const t=l.lineHeight;u.y+=hr(x,t)+c}else u.y+=v})),bi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Ie(e.font),n=Pe(e.padding);if(!e.display)return;const s=gi(t.rtl,this.left,this.width),r=this.ctx,o=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+l,h=Ht(t.align,h,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+Ht(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=Ht(o,h,h+d);r.textAlign=s.textAlign($t(o)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=i.string,we(r,e.text,u,c,i)}_computeTitleHeight(){const t=this.options.title,e=Ie(t.font),i=Pe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,s;if(Rt(t,this.left,this.right)&&Rt(e,this.top,this.bottom))for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(n=s[i],Rt(t,n.left,n.left+n.width)&&Rt(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const r=this._hoveredItem,o=(s=i,null!==(n=r)&&null!==s&&n.datasetIndex===s.datasetIndex&&n.index===s.index);r&&!o&&Z(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!o&&Z(e.onHover,[t,i,this],this)}else i&&Z(e.onClick,[t,i,this],this);var n,s}}function hr(t,e){return e*(t.text?t.text.length:0)}var dr={id:"legend",_element:cr,start(t,e,i){const n=t.legend=new cr({ctx:t.ctx,options:i,chart:t});xn.configure(t,n,i),xn.addBox(t,n)},stop(t){xn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;xn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)}
vendor: 6,620 bytes, line 2
2,defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,s=i.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),c=Pe(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:r,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:s||l.textAlign,borderRadius:o&&(a||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};new WeakMap;const ur={average(t){if(!t.length)return!1;let e,i,n=new Set,s=0,r=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),s+=t.y,++r}}return 0!==r&&0!==n.size&&{x:[...n].reduce(((t,e)=>t+e))/n.size,y:s/r}},nearest(t,e){if(!t.length)return!1;let i,n,s,r=e.x,o=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Dt(e,n.getCenterPoint());t<a&&(a=t,s=n)}}if(s){const t=s.tooltipPosition();r=t.x,o=t.y}return{x:r,y:o}}};function fr(t,e){return e&&(Y(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function pr(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function gr(t,e){const{element:i,datasetIndex:n,index:s}=e,r=t.getDatasetMeta(n).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function mr(t,e){const i=t.chart.ctx,{body:n,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=Ie(e.bodyFont),c=Ie(e.titleFont),h=Ie(e.footerFont),d=r.length,u=s.length,f=n.length,p=Pe(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);b+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(g+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let v=0;const x=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,tt(t.title,x),i.font=l.string,tt(t.beforeBody.concat(t.afterBody),x),v=e.displayColors?o+2+e.boxPadding:0,tt(n,(t=>{tt(t.before,x),tt(t.lines,x),tt(t.after,x)})),v=0,i.font=h.string,tt(t.footer,x),i.restore(),m+=p.width,{width:m,height:g}}function br(t,e,i,n){const{x:s,width:r}=i,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),function(t,e,i,n){const{x:s,width:r}=n,o=i.caretSize+i.caretPadding;return"left"===t&&s+r+o>e.width||"right"===t&&s-r-o<0||void 0}(c,t,e,i)&&(c="center"),c}function vr(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||br(t,e,i,n),yAlign:n}}function xr(t,e,i,n){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=i,c=s+r,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=De(o);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,u)+s:"right"===a&&(p+=Math.max(d,f)+s),{x:Tt(p,0,n.width-e.width),y:Tt(g,0,n.height-e.height)}}function yr(t,e,i){const n=Pe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function _r(t){return fr([],pr(t))}function wr(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Sr={beforeTitle:H,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:H,beforeBody:H,beforeLabel:H,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return U(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.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(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:H,afterBody:H,beforeFooter:H,footer:H,afterFooter:H};function kr(t,e,i,n){const s=t[e].call(i,n);return void 0===s?Sr[e].call(i,n):s}class Ar extends Fn{static positioners=ur;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(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new Pi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(this,Te(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}
vendor: 15,252 bytes, line 2
2=e,n=kr(i,"beforeTitle",this,t),s=kr(i,"title",this,t),r=kr(i,"afterTitle",this,t);let o=[];return o=fr(o,pr(n)),o=fr(o,pr(s)),o=fr(o,pr(r)),o}getBeforeBody(t,e){return _r(kr(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return tt(t,(t=>{const e={before:[],lines:[],after:[]},s=wr(i,t);fr(e.before,pr(kr(s,"beforeLabel",this,t))),fr(e.lines,kr(s,"label",this,t)),fr(e.after,pr(kr(s,"afterLabel",this,t))),n.push(e)})),n}getAfterBody(t,e){return _r(kr(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=kr(i,"beforeFooter",this,t),s=kr(i,"footer",this,t),r=kr(i,"afterFooter",this,t);let o=[];return o=fr(o,pr(n)),o=fr(o,pr(s)),o=fr(o,pr(r)),o}_createItems(t){const e=this._active,i=this.chart.data,n=[],s=[],r=[];let o,a,l=[];for(o=0,a=e.length;o<a;++o)l.push(gr(this.chart,e[o]));return t.filter&&(l=l.filter(((e,n,s)=>t.filter(e,n,s,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),tt(l,(e=>{const i=wr(t.callbacks,e);n.push(kr(i,"labelColor",this,e)),s.push(kr(i,"labelPointStyle",this,e)),r.push(kr(i,"labelTextColor",this,e))})),this.labelColors=n,this.labelPointStyles=s,this.labelTextColors=r,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,r=[];if(n.length){const t=ur[i.position].call(this,n,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const e=this._size=mr(this,i),o=Object.assign({},t,e),a=vr(this.chart,i,o),l=xr(i,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=r,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:s}=this,{caretSize:r,cornerRadius:o}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=De(o),{x:d,y:u}=t,{width:f,height:p}=e;let g,m,b,v,x,y;return"center"===s?(x=u+p/2,"left"===n?(g=d,m=g-r,v=x+r,y=x-r):(g=d+f,m=g+r,v=x-r,y=x+r),b=g):(m="left"===n?d+Math.max(a,c)+r:"right"===n?d+f-Math.max(l,h)-r:this.caretX,"top"===s?(v=u,x=v-r,g=m-r,b=m+r):(v=u+p,x=v+r,g=m+r,b=m-r),y=v),{x1:g,x2:m,x3:b,y1:v,y2:x,y3:y}}drawTitle(t,e,i){const n=this.title,s=n.length;let r,o,a;if(s){const l=gi(i.rtl,this.x,this.width);for(t.x=yr(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",r=Ie(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,a=0;a<s;++a)e.fillText(n[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+o,a+1===s&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,n,s){const r=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:a,boxWidth:l}=s,c=Ie(s.bodyFont),h=yr(this,"left",s),d=n.x(h),u=a<c.lineHeight?(c.lineHeight-a)/2:0,f=e.y+u;if(s.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},i=n.leftForLtr(d,l)+l/2,c=f+a/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,fe(t,e,i,c),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,fe(t,e,i,c)}else{t.lineWidth=X(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const e=n.leftForLtr(d,l),i=n.leftForLtr(n.xPlus(d,1),l-2),o=De(r.borderRadius);Object.values(o).some((t=>0!==t))?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Se(t,{x:e,y:f,w:l,h:a,radius:o}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Se(t,{x:i,y:f+1,w:l-2,h:a-2,radius:o}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=r.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:s,bodyAlign:r,displayColors:o,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=Ie(i.bodyFont);let d=h.lineHeight,u=0;const f=gi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},g=f.textAlign(r);let m,b,v,x,y,_,w;for(e.textAlign=r,e.textBaseline="middle",e.font=h.string,t.x=yr(this,g,i),e.fillStyle=i.bodyColor,tt(this.beforeBody,p),u=o&&"right"!==g?"center"===r?l/2+c:l+2+c:0,x=0,_=n.length;x<_;++x){for(m=n[x],b=this.labelTextColors[x],e.fillStyle=b,tt(m.before,p),v=m.lines,o&&v.length&&(this._drawColorBox(e,t,x,f,i),d=Math.max(h.lineHeight,a)),y=0,w=v.length;y<w;++y)p(v[y]),d=h.lineHeight;tt(m.after,p)}u=0,d=h.lineHeight,tt(this.afterBody,p),t.y-=s}drawFooter(t,e,i){const n=this.footer,s=n.length;let r,o;if(s){const a=gi(i.rtl,this.x,this.width);for(t.x=yr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",r=Ie(i.footerFont),e.fillStyle=i.footerColor,e.font=r.string,o=0;o<s;++o)e.fillText(n[o],a.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:s,yAlign:r}=this,{x:o,y:a}=t,{width:l,height:c}=i,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=De(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(o+h,a),"top"===r&&this.drawCaret(t,e,i,n),e.lineTo(o+l-d,a),e.quadraticCurveTo(o+l,a,o+l,a+d),"center"===r&&"right"===s&&this.drawCaret(t,e,i,n),e.lineTo(o+l,a+c-f),e.quadraticCurveTo(o+l,a+c,o+l-f,a+c),"bottom"===r&&this.drawCaret(t,e,i,n),e.lineTo(o+u,a+c),e.quadraticCurveTo(o,a+c,o,a+c-u),"center"===r&&"left"===s&&this.drawCaret(t,e,i,n),e.lineTo(o,a+h),e.quadraticCurveTo(o,a,o+h,a),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=ur[t.position].call(this,this._active,this._eventPosition);if(!i)return;const r=this._size=mr(this,t),o=Object.assign({},i,this._size),a=vr(e,t,o),l=xr(t,o,a,e);n._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=Pe(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,n,e),mi(t,e.textDirection),s.y+=r.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),bi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),s=!et(i,n),r=this._positionChanged(n,e);(s||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,s=this._active||[],r=this._getActiveElements(t,s,e,i),o=this._positionChanged(r,t),a=e||!et(r,s)||o;return a&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const r=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,r=ur[s.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}}var Mr={id:"tooltip",_element:Ar,positioners:ur,afterInit(t,e,i){i&&(t.tooltip=new Ar({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Sr},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function Er(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Cr extends Un{static id="category";static defaults={ticks:{callback:Er}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(U(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Tt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}(i,t,Q(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return Er.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const 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}}function Or(t,e,{horizontal:i,minRotation:n}){const s=Et(n),r=(i?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}class Dr extends Un{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 U(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this;const r=t=>n=e?n:t,o=t=>s=i?s:t;if(t){const t=St(n),e=St(s);t<0&&e<0?o(0):t>0&&e>0&&r(0)}if(n===s){let e=0===s?1:Math.abs(.05*s);o(s+e),t||r(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:s,min:r,max:o,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=s||1,f=c-1,{min:p,max:g}=e,m=!U(r),b=!U(o),v=!U(l),x=(g-p)/(h+1);let y,_,w,S,k=At((g-p)/f/u)*u;if(k<1e-14&&!m&&!b)return[{value:p},{value:g}];S=Math.ceil(g/k)-Math.floor(p/k),S>f&&(k=At(S*k/f/u)*u),U(a)||(y=Math.pow(10,a),k=Math.ceil(k*y)/y),"ticks"===n?(_=Math.floor(p/k)*k,w=Math.ceil(g/k)*k):(_=p,w=g),m&&b&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((o-r)/s,k/1e3)?(S=Math.round(Math.min((o-r)/k,c)),k=(o-r)/S,_=r,w=o):v?(_=m?r:_,w=b?o:w,S=l-1,k=(w-_)/S):(S=(w-_)/k,S=kt(S,Math.round(S),k/1e3)?Math.round(S):Math.ceil(S));const A=Math.max(Ct(k),Ct(_));y=Math.pow(10,U(a)?A:a),_=Math.round(_*y)/y,w=Math.round(w*y)/y;let M=0;for(m&&(d&&_!==r?(i.push({value:r}),_<r&&M++,kt(Math.round((_+M*k)*y)/y,r,Or(r,x,t))&&M++):_<r&&M++);M<S;++M){const t=Math.round((_+M*k)*y)/y;if(b&&t>o)break;i.push({value:t})}return b&&d&&w!==o?i.length&&kt(i[i.length-1].value,o,Or(o,x,t))?i[i.length-1].value=o:i.push({value:o}):b&&w!==o||i.push({value:w}),i}({maxTicks:i,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:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e,i){let n,s,r;for(n=0,s=t.length;n<s;n++)r=t[n][i],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ee(t,this.chart.options.locale,this.options.ticks.format)}}class Pr extends Dr{static id="linear";static defaults={ticks:{callback:ne.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=K(t)?t:0,this.max=K(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Et(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ne.formatters.logarithmic,ne.formatters.numeric;class Ir{constructor(t,e){this.element=t,this.options=r({},e),this.priceData=null,this.chart=null,this.doughnutChart=null,this.colors=[{red:1
254,green:253,blue:87},{red:255,green:205,blue:86},{red:253,green:64,blue:82}],this.init()}initMainChart(){const t=this;if(!t.priceData)return;const e=t.element.querySelector('canvas[id^="chart-main"]');let i={gradient:null,chartSize:{width:null,height:null}},n={gradient:null,chartSize:{width:null,height:null}};const s=function(t){return{width:t.right-t.left,height:t.bottom-t.top}},r=function(e,i,n){const r=s(i);let o=e.createLinearGradient(0,i.bottom,0,i.top);return o.addColorStop(0,"rgba("+t.colors[0].red+", "+t.colors[0].green+", "+t.colors[0].blue+", "+n+")"),o.addColorStop(.5,"rgba("+t.colors[1].red+", "+t.colors[1].green+", "+t.colors[1].blue+", "+n+")"),o.addColorStop(1,"rgba("+t.colors[2].red+", "+t.colors[2].green+", "+t.colors[2].blue+", "+n+")"),{gradient:o,chartSize:r}},o={datasets:[{label:"öre/kWh",data:t.priceData.Prices,parsing:{xAxisKey:"ChartAxisLabel",yAxisKey:"PriceAdjusted"},fill:!0,stepped:"before",pointStyle:"circle",pointBorderWidth:2,pointRadius:6,pointHoverRadius:10,hoverBorderWidth:4,hoverBorderColor:"rgba(40, 40, 40, .8)",borderColor:function(t){const{ctx:e,chartArea:n}=t.chart;if(n)return function(t,e){const n=s(e);return i.gradient&&i.chartSize.width===n.width&&i.chartSize.height===n.height||(i=r(t,e,1)),i.gradient}(e,n)},backgroundColor:function(t){const{ctx:e,chartArea:i}=t.chart;if(i)return function(t,e){const i=s(e);return n.gradient&&n.chartSize.width===i.width&&n.chartSize.height===i.height||(n=r(t,e,.2)),n.gradient}(e,i)}}]},a=t.priceData.IsQuarterlyPrices?16:4,l={type:"line",data:o,options:{responsive:!0,aspectRatio:2,maintainAspectRatio:!0,scales:{x:{ticks:{callback:function(e,i){return i%a==0||i===t.priceData.Prices.length-1?this.getLabelForValue(e):""}}}},interaction:{intersect:!1,mode:"index"},plugins:{tooltip:{usePointStyle:!0}},onHover:e=>{if("mousemove"!==e.type)return;const i=e.chart.getElementsAtEventForMode(e,"index",{intersect:!1},!0);if(1!==i.length)return;const n=e.chart.data.datasets[i[0].datasetIndex].data[i[0].index];n&&t.updateDougnutChart(n)}}};t.chart=new _s(e,l),t.selectPoint(t.priceData.CurrentDeliveryPrice.ChartAxisLabel)}selectPoint(t){const e=this,i=e.getItemIndex(t);if(i<0)return;e.chart.setActiveElements([{datasetIndex:0,index:i}]);const n=e.chart.tooltip,s=e.chart.chartArea;n.setActiveElements([{datasetIndex:0,index:i}],{x:(s.left+s.right)/2,y:(s.top+s.bottom)/2}),e.chart.update()}getItemIndex(t){return this.chart&&t&&0!==t.length?this.chart.data.datasets[0].data.findIndex((e=>e.ChartAxisLabel===t)):-1}updateDougnutChart(t){const e=this;if(!e.priceData||!t||!e.doughnutChart)return;const i=e.priceData.HighestPriceAdjusted;if(0===i)return;const n=360*Math.abs(t.PriceAdjusted/i);e.doughnutChart.data.datasets[0].data=[n,360-n],e.doughnutChart.update(),e.element.querySelector('div[id^="chart-doughnut-label"] span').textContent=t.PriceAdjustedFormatted,e.element.querySelector('div[id^="chart-doughnut-label"] small').textContent=t.Label}initDoughnutChart(){const t=this;if(!t.priceData)return;const e=t.element.querySelector('canvas[id^="chart-doughnut"]'),i={type:"doughnut",data:{datasets:[{data:[0,360],backgroundColor:e=>{const i=e.chart,{ctx:n,chartArea:s}=i;return s?0===e.dataIndex&&0!==t.priceData.HighestPriceAdjusted?function(t,e,i,n){var s=e,r=i,o=t;n&&o>=1&&(o-=1,s=i,r=n);var a=r.red-s.red,l=r.green-s.green,c=r.blue-s.blue;return"rgb("+parseInt(Math.floor(s.red+a*o),10)+","+parseInt(Math.floor(s.green+l*o),10)+","+parseInt(Math.floor(s.blue+c*o),10)+")"}(Math.abs((e.parsed-t.priceData.LowestPriceAdjusted)/t.priceData.HighestPriceAdjusted),t.colors[0],t.colors[1],t.colors[2]):"rgb(242, 242, 242)":null}}]},options:{cutout:"80%",plugins:{tooltip:{enabled:!1}}}};t.doughnutChart=new _s(e,i),t.updateDougnutChart(t.priceData.CurrentDeliveryPrice)}setPriceData(){const t=this.element.querySelector("canvas[data-prices]");if(!t)return void console.warn("No canvas with data found, unable to load price data!");const e=t.getAttribute("data-prices");e&&0!==e.length?this.priceData=JSON.parse(e):console.warn("No price data found on canvas element, unable to init chart!")}init(){const t=this;_s.register(tn,Ls,Rs,Cr,Pr,Hs,ar,Mr,Zi,As);const i=function(){t.chart&&t.chart.destroy();const n=t.element.querySelector('div[role="tabpanel"].show'),s=t.element.querySelector('input[id^="toggle-vat-"]');let r=t.element.getAttribute("data-ajax-url");const o=r.split("/");n&&(o[o.length-2]=n.getAttribute("tabindex")),s&&(o[o.length-1]=s.checked),r=o.join("/"),t.element.setAttribute("data-ajax-url",r),e.makeRequest
2(t.element,(()=>{t.setPriceData(),t.initMainChart(),t.initDoughnutChart(),t.element.querySelector('input[type="checkbox"]').addEventListener("change",(t=>{i()})),t.element.querySelectorAll('div[id^="table-tab-pane"] table tbody tr').forEach((e=>{e.addEventListener("mouseover",(e=>{let i=e.target.getAttribute("data-label");if(i||(i=e.target.parentElement.getAttribute("data-label")),!i)return;const n=t.getItemIndex(i);if(n<0)return;const s=t.chart.data.datasets[0].data[n];t.updateDougnutChart(s),t.selectPoint(i)}))}))}))};i()}}var Lr=function(){if("undefined"!=typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),Tr=function(t,e,i){var n,s=[].concat(e),r=s.length,o=t.font,a=0;for(t.font=i.string,n=0;n<r;++n)a=Math.max(t.measureText(s[n]).width,a);return t.font=o,{height:r*i.lineHeight,width:a}};function Rr(t,e){var i=e.x,n=e.y;if(null===i)return{x:0,y:-1};if(null===n)return{x:1,y:0};var s=t.x-i,r=t.y-n,o=Math.sqrt(s*s+r*r);return{x:o?s/o:0,y:o?r/o:-1}}var Nr=0,Fr=1,zr=2,jr=4,Vr=8;function Br(t,e,i){var n=Nr;return t<i.left?n|=Fr:t>i.right&&(n|=zr),e<i.top?n|=Vr:e>i.bottom&&(n|=jr),n}function Wr(t,e){var i,n,s=e.anchor,r=t;return e.clamp&&(r=function(t,e){for(var i,n,s,r=t.x0,o=t.y0,a=t.x1,l=t.y1,c=Br(r,o,e),h=Br(a,l,e);c|h&&!(c&h);)(i=c||h)&Vr?(n=r+(a-r)*(e.top-o)/(l-o),s=e.top):i&jr?(n=r+(a-r)*(e.bottom-o)/(l-o),s=e.bottom):i&zr?(s=o+(l-o)*(e.right-r)/(a-r),n=e.right):i&Fr&&(s=o+(l-o)*(e.left-r)/(a-r),n=e.left),i===c?c=Br(r=n,o=s,e):h=Br(a=n,l=s,e);return{x0:r,x1:a,y0:o,y1:l}}(r,e.area)),"start"===s?(i=r.x0,n=r.y0):"end"===s?(i=r.x1,n=r.y1):(i=(r.x0+r.x1)/2,n=(r.y0+r.y1)/2),function(t,e,i,n,s){switch(s){case"center":i=n=0;break;case"bottom":i=0,n=1;break;case"right":i=1,n=0;break;case"left":i=-1,n=0;break;case"top":i=0,n=-1;break;case"start":i=-i,n=-n;break;case"end":break;default:s*=Math.PI/180,i=Math.cos(s),n=Math.sin(s)}return{x:t,y:e,vx:i,vy:n}}(i,n,t.vx,t.vy,e.align)}var $r=function(t,e){var i=(t.startAngle+t.endAngle)/2,n=Math.cos(i),s=Math.sin(i),r=t.innerRadius,o=t.outerRadius;return Wr({x0:t.x+n*r,y0:t.y+s*r,x1:t.x+n*o,y1:t.y+s*o,vx:n,vy:s},e)},Hr=function(t,e){var i=Rr(t,e.origin),n=i.x*t.options.radius,s=i.y*t.options.radius;return Wr({x0:t.x-n,y0:t.y-s,x1:t.x+n,y1:t.y+s,vx:i.x,vy:i.y},e)},qr=function(t,e){var i=Rr(t,e.origin),n=t.x,s=t.y,r=0,o=0;return t.horizontal?(n=Math.min(t.x,t.base),r=Math.abs(t.base-t.x)):(s=Math.min(t.y,t.base),o=Math.abs(t.base-t.y)),Wr({x0:n,y0:s+o,x1:n+r,y1:s,vx:i.x,vy:i.y},e)},Ur=function(t,e){var i=Rr(t,e.origin);return Wr({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:i.x,vy:i.y},e)},Yr=function(t){return Math.round(t*Lr)/Lr};function Xr(t,e){var i=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!i)return null;if(void 0!==i.xCenter&&void 0!==i.yCenter)return{x:i.xCenter,y:i.yCenter};var n=i.getBasePixel();return t.horizontal?{x:n,y:null}:{x:null,y:n}}function Kr(t,e,i){var n=t.shadowBlur,s=i.stroked,r=Yr(i.x),o=Yr(i.y),a=Yr(i.w);s&&t.strokeText(e,r,o,a),i.filled&&(n&&s&&(t.shadowBlur=0),t.fillText(e,r,o,a),n&&s&&(t.shadowBlur=n))}var Jr=function(t,e,i,n){var s=this;s._config=t,s._index=n,s._model=null,s._rects=null,s._ctx=e,s._el=i};rt(Jr.prototype,{_modelize:function(t,e,i,n){var s,r=this,o=r._index,a=Ie(Le([i.font,{}],n,o)),l=Le([i.color,ce.color],n,o);return{align:Le([i.align,"center"],n,o),anchor:Le([i.anchor,"center"],n,o),area:n.chart.chartArea,backgroundColor:Le([i.backgroundColor,null],n,o),borderColor:Le([i.borderColor,null],n,o),borderRadius:Le([i.borderRadius,0],n,o),borderWidth:Le([i.borderWidth,0],n,o),clamp:Le([i.clamp,!1],n,o),clip:Le([i.clip,!1],n,o),color:l,display:t,font:a,lines:e,offset:Le([i.offset,4],n,o),opacity:Le([i.opacity,1],n,o),origin:Xr(r._el,n),padding:Pe(Le([i.padding,4],n,o)),positioner:(s=r._el,s instanceof As?$r:s instanceof Rs?Hr:s instanceof Bs?qr:Ur),rotation:Le([i.rotation,0],n,o)*(Math.PI/180),size:Tr(r._ctx,e,a),textAlign:Le([i.textAlign,"start"],n,o),textShadowBlur:Le([i.textShadowBlur,0],n,o),textShadowColor:Le([i.textShadowColor,l],n,o),textStrokeColor:Le([i.textStrokeColor,l],n,o),textStrokeWidth:Le([i.textStrokeWidth,0],n,o)}},update:function(t){var e,i,n,s=this,r=null,o=null,a=s._index,l=s._config,c=Le([l.display,!0],t,a);c&&(e=t.dataset.data[a],(n=U(i=Q(Z(l.formatter,[e,t]),e))?[]:function(t){var e,i=[];for(t=[].concat(t);t.length;)"string"==typeof(e=t.pop())?i.unshift.apply(i,e.split("\n")):Array.isArray(e)?t.push.apply(t,e):U(t)||i.unshift(""+e);return i}(i)).length&&(o=function(t){var e=t.borderWidth||0,i=t.padding,n=t.size.height,s=t.size.width,r=-s/2,o=-n/2;return{frame:{x:r-i.left-e,y:o-i.top-e,w:s+i.width+2*e,h:n+i.height+2*e},text:{x:r,y:o,w:s,h:n}}}(r=s._modelize(c,n,l,t)))),s._model=r,s._rects=o},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(t,e){var i,n,s,r,o=t.ctx,a=this._model,l=this._rects;this.visible()&&(o.save(),a.clip&&(i=a.area,o.beginPath(),o.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),o.clip()),o.globalAlpha=(n=0,s=a.opacity,r=1,Math.max(n,Math.min(s,r))),o.translate(Yr(e.x),Yr(e.y)),o.rotate(a.rotation),function(t,e,
vendor: 5,130 bytes, line 2
2i){var n=i.backgroundColor,s=i.borderColor,r=i.borderWidth;(n||s&&r)&&(t.beginPath(),function(t,e,i,n,s,r){var o=Math.PI/2;if(r){var a=Math.min(r,s/2,n/2),l=e+a,c=i+a,h=e+n-a,d=i+s-a;t.moveTo(e,c),l<h&&c<d?(t.arc(l,c,a,-Math.PI,-o),t.arc(h,c,a,-o,0),t.arc(h,d,a,0,o),t.arc(l,d,a,o,Math.PI)):l<h?(t.moveTo(l,i),t.arc(h,c,a,-o,o),t.arc(l,c,a,o,Math.PI+o)):c<d?(t.arc(l,c,a,-Math.PI,0),t.arc(l,d,a,0,Math.PI)):t.arc(l,c,a,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,n,s)}(t,Yr(e.x)+r/2,Yr(e.y)+r/2,Yr(e.w)-r,Yr(e.h)-r,i.borderRadius),t.closePath(),n&&(t.fillStyle=n,t.fill()),s&&r&&(t.strokeStyle=s,t.lineWidth=r,t.lineJoin="miter",t.stroke()))}(o,l.frame,a),function(t,e,i,n){var s,r=n.textAlign,o=n.color,a=!!o,l=n.font,c=e.length,h=n.textStrokeColor,d=n.textStrokeWidth,u=h&&d;if(c&&(a||u))for(i=function(t,e,i){var n=i.lineHeight,s=t.w,r=t.x;return"center"===e?r+=s/2:"end"!==e&&"right"!==e||(r+=s),{h:n,w:s,x:r,y:t.y+n/2}}(i,r,l),t.font=l.string,t.textAlign=r,t.textBaseline="middle",t.shadowBlur=n.textShadowBlur,t.shadowColor=n.textShadowColor,a&&(t.fillStyle=o),u&&(t.lineJoin="round",t.lineWidth=d,t.strokeStyle=h),s=0,c=e.length;s<c;++s)Kr(t,e[s],{stroked:u,filled:a,w:i.w,x:i.x,y:i.y+i.h*s})}(o,a.lines,l.text,a),o.restore())}});var Qr=Number.MIN_SAFE_INTEGER||-9007199254740991,Gr=Number.MAX_SAFE_INTEGER||9007199254740991;function Zr(t,e,i){var n=Math.cos(i),s=Math.sin(i),r=e.x,o=e.y;return{x:r+n*(t.x-r)-s*(t.y-o),y:o+s*(t.x-r)+n*(t.y-o)}}function to(t,e){var i,n,s,r,o,a=Gr,l=Qr,c=e.origin;for(i=0;i<t.length;++i)s=(n=t[i]).x-c.x,r=n.y-c.y,o=e.vx*s+e.vy*r,a=Math.min(a,o),l=Math.max(l,o);return{min:a,max:l}}function eo(t,e){var i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);return{vx:(e.x-t.x)/s,vy:(e.y-t.y)/s,origin:t,ln:s}}var io=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};function no(t,e,i){var n=e.positioner(t,e),s=n.vx,r=n.vy;if(!s&&!r)return{x:n.x,y:n.y};var o=i.w,a=i.h,l=e.rotation,c=Math.abs(o/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),h=Math.abs(o/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),d=1/Math.max(Math.abs(s),Math.abs(r));return c*=s*d,h*=r*d,c+=e.offset*s,h+=e.offset*r,{x:n.x+c,y:n.y+h}}rt(io.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,i){this._rotation=i,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,i=e._rect;return!((t=Zr(t,e.center(),-e._rotation)).x<i.x-1||t.y<i.y-1||t.x>i.x+i.w+2||t.y>i.y+i.h+2)},intersects:function(t){var e,i,n,s=this._points(),r=t._points(),o=[eo(s[0],s[1]),eo(s[0],s[3])];for(this._rotation!==t._rotation&&o.push(eo(r[0],r[1]),eo(r[0],r[3])),e=0;e<o.length;++e)if(i=to(s,o[e]),n=to(r,o[e]),i.max<n.min||n.max<i.min)return!1;return!0},_points:function(){var t=this,e=t._rect,i=t._rotation,n=t.center();return[Zr({x:e.x,y:e.y},n,i),Zr({x:e.x+e.w,y:e.y},n,i),Zr({x:e.x+e.w,y:e.y+e.h},n,i),Zr({x:e.x,y:e.y+e.h},n,i)]}});var so={prepare:function(t){var e,i,n,s,r,o=[];for(e=0,n=t.length;e<n;++e)for(i=0,s=t[e].length;i<s;++i)r=t[e][i],o.push(r),r.$layout={_box:new io,_hidable:!1,_visible:!0,_set:e,_idx:r._index};return o.sort((function(t,e){var i=t.$layout,n=e.$layout;return i._idx===n._idx?n._set-i._set:n._idx-i._idx})),this.update(o),o},update:function(t){var e,i,n,s,r,o=!1;for(e=0,i=t.length;e<i;++e)s=(n=t[e]).model(),(r=n.$layout)._hidable=s&&"auto"===s.display,r._visible=n.visible(),o|=r._hidable;o&&function(t){var e,i,n,s,r,o,a;for(e=0,i=t.length;e<i;++e)(s=(n=t[e]).$layout)._visible&&(a=new Proxy(n._el,{get:(t,e)=>t.getProps([e],!0)[e]}),r=n.geometry(),o=no(a,n.model(),r),s._box.update(o,r,n.rotation()));!function(t,e){var i,n,s,r;for(i=t.length-1;i>=0;--i)for(s=t[i].$layout,n=i-1;n>=0&&s._visible;--n)(r=t[n].$layout)._visible&&s._box.intersects(r._box)&&e(s,r)}(t,(function(t,e){var i=t._hidable,n=e._hidable;i&&n||n?e._visible=!1:i&&(t._visible=!1)}))}(t)},lookup:function(t,e){var i,n;for(i=t.length-1;i>=0;--i)if((n=t[i].$layout)&&n._visible&&n._box.contains(e))return t[i];return null},draw:function(t,e){var i,n,s,r,o,a;for(i=0,n=e.length;i<n;++i)(r=(s=e[i]).$layout)._visible&&(o=s.geometry(),a=no(s._el,s.model(),o),r._box.update(a,o,s.rotation()),s.draw(t,a))}},ro="$datalabels",oo="$default";function ao(t,e,i,n){if(e){var s,r=i.$context,o=i.$groups;e[o._set]&&(s=e[o._set][o._key])&&!0===Z(s,[r,n])&&(t[ro]._dirty=!0,i.update(r))}}var lo={id:"datalabels",defaults:{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:function(t){if(U(t))return null;var e,i,n,s=t;if(X(t))if(U(t.label))if(U(t.r))for(s="",n=0,i=(e=Object.keys(t)).length;n<i;++n)s+=(0!==n?", ":"")+e[n]+": "+t[e[n]];else s=t.r;else s=t.label;return""+s},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},beforeInit:function(t){t[ro]={_actives:[]}},beforeUpdate:function(t){var e=t[ro];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]}
2,afterDatasetUpdate:function(t,e,i){var n,s,r,o,a,l,c,h,d=e.index,u=t[ro],f=u._datasets[d]=[],p=t.isDatasetVisible(d),g=t.data.datasets[d],m=function(t,e){var i,n,s,r=t.datalabels,o=[];return!1===r?null:(!0===r&&(r={}),e=rt({},[e,r]),n=e.labels||{},s=Object.keys(n),delete e.labels,s.length?s.forEach((function(t){n[t]&&o.push(rt({},[e,n[t],{_key:t}]))})):o.push(e),i=o.reduce((function(t,e){return tt(e.listeners||{},(function(i,n){t[n]=t[n]||{},t[n][e._key||oo]=i})),delete e.listeners,t}),{}),{labels:o,listeners:i})}(g,i),b=e.meta.data||[],v=t.ctx;for(v.save(),n=0,r=b.length;n<r;++n)if((c=b[n])[ro]=[],p&&c&&t.getDataVisibility(n)&&!c.skip)for(s=0,o=m.labels.length;s<o;++s)l=(a=m.labels[s])._key,(h=new Jr(a,v,c,n)).$groups={_set:d,_key:l||oo},h.$context={active:!1,chart:t,dataIndex:n,dataset:g,datasetIndex:d},h.update(h.$context),c[ro].push(h),f.push(h);v.restore(),rt(u._listeners,m.listeners,{merger:function(t,i,n){i[t]=i[t]||{},i[t][e.index]=n[t],u._listened=!0}})},afterUpdate:function(t){t[ro]._labels=so.prepare(t[ro]._datasets)},afterDatasetsDraw:function(t){so.draw(t,t[ro]._labels)},beforeEvent:function(t,e){if(t[ro]._listened){var i=e.event;switch(i.type){case"mousemove":case"mouseout":!function(t,e){var i,n,s=t[ro],r=s._listeners;if(r.enter||r.leave){if("mousemove"===e.type)n=so.lookup(s._labels,e);else if("mouseout"!==e.type)return;i=s._hovered,s._hovered=n,function(t,e,i,n,s){var r,o;(i||n)&&(i?n?i!==n&&(o=r=!0):o=!0:r=!0,o&&ao(t,e.leave,i,s),r&&ao(t,e.enter,n,s))}(t,r,i,n,e)}}(t,i);break;case"click":!function(t,e){var i=t[ro],n=i._listeners.click,s=n&&so.lookup(i._labels,e);s&&ao(t,n,s,e)}(t,i)}}},afterEvent:function(t){var e,i,n,s,r,o,a,l=t[ro],c=function(t,e){var i,n,s,r,o=t.slice(),a=[];for(i=0,s=e.length;i<s;++i)r=e[i],-1===(n=o.indexOf(r))?a.push([r,1]):o.splice(n,1);for(i=0,s=o.length;i<s;++i)a.push([o[i],-1]);return a}(l._actives,l._actives=t.getActiveElements());for(e=0,i=c.length;e<i;++e)if((r=c[e])[1])for(n=0,s=(a=r[0].element[ro]||[]).length;n<s;++n)(o=a[n]).$context.active=1===r[1],o.update(o.$context);(l._dirty||c.length)&&(so.update(l._labels),t.render()),delete l._dirty}};class co{constructor(t,e){this.element=t,this.options=r({},e),this.chart=null,this.chartData=[],this.init()}getContrast(t){return"#"===t.slice(0,1)&&(t=t.slice(1)),3===t.length&&(t=t.
2split("").map((function(t){return t+t})).join("")),(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3>=128?"black":"white"}initDoughnutChart(){const t=this;if(!t.chartData||0===t.chartData.length)return;const e=t.element.querySelector('canvas[id^="chart-"]'),i={type:"doughnut",data:{labels:t.chartData.map((t=>t.percent+"%")),datasets:[{data:t.chartData.map((t=>t.percent)),backgroundColor:e=>{const i=e.chart,{ctx:n,chartArea:s}=i;return s?t.chartData[e.dataIndex].color:null}}]},plugins:[lo],options:{cutout:"40%",plugins:{datalabels:{formatter:function(t,e){return e.chart.data.labels[e.dataIndex]},color:function(e){const{ctx:i,chartArea:n}=e.chart;if(n)return t.getContrast(t.chartData[e.dataIndex].color)},font:{family:'"Roboto", sans-serif, Arial',size:24}},tooltip:{enabled:!1}},onHover:e=>{if("mousemove"!==e.type)return;const i=e.chart.getElementsAtEventForMode(e,"nearest",{intersect:!1},!0);1===i.length&&u().getOrCreateInstance(t.element.querySelector(".carousel")).to(i[0].index)}}};t.chart=new _s(e,i),t.chart.setActiveElements([{datasetIndex:0,index:0}])}init(){const t=this;t.element.querySelectorAll("div.data-point").forEach((e=>{t.chartData.push({percent:parseFloat(e.getAttribute("data-percent")),color:e.getAttribute("data-color"),id:e.id})})),_s.register(Hs,ar,Mr,Zi,As,lo),t.initDoughnutChart()}}class ho{constructor(t,e){this.element=t,this.options=r({},e),this.chart=null,this.chartData=[],this.init()}setChartData(){const t=this;t.chartData=[],t.element.querySelectorAll(".category[data-kwh]").forEach((e=>{var i=e.getAttribute("data-label"),n=e.getAttribute("data-color"),s=JSON.parse(e.getAttribute("data-kwh"));t.chartData.push({label:i,backgroundColor:n,hoverBorderWidth:0,data:Object.values(s)})}))}updateMainChart(){const t=this;var e={baseConsumers:[],consumerCategories:[]};let i=parseFloat(t.element.querySelector('input[type="radio"]:checked').value.replace(",","."));isNaN(i)&&(i=parseFloat(document.getElementById("base-consumer-custom-value").value.replace(",","."))),e.baseConsumers.push({consumption:i,isActive:!0}),t.element.querySelectorAll(".category.consumers").forEach((t=>{var i={name:t.getAttribute("data-label"),color:t.getAttribute("data-color"),consumers:[]};t.querySelectorAll('input[type="checkbox"]:checked').forEach((t=>{var e=a(t,".bg-white");i.consumers.push({category:i.name,name:t.getAttribute("data-label"),consumption:parseFloat(e.querySelector('input[type="number"]').value.replace(",",".")),timeStart:e.querySelector('input[type="time"].timeStart').value,timeEnd:e.querySelector('input[type="time"].timeEnd').value,isActive:!0})})),e.consumerCategories.push(i)})),fetch("/api/effectcalculator/chartdata",{method:"POST",mode:"same-origin",cache:"no-cache",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}).then((t=>t.json())).then((e=>{if(e){t.element.querySelector(".category:not(.consumers)").setAttribute("data-kwh",JSON.stringify(e.baseConsumers[0].consumptions));for(var i=0;i<e.consumerCategories.length;i++){var n=t.element.querySelector('.category.consumers[data-label="'+e.consumerCategories[i].name+'"]');if(n){n.setAttribute("data-kwh",JSON.stringify(e.consumerCategories[i].consumptions)),n.querySelectorAll("label[data-label] span.text-danger").forEach((t=>{t.classList.add("d-none")}));for(var s=0;s<e.consumerCategories[i].consumers.length;s++)if(e.consumerCategories[i].consumers[s].isPeakConsumption){var r=n.querySelector('label[data-label="'+e.consumerCategories[i].consumers[s].name+'"] span.text-danger');r&&r.classList.remove("d-none")}}}t.setChartData(),t.chart.data.datasets=t.chartData,t.chart.update()}})).catch((function(t){console.warn("Something went wrong.",t)}))}initMainChart(){const t=this;if(!t.chartData)return;const e=t.element.querySelector('canvas[id^="chart-"]'),i=[];for(var n=0;n<24;n++)i.push(String(n).padStart(2,"0"));const s={type:"bar",data:{labels:i,datasets:this.chartData},options:{responsive:!0,aspectRatio:2,maintainAspectRatio:!0,scales:{x:{stacked:!0},y:{stacked:!0,beginAtZero:!0,offset:!1,ticks:{callback:function(t,e,
2i){return o(t)+" kW"}}}},interaction:{intersect:!1,mode:"index"},plugins:{legend:{display:!0,position:"top",labels:{font:{size:16},filter:(t,e)=>e.datasets[t.datasetIndex].data.some((t=>0!==t))}},title:{display:!1},tooltip:{usePointStyle:!0,callbacks:{title:function(t){const e=t[0].parsed.x;let i=e+1;return i>23&&(i=0),"kl. "+String(e).padStart(2,"0")+":00 - "+String(i).padStart(2,"0")+":00"},afterTitle:function(t){let e=0;for(var i=0;i<t.length;i++)e+=t[i].parsed.y;return"Total förbrukning: "+o(e)+" kW"},label:function(t){return t.dataset.label+" "+o(t.parsed.y)+" kW"}},filter:function(t){return 0!==t.parsed.y}}}}};t.chart=new _s(e,s)}init(){const t=this;e.makeRequest(t.element,(()=>{t.setChartData(),t.initMainChart(),t.element.querySelectorAll('input[type="checkbox"],input[type="radio"]').forEach((e=>{e.addEventListener("change",(e=>{if("radio"===e.target.type&&"base-consumer-custom"===e.target.id){const e=document.getElementById("base-consumer-custom-value");return e.focus(),void(e.value.length>0&&t.updateMainChart())}t.updateMainChart()}))})),t.element.querySelectorAll('input[type="number"],input[type="time"]').forEach((e=>{e.addEventListener("blur",(e=>{t.updateMainChart()}))})),document.getElementById("categories-show").addEventListener("click",(e=>{e.preventDefault(),t.element.querySelector(".categories-wrapper").style="",e.target.remove()}))})),_s.register(Hs,dr,ar,Mr,Bs,Gi,Cr,Pr)}}var uo=i(573);document.addEventListener("DOMContentLoaded",(function(){let t=new uo.ValidationService;t.addProvider("requiretrue",((t,e,i)=>!(!t||"checkbox"===e.getAttribute("type")&&!e.checked))),t.bootstrap(),document.querySelector("body").querySelectorAll('a[href^="http"]').forEach((t=>{const e=t.getAttribute("rel");null!=e&&!1!==e||t.getAttribute("href").startsWith(window.location.origin)||t.setAttribute("rel","noreferrer")})),function(t){if(!t)return;const i=function(t){h().getOrCreateInstance(t.target.querySelector(".dropdown-toggle")).show()},n=function(t){h().getOrCreateInstance(t.target.querySelector(".dropdown-toggle")).hide()},s=function(t){t.target.querySelectorAll(".dropdown.active-child > .dropdown-toggle, .dropdown.active > .dropdown-toggle").forEach((t=>{h().getOrCreateInstance(t).show()}))},r=function(t){t.target.nextElementSibling.classList.add("showing")},o=function(t){const e=t.target.nextElementSibling;e.classList.remove("showing"),e.classList.add("hiding")},a=function(t){const e=t.target.nextElementSibling;e.setAttribute("data-bs-popper","none"),e.onanimationend=()=>{e.classList.remove("hiding")}},l=function(t){const i=t.target.nextElementSibling;i.hasChildNodes()||e.makeRequest(i)},c=function(){const e=t.querySelector("button.navbar-toggler"),c=t.querySelector(e.getAttribute("data-bs-target"));t.querySelectorAll("li.dropdown").forEach((t=>{t.removeEventListener("mouseenter",i),t.removeEventListener("mouseleave",n)})),c.removeEventListener("shown.bs.collapse",s),c.removeEventListener("shown.bs.offcanvas",s),c.removeAttribute("aria-hidden"),c.querySelectorAll("li.dropdown > ul.dropdown-menu[data-ajax-url]").forEach((t=>{t.parentElement.removeEventListener("show.bs.dropdown",l)}));let h=window.getComputedStyle(t,"::after").getPropertyValue("content");if(!h||"none"===h)return;if(h=parseFloat(h.replace(/"/g,"").replace("px","")),isNaN(h))return;c.addEventListener("show.bs.dropdown",r),c.addEventListener("hide.bs.dropdown",o),c.addEventListener("hidden.bs.dropdown",a);const d=function(){c.querySelectorAll("ul.dropdown-menu .dropdown.dropend").forEach((t=>{t.classList.remove("dropend")})),c.addEventListener("shown.bs.collapse",s),c.addEventListener("shown.bs.offcanvas",s),c.setAttribute("aria-hidden","true"),c.querySelectorAll("li.dropdown").forEach((t=>{t.removeEventListener("mouseenter",i),t.removeEventListener("mouseleave",n)})),c.querySelectorAll('.dropdown-toggle[data-bs-auto-close="outside"]').forEach((t=>{t.setAttribute("data-bs-auto-close","false")})),c.querySelectorAll("li.dropdown > ul.dropdown-menu[data-ajax-url]").forEach((t=>{t.parentElement.addEventListener("show.bs.dropdown",l)}))};if(window.innerWidth>h)return t.querySelectorAll('.dropdown-toggle[data-bs-auto-close
2="false"]').forEach((t=>{t.setAttribute("data-bs-auto-close","outside")})),t.querySelectorAll("ul.navbar-nav > .dropdown").forEach((t=>{t.querySelectorAll("ul.dropdown-menu .dropdown > .dropdown-toggle").forEach((t=>{t.parentElement.classList.add("dropend")}))})),t.querySelectorAll('li.dropdown:not([data-furillo-nav-dropdown-hidden="true"])').forEach((t=>{t.addEventListener("mouseenter",i),t.addEventListener("mouseleave",n)})),void(t.classList.contains("navbar-hybrid")&&d());d()};window.addEventListener("resize",c),c()}(document.querySelector("#site > header nav.navbar"));const i=document.querySelector("#site nav.sub-navigation");i&&function(t){if(!t)return;const i=function(){if(t.querySelector("ul"))return;let i=window.getComputedStyle(t,"::after").getPropertyValue("content");i&&"none"!==i&&(i=parseFloat(i.replace(/"/g,"").replace("px","")),isNaN(i)||window.innerWidth<=i||(t.addEventListener("show.bs.collapse",(t=>{const i=t.target;i.hasChildNodes()||e.makeRequest(i)})),e.makeRequest(t)))};window.addEventListener("resize",i),i()}(i),e.init(document.querySelector("body")),n.init(document.querySelector("body")),function(){var t=[].slice.call(document.querySelectorAll(".video-banner video"));if(t&&0!==t.length&&"IntersectionObserver"in window){var e=new IntersectionObserver((function(t,i){t.forEach((function(t){if(t.isIntersecting){for(var i in t.target.children){var n=t.target.children[i];"string"==typeof n.tagName&&"SOURCE"===n.tagName&&(n.src=n.dataset.src)}t.target.load(),e.unobserve(t.target)}}))}));t.forEach((function(t){e.observe(t)}))}}(),function(){var t=[].slice.call(document.querySelectorAll("[data-animate]"));if(t&&0!==t.length&&"IntersectionObserver"in window){var e=new IntersectionObserver((function(t,i){t.forEach((function(t){t.isIntersecting&&(t.target.classList.remove("animate-pending"),t.target.classList.add("animate"),t.target.classList.add(t.target.getAttribute("data-animate")),e.unobserve(t.target))}))}));t.forEach((function(t){t.getAttribute("data-animate").length>0&&e.observe(t)}))}}();const r=document.querySelectorAll(".block-image a.open-image-modal, .block-media-list a.open-image-modal");r&&r.length>0&&r.forEach((t=>{t.setAttribute("data-bs-toggle","modal"),t.setAttribute("data-bs-target","#shared-modal")})),function(t){let i=null;t.addEventListener("show.bs.modal",(n=>{const s=n.relatedTarget;if(!s)return;!function(t){i=t.hasAttribute("data-html-holder")?{type:"HTML",parent:document.getElementById(t.getAttribute("data-html-holder"))}:{url:t.getAttribute("href"),type:"IMG",currentPageId:t.getAttribute("data-current-page-id"),blockId:t.getAttribute("data-block-id"),contentId:t.getAttribute("data-content-id")}}(s);const r=t.querySelector("div.modal-body");if("IMG"===i.type)return t.querySelector("div.modal-dialog").classList.add("modal-xl"),t.classList.add("image"),i.blockId&&0!==i.blockId.length&&i.currentPageId&&0!==i.currentPageId.length?(r.setAttribute("data-ajax-url","/partials/imagegallery/"+i.currentPageId+"/"+i.blockId+"/carousel"),void e.makeRequest(r,(function(){const e=u().getOrCreateInstance(t.querySelector(".modal-body .carousel"));if(!i.contentId||0===i.contentId.length)return;const n=t.querySelector('.modal-body .carousel .carousel-indicators button[data-content-id="'+i.contentId+'"]');if(!n)return;const s=parseInt(n.getAttribute("data-bs-slide-to"));isNaN(s)||e.to(s)}))):void function(){const t=document.createElement("img");t.setAttribute("src",i.url),t.classList.add("img-fluid"),r.innerHTML="",r.appendChild(t)}();if("HTML"!==i.type);else for(t.querySelector("div.modal-dialog").classList.add("modal-lg"),t.classList.add("html");i.parent.childNodes.length>0;)r.appendChild(i.parent.childNodes[0])})),t.addEventListener("hidden.bs.modal",(e=>{if(t.setAttribute("class","modal"),t.querySelector("div.modal-dialog").setAttribute("class","modal-dialog modal-dialog-centered"),i&&"HTML"===i.type){const e=t.querySelector("div.modal-body");for(;e.childNodes.length>0;)i.parent.appendChild(e.childNodes[0])}}))}(document.querySelector("#shared-modal")),document.querySelectorAll(".block-page-list").forEach((t=>{let e=t.querySelector(".tag-filters");e&&new l(e,{listWrapper:t})})),document.querySelectorAll(".offcanvas").forEach((t=>{t.removeAttribute("style")})),document.querySelectorAll('#site > header > div[data-type="system-message"]').forEach((t=>{t.addEventListener("close.bs.alert",(t=>{const e=parseInt(t.target.getAttribute("data-id"));if(!isNaN(e)){var i=s.get("read_messages"),n=[];i&&i.length>0&&(n=i.split("|")),n.push(e),s.set("read_messages",n.join("|"),7)}}))}));const o=document.querySelectorAll("div.umbraco-forms-form > form");o&&o.length>0&&o.forEach((t=>{t.addEventListener("validation",(function(t){if(t.detail.valid)return;const e=function(e){t.target.querySelectorAll(e).forEach((t=>{let e=t.querySelector("input.input-validation-error");
2if(!e)return;let i=e.getAttribute("name");t.parentNode.querySelector('span[data-valmsg-for="'+i+'"]').style.display="inline-block"}))};e(".radiobuttonlist"),e(".checkboxlist")}))}));const a=document.querySelector("header.site-header ul.top-menu li.translate a");if(a){const t=window.location.href,e=a.getAttribute("href"),i=new URL(e),n=new URLSearchParams(i.search);n.delete("u"),n.append("u",t),a.setAttribute("href",i.origin+i.pathname+"?"+n.toString())}const c=document.querySelector(".contract-module-page div[data-contract-module-step]");c&&(window.contractModule=new f(c)),document.querySelectorAll('div[data-ajax-url^="/partials/blocks/hourlyprice"]').forEach((t=>{new Ir(t)})),document.querySelectorAll("div.block-interactive-diagram").forEach((t=>{new co(t)})),document.querySelectorAll('div[data-ajax-url^="/partials/blocks/effectcalculator"]').forEach((t=>{new ho(t)}));const d=document.querySelectorAll("lime-form");d&&1===d.length&&function(t,e="unnamed",i=500,n=3){let s=0;new Promise((r=>{const o=setInterval((async()=>{s++,s===n&&(console.info("[retry: "+e+"] Trying operation for the last time ("+n+")."),clearInterval(o));try{let n=await t();clearInterval(o),console.info("[retry: "+e+"] "+n+" after "+s+" tries (~"+i*s+"ms)."),r()}catch(t){console.info("[retry: "+e+"] Try number "+s+" of "+n+" was unsuccessful ("+t+").")}}),i)}))}((()=>new Promise(((t,e)=>{const i=document.querySelector("lime-form");if(!i)return void e("No Lime Forms found on page!");if(!window.limeForms)return void e("window.limeForms not yet set");var n=window.limeForms.getApi();if(!n)return void e("window.limeForms.getApi() returned no api");let s=i.getAttribute("form-variables");if(!s){const t=document.getElementById("lime-form-variables");t&&(s=t.innerText)}s&&(console.debug("[setupLimeForms()] Variables set to Lime Forms",JSON.parse(s)),n.onReady((function(){this.setFieldValues(JSON.parse(s))}))),t("Lime Forms successfully loaded")}))),"setupLimeForms()")}))}()}(); 3//# sourceMappingURL=site.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.