@oliasoft-open-source/charts-library 5.2.1-beta-8 → 5.2.1-beta-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Color-AVL7NMMY-CqDJ8ZOT.js +1 -0
- package/dist/assets/DocsRenderer-PQXLIZUC-D_u5u9z2.js +2 -0
- package/dist/assets/bar-chart-const-D_44J3Hs.js +1 -0
- package/dist/assets/bar-chart.stories-xE70f9TR.js +145 -0
- package/dist/assets/client-Ciqut_YX.js +1 -0
- package/dist/assets/components-9epRxl4J.js +1 -0
- package/dist/assets/get-custom-legend-plugin-example-CGyRL0oI.js +1 -0
- package/dist/assets/get-draggableData-BVJ5iVjR.js +2 -0
- package/dist/assets/iframe-DwZM_ZTV.js +2349 -0
- package/dist/assets/legend-DX1GE7eL.js +1266 -0
- package/dist/assets/legend-context-EFDEFPqT.js +47 -0
- package/dist/assets/line-chart-DA2zDhY7.js +1 -0
- package/dist/assets/line-chart.stories-2jpvKnZZ.js +1162 -0
- package/dist/assets/{line-chart.test-case.stories-BherIy2k.js → line-chart.test-case.stories-BtymlJdg.js} +4 -4
- package/dist/assets/pie-chart.stories-BitiqvNU.js +45 -0
- package/dist/assets/preload-helper-Dr7BywEQ.js +1 -0
- package/dist/assets/react-18-DuDr_33m.js +1 -0
- package/dist/assets/react-6r188Yvx.js +1 -0
- package/dist/assets/scatter-chart.stories-Dx00FKXF.js +41 -0
- package/dist/iframe.html +2 -2
- package/dist/index.js +39708 -4959
- package/dist/project.json +1 -1
- package/dist/vite-inject-mocker-entry.js +8 -18
- package/package.json +2 -2
- package/dist/assets/Color-AVL7NMMY-CS12GsAp.js +0 -1
- package/dist/assets/DocsRenderer-PQXLIZUC-GzKWCIKM.js +0 -2
- package/dist/assets/bar-chart-const-Cgj9sgUU.js +0 -1
- package/dist/assets/bar-chart.stories-DiVXSfzm.js +0 -136
- package/dist/assets/client-YjsYyvlT.js +0 -1
- package/dist/assets/get-custom-legend-plugin-example-DoKp_ti3.js +0 -1
- package/dist/assets/get-draggableData-C4lfrQc8.js +0 -2
- package/dist/assets/iframe-DCxgzTof.js +0 -2359
- package/dist/assets/index-C0sntNAo.js +0 -1
- package/dist/assets/legend-CkDoV6Ma.js +0 -1372
- package/dist/assets/legend-context-Byc4ADTV.js +0 -68
- package/dist/assets/line-chart-B8LdJRW7.js +0 -1
- package/dist/assets/line-chart.stories-DMNBRfTA.js +0 -1162
- package/dist/assets/pie-chart.stories-CqXDaxxI.js +0 -45
- package/dist/assets/preload-helper-PPVm8Dsz.js +0 -1
- package/dist/assets/react-18-2D2yOiaU.js +0 -1
- package/dist/assets/scatter-chart.stories-CzHmKRFZ.js +0 -41
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{r as xe,R as dg,g as Fc,e as $o,j as Yy}from"./iframe-DCxgzTof.js";/*!
|
|
2
|
-
* @kurkle/color v0.3.4
|
|
3
|
-
* https://github.com/kurkle/color#readme
|
|
4
|
-
* (c) 2024 Jukka Kurkela
|
|
5
|
-
* Released under the MIT License
|
|
6
|
-
*/function Gr(t){return t+.5|0}const xi=(t,e,n)=>Math.max(Math.min(t,n),e);function Tr(t){return xi(Gr(t*2.55),0,255)}function wi(t){return xi(Gr(t*255),0,255)}function jn(t){return xi(Gr(t/2.55)/100,0,1)}function bh(t){return xi(Gr(t*100),0,100)}const rn={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},xc=[..."0123456789ABCDEF"],Xy=t=>xc[t&15],Ky=t=>xc[(t&240)>>4]+xc[t&15],Go=t=>(t&240)>>4===(t&15),qy=t=>Go(t.r)&&Go(t.g)&&Go(t.b)&&Go(t.a);function jy(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&rn[t[1]]*17,g:255&rn[t[2]]*17,b:255&rn[t[3]]*17,a:e===5?rn[t[4]]*17:255}:(e===7||e===9)&&(n={r:rn[t[1]]<<4|rn[t[2]],g:rn[t[3]]<<4|rn[t[4]],b:rn[t[5]]<<4|rn[t[6]],a:e===9?rn[t[7]]<<4|rn[t[8]]:255})),n}const Zy=(t,e)=>t<255?e(t):"";function Jy(t){var e=qy(t)?Xy:Ky;return t?"#"+e(t.r)+e(t.g)+e(t.b)+Zy(t.a,e):void 0}const Qy=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function gg(t,e,n){const i=e*Math.min(n,1-n),s=(o,l=(o+t/30)%12)=>n-i*Math.max(Math.min(l-3,9-l,1),-1);return[s(0),s(8),s(4)]}function tv(t,e,n){const i=(s,o=(s+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function ev(t,e,n){const i=gg(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function nv(t,e,n,i,s){return t===s?(e-n)/i+(e<n?6:0):e===s?(n-t)/i+2:(t-e)/i+4}function Wc(t){const n=t.r/255,i=t.g/255,s=t.b/255,o=Math.max(n,i,s),l=Math.min(n,i,s),c=(o+l)/2;let u,h,d;return o!==l&&(d=o-l,h=c>.5?d/(2-o-l):d/(o+l),u=nv(n,i,s,d,o),u=u*60+.5),[u|0,h||0,c]}function zc(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(wi)}function Hc(t,e,n){return zc(gg,t,e,n)}function iv(t,e,n){return zc(ev,t,e,n)}function sv(t,e,n){return zc(tv,t,e,n)}function pg(t){return(t%360+360)%360}function rv(t){const e=Qy.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?Tr(+e[5]):wi(+e[5]));const s=pg(+e[2]),o=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?i=iv(s,o,l):e[1]==="hsv"?i=sv(s,o,l):i=Hc(s,o,l),{r:i[0],g:i[1],b:i[2],a:n}}function ov(t,e){var n=Wc(t);n[0]=pg(n[0]+e),n=Hc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function av(t){if(!t)return;const e=Wc(t),n=e[0],i=bh(e[1]),s=bh(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${jn(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const xh={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"},yh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function lv(){const t={},e=Object.keys(yh),n=Object.keys(xh);let i,s,o,l,c;for(i=0;i<e.length;i++){for(l=c=e[i],s=0;s<n.length;s++)o=n[s],c=c.replace(o,xh[o]);o=parseInt(yh[l],16),t[c]=[o>>16&255,o>>8&255,o&255]}return t}let Yo;function cv(t){Yo||(Yo=lv(),Yo.transparent=[0,0,0,0]);const e=Yo[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const fv=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function uv(t){const e=fv.exec(t);let n=255,i,s,o;if(e){if(e[7]!==i){const l=+e[7];n=e[8]?Tr(l):xi(l*255,0,255)}return i=+e[1],s=+e[3],o=+e[5],i=255&(e[2]?Tr(i):xi(i,0,255)),s=255&(e[4]?Tr(s):xi(s,0,255)),o=255&(e[6]?Tr(o):xi(o,0,255)),{r:i,g:s,b:o,a:n}}}function hv(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${jn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const ec=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Es=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function dv(t,e,n){const i=Es(jn(t.r)),s=Es(jn(t.g)),o=Es(jn(t.b));return{r:wi(ec(i+n*(Es(jn(e.r))-i))),g:wi(ec(s+n*(Es(jn(e.g))-s))),b:wi(ec(o+n*(Es(jn(e.b))-o))),a:t.a+n*(e.a-t.a)}}function Xo(t,e,n){if(t){let i=Wc(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=Hc(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function mg(t,e){return t&&Object.assign(e||{},t)}function vh(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=wi(t[3]))):(e=mg(t,{r:0,g:0,b:0,a:1}),e.a=wi(e.a)),e}function gv(t){return t.charAt(0)==="r"?uv(t):rv(t)}class Nr{constructor(e){if(e instanceof Nr)return e;const n=typeof e;let i;n==="object"?i=vh(e):n==="string"&&(i=jy(e)||cv(e)||gv(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=mg(this._rgb);return e&&(e.a=jn(e.a)),e}set rgb(e){this._rgb=vh(e)}rgbString(){return this._valid?hv(this._rgb):void 0}hexString(){return this._valid?Jy(this._rgb):void 0}hslString(){return this._valid?av(this._rgb):void 0}mix(e,n){if(e){const i=this.rgb,s=e.rgb;let o;const l=n===o?.5:n,c=2*l-1,u=i.a-s.a,h=((c*u===-1?c:(c+u)/(1+c*u))+1)/2;o=1-h,i.r=255&h*i.r+o*s.r+.5,i.g=255&h*i.g+o*s.g+.5,i.b=255&h*i.b+o*s.b+.5,i.a=l*i.a+(1-l)*s.a,this.rgb=i}return this}interpolate(e,n){return e&&(this._rgb=dv(this._rgb,e._rgb,n)),this}clone(){return new Nr(this.rgb)}alpha(e){return this._rgb.a=wi(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Gr(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Xo(this._rgb,2,e),this}darken(e){return Xo(this._rgb,2,-e),this}saturate(e){return Xo(this._rgb,1,e),this}desaturate(e){return Xo(this._rgb,1,-e),this}rotate(e){return ov(this._rgb,e),this}}/*!
|
|
7
|
-
* Chart.js v4.4.9
|
|
8
|
-
* https://www.chartjs.org
|
|
9
|
-
* (c) 2025 Chart.js Contributors
|
|
10
|
-
* Released under the MIT License
|
|
11
|
-
*/function $n(){}const pv=(()=>{let t=0;return()=>t++})();function xt(t){return t==null}function qt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function _t(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Zt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function $e(t,e){return Zt(t)?t:e}function lt(t,e){return typeof t>"u"?e:t}const mv=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,_g=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function it(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function pt(t,e,n,i){let s,o,l;if(qt(t))for(o=t.length,s=0;s<o;s++)e.call(n,t[s],s);else if(_t(t))for(l=Object.keys(t),o=l.length,s=0;s<o;s++)e.call(n,t[l[s]],l[s])}function pa(t,e){let n,i,s,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(s=t[n],o=e[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function ma(t){if(qt(t))return t.map(ma);if(_t(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let s=0;for(;s<i;++s)e[n[s]]=ma(t[n[s]]);return e}return t}function bg(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function _v(t,e,n,i){if(!bg(t))return;const s=e[t],o=n[t];_t(s)&&_t(o)?Cn(s,o,i):e[t]=ma(o)}function Cn(t,e,n){const i=qt(e)?e:[e],s=i.length;if(!_t(t))return t;n=n||{};const o=n.merger||_v;let l;for(let c=0;c<s;++c){if(l=i[c],!_t(l))continue;const u=Object.keys(l);for(let h=0,d=u.length;h<d;++h)o(u[h],t,l,n)}return t}function Er(t,e){return Cn(t,e,{merger:bv})}function bv(t,e,n){if(!bg(t))return;const i=e[t],s=n[t];_t(i)&&_t(s)?Er(i,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ma(s))}const Sh={"":t=>t,x:t=>t.x,y:t=>t.y};function xv(t){const e=t.split("."),n=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function yv(t){const e=xv(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function Ji(t,e){return(Sh[e]||(Sh[e]=yv(e)))(t)}function Uc(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Br=t=>typeof t<"u",Mi=t=>typeof t=="function",wh=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function vv(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ut=Math.PI,Bt=2*Ut,Sv=Bt+Ut,_a=Number.POSITIVE_INFINITY,wv=Ut/180,te=Ut/2,Vi=Ut/4,Mh=Ut*2/3,yi=Math.log10,an=Math.sign;function ji(t,e,n){return Math.abs(t-e)<n}function Th(t){const e=Math.round(t);t=ji(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(yi(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Mv(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(n|0)&&e.push(n),e.sort((s,o)=>s-o).pop(),e}function Tv(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Ls(t){return!Tv(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Pv(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function xg(t,e,n){let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Jn(t){return t*(Ut/180)}function Cv(t){return t*(180/Ut)}function Ph(t){if(!Zt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function yg(t,e){const n=e.x-t.x,i=e.y-t.y,s=Math.sqrt(n*n+i*i);let o=Math.atan2(i,n);return o<-.5*Ut&&(o+=Bt),{angle:o,distance:s}}function yc(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kv(t,e){return(t-e+Sv)%Bt-Ut}function Mn(t){return(t%Bt+Bt)%Bt}function Fr(t,e,n,i){const s=Mn(t),o=Mn(e),l=Mn(n),c=Mn(o-s),u=Mn(l-s),h=Mn(s-o),d=Mn(s-l);return s===o||s===l||i&&o===l||c>u&&h<d}function pe(t,e,n){return Math.max(e,Math.min(n,t))}function Ev(t){return pe(t,-32768,32767)}function Qn(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Vc(t,e,n){n=n||(l=>t[l]<e);let i=t.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,n(o)?s=o:i=o;return{lo:s,hi:i}}const qi=(t,e,n,i)=>Vc(t,n,i?s=>{const o=t[s][e];return o<n||o===n&&t[s+1][e]===n}:s=>t[s][e]<n),Iv=(t,e,n)=>Vc(t,n,i=>t[i][e]>=n);function Av(t,e,n){let i=0,s=t.length;for(;i<s&&t[i]<e;)i++;for(;s>i&&t[s-1]>n;)s--;return i>0||s<t.length?t.slice(i,s):t}const vg=["push","pop","shift","splice","unshift"];function Ov(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),vg.forEach(n=>{const i="_onData"+Uc(n),s=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const l=s.apply(this,o);return t._chartjs.listeners.forEach(c=>{typeof c[i]=="function"&&c[i](...o)}),l}})})}function Ch(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(vg.forEach(o=>{delete t[o]}),delete t._chartjs)}function Sg(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const wg=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Mg(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,wg.call(window,()=>{i=!1,t.apply(e,n)}))}}function Dv(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const $c=t=>t==="start"?"left":t==="end"?"right":"center",ge=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Rv=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function Tg(t,e,n){const i=e.length;let s=0,o=i;if(t._sorted){const{iScale:l,vScale:c,_parsed:u}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=l.axis,{min:p,max:_,minDefined:v,maxDefined:T}=l.getUserBounds();if(v){if(s=Math.min(qi(u,d,p).lo,n?i:qi(e,d,l.getPixelForValue(p)).lo),h){const M=u.slice(0,s+1).reverse().findIndex(k=>!xt(k[c.axis]));s-=Math.max(0,M)}s=pe(s,0,i-1)}if(T){let M=Math.max(qi(u,l.axis,_,!0).hi+1,n?0:qi(e,d,l.getPixelForValue(_),!0).hi+1);if(h){const k=u.slice(M-1).findIndex(A=>!xt(A[c.axis]));M+=Math.max(0,k)}o=pe(M,s,i)-s}else o=i-s}return{start:s,count:o}}function Pg(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=s,!0;const o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),o}const Ko=t=>t===0||t===1,kh=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Bt/n)),Eh=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Bt/n)+1,Ir={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=>-Math.cos(t*te)+1,easeOutSine:t=>Math.sin(t*te),easeInOutSine:t=>-.5*(Math.cos(Ut*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Ko(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),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=>Ko(t)?t:kh(t,.075,.3),easeOutElastic:t=>Ko(t)?t:Eh(t,.075,.3),easeInOutElastic(t){return Ko(t)?t:t<.5?.5*kh(t*2,.1125,.45):.5+.5*Eh(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Ir.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Ir.easeInBounce(t*2)*.5:Ir.easeOutBounce(t*2-1)*.5+.5};function Gc(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Ih(t){return Gc(t)?t:new Nr(t)}function nc(t){return Gc(t)?t:new Nr(t).saturate(.5).darken(.1).hexString()}const Lv=["x","y","borderWidth","radius","tension"],Nv=["color","borderColor","backgroundColor"];function Bv(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:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Nv},numbers:{type:"number",properties:Lv}}),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:e=>e|0}}}})}function Fv(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ah=new Map;function Wv(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Ah.get(n);return i||(i=new Intl.NumberFormat(t,e),Ah.set(n,i)),i}function wa(t,e,n){return Wv(e,n).format(t)}const Cg={values(t){return qt(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let s,o=t;if(n.length>1){const h=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(h<1e-4||h>1e15)&&(s="scientific"),o=zv(t,n)}const l=yi(Math.abs(o)),c=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),u={notation:s,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),wa(t,i,u)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(yi(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Cg.numeric.call(this,t,e,n):""}};function zv(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Yc={formatters:Cg};function Hv(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:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:Yc.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:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Qi=Object.create(null),vc=Object.create(null);function Ar(t,e){if(!e)return t;const n=e.split(".");for(let i=0,s=n.length;i<s;++i){const o=n[i];t=t[o]||(t[o]=Object.create(null))}return t}function ic(t,e,n){return typeof e=="string"?Cn(Ar(t,e),n):Cn(Ar(t,""),e)}class Uv{constructor(e,n){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=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>nc(s.backgroundColor),this.hoverBorderColor=(i,s)=>nc(s.borderColor),this.hoverColor=(i,s)=>nc(s.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(e),this.apply(n)}set(e,n){return ic(this,e,n)}get(e){return Ar(this,e)}describe(e,n){return ic(vc,e,n)}override(e,n){return ic(Qi,e,n)}route(e,n,i,s){const o=Ar(this,e),l=Ar(this,i),c="_"+n;Object.defineProperties(o,{[c]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const u=this[c],h=l[s];return _t(u)?Object.assign({},h,u):lt(u,h)},set(u){this[c]=u}}})}apply(e){e.forEach(n=>n(this))}}var It=new Uv({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Bv,Fv,Hv]);function Vv(t){return!t||xt(t.size)||xt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Oh(t,e,n,i,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,n.push(s)),o>i&&(i=o),i}function $i(t,e,n){const i=t.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((e-s)*i)/i+s}function Dh(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Sc(t,e,n,i){kg(t,e,n,i,null)}function kg(t,e,n,i,s){let o,l,c,u,h,d,p,_;const v=e.pointStyle,T=e.rotation,M=e.radius;let k=(T||0)*wv;if(v&&typeof v=="object"&&(o=v.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(n,i),t.rotate(k),t.drawImage(v,-v.width/2,-v.height/2,v.width,v.height),t.restore();return}if(!(isNaN(M)||M<=0)){switch(t.beginPath(),v){default:s?t.ellipse(n,i,s/2,M,0,0,Bt):t.arc(n,i,M,0,Bt),t.closePath();break;case"triangle":d=s?s/2:M,t.moveTo(n+Math.sin(k)*d,i-Math.cos(k)*M),k+=Mh,t.lineTo(n+Math.sin(k)*d,i-Math.cos(k)*M),k+=Mh,t.lineTo(n+Math.sin(k)*d,i-Math.cos(k)*M),t.closePath();break;case"rectRounded":h=M*.516,u=M-h,l=Math.cos(k+Vi)*u,p=Math.cos(k+Vi)*(s?s/2-h:u),c=Math.sin(k+Vi)*u,_=Math.sin(k+Vi)*(s?s/2-h:u),t.arc(n-p,i-c,h,k-Ut,k-te),t.arc(n+_,i-l,h,k-te,k),t.arc(n+p,i+c,h,k,k+te),t.arc(n-_,i+l,h,k+te,k+Ut),t.closePath();break;case"rect":if(!T){u=Math.SQRT1_2*M,d=s?s/2:u,t.rect(n-d,i-u,2*d,2*u);break}k+=Vi;case"rectRot":p=Math.cos(k)*(s?s/2:M),l=Math.cos(k)*M,c=Math.sin(k)*M,_=Math.sin(k)*(s?s/2:M),t.moveTo(n-p,i-c),t.lineTo(n+_,i-l),t.lineTo(n+p,i+c),t.lineTo(n-_,i+l),t.closePath();break;case"crossRot":k+=Vi;case"cross":p=Math.cos(k)*(s?s/2:M),l=Math.cos(k)*M,c=Math.sin(k)*M,_=Math.sin(k)*(s?s/2:M),t.moveTo(n-p,i-c),t.lineTo(n+p,i+c),t.moveTo(n+_,i-l),t.lineTo(n-_,i+l);break;case"star":p=Math.cos(k)*(s?s/2:M),l=Math.cos(k)*M,c=Math.sin(k)*M,_=Math.sin(k)*(s?s/2:M),t.moveTo(n-p,i-c),t.lineTo(n+p,i+c),t.moveTo(n+_,i-l),t.lineTo(n-_,i+l),k+=Vi,p=Math.cos(k)*(s?s/2:M),l=Math.cos(k)*M,c=Math.sin(k)*M,_=Math.sin(k)*(s?s/2:M),t.moveTo(n-p,i-c),t.lineTo(n+p,i+c),t.moveTo(n+_,i-l),t.lineTo(n-_,i+l);break;case"line":l=s?s/2:Math.cos(k)*M,c=Math.sin(k)*M,t.moveTo(n-l,i-c),t.lineTo(n+l,i+c);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(k)*(s?s/2:M),i+Math.sin(k)*M);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Ns(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Ma(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ta(t){t.restore()}function $v(t,e,n,i,s){if(!e)return t.lineTo(n.x,n.y);if(s==="middle"){const o=(e.x+n.x)/2;t.lineTo(o,e.y),t.lineTo(o,n.y)}else s==="after"!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Gv(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Yv(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),xt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Xv(t,e,n,i,s){if(s.strikethrough||s.underline){const o=t.measureText(i),l=e-o.actualBoundingBoxLeft,c=e+o.actualBoundingBoxRight,u=n-o.actualBoundingBoxAscent,h=n+o.actualBoundingBoxDescent,d=s.strikethrough?(u+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(l,d),t.lineTo(c,d),t.stroke()}}function Kv(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Wr(t,e,n,i,s,o={}){const l=qt(e)?e:[e],c=o.strokeWidth>0&&o.strokeColor!=="";let u,h;for(t.save(),t.font=s.string,Yv(t,o),u=0;u<l.length;++u)h=l[u],o.backdrop&&Kv(t,o.backdrop),c&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),xt(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,n,i,o.maxWidth)),t.fillText(h,n,i,o.maxWidth),Xv(t,n,i,h,o),i+=Number(s.lineHeight);t.restore()}function ba(t,e){const{x:n,y:i,w:s,h:o,radius:l}=e;t.arc(n+l.topLeft,i+l.topLeft,l.topLeft,1.5*Ut,Ut,!0),t.lineTo(n,i+o-l.bottomLeft),t.arc(n+l.bottomLeft,i+o-l.bottomLeft,l.bottomLeft,Ut,te,!0),t.lineTo(n+s-l.bottomRight,i+o),t.arc(n+s-l.bottomRight,i+o-l.bottomRight,l.bottomRight,te,0,!0),t.lineTo(n+s,i+l.topRight),t.arc(n+s-l.topRight,i+l.topRight,l.topRight,0,-te,!0),t.lineTo(n+l.topLeft,i)}const qv=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,jv=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Zv(t,e){const n=(""+t).match(qv);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const Jv=t=>+t||0;function Xc(t,e){const n={},i=_t(e),s=i?Object.keys(e):e,o=_t(t)?i?l=>lt(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of s)n[l]=Jv(o(l));return n}function Eg(t){return Xc(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ds(t){return Xc(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ge(t){const e=Eg(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function fe(t,e){t=t||{},e=e||It.font;let n=lt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=lt(t.style,e.style);i&&!(""+i).match(jv)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:lt(t.family,e.family),lineHeight:Zv(lt(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:lt(t.weight,e.weight),string:""};return s.string=Vv(s),s}function Lt(t,e,n,i){let s,o,l;for(s=0,o=t.length;s<o;++s)if(l=t[s],l!==void 0&&(e!==void 0&&typeof l=="function"&&(l=l(e)),n!==void 0&&qt(l)&&(l=l[n%l.length]),l!==void 0))return l}function Qv(t,e,n){const{min:i,max:s}=t,o=_g(e,(s-i)/2),l=(c,u)=>n&&c===0?0:c+u;return{min:l(i,-Math.abs(o)),max:l(s,o)}}function es(t,e){return Object.assign(Object.create(t),e)}function Kc(t,e=[""],n,i,s=()=>t[0]){const o=n||t;typeof i>"u"&&(i=Dg("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:s,override:c=>Kc([c,...t],e,o,i)};return new Proxy(l,{deleteProperty(c,u){return delete c[u],delete c._keys,delete t[0][u],!0},get(c,u){return Ag(c,u,()=>aS(u,e,t,c))},getOwnPropertyDescriptor(c,u){return Reflect.getOwnPropertyDescriptor(c._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(c,u){return Lh(c).includes(u)},ownKeys(c){return Lh(c)},set(c,u,h){const d=c._storage||(c._storage=s());return c[u]=d[u]=h,delete c._keys,!0}})}function Bs(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ig(t,i),setContext:o=>Bs(t,o,n,i),override:o=>Bs(t.override(o),e,n,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete t[l],!0},get(o,l,c){return Ag(o,l,()=>eS(o,l,c))},getOwnPropertyDescriptor(o,l){return o._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(o,l,c){return t[l]=c,delete o[l],!0}})}function Ig(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:i,isScriptable:Mi(n)?n:()=>n,isIndexable:Mi(i)?i:()=>i}}const tS=(t,e)=>t?t+Uc(e):e,qc=(t,e)=>_t(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Ag(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function eS(t,e,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:l}=t;let c=i[e];return Mi(c)&&l.isScriptable(e)&&(c=nS(e,c,t,n)),qt(c)&&c.length&&(c=iS(e,c,t,l.isIndexable)),qc(e,c)&&(c=Bs(c,s,o&&o[e],l)),c}function nS(t,e,n,i){const{_proxy:s,_context:o,_subProxy:l,_stack:c}=n;if(c.has(t))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t);c.add(t);let u=e(o,l||i);return c.delete(t),qc(t,u)&&(u=jc(s._scopes,s,t,u)),u}function iS(t,e,n,i){const{_proxy:s,_context:o,_subProxy:l,_descriptors:c}=n;if(typeof o.index<"u"&&i(t))return e[o.index%e.length];if(_t(e[0])){const u=e,h=s._scopes.filter(d=>d!==u);e=[];for(const d of u){const p=jc(h,s,t,d);e.push(Bs(p,o,l&&l[t],c))}}return e}function Og(t,e,n){return Mi(t)?t(e,n):t}const sS=(t,e)=>t===!0?e:typeof t=="string"?Ji(e,t):void 0;function rS(t,e,n,i,s){for(const o of e){const l=sS(n,o);if(l){t.add(l);const c=Og(l._fallback,n,s);if(typeof c<"u"&&c!==n&&c!==i)return c}else if(l===!1&&typeof i<"u"&&n!==i)return null}return!1}function jc(t,e,n,i){const s=e._rootScopes,o=Og(e._fallback,n,i),l=[...t,...s],c=new Set;c.add(i);let u=Rh(c,l,n,o||n,i);return u===null||typeof o<"u"&&o!==n&&(u=Rh(c,l,o,u,i),u===null)?!1:Kc(Array.from(c),[""],s,o,()=>oS(e,n,i))}function Rh(t,e,n,i,s){for(;n;)n=rS(t,e,n,i,s);return n}function oS(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return qt(s)&&_t(n)?n:s||{}}function aS(t,e,n,i){let s;for(const o of e)if(s=Dg(tS(o,t),n),typeof s<"u")return qc(t,s)?jc(n,i,t,s):s}function Dg(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function Lh(t){let e=t._keys;return e||(e=t._keys=lS(t._scopes)),e}function lS(t){const e=new Set;for(const n of t)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}const cS=Number.EPSILON||1e-14,Fs=(t,e)=>e<t.length&&!t[e].skip&&t[e],Rg=t=>t==="x"?"y":"x";function fS(t,e,n,i){const s=t.skip?e:t,o=e,l=n.skip?e:n,c=yc(o,s),u=yc(l,o);let h=c/(c+u),d=u/(c+u);h=isNaN(h)?0:h,d=isNaN(d)?0:d;const p=i*h,_=i*d;return{previous:{x:o.x-p*(l.x-s.x),y:o.y-p*(l.y-s.y)},next:{x:o.x+_*(l.x-s.x),y:o.y+_*(l.y-s.y)}}}function uS(t,e,n){const i=t.length;let s,o,l,c,u,h=Fs(t,0);for(let d=0;d<i-1;++d)if(u=h,h=Fs(t,d+1),!(!u||!h)){if(ji(e[d],0,cS)){n[d]=n[d+1]=0;continue}s=n[d]/e[d],o=n[d+1]/e[d],c=Math.pow(s,2)+Math.pow(o,2),!(c<=9)&&(l=3/Math.sqrt(c),n[d]=s*l*e[d],n[d+1]=o*l*e[d])}}function hS(t,e,n="x"){const i=Rg(n),s=t.length;let o,l,c,u=Fs(t,0);for(let h=0;h<s;++h){if(l=c,c=u,u=Fs(t,h+1),!c)continue;const d=c[n],p=c[i];l&&(o=(d-l[n])/3,c[`cp1${n}`]=d-o,c[`cp1${i}`]=p-o*e[h]),u&&(o=(u[n]-d)/3,c[`cp2${n}`]=d+o,c[`cp2${i}`]=p+o*e[h])}}function dS(t,e="x"){const n=Rg(e),i=t.length,s=Array(i).fill(0),o=Array(i);let l,c,u,h=Fs(t,0);for(l=0;l<i;++l)if(c=u,u=h,h=Fs(t,l+1),!!u){if(h){const d=h[e]-u[e];s[l]=d!==0?(h[n]-u[n])/d:0}o[l]=c?h?an(s[l-1])!==an(s[l])?0:(s[l-1]+s[l])/2:s[l-1]:s[l]}uS(t,s,o),hS(t,o,e)}function qo(t,e,n){return Math.max(Math.min(t,n),e)}function gS(t,e){let n,i,s,o,l,c=Ns(t[0],e);for(n=0,i=t.length;n<i;++n)l=o,o=c,c=n<i-1&&Ns(t[n+1],e),o&&(s=t[n],l&&(s.cp1x=qo(s.cp1x,e.left,e.right),s.cp1y=qo(s.cp1y,e.top,e.bottom)),c&&(s.cp2x=qo(s.cp2x,e.left,e.right),s.cp2y=qo(s.cp2y,e.top,e.bottom)))}function pS(t,e,n,i,s){let o,l,c,u;if(e.spanGaps&&(t=t.filter(h=>!h.skip)),e.cubicInterpolationMode==="monotone")dS(t,s);else{let h=i?t[t.length-1]:t[0];for(o=0,l=t.length;o<l;++o)c=t[o],u=fS(h,c,t[Math.min(o+1,l-(i?0:1))%l],e.tension),c.cp1x=u.previous.x,c.cp1y=u.previous.y,c.cp2x=u.next.x,c.cp2y=u.next.y,h=c}e.capBezierPoints&&gS(t,n)}function Zc(){return typeof window<"u"&&typeof document<"u"}function Jc(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function xa(t,e,n){let i;return typeof t=="string"?(i=parseInt(t,10),t.indexOf("%")!==-1&&(i=i/100*e.parentNode[n])):i=t,i}const Pa=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function mS(t,e){return Pa(t).getPropertyValue(e)}const _S=["top","right","bottom","left"];function Zi(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=_S[s];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const bS=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function xS(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:o}=i;let l=!1,c,u;if(bS(s,o,t.target))c=s,u=o;else{const h=e.getBoundingClientRect();c=i.clientX-h.left,u=i.clientY-h.top,l=!0}return{x:c,y:u,box:l}}function Tn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Pa(n),o=s.boxSizing==="border-box",l=Zi(s,"padding"),c=Zi(s,"border","width"),{x:u,y:h,box:d}=xS(t,n),p=l.left+(d&&c.left),_=l.top+(d&&c.top);let{width:v,height:T}=e;return o&&(v-=l.width+c.width,T-=l.height+c.height),{x:Math.round((u-p)/v*n.width/i),y:Math.round((h-_)/T*n.height/i)}}function yS(t,e,n){let i,s;if(e===void 0||n===void 0){const o=t&&Jc(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const l=o.getBoundingClientRect(),c=Pa(o),u=Zi(c,"border","width"),h=Zi(c,"padding");e=l.width-h.width-u.width,n=l.height-h.height-u.height,i=xa(c.maxWidth,o,"clientWidth"),s=xa(c.maxHeight,o,"clientHeight")}}return{width:e,height:n,maxWidth:i||_a,maxHeight:s||_a}}const jo=t=>Math.round(t*10)/10;function vS(t,e,n,i){const s=Pa(t),o=Zi(s,"margin"),l=xa(s.maxWidth,t,"clientWidth")||_a,c=xa(s.maxHeight,t,"clientHeight")||_a,u=yS(t,e,n);let{width:h,height:d}=u;if(s.boxSizing==="content-box"){const _=Zi(s,"border","width"),v=Zi(s,"padding");h-=v.width+_.width,d-=v.height+_.height}return h=Math.max(0,h-o.width),d=Math.max(0,i?h/i:d-o.height),h=jo(Math.min(h,l,u.maxWidth)),d=jo(Math.min(d,c,u.maxHeight)),h&&!d&&(d=jo(h/2)),(e!==void 0||n!==void 0)&&i&&u.height&&d>u.height&&(d=u.height,h=jo(Math.floor(d*i))),{width:h,height:d}}function Nh(t,e,n){const i=e||1,s=Math.floor(t.height*i),o=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||l.height!==s||l.width!==o?(t.currentDevicePixelRatio=i,l.height=s,l.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}const SS=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Zc()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Bh(t,e){const n=mS(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Xi(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function wS(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:i==="middle"?n<.5?t.y:e.y:i==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function MS(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},l=Xi(t,s,n),c=Xi(s,o,n),u=Xi(o,e,n),h=Xi(l,c,n),d=Xi(c,u,n);return Xi(h,d,n)}const TS=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},PS=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Rs(t,e,n){return t?TS(e,n):PS()}function Lg(t,e){let n,i;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function Ng(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Bg(t){return t==="angle"?{between:Fr,compare:kv,normalize:Mn}:{between:Qn,compare:(e,n)=>e-n,normalize:e=>e}}function Fh({start:t,end:e,count:n,loop:i,style:s}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n===0,style:s}}function CS(t,e,n){const{property:i,start:s,end:o}=n,{between:l,normalize:c}=Bg(i),u=e.length;let{start:h,end:d,loop:p}=t,_,v;if(p){for(h+=u,d+=u,_=0,v=u;_<v&&l(c(e[h%u][i]),s,o);++_)h--,d--;h%=u,d%=u}return d<h&&(d+=u),{start:h,end:d,loop:p,style:t.style}}function Fg(t,e,n){if(!n)return[t];const{property:i,start:s,end:o}=n,l=e.length,{compare:c,between:u,normalize:h}=Bg(i),{start:d,end:p,loop:_,style:v}=CS(t,e,n),T=[];let M=!1,k=null,A,D,W;const U=()=>u(s,W,A)&&c(s,W)!==0,N=()=>c(o,A)===0||u(o,W,A),G=()=>M||U(),$=()=>!M||N();for(let X=d,Z=d;X<=p;++X)D=e[X%l],!D.skip&&(A=h(D[i]),A!==W&&(M=u(A,s,o),k===null&&G()&&(k=c(A,s)===0?X:Z),k!==null&&$()&&(T.push(Fh({start:k,end:X,loop:_,count:l,style:v})),k=null),Z=X,W=A));return k!==null&&T.push(Fh({start:k,end:p,loop:_,count:l,style:v})),T}function Wg(t,e){const n=[],i=t.segments;for(let s=0;s<i.length;s++){const o=Fg(i[s],t.points,e);o.length&&n.push(...o)}return n}function kS(t,e,n,i){let s=0,o=e-1;if(n&&!i)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,n&&(o+=s);o>s&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}function ES(t,e,n,i){const s=t.length,o=[];let l=e,c=t[e],u;for(u=e+1;u<=n;++u){const h=t[u%s];h.skip||h.stop?c.skip||(i=!1,o.push({start:e%s,end:(u-1)%s,loop:i}),e=l=h.stop?u:null):(l=u,c.skip&&(e=u)),c=h}return l!==null&&o.push({start:e%s,end:l%s,loop:i}),o}function IS(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const o=!!t._loop,{start:l,end:c}=kS(n,s,o,i);if(i===!0)return Wh(t,[{start:l,end:c,loop:o}],n,e);const u=c<l?c+s:c,h=!!t._fullLoop&&l===0&&c===s-1;return Wh(t,ES(n,l,u,h),n,e)}function Wh(t,e,n,i){return!i||!i.setContext||!n?e:AS(t,e,n,i)}function AS(t,e,n,i){const s=t._chart.getContext(),o=zh(t.options),{_datasetIndex:l,options:{spanGaps:c}}=t,u=n.length,h=[];let d=o,p=e[0].start,_=p;function v(T,M,k,A){const D=c?-1:1;if(T!==M){for(T+=u;n[T%u].skip;)T-=D;for(;n[M%u].skip;)M+=D;T%u!==M%u&&(h.push({start:T%u,end:M%u,loop:k,style:A}),d=A,p=M%u)}}for(const T of e){p=c?p:T.start;let M=n[p%u],k;for(_=p+1;_<=T.end;_++){const A=n[_%u];k=zh(i.setContext(es(s,{type:"segment",p0:M,p1:A,p0DataIndex:(_-1)%u,p1DataIndex:_%u,datasetIndex:l}))),OS(k,d)&&v(p,_-1,T.loop,d),M=A,d=k}p<_-1&&v(p,_-1,T.loop,d)}return h}function zh(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function OS(t,e){if(!e)return!1;const n=[],i=function(s,o){return Gc(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function Zo(t,e,n){return t.options.clip?t[n]:e[n]}function DS(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Zo(n,e,"left"),right:Zo(n,e,"right"),top:Zo(i,e,"top"),bottom:Zo(i,e,"bottom")}:e}function zg(t,e){const n=e._clip;if(n.disabled)return!1;const i=DS(e,t.chartArea);return{left:n.left===!1?0:i.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:i.right+(n.right===!0?0:n.right),top:n.top===!1?0:i.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:i.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
12
|
-
* Chart.js v4.4.9
|
|
13
|
-
* https://www.chartjs.org
|
|
14
|
-
* (c) 2025 Chart.js Contributors
|
|
15
|
-
* Released under the MIT License
|
|
16
|
-
*/class RS{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,s){const o=n.listeners[s],l=n.duration;o.forEach(c=>c({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(i-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=wg.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let l=o.length-1,c=!1,u;for(;l>=0;--l)u=o[l],u._active?(u._total>i.duration&&(i.duration=u._total),u.tick(e),c=!0):(o[l]=o[o.length-1],o.pop());c&&(s.draw(),this._notify(s,i,e,"progress")),o.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yn=new RS;const Hh="transparent",LS={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Ih(t||Hh),s=i.valid&&Ih(e||Hh);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class NS{constructor(e,n,i,s){const o=n[i];s=Lt([e.to,s,o,e.from]);const l=Lt([e.from,o,s]);this._active=!0,this._fn=e.fn||LS[e.type||typeof l],this._easing=Ir[e.easing]||Ir.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=l,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,l=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=Lt([e.to,n,s,e.from]),this._from=Lt([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,s=this._prop,o=this._from,l=this._loop,c=this._to;let u;if(this._active=o!==c&&(l||n<i),!this._active){this._target[s]=c,this._notify(!0);return}if(n<0){this._target[s]=o;return}u=n/i%2,u=l&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[s]=this._fn(o,c,u)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][n]()}}class Hg{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!_t(e))return;const n=Object.keys(It.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!_t(o))return;const l={};for(const c of n)l[c]=o[c];(qt(o.properties)&&o.properties||[s]).forEach(c=>{(c===s||!i.has(c))&&i.set(c,l)})})}_animateOptions(e,n){const i=n.options,s=FS(e,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&BS(e.options.$animations,i).then(()=>{e.options=i},()=>{}),o}_createAnimations(e,n){const i=this._properties,s=[],o=e.$animations||(e.$animations={}),l=Object.keys(n),c=Date.now();let u;for(u=l.length-1;u>=0;--u){const h=l[u];if(h.charAt(0)==="$")continue;if(h==="options"){s.push(...this._animateOptions(e,n));continue}const d=n[h];let p=o[h];const _=i.get(h);if(p)if(_&&p.active()){p.update(_,d,c);continue}else p.cancel();if(!_||!_.duration){e[h]=d;continue}o[h]=p=new NS(_,e,h,d),s.push(p)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return Yn.add(this._chart,i),!0}}function BS(t,e){const n=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const o=t[i[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function FS(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Uh(t,e){const n=t&&t.options||{},i=n.reverse,s=n.min===void 0?e:0,o=n.max===void 0?e:0;return{start:i?o:s,end:i?s:o}}function WS(t,e,n){if(n===!1)return!1;const i=Uh(t,n),s=Uh(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function zS(t){let e,n,i,s;return _t(t)?(e=t.top,n=t.right,i=t.bottom,s=t.left):e=n=i=s=t,{top:e,right:n,bottom:i,left:s,disabled:t===!1}}function Ug(t,e){const n=[],i=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=i.length;s<o;++s)n.push(i[s].index);return n}function Vh(t,e,n,i={}){const s=t.keys,o=i.mode==="single";let l,c,u,h;if(e===null)return;let d=!1;for(l=0,c=s.length;l<c;++l){if(u=+s[l],u===n){if(d=!0,i.all)continue;break}h=t.values[u],Zt(h)&&(o||e===0||an(e)===an(h))&&(e+=h)}return!d&&!i.all?0:e}function HS(t,e){const{iScale:n,vScale:i}=e,s=n.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",l=Object.keys(t),c=new Array(l.length);let u,h,d;for(u=0,h=l.length;u<h;++u)d=l[u],c[u]={[s]:d,[o]:t[d]};return c}function sc(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function US(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function VS(t){const{min:e,max:n,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function $S(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function $h(t,e,n,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const o=t[s.index];if(n&&o>0||!n&&o<0)return s.index}return null}function Gh(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:o,vScale:l,index:c}=i,u=o.axis,h=l.axis,d=US(o,l,i),p=e.length;let _;for(let v=0;v<p;++v){const T=e[v],{[u]:M,[h]:k}=T,A=T._stacks||(T._stacks={});_=A[h]=$S(s,d,M),_[c]=k,_._top=$h(_,l,!0,i.type),_._bottom=$h(_,l,!1,i.type);const D=_._visualValues||(_._visualValues={});D[c]=k}}function rc(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function GS(t,e){return es(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function YS(t,e,n){return es(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function xr(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const s of e){const o=s._stacks;if(!o||o[i]===void 0||o[i][n]===void 0)return;delete o[i][n],o[i]._visualValues!==void 0&&o[i]._visualValues[n]!==void 0&&delete o[i]._visualValues[n]}}}const oc=t=>t==="reset"||t==="none",Yh=(t,e)=>e?t:Object.assign({},t),XS=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Ug(n,!0),values:null};class Yr{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=sc(e.vScale,e),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(e){this.index!==e&&xr(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(p,_,v,T)=>p==="x"?_:p==="r"?T:v,o=n.xAxisID=lt(i.xAxisID,rc(e,"x")),l=n.yAxisID=lt(i.yAxisID,rc(e,"y")),c=n.rAxisID=lt(i.rAxisID,rc(e,"r")),u=n.indexAxis,h=n.iAxisID=s(u,o,l,c),d=n.vAxisID=s(u,l,o,c);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ch(this._data,this),e._stacked&&xr(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(_t(n)){const s=this._cachedMeta;this._data=HS(n,s)}else if(i!==n){if(i){Ch(i,this);const s=this._cachedMeta;xr(s),s._parsed=[]}n&&Object.isExtensible(n)&&Ov(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=sc(n.vScale,n),n.stack!==i.stack&&(s=!0,xr(n),n.stack=i.stack),this._resyncElements(e),(s||o!==n._stacked)&&(Gh(this,n._parsed),n._stacked=sc(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:l}=i,c=o.axis;let u=e===0&&n===s.length?!0:i._sorted,h=e>0&&i._parsed[e-1],d,p,_;if(this._parsing===!1)i._parsed=s,i._sorted=!0,_=s;else{qt(s[e])?_=this.parseArrayData(i,s,e,n):_t(s[e])?_=this.parseObjectData(i,s,e,n):_=this.parsePrimitiveData(i,s,e,n);const v=()=>p[c]===null||h&&p[c]<h[c];for(d=0;d<n;++d)i._parsed[d+e]=p=_[d],u&&(v()&&(u=!1),h=p);i._sorted=u}l&&Gh(this,_)}parsePrimitiveData(e,n,i,s){const{iScale:o,vScale:l}=e,c=o.axis,u=l.axis,h=o.getLabels(),d=o===l,p=new Array(s);let _,v,T;for(_=0,v=s;_<v;++_)T=_+i,p[_]={[c]:d||o.parse(h[T],T),[u]:l.parse(n[T],T)};return p}parseArrayData(e,n,i,s){const{xScale:o,yScale:l}=e,c=new Array(s);let u,h,d,p;for(u=0,h=s;u<h;++u)d=u+i,p=n[d],c[u]={x:o.parse(p[0],d),y:l.parse(p[1],d)};return c}parseObjectData(e,n,i,s){const{xScale:o,yScale:l}=e,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,h=new Array(s);let d,p,_,v;for(d=0,p=s;d<p;++d)_=d+i,v=n[_],h[d]={x:o.parse(Ji(v,c),_),y:l.parse(Ji(v,u),_)};return h}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,i){const s=this.chart,o=this._cachedMeta,l=n[e.axis],c={keys:Ug(s,!0),values:n._stacks[e.axis]._visualValues};return Vh(c,l,o.index,{mode:i})}updateRangeFromParsed(e,n,i,s){const o=i[n.axis];let l=o===null?NaN:o;const c=s&&i._stacks[n.axis];s&&c&&(s.values=c,l=Vh(s,o,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&e===i.iScale,l=s.length,c=this._getOtherScale(e),u=XS(n,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:p}=VS(c);let _,v;function T(){v=s[_];const M=v[c.axis];return!Zt(v[e.axis])||d>M||p<M}for(_=0;_<l&&!(!T()&&(this.updateRangeFromParsed(h,e,v,u),o));++_);if(o){for(_=l-1;_>=0;--_)if(!T()){this.updateRangeFromParsed(h,e,v,u);break}}return h}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let s,o,l;for(s=0,o=n.length;s<o;++s)l=n[s][e.axis],Zt(l)&&i.push(l);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,i=n.iScale,s=n.vScale,o=this.getParsed(e);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=zS(lt(this.options.clip,WS(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,i=this._cachedMeta,s=i.data||[],o=n.chartArea,l=[],c=this._drawStart||0,u=this._drawCount||s.length-c,h=this.options.drawActiveElementsOnTop;let d;for(i.dataset&&i.dataset.draw(e,o,c,u),d=c;d<c+u;++d){const p=s[d];p.hidden||(p.active&&h?l.push(p):p.draw(e,o))}for(d=0;d<l.length;++d)l[d].draw(e,o)}getStyle(e,n){const i=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,n,i){const s=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];o=l.$context||(l.$context=YS(this.getContext(),e,l)),o.parsed=this.getParsed(e),o.raw=s.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=GS(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=i,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",i){const s=n==="active",o=this._cachedDataOpts,l=e+"-"+n,c=o[l],u=this.enableOptionSharing&&Br(i);if(c)return Yh(c,u);const h=this.chart.config,d=h.datasetElementScopeKeys(this._type,e),p=s?[`${e}Hover`,"hover",e,""]:[e,""],_=h.getOptionScopes(this.getDataset(),d),v=Object.keys(It.elements[e]),T=()=>this.getContext(i,s,n),M=h.resolveNamedOptions(_,v,T,p);return M.$shared&&(M.$shared=u,o[l]=Object.freeze(Yh(M,u))),M}_resolveAnimations(e,n,i){const s=this.chart,o=this._cachedDataOpts,l=`animation-${n}`,c=o[l];if(c)return c;let u;if(s.options.animation!==!1){const d=this.chart.config,p=d.datasetAnimationScopeKeys(this._type,n),_=d.getOptionScopes(this.getDataset(),p);u=d.createResolver(_,this.getContext(e,i,n))}const h=new Hg(s,u&&u.animations);return u&&u._cacheable&&(o[l]=Object.freeze(h)),h}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||oc(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),s=this._sharedOptions,o=this.getSharedOptions(i),l=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,i),{sharedOptions:o,includeOptions:l}}updateElement(e,n,i,s){oc(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!oc(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,s){e.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(e,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[c,u,h]of this._syncList)this[c](u,h);this._syncList=[];const s=i.length,o=n.length,l=Math.min(o,s);l&&this.parse(0,l),o>s?this._insertElements(s,o-s,e):o<s&&this._removeElements(o,s-o)}_insertElements(e,n,i=!0){const s=this._cachedMeta,o=s.data,l=e+n;let c;const u=h=>{for(h.length+=n,c=h.length-1;c>=l;c--)h[c]=h[c-n]};for(u(o),c=e;c<l;++c)o[c]=new this.dataElementType;this._parsing&&u(s._parsed),this.parse(e,n),i&&this.updateElements(o,e,n,"reset")}updateElements(e,n,i,s){}_removeElements(e,n){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(e,n);i._stacked&&xr(i,s)}i.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,i,s]=e;this[n](i,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function KS(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let s=0,o=n.length;s<o;s++)i=i.concat(n[s].controller.getAllParsedValues(t));t._cache.$bar=Sg(i.sort((s,o)=>s-o))}return t._cache.$bar}function qS(t){const e=t.iScale,n=KS(e,t.type);let i=e._length,s,o,l,c;const u=()=>{l===32767||l===-32768||(Br(c)&&(i=Math.min(i,Math.abs(l-c)||i)),c=l)};for(s=0,o=n.length;s<o;++s)l=e.getPixelForValue(n[s]),u();for(c=void 0,s=0,o=e.ticks.length;s<o;++s)l=e.getPixelForTick(s),u();return i}function jS(t,e,n,i){const s=n.barThickness;let o,l;return xt(s)?(o=e.min*n.categoryPercentage,l=n.barPercentage):(o=s*i,l=1),{chunk:o/i,ratio:l,start:e.pixels[t]-o/2}}function ZS(t,e,n,i){const s=e.pixels,o=s[t];let l=t>0?s[t-1]:null,c=t<s.length-1?s[t+1]:null;const u=n.categoryPercentage;l===null&&(l=o-(c===null?e.end-e.start:c-o)),c===null&&(c=o+o-l);const h=o-(o-Math.min(l,c))/2*u;return{chunk:Math.abs(c-l)/2*u/i,ratio:n.barPercentage,start:h}}function JS(t,e,n,i){const s=n.parse(t[0],i),o=n.parse(t[1],i),l=Math.min(s,o),c=Math.max(s,o);let u=l,h=c;Math.abs(l)>Math.abs(c)&&(u=c,h=l),e[n.axis]=h,e._custom={barStart:u,barEnd:h,start:s,end:o,min:l,max:c}}function Vg(t,e,n,i){return qt(t)?JS(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Xh(t,e,n,i){const s=t.iScale,o=t.vScale,l=s.getLabels(),c=s===o,u=[];let h,d,p,_;for(h=n,d=n+i;h<d;++h)_=e[h],p={},p[s.axis]=c||s.parse(l[h],h),u.push(Vg(_,p,o,h));return u}function ac(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function QS(t,e,n){return t!==0?an(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function tw(t){let e,n,i,s,o;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(s="end",o="start"):(s="start",o="end"),{start:n,end:i,reverse:e,top:s,bottom:o}}function ew(t,e,n,i){let s=e.borderSkipped;const o={};if(!s){t.borderSkipped=o;return}if(s===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:c,reverse:u,top:h,bottom:d}=tw(t);s==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=h:(n._bottom||0)===i?s=d:(o[Kh(d,l,c,u)]=!0,s=h)),o[Kh(s,l,c,u)]=!0,t.borderSkipped=o}function Kh(t,e,n,i){return i?(t=nw(t,e,n),t=qh(t,n,e)):t=qh(t,e,n),t}function nw(t,e,n){return t===e?n:t===n?e:t}function qh(t,e,n){return t==="start"?e:t==="end"?n:t}function iw(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class sw extends Yr{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(e,n,i,s){return Xh(e,n,i,s)}parseArrayData(e,n,i,s){return Xh(e,n,i,s)}parseObjectData(e,n,i,s){const{iScale:o,vScale:l}=e,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,h=o.axis==="x"?c:u,d=l.axis==="x"?c:u,p=[];let _,v,T,M;for(_=i,v=i+s;_<v;++_)M=n[_],T={},T[o.axis]=o.parse(Ji(M,h),_),p.push(Vg(Ji(M,d),T,l,_));return p}updateRangeFromParsed(e,n,i,s){super.updateRangeFromParsed(e,n,i,s);const o=i._custom;o&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:i,vScale:s}=n,o=this.getParsed(e),l=o._custom,c=ac(l)?"["+l.start+", "+l.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,i,s){const o=s==="reset",{index:l,_cachedMeta:{vScale:c}}=this,u=c.getBasePixel(),h=c.isHorizontal(),d=this._getRuler(),{sharedOptions:p,includeOptions:_}=this._getSharedOptions(n,s);for(let v=n;v<n+i;v++){const T=this.getParsed(v),M=o||xt(T[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(v),k=this._calculateBarIndexPixels(v,d),A=(T._stacks||{})[c.axis],D={horizontal:h,base:M.base,enableBorderRadius:!A||ac(T._custom)||l===A._top||l===A._bottom,x:h?M.head:k.center,y:h?k.center:M.head,height:h?k.size:Math.abs(M.size),width:h?Math.abs(M.size):k.size};_&&(D.options=p||this.resolveDataElementOptions(v,e[v].active?"active":s));const W=D.options||e[v].options;ew(D,W,A,l),iw(D,W,d.ratio),this.updateElement(e[v],v,D,s)}}_getStacks(e,n){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),o=i.options.stacked,l=[],c=this._cachedMeta.controller.getParsed(n),u=c&&c[i.axis],h=d=>{const p=d._parsed.find(v=>v[i.axis]===u),_=p&&p[d.vScale.axis];if(xt(_)||isNaN(_))return!0};for(const d of s)if(!(n!==void 0&&h(d))&&((o===!1||l.indexOf(d.stack)===-1||o===void 0&&d.stack===void 0)&&l.push(d.stack),d.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const s=this._getStacks(e,i),o=n!==void 0?s.indexOf(n):-1;return o===-1?s.length-1:o}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,s=[];let o,l;for(o=0,l=n.data.length;o<l;++o)s.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const c=e.barThickness;return{min:c||qS(n),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:i,index:s},options:{base:o,minBarLength:l}}=this,c=o||0,u=this.getParsed(e),h=u._custom,d=ac(h);let p=u[n.axis],_=0,v=i?this.applyStack(n,u,i):p,T,M;v!==p&&(_=v-p,v=p),d&&(p=h.barStart,v=h.barEnd-h.barStart,p!==0&&an(p)!==an(h.barEnd)&&(_=0),_+=p);const k=!xt(o)&&!d?o:_;let A=n.getPixelForValue(k);if(this.chart.getDataVisibility(e)?T=n.getPixelForValue(_+v):T=A,M=T-A,Math.abs(M)<l){M=QS(M,n,c)*l,p===c&&(A-=M/2);const D=n.getPixelForDecimal(0),W=n.getPixelForDecimal(1),U=Math.min(D,W),N=Math.max(D,W);A=Math.max(Math.min(A,N),U),T=A+M,i&&!d&&(u._stacks[n.axis]._visualValues[s]=n.getValueForPixel(T)-n.getValueForPixel(A))}if(A===n.getPixelForValue(c)){const D=an(M)*n.getLineWidthForValue(c)/2;A+=D,M-=D}return{size:M,base:A,head:T,center:T+M/2}}_calculateBarIndexPixels(e,n){const i=n.scale,s=this.options,o=s.skipNull,l=lt(s.maxBarThickness,1/0);let c,u;if(n.grouped){const h=o?this._getStackCount(e):n.stackCount,d=s.barThickness==="flex"?ZS(e,n,s,h):jS(e,n,s,h),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);c=d.start+d.chunk*p+d.chunk/2,u=Math.min(l,d.chunk*d.ratio)}else c=i.getPixelForValue(this.getParsed(e)[i.axis],e),u=Math.min(l,n.min*n.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}}draw(){const e=this._cachedMeta,n=e.vScale,i=e.data,s=i.length;let o=0;for(;o<s;++o)this.getParsed(o)[n.axis]!==null&&!i[o].hidden&&i[o].draw(this._ctx)}}function rw(t,e,n){let i=1,s=1,o=0,l=0;if(e<Bt){const c=t,u=c+e,h=Math.cos(c),d=Math.sin(c),p=Math.cos(u),_=Math.sin(u),v=(W,U,N)=>Fr(W,c,u,!0)?1:Math.max(U,U*n,N,N*n),T=(W,U,N)=>Fr(W,c,u,!0)?-1:Math.min(U,U*n,N,N*n),M=v(0,h,p),k=v(te,d,_),A=T(Ut,h,p),D=T(Ut+te,d,_);i=(M-A)/2,s=(k-D)/2,o=-(M+A)/2,l=-(k+D)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:l}}class ow extends Yr{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:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((o,l)=>{const u=e.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:s,lineWidth:u.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let o=u=>+i[u];if(_t(i[e])){const{key:u="value"}=this._parsing;o=h=>+Ji(i[h],u)}let l,c;for(l=e,c=e+n;l<c;++l)s._parsed[l]=o(l)}}_getRotation(){return Jn(this.options.rotation-90)}_getCircumference(){return Jn(this.options.circumference)}_getRotationExtents(){let e=Bt,n=-Bt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,o=s._getRotation(),l=s._getCircumference();e=Math.min(e,o),n=Math.max(n,o+l)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:i}=n,s=this._cachedMeta,o=s.data,l=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,c=Math.max((Math.min(i.width,i.height)-l)/2,0),u=Math.min(mv(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:d,rotation:p}=this._getRotationExtents(),{ratioX:_,ratioY:v,offsetX:T,offsetY:M}=rw(p,d,u),k=(i.width-l)/_,A=(i.height-l)/v,D=Math.max(Math.min(k,A)/2,0),W=_g(this.options.radius,D),U=Math.max(W*u,0),N=(W-U)/this._getVisibleDatasetWeightTotal();this.offsetX=T*W,this.offsetY=M*W,s.total=this.calculateTotal(),this.outerRadius=W-N*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-N*h,0),this.updateElements(o,0,o.length,e)}_circumference(e,n){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*o/Bt)}updateElements(e,n,i,s){const o=s==="reset",l=this.chart,c=l.chartArea,h=l.options.animation,d=(c.left+c.right)/2,p=(c.top+c.bottom)/2,_=o&&h.animateScale,v=_?0:this.innerRadius,T=_?0:this.outerRadius,{sharedOptions:M,includeOptions:k}=this._getSharedOptions(n,s);let A=this._getRotation(),D;for(D=0;D<n;++D)A+=this._circumference(D,o);for(D=n;D<n+i;++D){const W=this._circumference(D,o),U=e[D],N={x:d+this.offsetX,y:p+this.offsetY,startAngle:A,endAngle:A+W,circumference:W,outerRadius:T,innerRadius:v};k&&(N.options=M||this.resolveDataElementOptions(D,U.active?"active":s)),A+=W,this.updateElement(U,D,N,s)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let i=0,s;for(s=0;s<n.length;s++){const o=e._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?Bt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=wa(n._parsed[e],i.options.locale);return{label:s[e]||"",value:o}}getMaxBorderWidth(e){let n=0;const i=this.chart;let s,o,l,c,u;if(!e){for(s=0,o=i.data.datasets.length;s<o;++s)if(i.isDatasetVisible(s)){l=i.getDatasetMeta(s),e=l.data,c=l.controller;break}}if(!e)return 0;for(s=0,o=e.length;s<o;++s)u=c.resolveDataElementOptions(s),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let i=0,s=e.length;i<s;++i){const o=this.resolveDataElementOptions(i);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(e){return Math.max(lt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class aw extends Yr{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(e){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=n,l=this.chart._animationsDisabled;let{start:c,count:u}=Tg(n,s,l);this._drawStart=c,this._drawCount=u,Pg(n)&&(c=0,u=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const h=this.resolveDatasetElementOptions(e);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!l,options:h},e),this.updateElements(s,c,u,e)}updateElements(e,n,i,s){const o=s==="reset",{iScale:l,vScale:c,_stacked:u,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(n,s),_=l.axis,v=c.axis,{spanGaps:T,segment:M}=this.options,k=Ls(T)?T:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||o||s==="none",D=n+i,W=e.length;let U=n>0&&this.getParsed(n-1);for(let N=0;N<W;++N){const G=e[N],$=A?G:{};if(N<n||N>=D){$.skip=!0;continue}const X=this.getParsed(N),Z=xt(X[v]),rt=$[_]=l.getPixelForValue(X[_],N),st=$[v]=o||Z?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,X,u):X[v],N);$.skip=isNaN(rt)||isNaN(st)||Z,$.stop=N>0&&Math.abs(X[_]-U[_])>k,M&&($.parsed=X,$.raw=h.data[N]),p&&($.options=d||this.resolveDataElementOptions(N,G.active?"active":s)),A||this.updateElement(G,N,$,s),U=X}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),l=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class lw extends ow{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class cw extends Yr{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=n,l=this.getParsed(e),c=s.getLabelForValue(l.x),u=o.getLabelForValue(l.y);return{label:i[e]||"",value:"("+c+", "+u+")"}}update(e){const n=this._cachedMeta,{data:i=[]}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=Tg(n,i,s);if(this._drawStart=o,this._drawCount=l,Pg(n)&&(o=0,l=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:u}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!u._decimated,c.points=i;const h=this.resolveDatasetElementOptions(e);h.segment=this.options.segment,this.updateElement(c,void 0,{animated:!s,options:h},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(i,o,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,i,s){const o=s==="reset",{iScale:l,vScale:c,_stacked:u,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(n,s),p=this.getSharedOptions(d),_=this.includeOptions(s,p),v=l.axis,T=c.axis,{spanGaps:M,segment:k}=this.options,A=Ls(M)?M:Number.POSITIVE_INFINITY,D=this.chart._animationsDisabled||o||s==="none";let W=n>0&&this.getParsed(n-1);for(let U=n;U<n+i;++U){const N=e[U],G=this.getParsed(U),$=D?N:{},X=xt(G[T]),Z=$[v]=l.getPixelForValue(G[v],U),rt=$[T]=o||X?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,G,u):G[T],U);$.skip=isNaN(Z)||isNaN(rt)||X,$.stop=U>0&&Math.abs(G[v]-W[v])>A,k&&($.parsed=G,$.raw=h.data[U]),_&&($.options=p||this.resolveDataElementOptions(U,N.active?"active":s)),D||this.updateElement(N,U,$,s),W=G}this.updateSharedOptions(p,s,d)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let c=0;for(let u=n.length-1;u>=0;--u)c=Math.max(c,n[u].size(this.resolveDataElementOptions(u))/2);return c>0&&c}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,l)/2}}function Gi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qc{static override(e){Object.assign(Qc.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return Gi()}parse(){return Gi()}format(){return Gi()}add(){return Gi()}diff(){return Gi()}startOf(){return Gi()}endOf(){return Gi()}}var fw={_date:Qc};function uw(t,e,n,i){const{controller:s,data:o,_sorted:l}=t,c=s._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&e===c.axis&&e!=="r"&&l&&o.length){const h=c._reversePixels?Iv:qi;if(i){if(s._sharedOptions){const d=o[0],p=typeof d.getRange=="function"&&d.getRange(e);if(p){const _=h(o,e,n-p),v=h(o,e,n+p);return{lo:_.lo,hi:v.hi}}}}else{const d=h(o,e,n);if(u){const{vScale:p}=s._cachedMeta,{_parsed:_}=t,v=_.slice(0,d.lo+1).reverse().findIndex(M=>!xt(M[p.axis]));d.lo-=Math.max(0,v);const T=_.slice(d.hi).findIndex(M=>!xt(M[p.axis]));d.hi+=Math.max(0,T)}return d}}return{lo:0,hi:o.length-1}}function Ca(t,e,n,i,s){const o=t.getSortedVisibleDatasetMetas(),l=n[e];for(let c=0,u=o.length;c<u;++c){const{index:h,data:d}=o[c],{lo:p,hi:_}=uw(o[c],e,l,s);for(let v=p;v<=_;++v){const T=d[v];T.skip||i(T,h,v)}}}function hw(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(i,s){const o=e?Math.abs(i.x-s.x):0,l=n?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(l,2))}}function lc(t,e,n,i,s){const o=[];return!s&&!t.isPointInArea(e)||Ca(t,n,e,function(c,u,h){!s&&!Ns(c,t.chartArea,0)||c.inRange(e.x,e.y,i)&&o.push({element:c,datasetIndex:u,index:h})},!0),o}function dw(t,e,n,i){let s=[];function o(l,c,u){const{startAngle:h,endAngle:d}=l.getProps(["startAngle","endAngle"],i),{angle:p}=yg(l,{x:e.x,y:e.y});Fr(p,h,d)&&s.push({element:l,datasetIndex:c,index:u})}return Ca(t,n,e,o),s}function gw(t,e,n,i,s,o){let l=[];const c=hw(n);let u=Number.POSITIVE_INFINITY;function h(d,p,_){const v=d.inRange(e.x,e.y,s);if(i&&!v)return;const T=d.getCenterPoint(s);if(!(!!o||t.isPointInArea(T))&&!v)return;const k=c(e,T);k<u?(l=[{element:d,datasetIndex:p,index:_}],u=k):k===u&&l.push({element:d,datasetIndex:p,index:_})}return Ca(t,n,e,h),l}function cc(t,e,n,i,s,o){return!o&&!t.isPointInArea(e)?[]:n==="r"&&!i?dw(t,e,n,s):gw(t,e,n,i,s,o)}function jh(t,e,n,i,s){const o=[],l=n==="x"?"inXRange":"inYRange";let c=!1;return Ca(t,n,e,(u,h,d)=>{u[l]&&u[l](e[n],s)&&(o.push({element:u,datasetIndex:h,index:d}),c=c||u.inRange(e.x,e.y,s))}),i&&!c?[]:o}var pw={modes:{index(t,e,n,i){const s=Tn(e,t),o=n.axis||"x",l=n.includeInvisible||!1,c=n.intersect?lc(t,s,o,i,l):cc(t,s,o,!1,i,l),u=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{const d=c[0].index,p=h.data[d];p&&!p.skip&&u.push({element:p,datasetIndex:h.index,index:d})}),u):[]},dataset(t,e,n,i){const s=Tn(e,t),o=n.axis||"xy",l=n.includeInvisible||!1;let c=n.intersect?lc(t,s,o,i,l):cc(t,s,o,!1,i,l);if(c.length>0){const u=c[0].datasetIndex,h=t.getDatasetMeta(u).data;c=[];for(let d=0;d<h.length;++d)c.push({element:h[d],datasetIndex:u,index:d})}return c},point(t,e,n,i){const s=Tn(e,t),o=n.axis||"xy",l=n.includeInvisible||!1;return lc(t,s,o,i,l)},nearest(t,e,n,i){const s=Tn(e,t),o=n.axis||"xy",l=n.includeInvisible||!1;return cc(t,s,o,n.intersect,i,l)},x(t,e,n,i){const s=Tn(e,t);return jh(t,s,"x",n.intersect,i)},y(t,e,n,i){const s=Tn(e,t);return jh(t,s,"y",n.intersect,i)}}};const $g=["left","top","right","bottom"];function yr(t,e){return t.filter(n=>n.pos===e)}function Zh(t,e){return t.filter(n=>$g.indexOf(n.pos)===-1&&n.box.axis===e)}function vr(t,e){return t.sort((n,i)=>{const s=e?i:n,o=e?n:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function mw(t){const e=[];let n,i,s,o,l,c;for(n=0,i=(t||[]).length;n<i;++n)s=t[n],{position:o,options:{stack:l,stackWeight:c=1}}=s,e.push({index:n,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:l&&o+l,stackWeight:c});return e}function _w(t){const e={};for(const n of t){const{stack:i,pos:s,stackWeight:o}=n;if(!i||!$g.includes(s))continue;const l=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=o}return e}function bw(t,e){const n=_w(t),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let o,l,c;for(o=0,l=t.length;o<l;++o){c=t[o];const{fullSize:u}=c.box,h=n[c.stack],d=h&&c.stackWeight/h.weight;c.horizontal?(c.width=d?d*i:u&&e.availableWidth,c.height=s):(c.width=i,c.height=d?d*s:u&&e.availableHeight)}return n}function xw(t){const e=mw(t),n=vr(e.filter(h=>h.box.fullSize),!0),i=vr(yr(e,"left"),!0),s=vr(yr(e,"right")),o=vr(yr(e,"top"),!0),l=vr(yr(e,"bottom")),c=Zh(e,"x"),u=Zh(e,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:s.concat(u).concat(l).concat(c),chartArea:yr(e,"chartArea"),vertical:i.concat(s).concat(u),horizontal:o.concat(l).concat(c)}}function Jh(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Gg(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 yw(t,e,n,i){const{pos:s,box:o}=n,l=t.maxPadding;if(!_t(s)){n.size&&(t[s]-=n.size);const p=i[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?o.height:o.width),n.size=p.size/p.count,t[s]+=n.size}o.getPadding&&Gg(l,o.getPadding());const c=Math.max(0,e.outerWidth-Jh(l,t,"left","right")),u=Math.max(0,e.outerHeight-Jh(l,t,"top","bottom")),h=c!==t.w,d=u!==t.h;return t.w=c,t.h=u,n.horizontal?{same:h,other:d}:{same:d,other:h}}function vw(t){const e=t.maxPadding;function n(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Sw(t,e){const n=e.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(l=>{o[l]=Math.max(e[l],n[l])}),o}return i(t?["left","right"]:["top","bottom"])}function Pr(t,e,n,i){const s=[];let o,l,c,u,h,d;for(o=0,l=t.length,h=0;o<l;++o){c=t[o],u=c.box,u.update(c.width||e.w,c.height||e.h,Sw(c.horizontal,e));const{same:p,other:_}=yw(e,n,c,i);h|=p&&s.length,d=d||_,u.fullSize||s.push(c)}return h&&Pr(s,e,n,i)||d}function Jo(t,e,n,i,s){t.top=n,t.left=e,t.right=e+i,t.bottom=n+s,t.width=i,t.height=s}function Qh(t,e,n,i){const s=n.padding;let{x:o,y:l}=e;for(const c of t){const u=c.box,h=i[c.stack]||{placed:0,weight:1},d=c.stackWeight/h.weight||1;if(c.horizontal){const p=e.w*d,_=h.size||u.height;Br(h.start)&&(l=h.start),u.fullSize?Jo(u,s.left,l,n.outerWidth-s.right-s.left,_):Jo(u,e.left+h.placed,l,p,_),h.start=l,h.placed+=p,l=u.bottom}else{const p=e.h*d,_=h.size||u.width;Br(h.start)&&(o=h.start),u.fullSize?Jo(u,o,s.top,_,n.outerHeight-s.bottom-s.top):Jo(u,o,e.top+h.placed,_,p),h.start=o,h.placed+=p,o=u.right}}e.x=o,e.y=l}var on={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(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const s=Ge(t.options.layout.padding),o=Math.max(e-s.width,0),l=Math.max(n-s.height,0),c=xw(t.boxes),u=c.vertical,h=c.horizontal;pt(t.boxes,M=>{typeof M.beforeLayout=="function"&&M.beforeLayout()});const d=u.reduce((M,k)=>k.box.options&&k.box.options.display===!1?M:M+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:o,availableHeight:l,vBoxMaxWidth:o/2/d,hBoxMaxHeight:l/2}),_=Object.assign({},s);Gg(_,Ge(i));const v=Object.assign({maxPadding:_,w:o,h:l,x:s.left,y:s.top},s),T=bw(u.concat(h),p);Pr(c.fullSize,v,p,T),Pr(u,v,p,T),Pr(h,v,p,T)&&Pr(u,v,p,T),vw(v),Qh(c.leftAndTop,v,p,T),v.x+=v.w,v.y+=v.h,Qh(c.rightAndBottom,v,p,T),t.chartArea={left:v.left,top:v.top,right:v.left+v.w,bottom:v.top+v.h,height:v.h,width:v.w},pt(c.chartArea,M=>{const k=M.box;Object.assign(k,t.chartArea),k.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class Yg{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,s){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(e){return!0}updateConfig(e){}}class ww extends Yg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const da="$chartjs",Mw={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},td=t=>t===null||t==="";function Tw(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[da]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",td(s)){const o=Bh(t,"width");o!==void 0&&(t.width=o)}if(td(i))if(t.style.height==="")t.height=t.width/(e||2);else{const o=Bh(t,"height");o!==void 0&&(t.height=o)}return t}const Xg=SS?{passive:!0}:!1;function Pw(t,e,n){t&&t.addEventListener(e,n,Xg)}function Cw(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Xg)}function kw(t,e){const n=Mw[t.type]||t.type,{x:i,y:s}=Tn(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function ya(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Ew(t,e,n){const i=t.canvas,s=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||ya(c.addedNodes,i),l=l&&!ya(c.removedNodes,i);l&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Iw(t,e,n){const i=t.canvas,s=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||ya(c.removedNodes,i),l=l&&!ya(c.addedNodes,i);l&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const zr=new Map;let ed=0;function Kg(){const t=window.devicePixelRatio;t!==ed&&(ed=t,zr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Aw(t,e){zr.size||window.addEventListener("resize",Kg),zr.set(t,e)}function Ow(t){zr.delete(t),zr.size||window.removeEventListener("resize",Kg)}function Dw(t,e,n){const i=t.canvas,s=i&&Jc(i);if(!s)return;const o=Mg((c,u)=>{const h=s.clientWidth;n(c,u),h<s.clientWidth&&n()},window),l=new ResizeObserver(c=>{const u=c[0],h=u.contentRect.width,d=u.contentRect.height;h===0&&d===0||o(h,d)});return l.observe(s),Aw(t,o),l}function fc(t,e,n){n&&n.disconnect(),e==="resize"&&Ow(t)}function Rw(t,e,n){const i=t.canvas,s=Mg(o=>{t.ctx!==null&&n(kw(o,t))},t);return Pw(i,e,s),s}class Lw extends Yg{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(Tw(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[da])return!1;const i=n[da].initial;["height","width"].forEach(o=>{const l=i[o];xt(l)?n.removeAttribute(o):n.setAttribute(o,l)});const s=i.style||{};return Object.keys(s).forEach(o=>{n.style[o]=s[o]}),n.width=n.width,delete n[da],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),l={attach:Ew,detach:Iw,resize:Dw}[n]||Rw;s[n]=l(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:fc,detach:fc,resize:fc}[n]||Cw)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return vS(e,n,i,s)}isAttached(e){const n=e&&Jc(e);return!!(n&&n.isConnected)}}function Nw(t){return!Zc()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ww:Lw}class ei{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Ls(this.x)&&Ls(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const s={};return e.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}}function Bw(t,e){const n=t.options.ticks,i=Fw(t),s=Math.min(n.maxTicksLimit||i,i),o=n.major.enabled?zw(e):[],l=o.length,c=o[0],u=o[l-1],h=[];if(l>s)return Hw(e,h,o,l/s),h;const d=Ww(o,e,s);if(l>0){let p,_;const v=l>1?Math.round((u-c)/(l-1)):null;for(Qo(e,h,d,xt(v)?0:c-v,c),p=0,_=l-1;p<_;p++)Qo(e,h,d,o[p],o[p+1]);return Qo(e,h,d,u,xt(v)?e.length:u+v),h}return Qo(e,h,d),h}function Fw(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(i,s))}function Ww(t,e,n){const i=Uw(t),s=e.length/n;if(!i)return Math.max(s,1);const o=Mv(i);for(let l=0,c=o.length-1;l<c;l++){const u=o[l];if(u>s)return u}return Math.max(s,1)}function zw(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function Hw(t,e,n,i){let s=0,o=n[0],l;for(i=Math.ceil(i),l=0;l<t.length;l++)l===o&&(e.push(t[l]),s++,o=n[s*i])}function Qo(t,e,n,i,s){const o=lt(i,0),l=Math.min(lt(s,t.length),t.length);let c=0,u,h,d;for(n=Math.ceil(n),s&&(u=s-i,n=u/Math.floor(u/n)),d=o;d<0;)c++,d=Math.round(o+c*n);for(h=Math.max(o,0);h<l;h++)h===d&&(e.push(t[h]),c++,d=Math.round(o+c*n))}function Uw(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}const Vw=t=>t==="left"?"right":t==="right"?"left":t,nd=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,id=(t,e)=>Math.min(e||t,t);function sd(t,e){const n=[],i=t.length/e,s=t.length;let o=0;for(;o<s;o+=i)n.push(t[Math.floor(o)]);return n}function $w(t,e,n){const i=t.ticks.length,s=Math.min(e,i-1),o=t._startPixel,l=t._endPixel,c=1e-6;let u=t.getPixelForTick(s),h;if(!(n&&(i===1?h=Math.max(u-o,l-u):e===0?h=(t.getPixelForTick(1)-u)/2:h=(u-t.getPixelForTick(s-1))/2,u+=s<e?h:-h,u<o-c||u>l+c)))return u}function Gw(t,e){pt(t,n=>{const i=n.gc,s=i.length/2;let o;if(s>e){for(o=0;o<s;++o)delete n.data[i[o]];i.splice(0,s)}})}function Sr(t){return t.drawTicks?t.tickLength:0}function rd(t,e){if(!t.display)return 0;const n=fe(t.font,e),i=Ge(t.padding);return(qt(t.text)?t.text.length:1)*n.lineHeight+i.height}function Yw(t,e){return es(t,{scale:e,type:"scale"})}function Xw(t,e,n){return es(t,{tick:n,index:e,type:"tick"})}function Kw(t,e,n){let i=$c(t);return(n&&e!=="right"||!n&&e==="right")&&(i=Vw(i)),i}function qw(t,e,n,i){const{top:s,left:o,bottom:l,right:c,chart:u}=t,{chartArea:h,scales:d}=u;let p=0,_,v,T;const M=l-s,k=c-o;if(t.isHorizontal()){if(v=ge(i,o,c),_t(n)){const A=Object.keys(n)[0],D=n[A];T=d[A].getPixelForValue(D)+M-e}else n==="center"?T=(h.bottom+h.top)/2+M-e:T=nd(t,n,e);_=c-o}else{if(_t(n)){const A=Object.keys(n)[0],D=n[A];v=d[A].getPixelForValue(D)-k+e}else n==="center"?v=(h.left+h.right)/2-k+e:v=nd(t,n,e);T=ge(i,l,s),p=n==="left"?-te:te}return{titleX:v,titleY:T,maxWidth:_,rotation:p}}class ns extends ei{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:i,_suggestedMax:s}=this;return e=$e(e,Number.POSITIVE_INFINITY),n=$e(n,Number.NEGATIVE_INFINITY),i=$e(i,Number.POSITIVE_INFINITY),s=$e(s,Number.NEGATIVE_INFINITY),{min:$e(e,i),max:$e(n,s),minDefined:Zt(e),maxDefined:Zt(n)}}getMinMax(e){let{min:n,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),l;if(s&&o)return{min:n,max:i};const c=this.getMatchingVisibleMetas();for(let u=0,h=c.length;u<h;++u)l=c[u].controller.getMinMax(this,e),s||(n=Math.min(n,l.min)),o||(i=Math.max(i,l.max));return n=o&&n>i?i:n,i=s&&n>i?n:i,{min:$e(n,$e(i,n)),max:$e(i,$e(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){it(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:s,grace:o,ticks:l}=this.options,c=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,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=Qv(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=c<this.ticks.length;this._convertTicksToLabels(u?sd(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Bw(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,e=!e),this._startPixel=n,this._endPixel=i,this._reversePixels=e,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){it(this.options.afterUpdate,[this])}beforeSetDimensions(){it(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){it(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),it(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){it(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let i,s,o;for(i=0,s=e.length;i<s;i++)o=e[i],o.label=it(n.callback,[o.value,i,e],this)}afterTickToLabelConversion(){it(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){it(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,i=id(this.ticks.length,e.ticks.maxTicksLimit),s=n.minRotation||0,o=n.maxRotation;let l=s,c,u,h;if(!this._isVisible()||!n.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const d=this._getLabelSizes(),p=d.widest.width,_=d.highest.height,v=pe(this.chart.width-p,0,this.maxWidth);c=e.offset?this.maxWidth/i:v/(i-1),p+6>c&&(c=v/(i-(e.offset?.5:1)),u=this.maxHeight-Sr(e.grid)-n.padding-rd(e.title,this.chart.options.font),h=Math.sqrt(p*p+_*_),l=Cv(Math.min(Math.asin(pe((d.highest.height+6)/c,-1,1)),Math.asin(pe(u/h,-1,1))-Math.asin(pe(_/h,-1,1)))),l=Math.max(s,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){it(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){it(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:o}}=this,l=this._isVisible(),c=this.isHorizontal();if(l){const u=rd(s,n.options.font);if(c?(e.width=this.maxWidth,e.height=Sr(o)+u):(e.height=this.maxHeight,e.width=Sr(o)+u),i.display&&this.ticks.length){const{first:h,last:d,widest:p,highest:_}=this._getLabelSizes(),v=i.padding*2,T=Jn(this.labelRotation),M=Math.cos(T),k=Math.sin(T);if(c){const A=i.mirror?0:k*p.width+M*_.height;e.height=Math.min(this.maxHeight,e.height+A+v)}else{const A=i.mirror?0:M*p.width+k*_.height;e.width=Math.min(this.maxWidth,e.width+A+v)}this._calculatePadding(h,d,k,M)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,s){const{ticks:{align:o,padding:l},position:c}=this.options,u=this.labelRotation!==0,h=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let _=0,v=0;u?h?(_=s*e.width,v=i*n.height):(_=i*e.height,v=s*n.width):o==="start"?v=n.width:o==="end"?_=e.width:o!=="inner"&&(_=e.width/2,v=n.width/2),this.paddingLeft=Math.max((_-d+l)*this.width/(this.width-d),0),this.paddingRight=Math.max((v-p+l)*this.width/(this.width-p),0)}else{let d=n.height/2,p=e.height/2;o==="start"?(d=0,p=e.height):o==="end"&&(d=n.height,p=0),this.paddingTop=d+l,this.paddingBottom=p+l}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){it(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n<i;n++)xt(e[n].label)&&(e.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=sd(i,n)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,i){const{ctx:s,_longestTextCache:o}=this,l=[],c=[],u=Math.floor(n/id(n,i));let h=0,d=0,p,_,v,T,M,k,A,D,W,U,N;for(p=0;p<n;p+=u){if(T=e[p].label,M=this._resolveTickFontOptions(p),s.font=k=M.string,A=o[k]=o[k]||{data:{},gc:[]},D=M.lineHeight,W=U=0,!xt(T)&&!qt(T))W=Oh(s,A.data,A.gc,W,T),U=D;else if(qt(T))for(_=0,v=T.length;_<v;++_)N=T[_],!xt(N)&&!qt(N)&&(W=Oh(s,A.data,A.gc,W,N),U+=D);l.push(W),c.push(U),h=Math.max(W,h),d=Math.max(U,d)}Gw(o,n);const G=l.indexOf(h),$=c.indexOf(d),X=Z=>({width:l[Z]||0,height:c[Z]||0});return{first:X(0),last:X(n-1),widest:X(G),highest:X($),widths:l,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Ev(this._alignToPixels?$i(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const i=n[e];return i.$context||(i.$context=Xw(this.getContext(),e,i))}return this.$context||(this.$context=Yw(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Jn(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),o=this._getLabelSizes(),l=e.autoSkipPadding||0,c=o?o.widest.width+l:0,u=o?o.highest.height+l:0;return this.isHorizontal()?u*i>c*s?c/i:u/s:u*s<c*i?u/i:c/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,i=this.chart,s=this.options,{grid:o,position:l,border:c}=s,u=o.offset,h=this.isHorizontal(),p=this.ticks.length+(u?1:0),_=Sr(o),v=[],T=c.setContext(this.getContext()),M=T.display?T.width:0,k=M/2,A=function(Pt){return $i(i,Pt,M)};let D,W,U,N,G,$,X,Z,rt,st,ft,Wt;if(l==="top")D=A(this.bottom),$=this.bottom-_,Z=D-k,st=A(e.top)+k,Wt=e.bottom;else if(l==="bottom")D=A(this.top),st=e.top,Wt=A(e.bottom)-k,$=D+k,Z=this.top+_;else if(l==="left")D=A(this.right),G=this.right-_,X=D-k,rt=A(e.left)+k,ft=e.right;else if(l==="right")D=A(this.left),rt=e.left,ft=A(e.right)-k,G=D+k,X=this.left+_;else if(n==="x"){if(l==="center")D=A((e.top+e.bottom)/2+.5);else if(_t(l)){const Pt=Object.keys(l)[0],St=l[Pt];D=A(this.chart.scales[Pt].getPixelForValue(St))}st=e.top,Wt=e.bottom,$=D+k,Z=$+_}else if(n==="y"){if(l==="center")D=A((e.left+e.right)/2);else if(_t(l)){const Pt=Object.keys(l)[0],St=l[Pt];D=A(this.chart.scales[Pt].getPixelForValue(St))}G=D-k,X=G-_,rt=e.left,ft=e.right}const Vt=lt(s.ticks.maxTicksLimit,p),vt=Math.max(1,Math.ceil(p/Vt));for(W=0;W<p;W+=vt){const Pt=this.getContext(W),St=o.setContext(Pt),zt=c.setContext(Pt),$t=St.lineWidth,Re=St.color,se=zt.dash||[],ye=zt.dashOffset,En=St.tickWidth,Le=St.tickColor,ve=St.tickBorderDash||[],Se=St.tickBorderDashOffset;U=$w(this,W,u),U!==void 0&&(N=$i(i,U,$t),h?G=X=rt=ft=N:$=Z=st=Wt=N,v.push({tx1:G,ty1:$,tx2:X,ty2:Z,x1:rt,y1:st,x2:ft,y2:Wt,width:$t,color:Re,borderDash:se,borderDashOffset:ye,tickWidth:En,tickColor:Le,tickBorderDash:ve,tickBorderDashOffset:Se}))}return this._ticksLength=p,this._borderValue=D,v}_computeLabelItems(e){const n=this.axis,i=this.options,{position:s,ticks:o}=i,l=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:h,padding:d,mirror:p}=o,_=Sr(i.grid),v=_+d,T=p?-d:v,M=-Jn(this.labelRotation),k=[];let A,D,W,U,N,G,$,X,Z,rt,st,ft,Wt="middle";if(s==="top")G=this.bottom-T,$=this._getXAxisLabelAlignment();else if(s==="bottom")G=this.top+T,$=this._getXAxisLabelAlignment();else if(s==="left"){const vt=this._getYAxisLabelAlignment(_);$=vt.textAlign,N=vt.x}else if(s==="right"){const vt=this._getYAxisLabelAlignment(_);$=vt.textAlign,N=vt.x}else if(n==="x"){if(s==="center")G=(e.top+e.bottom)/2+v;else if(_t(s)){const vt=Object.keys(s)[0],Pt=s[vt];G=this.chart.scales[vt].getPixelForValue(Pt)+v}$=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")N=(e.left+e.right)/2-v;else if(_t(s)){const vt=Object.keys(s)[0],Pt=s[vt];N=this.chart.scales[vt].getPixelForValue(Pt)}$=this._getYAxisLabelAlignment(_).textAlign}n==="y"&&(u==="start"?Wt="top":u==="end"&&(Wt="bottom"));const Vt=this._getLabelSizes();for(A=0,D=c.length;A<D;++A){W=c[A],U=W.label;const vt=o.setContext(this.getContext(A));X=this.getPixelForTick(A)+o.labelOffset,Z=this._resolveTickFontOptions(A),rt=Z.lineHeight,st=qt(U)?U.length:1;const Pt=st/2,St=vt.color,zt=vt.textStrokeColor,$t=vt.textStrokeWidth;let Re=$;l?(N=X,$==="inner"&&(A===D-1?Re=this.options.reverse?"left":"right":A===0?Re=this.options.reverse?"right":"left":Re="center"),s==="top"?h==="near"||M!==0?ft=-st*rt+rt/2:h==="center"?ft=-Vt.highest.height/2-Pt*rt+rt:ft=-Vt.highest.height+rt/2:h==="near"||M!==0?ft=rt/2:h==="center"?ft=Vt.highest.height/2-Pt*rt:ft=Vt.highest.height-st*rt,p&&(ft*=-1),M!==0&&!vt.showLabelBackdrop&&(N+=rt/2*Math.sin(M))):(G=X,ft=(1-st)*rt/2);let se;if(vt.showLabelBackdrop){const ye=Ge(vt.backdropPadding),En=Vt.heights[A],Le=Vt.widths[A];let ve=ft-ye.top,Se=0-ye.left;switch(Wt){case"middle":ve-=En/2;break;case"bottom":ve-=En;break}switch($){case"center":Se-=Le/2;break;case"right":Se-=Le;break;case"inner":A===D-1?Se-=Le:A>0&&(Se-=Le/2);break}se={left:Se,top:ve,width:Le+ye.width,height:En+ye.height,color:vt.backdropColor}}k.push({label:U,font:Z,textOffset:ft,options:{rotation:M,color:St,strokeColor:zt,strokeWidth:$t,textAlign:Re,textBaseline:Wt,translation:[N,G],backdrop:se}})}return k}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Jn(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,l=this._getLabelSizes(),c=e+o,u=l.widest.width;let h,d;return n==="left"?s?(d=this.right+o,i==="near"?h="left":i==="center"?(h="center",d+=u/2):(h="right",d+=u)):(d=this.right-c,i==="near"?h="right":i==="center"?(h="center",d-=u/2):(h="left",d=this.left)):n==="right"?s?(d=this.left+o,i==="near"?h="right":i==="center"?(h="center",d-=u/2):(h="left",d-=u)):(d=this.left+c,i==="near"?h="left":i==="center"?(h="center",d+=u/2):(h="right",d=this.right)):h="right",{textAlign:h,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:s,width:o,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,s,o,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(o=>o.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,l;const c=(u,h,d)=>{!d.width||!d.color||(i.save(),i.lineWidth=d.width,i.strokeStyle=d.color,i.setLineDash(d.borderDash||[]),i.lineDashOffset=d.borderDashOffset,i.beginPath(),i.moveTo(u.x,u.y),i.lineTo(h.x,h.y),i.stroke(),i.restore())};if(n.display)for(o=0,l=s.length;o<l;++o){const u=s[o];n.drawOnChartArea&&c({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&c({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),l=i.display?o.width:0;if(!l)return;const c=s.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let h,d,p,_;this.isHorizontal()?(h=$i(e,this.left,l)-l/2,d=$i(e,this.right,c)+c/2,p=_=u):(p=$i(e,this.top,l)-l/2,_=$i(e,this.bottom,c)+c/2,h=d=u),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(h,p),n.lineTo(d,_),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Ma(i,s);const o=this.getLabelItems(e);for(const l of o){const c=l.options,u=l.font,h=l.label,d=l.textOffset;Wr(i,h,0,d,u,c)}s&&Ta(i)}drawTitle(){const{ctx:e,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const o=fe(i.font),l=Ge(i.padding),c=i.align;let u=o.lineHeight/2;n==="bottom"||n==="center"||_t(n)?(u+=l.bottom,qt(i.text)&&(u+=o.lineHeight*(i.text.length-1))):u+=l.top;const{titleX:h,titleY:d,maxWidth:p,rotation:_}=qw(this,u,n,c);Wr(e,i.text,0,0,o,{color:i.color,maxWidth:p,rotation:_,textAlign:Kw(c,n,s),textBaseline:"middle",translation:[h,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,i=lt(e.grid&&e.grid.z,-1),s=lt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==ns.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,l;for(o=0,l=n.length;o<l;++o){const c=n[o];c[i]===this.id&&(!e||c.type===e)&&s.push(c)}return s}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return fe(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ta{constructor(e,n,i){this.type=e,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let i;Jw(n)&&(i=this.register(n));const s=this.items,o=e.id,l=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,jw(e,l,i),this.override&&It.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const n=this.items,i=e.id,s=this.scope;i in n&&delete n[i],s&&i in It[s]&&(delete It[s][i],this.override&&delete Qi[i])}}function jw(t,e,n){const i=Cn(Object.create(null),[n?It.get(n):{},It.get(e),t.defaults]);It.set(e,i),t.defaultRoutes&&Zw(e,t.defaultRoutes),t.descriptors&&It.describe(e,t.descriptors)}function Zw(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),s=i.pop(),o=[t].concat(i).join("."),l=e[n].split("."),c=l.pop(),u=l.join(".");It.route(o,s,u,c)})}function Jw(t){return"id"in t&&"defaults"in t}class Qw{constructor(){this.controllers=new ta(Yr,"datasets",!0),this.elements=new ta(ei,"elements"),this.plugins=new ta(Object,"plugins"),this.scales=new ta(ns,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):pt(s,l=>{const c=i||this._getRegistryForType(l);this._exec(e,c,l)})})}_exec(e,n,i){const s=Uc(e);it(i["before"+s],[],i),n[e](i),it(i["after"+s],[],i)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(e))return i}return this.plugins}_get(e,n,i){const s=n.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return s}}var wn=new Qw;class tM{constructor(){this._init=[]}notify(e,n,i,s){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=s?this._descriptors(e).filter(s):this._descriptors(e),l=this._notify(o,e,n,i);return n==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,n,i,s){s=s||{};for(const o of e){const l=o.plugin,c=l[i],u=[n,s,o.options];if(it(c,u,l)===!1&&s.cancelable)return!1}return!0}invalidate(){xt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const i=e&&e.config,s=lt(i.options&&i.options.plugins,{}),o=eM(i);return s===!1&&!n?[]:iM(e,o,s,n)}_notifyStateChanges(e){const n=this._oldCache||[],i=this._cache,s=(o,l)=>o.filter(c=>!l.some(u=>c.plugin.id===u.plugin.id));this._notify(s(n,i),e,"stop"),this._notify(s(i,n),e,"start")}}function eM(t){const e={},n=[],i=Object.keys(wn.plugins.items);for(let o=0;o<i.length;o++)n.push(wn.getPlugin(i[o]));const s=t.plugins||[];for(let o=0;o<s.length;o++){const l=s[o];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function nM(t,e){return!e&&t===!1?null:t===!0?{}:t}function iM(t,{plugins:e,localIds:n},i,s){const o=[],l=t.getContext();for(const c of e){const u=c.id,h=nM(i[u],s);h!==null&&o.push({plugin:c,options:sM(t.config,{plugin:c,local:n[u]},h,l)})}return o}function sM(t,{plugin:e,local:n},i,s){const o=t.pluginScopeKeys(e),l=t.getOptionScopes(i,o);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wc(t,e){const n=It.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function rM(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function oM(t,e){return t===e?"_index_":"_value_"}function od(t){if(t==="x"||t==="y"||t==="r")return t}function aM(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Mc(t,...e){if(od(t))return t;for(const n of e){const i=n.axis||aM(n.position)||t.length>1&&od(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function ad(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function lM(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return ad(t,"x",n[0])||ad(t,"y",n[0])}return{}}function cM(t,e){const n=Qi[t.type]||{scales:{}},i=e.scales||{},s=wc(t.type,e),o=Object.create(null);return Object.keys(i).forEach(l=>{const c=i[l];if(!_t(c))return console.error(`Invalid scale configuration for scale: ${l}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const u=Mc(l,c,lM(l,t),It.scales[c.type]),h=oM(u,s),d=n.scales||{};o[l]=Er(Object.create(null),[{axis:u},c,d[u],d[h]])}),t.data.datasets.forEach(l=>{const c=l.type||t.type,u=l.indexAxis||wc(c,e),d=(Qi[c]||{}).scales||{};Object.keys(d).forEach(p=>{const _=rM(p,u),v=l[_+"AxisID"]||_;o[v]=o[v]||Object.create(null),Er(o[v],[{axis:_},i[v],d[p]])})}),Object.keys(o).forEach(l=>{const c=o[l];Er(c,[It.scales[c.type],It.scale])}),o}function qg(t){const e=t.options||(t.options={});e.plugins=lt(e.plugins,{}),e.scales=cM(t,e)}function jg(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function fM(t){return t=t||{},t.data=jg(t.data),qg(t),t}const ld=new Map,Zg=new Set;function ea(t,e){let n=ld.get(t);return n||(n=e(),ld.set(t,n),Zg.add(n)),n}const wr=(t,e,n)=>{const i=Ji(e,n);i!==void 0&&t.add(i)};class uM{constructor(e){this._config=fM(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=jg(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),qg(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return ea(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return ea(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return ea(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return ea(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let s=i.get(e);return(!s||n)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,n,i){const{options:s,type:o}=this,l=this._cachedScopes(e,i),c=l.get(n);if(c)return c;const u=new Set;n.forEach(d=>{e&&(u.add(e),d.forEach(p=>wr(u,e,p))),d.forEach(p=>wr(u,s,p)),d.forEach(p=>wr(u,Qi[o]||{},p)),d.forEach(p=>wr(u,It,p)),d.forEach(p=>wr(u,vc,p))});const h=Array.from(u);return h.length===0&&h.push(Object.create(null)),Zg.has(n)&&l.set(n,h),h}chartOptionScopes(){const{options:e,type:n}=this;return[e,Qi[n]||{},It.datasets[n]||{},{type:n},It,vc]}resolveNamedOptions(e,n,i,s=[""]){const o={$shared:!0},{resolver:l,subPrefixes:c}=cd(this._resolverCache,e,s);let u=l;if(dM(l,n)){o.$shared=!1,i=Mi(i)?i():i;const h=this.createResolver(e,i,c);u=Bs(l,i,h)}for(const h of n)o[h]=u[h];return o}createResolver(e,n,i=[""],s){const{resolver:o}=cd(this._resolverCache,e,i);return _t(n)?Bs(o,n,void 0,s):o}}function cd(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let o=i.get(s);return o||(o={resolver:Kc(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},i.set(s,o)),o}const hM=t=>_t(t)&&Object.getOwnPropertyNames(t).some(e=>Mi(t[e]));function dM(t,e){const{isScriptable:n,isIndexable:i}=Ig(t);for(const s of e){const o=n(s),l=i(s),c=(l||o)&&t[s];if(o&&(Mi(c)||hM(c))||l&&qt(c))return!0}return!1}var gM="4.4.9";const pM=["top","bottom","left","right","chartArea"];function fd(t,e){return t==="top"||t==="bottom"||pM.indexOf(t)===-1&&e==="x"}function ud(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function hd(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),it(n&&n.onComplete,[t],e)}function mM(t){const e=t.chart,n=e.options.animation;it(n&&n.onProgress,[t],e)}function Jg(t){return Zc()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ga={},dd=t=>{const e=Jg(t);return Object.values(ga).filter(n=>n.canvas===e).pop()};function _M(t,e,n){const i=Object.keys(t);for(const s of i){const o=+s;if(o>=e){const l=t[s];delete t[s],(n>0||o>e)&&(t[o+n]=l)}}}function bM(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}let tf=class{static defaults=It;static instances=ga;static overrides=Qi;static registry=wn;static version=gM;static getChart=dd;static register(...e){wn.add(...e),gd()}static unregister(...e){wn.remove(...e),gd()}constructor(e,n){const i=this.config=new uM(n),s=Jg(e),o=dd(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const l=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Nw(s)),this.platform.updateConfig(i);const c=this.platform.acquireContext(s,l.aspectRatio),u=c&&c.canvas,h=u&&u.height,d=u&&u.width;if(this.id=pv(),this.ctx=c,this.canvas=u,this.width=d,this.height=h,this._options=l,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 tM,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Dv(p=>this.update(p),l.resizeDelay||0),this._dataChanges=[],ga[this.id]=this,!c||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Yn.listen(this,"complete",hd),Yn.listen(this,"progress",mM),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:s,_aspectRatio:o}=this;return xt(e)?n&&o?o:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return wn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Nh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Dh(this.canvas,this.ctx),this}stop(){return Yn.stop(this),this}resize(e,n){Yn.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(s,e,n,o),c=i.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,Nh(this,c,!0)&&(this.notifyPlugins("resize",{size:l}),it(i.onResize,[this,l],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};pt(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,s=Object.keys(i).reduce((l,c)=>(l[c]=!1,l),{});let o=[];n&&(o=o.concat(Object.keys(n).map(l=>{const c=n[l],u=Mc(l,c),h=u==="r",d=u==="x";return{options:c,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),pt(o,l=>{const c=l.options,u=c.id,h=Mc(u,c),d=lt(c.type,l.dtype);(c.position===void 0||fd(c.position,h)!==fd(l.dposition))&&(c.position=l.dposition),s[u]=!0;let p=null;if(u in i&&i[u].type===d)p=i[u];else{const _=wn.getScale(d);p=new _({id:u,type:d,ctx:this.ctx,chart:this}),i[p.id]=p}p.init(c,e)}),pt(s,(l,c)=>{l||delete i[c]}),pt(i,l=>{on.configure(this,l,l.options),on.addBox(this,l)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((s,o)=>s.index-o.index),i>n){for(let s=n;s<i;++s)this._destroyDatasetMeta(s);e.splice(n,i-n)}this._sortedMetasets=e.slice(0).sort(ud("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((i,s)=>{n.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i<s;i++){const o=n[i];let l=this.getDatasetMeta(i);const c=o.type||this.config.type;if(l.type&&l.type!==c&&(this._destroyDatasetMeta(i),l=this.getDatasetMeta(i)),l.type=c,l.indexAxis=o.indexAxis||wc(c,this.options),l.order=o.order||0,l.index=i,l.label=""+o.label,l.visible=this.isDatasetVisible(i),l.controller)l.controller.updateIndex(i),l.controller.linkScales();else{const u=wn.getController(c),{datasetElementType:h,dataElementType:d}=It.datasets[c];Object.assign(u,{dataElementType:wn.getElement(d),datasetElementType:h&&wn.getElement(h)}),l.controller=new u(this,i),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){pt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let h=0,d=this.data.datasets.length;h<d;h++){const{controller:p}=this.getDatasetMeta(h),_=!s&&o.indexOf(p)===-1;p.buildOrUpdateElements(_),l=Math.max(+p.getMaxOverflow(),l)}l=this._minPadding=i.layout.autoPadding?l:0,this._updateLayout(l),s||pt(o,h=>{h.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(ud("z","_idx"));const{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){pt(this.scales,e=>{on.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!wh(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of n){const l=i==="_removeElements"?-o:o;_M(e,s,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=o=>new Set(e.filter(l=>l[0]===o).map((l,c)=>c+","+l.splice(1).join(","))),s=i(0);for(let o=1;o<n;o++)if(!wh(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;on.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],pt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,Mi(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const i=this.getDatasetMeta(e),s={meta:i,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Yn.has(this)?this.attached&&!Yn.running(this)&&Yn.start(this):(this.draw(),hd({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,i=[];let s,o;for(s=0,o=n.length;s<o;++s){const l=n[s];(!e||l.visible)&&i.push(l)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i={meta:e,index:e.index,cancelable:!0},s=zg(this,e);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&Ma(n,s),e.controller.draw(),s&&Ta(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return Ns(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const o=pw.modes[n];return typeof o=="function"?o(this,e,i,s):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let s=i.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=es(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const s=i?"show":"hide",o=this.getDatasetMeta(e),l=o.controller._resolveAnimations(void 0,s);Br(n)?(o.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),l.update(o,{visible:i}),this.update(c=>c.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Yn.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Dh(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete ga[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,i=(o,l)=>{n.addEventListener(this,o,l),e[o]=l},s=(o,l,c)=>{o.offsetX=l,o.offsetY=c,this._eventHandler(o)};pt(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(u,h)=>{n.addEventListener(this,u,h),e[u]=h},s=(u,h)=>{e[u]&&(n.removeEventListener(this,u,h),delete e[u])},o=(u,h)=>{this.canvas&&this.resize(u,h)};let l;const c=()=>{s("attach",c),this.attached=!0,this.resize(),i("resize",o),i("detach",l)};l=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",c)},n.isAttached(this.canvas)?c():l()}unbindEvents(){pt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},pt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const s=i?"set":"remove";let o,l,c,u;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),c=0,u=e.length;c<u;++c){l=e[c];const h=l&&this.getDatasetMeta(l.datasetIndex).controller;h&&h[s+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],i=e.map(({datasetIndex:o,index:l})=>{const c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:c.data[l],index:l}});!pa(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const s=this.options.hover,o=(u,h)=>u.filter(d=>!h.some(p=>d.datasetIndex===p.datasetIndex&&d.index===p.index)),l=o(n,e),c=i?e:o(e,n);l.length&&this.updateHoverStyle(l,s.mode,!1),c.length&&s.mode&&this.updateHoverStyle(c,s.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:s=[],options:o}=this,l=n,c=this._getActiveElements(e,s,i,l),u=vv(e),h=bM(e,this._lastEvent,i,u);i&&(this._lastEvent=null,it(o.onHover,[e,c,this],this),u&&it(o.onClick,[e,c,this],this));const d=!pa(c,s);return(d||n)&&(this._active=c,this._updateHoverStyles(c,s,n)),this._lastEvent=h,d}_getActiveElements(e,n,i,s){if(e.type==="mouseout")return[];if(!i)return n;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,s)}};function gd(){return pt(tf.instances,t=>t._plugins.invalidate())}function xM(t,e,n){const{startAngle:i,pixelMargin:s,x:o,y:l,outerRadius:c,innerRadius:u}=e;let h=s/c;t.beginPath(),t.arc(o,l,c,i-h,n+h),u>s?(h=s/u,t.arc(o,l,u,n+h,i-h,!0)):t.arc(o,l,s,n+te,i-te),t.closePath(),t.clip()}function yM(t){return Xc(t,["outerStart","outerEnd","innerStart","innerEnd"])}function vM(t,e,n,i){const s=yM(t.options.borderRadius),o=(n-e)/2,l=Math.min(o,i*e/2),c=u=>{const h=(n-Math.min(o,u))*i/2;return pe(u,0,Math.min(o,h))};return{outerStart:c(s.outerStart),outerEnd:c(s.outerEnd),innerStart:pe(s.innerStart,0,l),innerEnd:pe(s.innerEnd,0,l)}}function Is(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function va(t,e,n,i,s,o){const{x:l,y:c,startAngle:u,pixelMargin:h,innerRadius:d}=e,p=Math.max(e.outerRadius+i+n-h,0),_=d>0?d+i+n+h:0;let v=0;const T=s-u;if(i){const vt=d>0?d-i:0,Pt=p>0?p-i:0,St=(vt+Pt)/2,zt=St!==0?T*St/(St+i):T;v=(T-zt)/2}const M=Math.max(.001,T*p-n/Ut)/p,k=(T-M)/2,A=u+k+v,D=s-k-v,{outerStart:W,outerEnd:U,innerStart:N,innerEnd:G}=vM(e,_,p,D-A),$=p-W,X=p-U,Z=A+W/$,rt=D-U/X,st=_+N,ft=_+G,Wt=A+N/st,Vt=D-G/ft;if(t.beginPath(),o){const vt=(Z+rt)/2;if(t.arc(l,c,p,Z,vt),t.arc(l,c,p,vt,rt),U>0){const $t=Is(X,rt,l,c);t.arc($t.x,$t.y,U,rt,D+te)}const Pt=Is(ft,D,l,c);if(t.lineTo(Pt.x,Pt.y),G>0){const $t=Is(ft,Vt,l,c);t.arc($t.x,$t.y,G,D+te,Vt+Math.PI)}const St=(D-G/_+(A+N/_))/2;if(t.arc(l,c,_,D-G/_,St,!0),t.arc(l,c,_,St,A+N/_,!0),N>0){const $t=Is(st,Wt,l,c);t.arc($t.x,$t.y,N,Wt+Math.PI,A-te)}const zt=Is($,A,l,c);if(t.lineTo(zt.x,zt.y),W>0){const $t=Is($,Z,l,c);t.arc($t.x,$t.y,W,A-te,Z)}}else{t.moveTo(l,c);const vt=Math.cos(Z)*p+l,Pt=Math.sin(Z)*p+c;t.lineTo(vt,Pt);const St=Math.cos(rt)*p+l,zt=Math.sin(rt)*p+c;t.lineTo(St,zt)}t.closePath()}function SM(t,e,n,i,s){const{fullCircles:o,startAngle:l,circumference:c}=e;let u=e.endAngle;if(o){va(t,e,n,i,u,s);for(let h=0;h<o;++h)t.fill();isNaN(c)||(u=l+(c%Bt||Bt))}return va(t,e,n,i,u,s),t.fill(),u}function wM(t,e,n,i,s){const{fullCircles:o,startAngle:l,circumference:c,options:u}=e,{borderWidth:h,borderJoinStyle:d,borderDash:p,borderDashOffset:_}=u,v=u.borderAlign==="inner";if(!h)return;t.setLineDash(p||[]),t.lineDashOffset=_,v?(t.lineWidth=h*2,t.lineJoin=d||"round"):(t.lineWidth=h,t.lineJoin=d||"bevel");let T=e.endAngle;if(o){va(t,e,n,i,T,s);for(let M=0;M<o;++M)t.stroke();isNaN(c)||(T=l+(c%Bt||Bt))}v&&xM(t,e,T),o||(va(t,e,n,i,T,s),t.stroke())}class MM extends ei{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};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){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,e&&Object.assign(this,e)}inRange(e,n,i){const s=this.getProps(["x","y"],i),{angle:o,distance:l}=yg(s,{x:e,y:n}),{startAngle:c,endAngle:u,innerRadius:h,outerRadius:d,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),_=(this.options.spacing+this.options.borderWidth)/2,v=lt(p,u-c),T=Fr(o,c,u)&&c!==u,M=v>=Bt||T,k=Qn(l,h+_,d+_);return M&&k}getCenterPoint(e){const{x:n,y:i,startAngle:s,endAngle:o,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:h}=this.options,d=(s+o)/2,p=(l+c+h+u)/2;return{x:n+Math.cos(d)*p,y:i+Math.sin(d)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:i}=this,s=(n.offset||0)/4,o=(n.spacing||0)/2,l=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>Bt?Math.floor(i/Bt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*s,Math.sin(c)*s);const u=1-Math.sin(Math.min(Ut,i||0)),h=s*u;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,SM(e,this,h,o,l),wM(e,this,h,o,l),e.restore()}}function Qg(t,e,n=e){t.lineCap=lt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(lt(n.borderDash,e.borderDash)),t.lineDashOffset=lt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=lt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=lt(n.borderWidth,e.borderWidth),t.strokeStyle=lt(n.borderColor,e.borderColor)}function TM(t,e,n){t.lineTo(n.x,n.y)}function PM(t){return t.stepped?$v:t.tension||t.cubicInterpolationMode==="monotone"?Gv:TM}function tp(t,e,n={}){const i=t.length,{start:s=0,end:o=i-1}=n,{start:l,end:c}=e,u=Math.max(s,l),h=Math.min(o,c),d=s<l&&o<l||s>c&&o>c;return{count:i,start:u,loop:e.loop,ilen:h<u&&!d?i+h-u:h-u}}function CM(t,e,n,i){const{points:s,options:o}=e,{count:l,start:c,loop:u,ilen:h}=tp(s,n,i),d=PM(o);let{move:p=!0,reverse:_}=i||{},v,T,M;for(v=0;v<=h;++v)T=s[(c+(_?h-v:v))%l],!T.skip&&(p?(t.moveTo(T.x,T.y),p=!1):d(t,M,T,_,o.stepped),M=T);return u&&(T=s[(c+(_?h:0))%l],d(t,M,T,_,o.stepped)),!!u}function kM(t,e,n,i){const s=e.points,{count:o,start:l,ilen:c}=tp(s,n,i),{move:u=!0,reverse:h}=i||{};let d=0,p=0,_,v,T,M,k,A;const D=U=>(l+(h?c-U:U))%o,W=()=>{M!==k&&(t.lineTo(d,k),t.lineTo(d,M),t.lineTo(d,A))};for(u&&(v=s[D(0)],t.moveTo(v.x,v.y)),_=0;_<=c;++_){if(v=s[D(_)],v.skip)continue;const U=v.x,N=v.y,G=U|0;G===T?(N<M?M=N:N>k&&(k=N),d=(p*d+U)/++p):(W(),t.lineTo(U,N),T=G,p=0,M=k=N),A=N}W()}function Tc(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?kM:CM}function EM(t){return t.stepped?wS:t.tension||t.cubicInterpolationMode==="monotone"?MS:Xi}function IM(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),Qg(t,e.options),t.stroke(s)}function AM(t,e,n,i){const{segments:s,options:o}=e,l=Tc(e);for(const c of s)Qg(t,o,c.style),t.beginPath(),l(t,e,c,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const OM=typeof Path2D=="function";function DM(t,e,n,i){OM&&!e.options.segment?IM(t,e,n,i):AM(t,e,n,i)}class ef extends ei{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:e=>e!=="borderDash"&&e!=="fill"};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;pS(this._points,i,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=IS(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,s=e[n],o=this.points,l=Wg(this,{property:n,start:s,end:s});if(!l.length)return;const c=[],u=EM(i);let h,d;for(h=0,d=l.length;h<d;++h){const{start:p,end:_}=l[h],v=o[p],T=o[_];if(v===T){c.push(v);continue}const M=Math.abs((s-v[n])/(T[n]-v[n])),k=u(v,T,M,i.stepped);k[n]=e[n],c.push(k)}return c.length===1?c[0]:c}pathSegment(e,n,i){return Tc(this)(e,this,n,i)}path(e,n,i){const s=this.segments,o=Tc(this);let l=this._loop;n=n||0,i=i||this.points.length-n;for(const c of s)l&=o(e,this,c,{start:n,end:n+i-1});return!!l}draw(e,n,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),DM(e,this,i,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function pd(t,e,n,i){const s=t.options,{[n]:o}=t.getProps([n],i);return Math.abs(e-o)<s.radius+s.hitRadius}class RM extends ei{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(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,i){const s=this.options,{x:o,y:l}=this.getProps(["x","y"],i);return Math.pow(e-o,2)+Math.pow(n-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(e,n){return pd(this,e,"x",n)}inYRange(e,n){return pd(this,e,"y",n)}getCenterPoint(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const i=n&&e.borderWidth||0;return(n+i)*2}draw(e,n){const i=this.options;this.skip||i.radius<.1||!Ns(this,n,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,Sc(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function ep(t,e){const{x:n,y:i,base:s,width:o,height:l}=t.getProps(["x","y","base","width","height"],e);let c,u,h,d,p;return t.horizontal?(p=l/2,c=Math.min(n,s),u=Math.max(n,s),h=i-p,d=i+p):(p=o/2,c=n-p,u=n+p,h=Math.min(i,s),d=Math.max(i,s)),{left:c,top:h,right:u,bottom:d}}function vi(t,e,n,i){return t?0:pe(e,n,i)}function LM(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,o=Eg(i);return{t:vi(s.top,o.top,0,n),r:vi(s.right,o.right,0,e),b:vi(s.bottom,o.bottom,0,n),l:vi(s.left,o.left,0,e)}}function NM(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=Ds(s),l=Math.min(e,n),c=t.borderSkipped,u=i||_t(s);return{topLeft:vi(!u||c.top||c.left,o.topLeft,0,l),topRight:vi(!u||c.top||c.right,o.topRight,0,l),bottomLeft:vi(!u||c.bottom||c.left,o.bottomLeft,0,l),bottomRight:vi(!u||c.bottom||c.right,o.bottomRight,0,l)}}function BM(t){const e=ep(t),n=e.right-e.left,i=e.bottom-e.top,s=LM(t,n/2,i/2),o=NM(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function uc(t,e,n,i){const s=e===null,o=n===null,c=t&&!(s&&o)&&ep(t,i);return c&&(s||Qn(e,c.left,c.right))&&(o||Qn(n,c.top,c.bottom))}function FM(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function WM(t,e){t.rect(e.x,e.y,e.w,e.h)}function hc(t,e,n={}){const i=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-i,l=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+o,h:t.h+l,radius:t.radius}}class zM extends ei{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:i,backgroundColor:s}}=this,{inner:o,outer:l}=BM(this),c=FM(l.radius)?ba:WM;e.save(),(l.w!==o.w||l.h!==o.h)&&(e.beginPath(),c(e,hc(l,n,o)),e.clip(),c(e,hc(o,-n,l)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),c(e,hc(o,n)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,n,i){return uc(this,e,n,i)}inXRange(e,n){return uc(this,e,null,n)}inYRange(e,n){return uc(this,null,e,n)}getCenterPoint(e){const{x:n,y:i,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(n+s)/2:n,y:o?i:(i+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}function HM(t,e,n){const i=t.segments,s=t.points,o=e.points,l=[];for(const c of i){let{start:u,end:h}=c;h=nf(u,h,s);const d=Pc(n,s[u],s[h],c.loop);if(!e.segments){l.push({source:c,target:d,start:s[u],end:s[h]});continue}const p=Wg(e,d);for(const _ of p){const v=Pc(n,o[_.start],o[_.end],_.loop),T=Fg(c,s,v);for(const M of T)l.push({source:M,target:_,start:{[n]:md(d,v,"start",Math.max)},end:{[n]:md(d,v,"end",Math.min)}})}}return l}function Pc(t,e,n,i){if(i)return;let s=e[t],o=n[t];return t==="angle"&&(s=Mn(s),o=Mn(o)),{property:t,start:s,end:o}}function UM(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,o=[];return e.segments.forEach(({start:l,end:c})=>{c=nf(l,c,s);const u=s[l],h=s[c];i!==null?(o.push({x:u.x,y:i}),o.push({x:h.x,y:i})):n!==null&&(o.push({x:n,y:u.y}),o.push({x:n,y:h.y}))}),o}function nf(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function md(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function np(t,e){let n=[],i=!1;return qt(t)?(i=!0,n=t):n=UM(t,e),n.length?new ef({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function _d(t){return t&&t.fill!==!1}function VM(t,e,n){let s=t[e].fill;const o=[e];let l;if(!n)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!Zt(s))return s;if(l=t[s],!l)return!1;if(l.visible)return s;o.push(s),s=l.fill}return!1}function $M(t,e,n){const i=KM(t);if(_t(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Zt(s)&&Math.floor(s)===s?GM(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function GM(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function YM(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:_t(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function XM(t,e,n){let i;return t==="start"?i=n:t==="end"?i=e.options.reverse?e.min:e.max:_t(t)?i=t.value:i=e.getBaseValue(),i}function KM(t){const e=t.options,n=e.fill;let i=lt(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function qM(t){const{scale:e,index:n,line:i}=t,s=[],o=i.segments,l=i.points,c=jM(e,n);c.push(np({x:null,y:e.bottom},i));for(let u=0;u<o.length;u++){const h=o[u];for(let d=h.start;d<=h.end;d++)ZM(s,l[d],c)}return new ef({points:s,options:{}})}function jM(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const o=i[s];if(o.index===e)break;o.hidden||n.unshift(o.dataset)}return n}function ZM(t,e,n){const i=[];for(let s=0;s<n.length;s++){const o=n[s],{first:l,last:c,point:u}=JM(o,e,"x");if(!(!u||l&&c)){if(l)i.unshift(u);else if(t.push(u),!c)break}}t.push(...i)}function JM(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const s=i[n],o=t.segments,l=t.points;let c=!1,u=!1;for(let h=0;h<o.length;h++){const d=o[h],p=l[d.start][n],_=l[d.end][n];if(Qn(s,p,_)){c=s===p,u=s===_;break}}return{first:c,last:u,point:i}}class ip{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,i){const{x:s,y:o,radius:l}=this;return n=n||{start:0,end:Bt},e.arc(s,o,l,n.end,n.start,!0),!i.bounds}interpolate(e){const{x:n,y:i,radius:s}=this,o=e.angle;return{x:n+Math.cos(o)*s,y:i+Math.sin(o)*s,angle:o}}}function QM(t){const{chart:e,fill:n,line:i}=t;if(Zt(n))return tT(e,n);if(n==="stack")return qM(t);if(n==="shape")return!0;const s=eT(t);return s instanceof ip?s:np(s,i)}function tT(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function eT(t){return(t.scale||{}).getPointPositionForValue?iT(t):nT(t)}function nT(t){const{scale:e={},fill:n}=t,i=YM(n,e);if(Zt(i)){const s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function iT(t){const{scale:e,fill:n}=t,i=e.options,s=e.getLabels().length,o=i.reverse?e.max:e.min,l=XM(n,e,o),c=[];if(i.grid.circular){const u=e.getPointPositionForValue(0,o);return new ip({x:u.x,y:u.y,radius:e.getDistanceFromCenterForValue(l)})}for(let u=0;u<s;++u)c.push(e.getPointPositionForValue(u,l));return c}function dc(t,e,n){const i=QM(e),{chart:s,index:o,line:l,scale:c,axis:u}=e,h=l.options,d=h.fill,p=h.backgroundColor,{above:_=p,below:v=p}=d||{},T=s.getDatasetMeta(o),M=zg(s,T);i&&l.points.length&&(Ma(t,n),sT(t,{line:l,target:i,above:_,below:v,area:n,scale:c,axis:u,clip:M}),Ta(t))}function sT(t,e){const{line:n,target:i,above:s,below:o,area:l,scale:c,clip:u}=e,h=n._loop?"angle":e.axis;t.save(),h==="x"&&o!==s&&(bd(t,i,l.top),xd(t,{line:n,target:i,color:s,scale:c,property:h,clip:u}),t.restore(),t.save(),bd(t,i,l.bottom)),xd(t,{line:n,target:i,color:o,scale:c,property:h,clip:u}),t.restore()}function bd(t,e,n){const{segments:i,points:s}=e;let o=!0,l=!1;t.beginPath();for(const c of i){const{start:u,end:h}=c,d=s[u],p=s[nf(u,h,s)];o?(t.moveTo(d.x,d.y),o=!1):(t.lineTo(d.x,n),t.lineTo(d.x,d.y)),l=!!e.pathSegment(t,c,{move:l}),l?t.closePath():t.lineTo(p.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function xd(t,e){const{line:n,target:i,property:s,color:o,scale:l,clip:c}=e,u=HM(n,i,s);for(const{source:h,target:d,start:p,end:_}of u){const{style:{backgroundColor:v=o}={}}=h,T=i!==!0;t.save(),t.fillStyle=v,rT(t,l,c,T&&Pc(s,p,_)),t.beginPath();const M=!!n.pathSegment(t,h);let k;if(T){M?t.closePath():yd(t,i,_,s);const A=!!i.pathSegment(t,d,{move:M,reverse:!0});k=M&&A,k||yd(t,i,p,s)}t.closePath(),t.fill(k?"evenodd":"nonzero"),t.restore()}}function rT(t,e,n,i){const s=e.chart.chartArea,{property:o,start:l,end:c}=i||{};if(o==="x"||o==="y"){let u,h,d,p;o==="x"?(u=l,h=s.top,d=c,p=s.bottom):(u=s.left,h=l,d=s.right,p=c),t.beginPath(),n&&(u=Math.max(u,n.left),d=Math.min(d,n.right),h=Math.max(h,n.top),p=Math.min(p,n.bottom)),t.rect(u,h,d-u,p-h),t.clip()}}function yd(t,e,n,i){const s=e.interpolate(n,i);s&&t.lineTo(s.x,s.y)}var EC={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,s=[];let o,l,c,u;for(l=0;l<i;++l)o=t.getDatasetMeta(l),c=o.dataset,u=null,c&&c.options&&c instanceof ef&&(u={visible:t.isDatasetVisible(l),index:l,fill:$M(c,l,i),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:c}),o.$filler=u,s.push(u);for(l=0;l<i;++l)u=s[l],!(!u||u.fill===!1)&&(u.fill=VM(s,l,n.propagate))},beforeDraw(t,e,n){const i=n.drawTime==="beforeDraw",s=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let l=s.length-1;l>=0;--l){const c=s[l].$filler;c&&(c.line.updateControlPoints(o,c.axis),i&&c.fill&&dc(t.ctx,c,o))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=t.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;_d(o)&&dc(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!_d(i)||n.drawTime!=="beforeDatasetDraw"||dc(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const vd=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},oT=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Sd extends ei{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,i){this.maxWidth=e,this.maxHeight=n,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 e=this.options.labels||{};let n=it(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(i=>e.filter(i,this.chart.data))),e.sort&&(n=n.sort((i,s)=>e.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,s=fe(i.font),o=s.size,l=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=vd(i,o);let h,d;n.font=s.string,this.isHorizontal()?(h=this.maxWidth,d=this._fitRows(l,o,c,u)+10):(d=this.maxHeight,h=this._fitCols(l,s,c,u)+10),this.width=Math.min(h,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,n,i,s){const{ctx:o,maxWidth:l,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],h=this.lineWidths=[0],d=s+c;let p=e;o.textAlign="left",o.textBaseline="middle";let _=-1,v=-d;return this.legendItems.forEach((T,M)=>{const k=i+n/2+o.measureText(T.text).width;(M===0||h[h.length-1]+k+2*c>l)&&(p+=d,h[h.length-(M>0?0:1)]=0,v+=d,_++),u[M]={left:0,top:v,row:_,width:k,height:s},h[h.length-1]+=k+c}),p}_fitCols(e,n,i,s){const{ctx:o,maxHeight:l,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],h=this.columnSizes=[],d=l-e;let p=c,_=0,v=0,T=0,M=0;return this.legendItems.forEach((k,A)=>{const{itemWidth:D,itemHeight:W}=aT(i,n,o,k,s);A>0&&v+W+2*c>d&&(p+=_+c,h.push({width:_,height:v}),T+=_+c,M++,_=v=0),u[A]={left:T,top:v,col:M,width:D,height:W},_=Math.max(_,D),v+=W+c}),p+=_,h.push({width:_,height:v}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:o}}=this,l=Rs(o,this.left,this.width);if(this.isHorizontal()){let c=0,u=ge(i,this.left+s,this.right-this.lineWidths[c]);for(const h of n)c!==h.row&&(c=h.row,u=ge(i,this.left+s,this.right-this.lineWidths[c])),h.top+=this.top+e+s,h.left=l.leftForLtr(l.x(u),h.width),u+=h.width+s}else{let c=0,u=ge(i,this.top+e+s,this.bottom-this.columnSizes[c].height);for(const h of n)h.col!==c&&(c=h.col,u=ge(i,this.top+e+s,this.bottom-this.columnSizes[c].height)),h.top=u,h.left+=this.left+s,h.left=l.leftForLtr(l.x(h.left),h.width),u+=h.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ma(e,this),this._draw(),Ta(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:o,labels:l}=e,c=It.color,u=Rs(e.rtl,this.left,this.width),h=fe(l.font),{padding:d}=l,p=h.size,_=p/2;let v;this.drawTitle(),s.textAlign=u.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:T,boxHeight:M,itemHeight:k}=vd(l,p),A=function(G,$,X){if(isNaN(T)||T<=0||isNaN(M)||M<0)return;s.save();const Z=lt(X.lineWidth,1);if(s.fillStyle=lt(X.fillStyle,c),s.lineCap=lt(X.lineCap,"butt"),s.lineDashOffset=lt(X.lineDashOffset,0),s.lineJoin=lt(X.lineJoin,"miter"),s.lineWidth=Z,s.strokeStyle=lt(X.strokeStyle,c),s.setLineDash(lt(X.lineDash,[])),l.usePointStyle){const rt={radius:M*Math.SQRT2/2,pointStyle:X.pointStyle,rotation:X.rotation,borderWidth:Z},st=u.xPlus(G,T/2),ft=$+_;kg(s,rt,st,ft,l.pointStyleWidth&&T)}else{const rt=$+Math.max((p-M)/2,0),st=u.leftForLtr(G,T),ft=Ds(X.borderRadius);s.beginPath(),Object.values(ft).some(Wt=>Wt!==0)?ba(s,{x:st,y:rt,w:T,h:M,radius:ft}):s.rect(st,rt,T,M),s.fill(),Z!==0&&s.stroke()}s.restore()},D=function(G,$,X){Wr(s,X.text,G,$+k/2,h,{strikethrough:X.hidden,textAlign:u.textAlign(X.textAlign)})},W=this.isHorizontal(),U=this._computeTitleHeight();W?v={x:ge(o,this.left+d,this.right-i[0]),y:this.top+d+U,line:0}:v={x:this.left+d,y:ge(o,this.top+U+d,this.bottom-n[0].height),line:0},Lg(this.ctx,e.textDirection);const N=k+d;this.legendItems.forEach((G,$)=>{s.strokeStyle=G.fontColor,s.fillStyle=G.fontColor;const X=s.measureText(G.text).width,Z=u.textAlign(G.textAlign||(G.textAlign=l.textAlign)),rt=T+_+X;let st=v.x,ft=v.y;u.setWidth(this.width),W?$>0&&st+rt+d>this.right&&(ft=v.y+=N,v.line++,st=v.x=ge(o,this.left+d,this.right-i[v.line])):$>0&&ft+N>this.bottom&&(st=v.x=st+n[v.line].width+d,v.line++,ft=v.y=ge(o,this.top+U+d,this.bottom-n[v.line].height));const Wt=u.x(st);if(A(Wt,ft,G),st=Rv(Z,st+T+_,W?st+rt:this.right,e.rtl),D(u.x(st),ft,G),W)v.x+=rt+d;else if(typeof G.text!="string"){const Vt=h.lineHeight;v.y+=sp(G,Vt)+d}else v.y+=N}),Ng(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=fe(n.font),s=Ge(n.padding);if(!n.display)return;const o=Rs(e.rtl,this.left,this.width),l=this.ctx,c=n.position,u=i.size/2,h=s.top+u;let d,p=this.left,_=this.width;if(this.isHorizontal())_=Math.max(...this.lineWidths),d=this.top+h,p=ge(e.align,p,this.right-_);else{const T=this.columnSizes.reduce((M,k)=>Math.max(M,k.height),0);d=h+ge(e.align,this.top,this.bottom-T-e.labels.padding-this._computeTitleHeight())}const v=ge(c,p,p+_);l.textAlign=o.textAlign($c(c)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=i.string,Wr(l,n.text,v,d,i)}_computeTitleHeight(){const e=this.options.title,n=fe(e.font),i=Ge(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,o;if(Qn(e,this.left,this.right)&&Qn(n,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],Qn(e,s.left,s.left+s.width)&&Qn(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(e){const n=this.options;if(!fT(e.type,n))return;const i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,o=oT(s,i);s&&!o&&it(n.onLeave,[e,s,this],this),this._hoveredItem=i,i&&!o&&it(n.onHover,[e,i,this],this)}else i&&it(n.onClick,[e,i,this],this)}}function aT(t,e,n,i,s){const o=lT(i,t,e,n),l=cT(s,i,e.lineHeight);return{itemWidth:o,itemHeight:l}}function lT(t,e,n,i){let s=t.text;return s&&typeof s!="string"&&(s=s.reduce((o,l)=>o.length>l.length?o:l)),e+n.size/2+i.measureText(s).width}function cT(t,e,n){let i=t;return typeof e.text!="string"&&(i=sp(e,n)),i}function sp(t,e){const n=t.text?t.text.length:0;return e*n}function fT(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var IC={id:"legend",_element:Sd,start(t,e,n){const i=t.legend=new Sd({ctx:t.ctx,options:n,chart:t});on.configure(t,i,n),on.addBox(t,i)},stop(t){on.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;on.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),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:n,pointStyle:i,textAlign:s,color:o,useBorderRadius:l,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(u=>{const h=u.controller.getStyle(n?0:void 0),d=Ge(h.borderWidth);return{text:e[u.index].label,fillStyle:h.backgroundColor,fontColor:o,hidden:!u.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:h.borderColor,pointStyle:i||h.pointStyle,rotation:h.rotation,textAlign:s||h.textAlign,borderRadius:l&&(c||h.borderRadius),datasetIndex:u.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)}}};class rp extends ei{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const s=qt(i.text)?i.text.length:1;this._padding=Ge(i.padding);const o=s*fe(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:s,right:o,options:l}=this,c=l.align;let u=0,h,d,p;return this.isHorizontal()?(d=ge(c,i,o),p=n+e,h=o-i):(l.position==="left"?(d=i+e,p=ge(c,s,n),u=Ut*-.5):(d=o-e,p=ge(c,n,s),u=Ut*.5),h=s-n),{titleX:d,titleY:p,maxWidth:h,rotation:u}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=fe(n.font),o=i.lineHeight/2+this._padding.top,{titleX:l,titleY:c,maxWidth:u,rotation:h}=this._drawArgs(o);Wr(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:h,textAlign:$c(n.align),textBaseline:"middle",translation:[l,c]})}}function uT(t,e){const n=new rp({ctx:t.ctx,options:e,chart:t});on.configure(t,n,e),on.addBox(t,n),t.titleBlock=n}var AC={id:"title",_element:rp,start(t,e,n){uT(t,n)},stop(t){const e=t.titleBlock;on.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;on.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Cr={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,o=0;for(e=0,n=t.length;e<n;++e){const c=t[e].element;if(c&&c.hasValue()){const u=c.tooltipPosition();i.add(u.x),s+=u.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((c,u)=>c+u)/i.size,y:s/o}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,s=Number.POSITIVE_INFINITY,o,l,c;for(o=0,l=t.length;o<l;++o){const u=t[o].element;if(u&&u.hasValue()){const h=u.getCenterPoint(),d=yc(e,h);d<s&&(s=d,c=u)}}if(c){const u=c.tooltipPosition();n=u.x,i=u.y}return{x:n,y:i}}};function Sn(t,e){return e&&(qt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Xn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
17
|
-
`)>-1?t.split(`
|
|
18
|
-
`):t}function hT(t,e){const{element:n,datasetIndex:i,index:s}=e,o=t.getDatasetMeta(i).controller,{label:l,value:c}=o.getLabelAndValue(s);return{chart:t,label:l,parsed:o.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:c,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function wd(t,e){const n=t.chart.ctx,{body:i,footer:s,title:o}=t,{boxWidth:l,boxHeight:c}=e,u=fe(e.bodyFont),h=fe(e.titleFont),d=fe(e.footerFont),p=o.length,_=s.length,v=i.length,T=Ge(e.padding);let M=T.height,k=0,A=i.reduce((U,N)=>U+N.before.length+N.lines.length+N.after.length,0);if(A+=t.beforeBody.length+t.afterBody.length,p&&(M+=p*h.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),A){const U=e.displayColors?Math.max(c,u.lineHeight):u.lineHeight;M+=v*U+(A-v)*u.lineHeight+(A-1)*e.bodySpacing}_&&(M+=e.footerMarginTop+_*d.lineHeight+(_-1)*e.footerSpacing);let D=0;const W=function(U){k=Math.max(k,n.measureText(U).width+D)};return n.save(),n.font=h.string,pt(t.title,W),n.font=u.string,pt(t.beforeBody.concat(t.afterBody),W),D=e.displayColors?l+2+e.boxPadding:0,pt(i,U=>{pt(U.before,W),pt(U.lines,W),pt(U.after,W)}),D=0,n.font=d.string,pt(t.footer,W),n.restore(),k+=T.width,{width:k,height:M}}function dT(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function gT(t,e,n,i){const{x:s,width:o}=i,l=n.caretSize+n.caretPadding;if(t==="left"&&s+o+l>e.width||t==="right"&&s-o-l<0)return!0}function pT(t,e,n,i){const{x:s,width:o}=n,{width:l,chartArea:{left:c,right:u}}=t;let h="center";return i==="center"?h=s<=(c+u)/2?"left":"right":s<=o/2?h="left":s>=l-o/2&&(h="right"),gT(h,t,e,n)&&(h="center"),h}function Md(t,e,n){const i=n.yAlign||e.yAlign||dT(t,n);return{xAlign:n.xAlign||e.xAlign||pT(t,e,n,i),yAlign:i}}function mT(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function _T(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function Td(t,e,n,i){const{caretSize:s,caretPadding:o,cornerRadius:l}=t,{xAlign:c,yAlign:u}=n,h=s+o,{topLeft:d,topRight:p,bottomLeft:_,bottomRight:v}=Ds(l);let T=mT(e,c);const M=_T(e,u,h);return u==="center"?c==="left"?T+=h:c==="right"&&(T-=h):c==="left"?T-=Math.max(d,_)+s:c==="right"&&(T+=Math.max(p,v)+s),{x:pe(T,0,i.width-e.width),y:pe(M,0,i.height-e.height)}}function na(t,e,n){const i=Ge(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function Pd(t){return Sn([],Xn(t))}function bT(t,e,n){return es(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Cd(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const op={beforeTitle:$n,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:$n,beforeBody:$n,beforeLabel:$n,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return xt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:$n,afterBody:$n,beforeFooter:$n,footer:$n,afterFooter:$n};function Ee(t,e,n,i){const s=t[e].call(n,i);return typeof s>"u"?op[e].call(n,i):s}class kd extends ei{static positioners=Cr;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,o=new Hg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=bT(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=Ee(i,"beforeTitle",this,e),o=Ee(i,"title",this,e),l=Ee(i,"afterTitle",this,e);let c=[];return c=Sn(c,Xn(s)),c=Sn(c,Xn(o)),c=Sn(c,Xn(l)),c}getBeforeBody(e,n){return Pd(Ee(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return pt(e,o=>{const l={before:[],lines:[],after:[]},c=Cd(i,o);Sn(l.before,Xn(Ee(c,"beforeLabel",this,o))),Sn(l.lines,Ee(c,"label",this,o)),Sn(l.after,Xn(Ee(c,"afterLabel",this,o))),s.push(l)}),s}getAfterBody(e,n){return Pd(Ee(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=Ee(i,"beforeFooter",this,e),o=Ee(i,"footer",this,e),l=Ee(i,"afterFooter",this,e);let c=[];return c=Sn(c,Xn(s)),c=Sn(c,Xn(o)),c=Sn(c,Xn(l)),c}_createItems(e){const n=this._active,i=this.chart.data,s=[],o=[],l=[];let c=[],u,h;for(u=0,h=n.length;u<h;++u)c.push(hT(this.chart,n[u]));return e.filter&&(c=c.filter((d,p,_)=>e.filter(d,p,_,i))),e.itemSort&&(c=c.sort((d,p)=>e.itemSort(d,p,i))),pt(c,d=>{const p=Cd(e.callbacks,d);s.push(Ee(p,"labelColor",this,d)),o.push(Ee(p,"labelPointStyle",this,d)),l.push(Ee(p,"labelTextColor",this,d))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=c,c}update(e,n){const i=this.options.setContext(this.getContext()),s=this._active;let o,l=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const c=Cr[i.position].call(this,s,this._eventPosition);l=this._createItems(i),this.title=this.getTitle(l,i),this.beforeBody=this.getBeforeBody(l,i),this.body=this.getBody(l,i),this.afterBody=this.getAfterBody(l,i),this.footer=this.getFooter(l,i);const u=this._size=wd(this,i),h=Object.assign({},c,u),d=Md(this.chart,i,h),p=Td(i,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=l,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,s){const o=this.getCaretPosition(e,i,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,i){const{xAlign:s,yAlign:o}=this,{caretSize:l,cornerRadius:c}=i,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:p}=Ds(c),{x:_,y:v}=e,{width:T,height:M}=n;let k,A,D,W,U,N;return o==="center"?(U=v+M/2,s==="left"?(k=_,A=k-l,W=U+l,N=U-l):(k=_+T,A=k+l,W=U-l,N=U+l),D=k):(s==="left"?A=_+Math.max(u,d)+l:s==="right"?A=_+T-Math.max(h,p)-l:A=this.caretX,o==="top"?(W=v,U=W-l,k=A-l,D=A+l):(W=v+M,U=W+l,k=A+l,D=A-l),N=W),{x1:k,x2:A,x3:D,y1:W,y2:U,y3:N}}drawTitle(e,n,i){const s=this.title,o=s.length;let l,c,u;if(o){const h=Rs(i.rtl,this.x,this.width);for(e.x=na(this,i.titleAlign,i),n.textAlign=h.textAlign(i.titleAlign),n.textBaseline="middle",l=fe(i.titleFont),c=i.titleSpacing,n.fillStyle=i.titleColor,n.font=l.string,u=0;u<o;++u)n.fillText(s[u],h.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+c,u+1===o&&(e.y+=i.titleMarginBottom-c)}}_drawColorBox(e,n,i,s,o){const l=this.labelColors[i],c=this.labelPointStyles[i],{boxHeight:u,boxWidth:h}=o,d=fe(o.bodyFont),p=na(this,"left",o),_=s.x(p),v=u<d.lineHeight?(d.lineHeight-u)/2:0,T=n.y+v;if(o.usePointStyle){const M={radius:Math.min(h,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},k=s.leftForLtr(_,h)+h/2,A=T+u/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Sc(e,M,k,A),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Sc(e,M,k,A)}else{e.lineWidth=_t(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const M=s.leftForLtr(_,h),k=s.leftForLtr(s.xPlus(_,1),h-2),A=Ds(l.borderRadius);Object.values(A).some(D=>D!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,ba(e,{x:M,y:T,w:h,h:u,radius:A}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),ba(e,{x:k,y:T+1,w:h-2,h:u-2,radius:A}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(M,T,h,u),e.strokeRect(M,T,h,u),e.fillStyle=l.backgroundColor,e.fillRect(k,T+1,h-2,u-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:s}=this,{bodySpacing:o,bodyAlign:l,displayColors:c,boxHeight:u,boxWidth:h,boxPadding:d}=i,p=fe(i.bodyFont);let _=p.lineHeight,v=0;const T=Rs(i.rtl,this.x,this.width),M=function(X){n.fillText(X,T.x(e.x+v),e.y+_/2),e.y+=_+o},k=T.textAlign(l);let A,D,W,U,N,G,$;for(n.textAlign=l,n.textBaseline="middle",n.font=p.string,e.x=na(this,k,i),n.fillStyle=i.bodyColor,pt(this.beforeBody,M),v=c&&k!=="right"?l==="center"?h/2+d:h+2+d:0,U=0,G=s.length;U<G;++U){for(A=s[U],D=this.labelTextColors[U],n.fillStyle=D,pt(A.before,M),W=A.lines,c&&W.length&&(this._drawColorBox(n,e,U,T,i),_=Math.max(p.lineHeight,u)),N=0,$=W.length;N<$;++N)M(W[N]),_=p.lineHeight;pt(A.after,M)}v=0,_=p.lineHeight,pt(this.afterBody,M),e.y-=o}drawFooter(e,n,i){const s=this.footer,o=s.length;let l,c;if(o){const u=Rs(i.rtl,this.x,this.width);for(e.x=na(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=u.textAlign(i.footerAlign),n.textBaseline="middle",l=fe(i.footerFont),n.fillStyle=i.footerColor,n.font=l.string,c=0;c<o;++c)n.fillText(s[c],u.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+i.footerSpacing}}drawBackground(e,n,i,s){const{xAlign:o,yAlign:l}=this,{x:c,y:u}=e,{width:h,height:d}=i,{topLeft:p,topRight:_,bottomLeft:v,bottomRight:T}=Ds(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(c+p,u),l==="top"&&this.drawCaret(e,n,i,s),n.lineTo(c+h-_,u),n.quadraticCurveTo(c+h,u,c+h,u+_),l==="center"&&o==="right"&&this.drawCaret(e,n,i,s),n.lineTo(c+h,u+d-T),n.quadraticCurveTo(c+h,u+d,c+h-T,u+d),l==="bottom"&&this.drawCaret(e,n,i,s),n.lineTo(c+v,u+d),n.quadraticCurveTo(c,u+d,c,u+d-v),l==="center"&&o==="left"&&this.drawCaret(e,n,i,s),n.lineTo(c,u+p),n.quadraticCurveTo(c,u,c+p,u),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const l=Cr[e.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=wd(this,e),u=Object.assign({},l,this._size),h=Md(n,e,u),d=Td(e,u,h,n);(s._to!==d.x||o._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=c.width,this.height=c.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const l=Ge(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=i,this.drawBackground(o,e,s,n),Lg(e,n.textDirection),o.y+=l.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),Ng(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,s=e.map(({datasetIndex:c,index:u})=>{const h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:h.data[u],index:u}}),o=!pa(i,s),l=this._positionChanged(s,n);(o||l)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],l=this._getActiveElements(e,o,n,i),c=this._positionChanged(l,e),u=n||!pa(l,o)||c;return u&&(this._active=l,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,i,s){const o=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,o.mode,o,i);return o.reverse&&l.reverse(),l}_positionChanged(e,n){const{caretX:i,caretY:s,options:o}=this,l=Cr[o.position].call(this,e,n);return l!==!1&&(i!==l.x||s!==l.y)}}var OC={id:"tooltip",_element:kd,positioners:Cr,afterInit(t,e,n){n&&(t.tooltip=new kd({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,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:op},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const xT=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function yT(t,e,n,i){const s=t.indexOf(e);if(s===-1)return xT(t,e,n,i);const o=t.lastIndexOf(e);return s!==o?n:s}const vT=(t,e)=>t===null?null:pe(Math.round(t),0,e);function Ed(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class DC extends ns{static id="category";static defaults={ticks:{callback:Ed}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:o}of n)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(xt(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:yT(i,e,lt(n,e),this._addedLabels),vT(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let l=e;l<=n;l++)s.push({value:l});return s}getLabelForValue(e){return Ed.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function ST(t,e){const n=[],{bounds:s,step:o,min:l,max:c,precision:u,count:h,maxTicks:d,maxDigits:p,includeBounds:_}=t,v=o||1,T=d-1,{min:M,max:k}=e,A=!xt(l),D=!xt(c),W=!xt(h),U=(k-M)/(p+1);let N=Th((k-M)/T/v)*v,G,$,X,Z;if(N<1e-14&&!A&&!D)return[{value:M},{value:k}];Z=Math.ceil(k/N)-Math.floor(M/N),Z>T&&(N=Th(Z*N/T/v)*v),xt(u)||(G=Math.pow(10,u),N=Math.ceil(N*G)/G),s==="ticks"?($=Math.floor(M/N)*N,X=Math.ceil(k/N)*N):($=M,X=k),A&&D&&o&&Pv((c-l)/o,N/1e3)?(Z=Math.round(Math.min((c-l)/N,d)),N=(c-l)/Z,$=l,X=c):W?($=A?l:$,X=D?c:X,Z=h-1,N=(X-$)/Z):(Z=(X-$)/N,ji(Z,Math.round(Z),N/1e3)?Z=Math.round(Z):Z=Math.ceil(Z));const rt=Math.max(Ph(N),Ph($));G=Math.pow(10,xt(u)?rt:u),$=Math.round($*G)/G,X=Math.round(X*G)/G;let st=0;for(A&&(_&&$!==l?(n.push({value:l}),$<l&&st++,ji(Math.round(($+st*N)*G)/G,l,Id(l,U,t))&&st++):$<l&&st++);st<Z;++st){const ft=Math.round(($+st*N)*G)/G;if(D&&ft>c)break;n.push({value:ft})}return D&&_&&X!==c?n.length&&ji(n[n.length-1].value,c,Id(c,U,t))?n[n.length-1].value=c:n.push({value:c}):(!D||X===c)&&n.push({value:X}),n}function Id(t,e,{horizontal:n,minRotation:i}){const s=Jn(i),o=(n?Math.sin(s):Math.cos(s))||.001,l=.75*e*(""+t).length;return Math.min(e/o,l)}class ap extends ns{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return xt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const l=u=>s=n?s:u,c=u=>o=i?o:u;if(e){const u=an(s),h=an(o);u<0&&h<0?c(0):u>0&&h>0&&l(0)}if(s===o){let u=o===0?1:Math.abs(o*.05);c(o+u),e||l(s-u)}this.min=s,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,l=ST(s,o);return e.bounds==="ticks"&&xg(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-n)/Math.max(e.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return wa(e,this.chart.options.locale,this.options.ticks.format)}}class RC extends ap{static id="linear";static defaults={ticks:{callback:Yc.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Zt(e)?e:0,this.max=Zt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=Jn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Hr=t=>Math.floor(yi(t)),Yi=(t,e)=>Math.pow(10,Hr(t)+e);function Ad(t){return t/Math.pow(10,Hr(t))===1}function Od(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function wT(t,e){const n=e-t;let i=Hr(n);for(;Od(t,e,i)>10;)i++;for(;Od(t,e,i)<10;)i--;return Math.min(i,Hr(t))}function MT(t,{min:e,max:n}){e=$e(t.min,e);const i=[],s=Hr(e);let o=wT(e,n),l=o<0?Math.pow(10,Math.abs(o)):1;const c=Math.pow(10,o),u=s>o?Math.pow(10,s):0,h=Math.round((e-u)*l)/l,d=Math.floor((e-u)/c/10)*c*10;let p=Math.floor((h-d)/Math.pow(10,o)),_=$e(t.min,Math.round((u+d+p*Math.pow(10,o))*l)/l);for(;_<n;)i.push({value:_,major:Ad(_),significand:p}),p>=10?p=p<15?15:20:p++,p>=20&&(o++,p=2,l=o>=0?1:l),_=Math.round((u+d+p*Math.pow(10,o))*l)/l;const v=$e(t.max,_);return i.push({value:v,major:Ad(v),significand:p}),i}class LC extends ns{static id="logarithmic";static defaults={ticks:{callback:Yc.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=ap.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Zt(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Zt(e)?Math.max(0,e):null,this.max=Zt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Zt(this._userMin)&&(this.min=e===Yi(this.min,0)?Yi(this.min,-1):Yi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const o=c=>i=e?i:c,l=c=>s=n?s:c;i===s&&(i<=0?(o(1),l(10)):(o(Yi(i,-1)),l(Yi(s,1)))),i<=0&&o(Yi(s,-1)),s<=0&&l(Yi(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=MT(n,this);return e.bounds==="ticks"&&xg(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":wa(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=yi(e),this._valueRange=yi(this.max)-yi(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yi(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}const ka={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},De=Object.keys(ka);function Dd(t,e){return t-e}function Rd(t,e){if(xt(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:o}=t._parseOpts;let l=e;return typeof i=="function"&&(l=i(l)),Zt(l)||(l=typeof i=="string"?n.parse(l,i):n.parse(l)),l===null?null:(s&&(l=s==="week"&&(Ls(o)||o===!0)?n.startOf(l,"isoWeek",o):n.startOf(l,s)),+l)}function Ld(t,e,n,i){const s=De.length;for(let o=De.indexOf(t);o<s-1;++o){const l=ka[De[o]],c=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(c*l.size))<=i)return De[o]}return De[s-1]}function TT(t,e,n,i,s){for(let o=De.length-1;o>=De.indexOf(n);o--){const l=De[o];if(ka[l].common&&t._adapter.diff(s,i,l)>=e-1)return l}return De[n?De.indexOf(n):0]}function PT(t){for(let e=De.indexOf(t)+1,n=De.length;e<n;++e)if(ka[De[e]].common)return De[e]}function Nd(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:s}=Vc(n,e),o=n[i]>=e?n[i]:n[s];t[o]=!0}}function CT(t,e,n,i){const s=t._adapter,o=+s.startOf(e[0].value,i),l=e[e.length-1].value;let c,u;for(c=o;c<=l;c=+s.add(c,1,i))u=n[c],u>=0&&(e[u].major=!0);return e}function Bd(t,e,n){const i=[],s={},o=e.length;let l,c;for(l=0;l<o;++l)c=e[l],s[c]=l,i.push({value:c,major:!1});return o===0||!n?i:CT(t,i,s,n)}class Fd extends ns{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const i=e.time||(e.time={}),s=this._adapter=new fw._date(e.adapters.date);s.init(n),Er(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Rd(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:s,max:o,minDefined:l,maxDefined:c}=this.getUserBounds();function u(h){!l&&!isNaN(h.min)&&(s=Math.min(s,h.min)),!c&&!isNaN(h.max)&&(o=Math.max(o,h.max))}(!l||!c)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),s=Zt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),o=Zt(o)&&!isNaN(o)?o:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,l=this.max,c=Av(s,o,l);return this._unit=n.unit||(i.autoSkip?Ld(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):TT(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:PT(this._unit),this.initOffsets(s),e.reverse&&c.reverse(),Bd(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,i=0,s,o;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?i=o:i=(o-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;n=pe(n,0,l),i=pe(i,0,l),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,s=this.options,o=s.time,l=o.unit||Ld(o.minUnit,n,i,this._getLabelCapacity(n)),c=lt(s.ticks.stepSize,1),u=l==="week"?o.isoWeekday:!1,h=Ls(u)||u===!0,d={};let p=n,_,v;if(h&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,h?"day":l),e.diff(i,n,l)>1e5*c)throw new Error(n+" and "+i+" are too far apart with stepSize of "+c+" "+l);const T=s.ticks.source==="data"&&this.getDataTimestamps();for(_=p,v=0;_<i;_=+e.add(_,c,l),v++)Nd(d,_,T);return(_===i||s.bounds==="ticks"||v===1)&&Nd(d,_,T),Object.keys(d).sort(Dd).map(M=>+M)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,o=this._unit,l=n||s[o];return this._adapter.format(e,l)}_tickFormatFunction(e,n,i,s){const o=this.options,l=o.ticks.callback;if(l)return it(l,[e,n,i],this);const c=o.time.displayFormats,u=this._unit,h=this._majorUnit,d=u&&c[u],p=h&&c[h],_=i[n],v=h&&p&&_&&_.major;return this._adapter.format(e,s||(v?p:d))}generateTickLabels(e){let n,i,s;for(n=0,i=e.length;n<i;++n)s=e[n],s.label=this._tickFormatFunction(s.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,s=Jn(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(s),l=Math.sin(s),c=this._resolveTickFontOptions(0).size;return{w:i*o+c*l,h:i*l+c*o}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,o=this._tickFormatFunction(e,0,Bd(this,[e],this._majorUnit),s),l=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)e=e.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)e.push(Rd(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Sg(e.sort(Dd))}}function ia(t,e,n){let i=0,s=t.length-1,o,l,c,u;n?(e>=t[i].pos&&e<=t[s].pos&&({lo:i,hi:s}=qi(t,"pos",e)),{pos:o,time:c}=t[i],{pos:l,time:u}=t[s]):(e>=t[i].time&&e<=t[s].time&&({lo:i,hi:s}=qi(t,"time",e)),{time:o,pos:c}=t[i],{time:l,pos:u}=t[s]);const h=l-o;return h?c+(u-c)*(e-o)/h:c}class NC extends Fd{static id="timeseries";static defaults=Fd.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ia(n,this.min),this._tableRange=ia(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,s=[],o=[];let l,c,u,h,d;for(l=0,c=e.length;l<c;++l)h=e[l],h>=n&&h<=i&&s.push(h);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(l=0,c=s.length;l<c;++l)d=s[l+1],u=s[l-1],h=s[l],Math.round((d+u)/2)!==h&&o.push({time:h,pos:l/(c-1)});return o}_generate(){const e=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(ia(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return ia(this._table,i*this._tableRange+this._minPos,!0)}}const lp="label";function Wd(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function kT(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function cp(t,e){t.labels=e}function fp(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lp;const i=[];t.datasets=e.map(s=>{const o=t.datasets.find(l=>l[n]===s[n]);return!o||!s.data||i.includes(o)?{...s}:(i.push(o),Object.assign(o,s),o)})}function ET(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lp;const n={labels:[],datasets:[]};return cp(n,t.labels),fp(n,t.datasets,e),n}function IT(t,e){const{height:n=150,width:i=300,redraw:s=!1,datasetIdKey:o,type:l,data:c,options:u,plugins:h=[],fallbackContent:d,updateMode:p,..._}=t,v=xe.useRef(null),T=xe.useRef(null),M=()=>{v.current&&(T.current=new tf(v.current,{type:l,data:ET(c,o),options:u&&{...u},plugins:h}),Wd(e,T.current))},k=()=>{Wd(e,null),T.current&&(T.current.destroy(),T.current=null)};return xe.useEffect(()=>{!s&&T.current&&u&&kT(T.current,u)},[s,u]),xe.useEffect(()=>{!s&&T.current&&cp(T.current.config.data,c.labels)},[s,c.labels]),xe.useEffect(()=>{!s&&T.current&&c.datasets&&fp(T.current.config.data,c.datasets,o)},[s,c.datasets]),xe.useEffect(()=>{T.current&&(s?(k(),setTimeout(M)):T.current.update(p))},[s,u,c.labels,c.datasets,p]),xe.useEffect(()=>{T.current&&(k(),setTimeout(M))},[l]),xe.useEffect(()=>(M(),()=>k()),[]),dg.createElement("canvas",{ref:v,role:"img",height:n,width:i,..._},d)}const AT=xe.forwardRef(IT);function Ea(t,e){return tf.register(e),xe.forwardRef((n,i)=>dg.createElement(AT,{...n,ref:i,type:t}))}const BC=Ea("line",aw),FC=Ea("bar",sw),WC=Ea("pie",lw),zC=Ea("scatter",cw);var gc={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
19
|
-
* http://hammerjs.github.io/
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) 2016 Jorik Tangelder;
|
|
22
|
-
* Licensed under the MIT license */var zd;function OT(){return zd||(zd=1,function(t){(function(e,n,i,s){var o=["","webkit","Moz","MS","ms","o"],l=n.createElement("div"),c="function",u=Math.round,h=Math.abs,d=Date.now;function p(b,S,P){return setTimeout(W(b,P),S)}function _(b,S,P){return Array.isArray(b)?(v(b,P[S],P),!0):!1}function v(b,S,P){var O;if(b)if(b.forEach)b.forEach(S,P);else if(b.length!==s)for(O=0;O<b.length;)S.call(P,b[O],O,b),O++;else for(O in b)b.hasOwnProperty(O)&&S.call(P,b[O],O,b)}function T(b,S,P){var O="DEPRECATED METHOD: "+S+`
|
|
23
|
-
`+P+` AT
|
|
24
|
-
`;return function(){var V=new Error("get-stack-trace"),q=V&&V.stack?V.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",ht=e.console&&(e.console.warn||e.console.log);return ht&&ht.call(e.console,O,q),b.apply(this,arguments)}}var M;typeof Object.assign!="function"?M=function(S){if(S===s||S===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(S),O=1;O<arguments.length;O++){var V=arguments[O];if(V!==s&&V!==null)for(var q in V)V.hasOwnProperty(q)&&(P[q]=V[q])}return P}:M=Object.assign;var k=T(function(S,P,O){for(var V=Object.keys(P),q=0;q<V.length;)(!O||O&&S[V[q]]===s)&&(S[V[q]]=P[V[q]]),q++;return S},"extend","Use `assign`."),A=T(function(S,P){return k(S,P,!0)},"merge","Use `assign`.");function D(b,S,P){var O=S.prototype,V;V=b.prototype=Object.create(O),V.constructor=b,V._super=O,P&&M(V,P)}function W(b,S){return function(){return b.apply(S,arguments)}}function U(b,S){return typeof b==c?b.apply(S&&S[0]||s,S):b}function N(b,S){return b===s?S:b}function G(b,S,P){v(rt(S),function(O){b.addEventListener(O,P,!1)})}function $(b,S,P){v(rt(S),function(O){b.removeEventListener(O,P,!1)})}function X(b,S){for(;b;){if(b==S)return!0;b=b.parentNode}return!1}function Z(b,S){return b.indexOf(S)>-1}function rt(b){return b.trim().split(/\s+/g)}function st(b,S,P){if(b.indexOf&&!P)return b.indexOf(S);for(var O=0;O<b.length;){if(P&&b[O][P]==S||!P&&b[O]===S)return O;O++}return-1}function ft(b){return Array.prototype.slice.call(b,0)}function Wt(b,S,P){for(var O=[],V=[],q=0;q<b.length;){var ht=b[q][S];st(V,ht)<0&&O.push(b[q]),V[q]=ht,q++}return O=O.sort(function(jt,ee){return jt[S]>ee[S]}),O}function Vt(b,S){for(var P,O,V=S[0].toUpperCase()+S.slice(1),q=0;q<o.length;){if(P=o[q],O=P?P+V:S,O in b)return O;q++}return s}var vt=1;function Pt(){return vt++}function St(b){var S=b.ownerDocument||b;return S.defaultView||S.parentWindow||e}var zt=/mobile|tablet|ip(ad|hone|od)|android/i,$t="ontouchstart"in e,Re=Vt(e,"PointerEvent")!==s,se=$t&&zt.test(navigator.userAgent),ye="touch",En="pen",Le="mouse",ve="kinect",Se=25,re=1,Ne=2,kt=4,ue=8,In=1,mn=2,ni=4,oe=8,ln=16,Xe=mn|ni,ae=oe|ln,Hs=Xe|ae,qr=["x","y"],_n=["clientX","clientY"];function Ot(b,S){var P=this;this.manager=b,this.callback=S,this.element=b.element,this.target=b.options.inputTarget,this.domHandler=function(O){U(b.options.enable,[b])&&P.handler(O)},this.init()}Ot.prototype={handler:function(){},init:function(){this.evEl&&G(this.element,this.evEl,this.domHandler),this.evTarget&&G(this.target,this.evTarget,this.domHandler),this.evWin&&G(St(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&$(this.element,this.evEl,this.domHandler),this.evTarget&&$(this.target,this.evTarget,this.domHandler),this.evWin&&$(St(this.element),this.evWin,this.domHandler)}};function Ci(b){var S,P=b.options.inputClass;return P?S=P:Re?S=qs:se?S=ri:$t?S=Js:S=ls,new S(b,rs)}function rs(b,S,P){var O=P.pointers.length,V=P.changedPointers.length,q=S&re&&O-V===0,ht=S&(kt|ue)&&O-V===0;P.isFirst=!!q,P.isFinal=!!ht,q&&(b.session={}),P.eventType=S,Da(b,P),b.emit("hammer.input",P),b.recognize(P),b.session.prevInput=P}function Da(b,S){var P=b.session,O=S.pointers,V=O.length;P.firstInput||(P.firstInput=ii(S)),V>1&&!P.firstMultiple?P.firstMultiple=ii(S):V===1&&(P.firstMultiple=!1);var q=P.firstInput,ht=P.firstMultiple,Gt=ht?ht.center:q.center,jt=S.center=An(O);S.timeStamp=d(),S.deltaTime=S.timeStamp-q.timeStamp,S.angle=Ei(Gt,jt),S.distance=si(Gt,jt),ki(P,S),S.offsetDirection=as(S.deltaX,S.deltaY);var ee=os(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=ee.x,S.overallVelocityY=ee.y,S.overallVelocity=h(ee.x)>h(ee.y)?ee.x:ee.y,S.scale=ht?Vs(ht.pointers,O):1,S.rotation=ht?Us(ht.pointers,O):0,S.maxPointers=P.prevInput?S.pointers.length>P.prevInput.maxPointers?S.pointers.length:P.prevInput.maxPointers:S.pointers.length,Ra(P,S);var qe=b.element;X(S.srcEvent.target,qe)&&(qe=S.srcEvent.target),S.target=qe}function ki(b,S){var P=S.center,O=b.offsetDelta||{},V=b.prevDelta||{},q=b.prevInput||{};(S.eventType===re||q.eventType===kt)&&(V=b.prevDelta={x:q.deltaX||0,y:q.deltaY||0},O=b.offsetDelta={x:P.x,y:P.y}),S.deltaX=V.x+(P.x-O.x),S.deltaY=V.y+(P.y-O.y)}function Ra(b,S){var P=b.lastInterval||S,O=S.timeStamp-P.timeStamp,V,q,ht,Gt;if(S.eventType!=ue&&(O>Se||P.velocity===s)){var jt=S.deltaX-P.deltaX,ee=S.deltaY-P.deltaY,qe=os(O,jt,ee);q=qe.x,ht=qe.y,V=h(qe.x)>h(qe.y)?qe.x:qe.y,Gt=as(jt,ee),b.lastInterval=S}else V=P.velocity,q=P.velocityX,ht=P.velocityY,Gt=P.direction;S.velocity=V,S.velocityX=q,S.velocityY=ht,S.direction=Gt}function ii(b){for(var S=[],P=0;P<b.pointers.length;)S[P]={clientX:u(b.pointers[P].clientX),clientY:u(b.pointers[P].clientY)},P++;return{timeStamp:d(),pointers:S,center:An(S),deltaX:b.deltaX,deltaY:b.deltaY}}function An(b){var S=b.length;if(S===1)return{x:u(b[0].clientX),y:u(b[0].clientY)};for(var P=0,O=0,V=0;V<S;)P+=b[V].clientX,O+=b[V].clientY,V++;return{x:u(P/S),y:u(O/S)}}function os(b,S,P){return{x:S/b||0,y:P/b||0}}function as(b,S){return b===S?In:h(b)>=h(S)?b<0?mn:ni:S<0?oe:ln}function si(b,S,P){P||(P=qr);var O=S[P[0]]-b[P[0]],V=S[P[1]]-b[P[1]];return Math.sqrt(O*O+V*V)}function Ei(b,S,P){P||(P=qr);var O=S[P[0]]-b[P[0]],V=S[P[1]]-b[P[1]];return Math.atan2(V,O)*180/Math.PI}function Us(b,S){return Ei(S[1],S[0],_n)+Ei(b[1],b[0],_n)}function Vs(b,S){return si(S[0],S[1],_n)/si(b[0],b[1],_n)}var $s={mousedown:re,mousemove:Ne,mouseup:kt},Gs="mousedown",Ys="mousemove mouseup";function ls(){this.evEl=Gs,this.evWin=Ys,this.pressed=!1,Ot.apply(this,arguments)}D(ls,Ot,{handler:function(S){var P=$s[S.type];P&re&&S.button===0&&(this.pressed=!0),P&Ne&&S.which!==1&&(P=kt),this.pressed&&(P&kt&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:Le,srcEvent:S}))}});var La={pointerdown:re,pointermove:Ne,pointerup:kt,pointercancel:ue,pointerout:ue},Na={2:ye,3:En,4:Le,5:ve},Xs="pointerdown",Ks="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Xs="MSPointerDown",Ks="MSPointerMove MSPointerUp MSPointerCancel");function qs(){this.evEl=Xs,this.evWin=Ks,Ot.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}D(qs,Ot,{handler:function(S){var P=this.store,O=!1,V=S.type.toLowerCase().replace("ms",""),q=La[V],ht=Na[S.pointerType]||S.pointerType,Gt=ht==ye,jt=st(P,S.pointerId,"pointerId");q&re&&(S.button===0||Gt)?jt<0&&(P.push(S),jt=P.length-1):q&(kt|ue)&&(O=!0),!(jt<0)&&(P[jt]=S,this.callback(this.manager,q,{pointers:P,changedPointers:[S],pointerType:ht,srcEvent:S}),O&&P.splice(jt,1))}});var Ba={touchstart:re,touchmove:Ne,touchend:kt,touchcancel:ue},Fa="touchstart",Wa="touchstart touchmove touchend touchcancel";function js(){this.evTarget=Fa,this.evWin=Wa,this.started=!1,Ot.apply(this,arguments)}D(js,Ot,{handler:function(S){var P=Ba[S.type];if(P===re&&(this.started=!0),!!this.started){var O=za.call(this,S,P);P&(kt|ue)&&O[0].length-O[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:O[0],changedPointers:O[1],pointerType:ye,srcEvent:S})}}});function za(b,S){var P=ft(b.touches),O=ft(b.changedTouches);return S&(kt|ue)&&(P=Wt(P.concat(O),"identifier")),[P,O]}var Ha={touchstart:re,touchmove:Ne,touchend:kt,touchcancel:ue},Ua="touchstart touchmove touchend touchcancel";function ri(){this.evTarget=Ua,this.targetIds={},Ot.apply(this,arguments)}D(ri,Ot,{handler:function(S){var P=Ha[S.type],O=Va.call(this,S,P);O&&this.callback(this.manager,P,{pointers:O[0],changedPointers:O[1],pointerType:ye,srcEvent:S})}});function Va(b,S){var P=ft(b.touches),O=this.targetIds;if(S&(re|Ne)&&P.length===1)return O[P[0].identifier]=!0,[P,P];var V,q,ht=ft(b.changedTouches),Gt=[],jt=this.target;if(q=P.filter(function(ee){return X(ee.target,jt)}),S===re)for(V=0;V<q.length;)O[q[V].identifier]=!0,V++;for(V=0;V<ht.length;)O[ht[V].identifier]&&Gt.push(ht[V]),S&(kt|ue)&&delete O[ht[V].identifier],V++;if(Gt.length)return[Wt(q.concat(Gt),"identifier"),Gt]}var Zs=2500,jr=25;function Js(){Ot.apply(this,arguments);var b=W(this.handler,this);this.touch=new ri(this.manager,b),this.mouse=new ls(this.manager,b),this.primaryTouch=null,this.lastTouches=[]}D(Js,Ot,{handler:function(S,P,O){var V=O.pointerType==ye,q=O.pointerType==Le;if(!(q&&O.sourceCapabilities&&O.sourceCapabilities.firesTouchEvents)){if(V)$a.call(this,P,O);else if(q&&Ga.call(this,O))return;this.callback(S,P,O)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function $a(b,S){b&re?(this.primaryTouch=S.changedPointers[0].identifier,Zr.call(this,S)):b&(kt|ue)&&Zr.call(this,S)}function Zr(b){var S=b.changedPointers[0];if(S.identifier===this.primaryTouch){var P={x:S.clientX,y:S.clientY};this.lastTouches.push(P);var O=this.lastTouches,V=function(){var q=O.indexOf(P);q>-1&&O.splice(q,1)};setTimeout(V,Zs)}}function Ga(b){for(var S=b.srcEvent.clientX,P=b.srcEvent.clientY,O=0;O<this.lastTouches.length;O++){var V=this.lastTouches[O],q=Math.abs(S-V.x),ht=Math.abs(P-V.y);if(q<=jr&&ht<=jr)return!0}return!1}var Jr=Vt(l.style,"touchAction"),Qr=Jr!==s,to="compute",Qs="auto",tr="manipulation",On="none",Ii="pan-x",Ai="pan-y",cs=Ya();function er(b,S){this.manager=b,this.set(S)}er.prototype={set:function(b){b==to&&(b=this.compute()),Qr&&this.manager.element.style&&cs[b]&&(this.manager.element.style[Jr]=b),this.actions=b.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var b=[];return v(this.manager.recognizers,function(S){U(S.options.enable,[S])&&(b=b.concat(S.getTouchAction()))}),fs(b.join(" "))},preventDefaults:function(b){var S=b.srcEvent,P=b.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var O=this.actions,V=Z(O,On)&&!cs[On],q=Z(O,Ai)&&!cs[Ai],ht=Z(O,Ii)&&!cs[Ii];if(V){var Gt=b.pointers.length===1,jt=b.distance<2,ee=b.deltaTime<250;if(Gt&&jt&&ee)return}if(!(ht&&q)&&(V||q&&P&Xe||ht&&P&ae))return this.preventSrc(S)},preventSrc:function(b){this.manager.session.prevented=!0,b.preventDefault()}};function fs(b){if(Z(b,On))return On;var S=Z(b,Ii),P=Z(b,Ai);return S&&P?On:S||P?S?Ii:Ai:Z(b,tr)?tr:Qs}function Ya(){if(!Qr)return!1;var b={},S=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){b[P]=S?e.CSS.supports("touch-action",P):!0}),b}var Dn=1,we=2,oi=4,bn=8,Ke=bn,ai=16,Be=32;function cn(b){this.options=M({},this.defaults,b||{}),this.id=Pt(),this.manager=null,this.options.enable=N(this.options.enable,!0),this.state=Dn,this.simultaneous={},this.requireFail=[]}cn.prototype={defaults:{},set:function(b){return M(this.options,b),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(b){if(_(b,"recognizeWith",this))return this;var S=this.simultaneous;return b=us(b,this),S[b.id]||(S[b.id]=b,b.recognizeWith(this)),this},dropRecognizeWith:function(b){return _(b,"dropRecognizeWith",this)?this:(b=us(b,this),delete this.simultaneous[b.id],this)},requireFailure:function(b){if(_(b,"requireFailure",this))return this;var S=this.requireFail;return b=us(b,this),st(S,b)===-1&&(S.push(b),b.requireFailure(this)),this},dropRequireFailure:function(b){if(_(b,"dropRequireFailure",this))return this;b=us(b,this);var S=st(this.requireFail,b);return S>-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(b){return!!this.simultaneous[b.id]},emit:function(b){var S=this,P=this.state;function O(V){S.manager.emit(V,b)}P<bn&&O(S.options.event+eo(P)),O(S.options.event),b.additionalEvent&&O(b.additionalEvent),P>=bn&&O(S.options.event+eo(P))},tryEmit:function(b){if(this.canEmit())return this.emit(b);this.state=Be},canEmit:function(){for(var b=0;b<this.requireFail.length;){if(!(this.requireFail[b].state&(Be|Dn)))return!1;b++}return!0},recognize:function(b){var S=M({},b);if(!U(this.options.enable,[this,S])){this.reset(),this.state=Be;return}this.state&(Ke|ai|Be)&&(this.state=Dn),this.state=this.process(S),this.state&(we|oi|bn|ai)&&this.tryEmit(S)},process:function(b){},getTouchAction:function(){},reset:function(){}};function eo(b){return b&ai?"cancel":b&bn?"end":b&oi?"move":b&we?"start":""}function no(b){return b==ln?"down":b==oe?"up":b==mn?"left":b==ni?"right":""}function us(b,S){var P=S.manager;return P?P.get(b):b}function Me(){cn.apply(this,arguments)}D(Me,cn,{defaults:{pointers:1},attrTest:function(b){var S=this.options.pointers;return S===0||b.pointers.length===S},process:function(b){var S=this.state,P=b.eventType,O=S&(we|oi),V=this.attrTest(b);return O&&(P&ue||!V)?S|ai:O||V?P&kt?S|bn:S&we?S|oi:we:Be}});function Oi(){Me.apply(this,arguments),this.pX=null,this.pY=null}D(Oi,Me,{defaults:{event:"pan",threshold:10,pointers:1,direction:Hs},getTouchAction:function(){var b=this.options.direction,S=[];return b&Xe&&S.push(Ai),b&ae&&S.push(Ii),S},directionTest:function(b){var S=this.options,P=!0,O=b.distance,V=b.direction,q=b.deltaX,ht=b.deltaY;return V&S.direction||(S.direction&Xe?(V=q===0?In:q<0?mn:ni,P=q!=this.pX,O=Math.abs(b.deltaX)):(V=ht===0?In:ht<0?oe:ln,P=ht!=this.pY,O=Math.abs(b.deltaY))),b.direction=V,P&&O>S.threshold&&V&S.direction},attrTest:function(b){return Me.prototype.attrTest.call(this,b)&&(this.state&we||!(this.state&we)&&this.directionTest(b))},emit:function(b){this.pX=b.deltaX,this.pY=b.deltaY;var S=no(b.direction);S&&(b.additionalEvent=this.options.event+S),this._super.emit.call(this,b)}});function hs(){Me.apply(this,arguments)}D(hs,Me,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[On]},attrTest:function(b){return this._super.attrTest.call(this,b)&&(Math.abs(b.scale-1)>this.options.threshold||this.state&we)},emit:function(b){if(b.scale!==1){var S=b.scale<1?"in":"out";b.additionalEvent=this.options.event+S}this._super.emit.call(this,b)}});function Di(){cn.apply(this,arguments),this._timer=null,this._input=null}D(Di,cn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Qs]},process:function(b){var S=this.options,P=b.pointers.length===S.pointers,O=b.distance<S.threshold,V=b.deltaTime>S.time;if(this._input=b,!O||!P||b.eventType&(kt|ue)&&!V)this.reset();else if(b.eventType&re)this.reset(),this._timer=p(function(){this.state=Ke,this.tryEmit()},S.time,this);else if(b.eventType&kt)return Ke;return Be},reset:function(){clearTimeout(this._timer)},emit:function(b){this.state===Ke&&(b&&b.eventType&kt?this.manager.emit(this.options.event+"up",b):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function nr(){Me.apply(this,arguments)}D(nr,Me,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[On]},attrTest:function(b){return this._super.attrTest.call(this,b)&&(Math.abs(b.rotation)>this.options.threshold||this.state&we)}});function ds(){Me.apply(this,arguments)}D(ds,Me,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Xe|ae,pointers:1},getTouchAction:function(){return Oi.prototype.getTouchAction.call(this)},attrTest:function(b){var S=this.options.direction,P;return S&(Xe|ae)?P=b.overallVelocity:S&Xe?P=b.overallVelocityX:S&ae&&(P=b.overallVelocityY),this._super.attrTest.call(this,b)&&S&b.offsetDirection&&b.distance>this.options.threshold&&b.maxPointers==this.options.pointers&&h(P)>this.options.velocity&&b.eventType&kt},emit:function(b){var S=no(b.offsetDirection);S&&this.manager.emit(this.options.event+S,b),this.manager.emit(this.options.event,b)}});function Rn(){cn.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}D(Rn,cn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[tr]},process:function(b){var S=this.options,P=b.pointers.length===S.pointers,O=b.distance<S.threshold,V=b.deltaTime<S.time;if(this.reset(),b.eventType&re&&this.count===0)return this.failTimeout();if(O&&V&&P){if(b.eventType!=kt)return this.failTimeout();var q=this.pTime?b.timeStamp-this.pTime<S.interval:!0,ht=!this.pCenter||si(this.pCenter,b.center)<S.posThreshold;this.pTime=b.timeStamp,this.pCenter=b.center,!ht||!q?this.count=1:this.count+=1,this._input=b;var Gt=this.count%S.taps;if(Gt===0)return this.hasRequireFailures()?(this._timer=p(function(){this.state=Ke,this.tryEmit()},S.interval,this),we):Ke}return Be},failTimeout:function(){return this._timer=p(function(){this.state=Be},this.options.interval,this),Be},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Ke&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function fn(b,S){return S=S||{},S.recognizers=N(S.recognizers,fn.defaults.preset),new gs(b,S)}fn.VERSION="2.0.7",fn.defaults={domEvents:!1,touchAction:to,enable:!0,inputTarget:null,inputClass:null,preset:[[nr,{enable:!1}],[hs,{enable:!1},["rotate"]],[ds,{direction:Xe}],[Oi,{direction:Xe},["swipe"]],[Rn],[Rn,{event:"doubletap",taps:2},["tap"]],[Di]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Xa=1,ir=2;function gs(b,S){this.options=M({},fn.defaults,S||{}),this.options.inputTarget=this.options.inputTarget||b,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=b,this.input=Ci(this),this.touchAction=new er(this,this.options.touchAction),ps(this,!0),v(this.options.recognizers,function(P){var O=this.add(new P[0](P[1]));P[2]&&O.recognizeWith(P[2]),P[3]&&O.requireFailure(P[3])},this)}gs.prototype={set:function(b){return M(this.options,b),b.touchAction&&this.touchAction.update(),b.inputTarget&&(this.input.destroy(),this.input.target=b.inputTarget,this.input.init()),this},stop:function(b){this.session.stopped=b?ir:Xa},recognize:function(b){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(b);var P,O=this.recognizers,V=S.curRecognizer;(!V||V&&V.state&Ke)&&(V=S.curRecognizer=null);for(var q=0;q<O.length;)P=O[q],S.stopped!==ir&&(!V||P==V||P.canRecognizeWith(V))?P.recognize(b):P.reset(),!V&&P.state&(we|oi|bn)&&(V=S.curRecognizer=P),q++}},get:function(b){if(b instanceof cn)return b;for(var S=this.recognizers,P=0;P<S.length;P++)if(S[P].options.event==b)return S[P];return null},add:function(b){if(_(b,"add",this))return this;var S=this.get(b.options.event);return S&&this.remove(S),this.recognizers.push(b),b.manager=this,this.touchAction.update(),b},remove:function(b){if(_(b,"remove",this))return this;if(b=this.get(b),b){var S=this.recognizers,P=st(S,b);P!==-1&&(S.splice(P,1),this.touchAction.update())}return this},on:function(b,S){if(b!==s&&S!==s){var P=this.handlers;return v(rt(b),function(O){P[O]=P[O]||[],P[O].push(S)}),this}},off:function(b,S){if(b!==s){var P=this.handlers;return v(rt(b),function(O){S?P[O]&&P[O].splice(st(P[O],S),1):delete P[O]}),this}},emit:function(b,S){this.options.domEvents&&Ka(b,S);var P=this.handlers[b]&&this.handlers[b].slice();if(!(!P||!P.length)){S.type=b,S.preventDefault=function(){S.srcEvent.preventDefault()};for(var O=0;O<P.length;)P[O](S),O++}},destroy:function(){this.element&&ps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ps(b,S){var P=b.element;if(P.style){var O;v(b.options.cssProps,function(V,q){O=Vt(P.style,q),S?(b.oldCssProps[O]=P.style[O],P.style[O]=V):P.style[O]=b.oldCssProps[O]||""}),S||(b.oldCssProps={})}}function Ka(b,S){var P=n.createEvent("Event");P.initEvent(b,!0,!0),P.gesture=S,S.target.dispatchEvent(P)}M(fn,{INPUT_START:re,INPUT_MOVE:Ne,INPUT_END:kt,INPUT_CANCEL:ue,STATE_POSSIBLE:Dn,STATE_BEGAN:we,STATE_CHANGED:oi,STATE_ENDED:bn,STATE_RECOGNIZED:Ke,STATE_CANCELLED:ai,STATE_FAILED:Be,DIRECTION_NONE:In,DIRECTION_LEFT:mn,DIRECTION_RIGHT:ni,DIRECTION_UP:oe,DIRECTION_DOWN:ln,DIRECTION_HORIZONTAL:Xe,DIRECTION_VERTICAL:ae,DIRECTION_ALL:Hs,Manager:gs,Input:Ot,TouchAction:er,TouchInput:ri,MouseInput:ls,PointerEventInput:qs,TouchMouseInput:Js,SingleTouchInput:js,Recognizer:cn,AttrRecognizer:Me,Tap:Rn,Pan:Oi,Swipe:ds,Pinch:hs,Rotate:nr,Press:Di,on:G,off:$,each:v,merge:A,extend:k,assign:M,inherit:D,bindFn:W,prefixed:Vt});var io=typeof e<"u"?e:typeof self<"u"?self:{};io.Hammer=fn,t.exports?t.exports=fn:e[i]=fn})(window,document,"Hammer")}(gc)),gc.exports}var DT=OT();const Or=Fc(DT);/*!
|
|
25
|
-
* chartjs-plugin-zoom v2.2.0
|
|
26
|
-
* https://www.chartjs.org/chartjs-plugin-zoom/2.2.0/
|
|
27
|
-
* (c) 2016-2024 chartjs-plugin-zoom Contributors
|
|
28
|
-
* Released under the MIT License
|
|
29
|
-
*/const Ur=t=>t&&t.enabled&&t.modifierKey,up=(t,e)=>t&&e[t+"Key"],sf=(t,e)=>t&&!e[t+"Key"];function Ti(t,e,n){return t===void 0?!0:typeof t=="string"?t.indexOf(e)!==-1:typeof t=="function"?t({chart:n}).indexOf(e)!==-1:!1}function pc(t,e){return typeof t=="function"&&(t=t({chart:e})),typeof t=="string"?{x:t.indexOf("x")!==-1,y:t.indexOf("y")!==-1}:{x:!1,y:!1}}function RT(t,e){let n;return function(){return clearTimeout(n),n=setTimeout(t,e),e}}function LT({x:t,y:e},n){const i=n.scales,s=Object.keys(i);for(let o=0;o<s.length;o++){const l=i[s[o]];if(e>=l.top&&e<=l.bottom&&t>=l.left&&t<=l.right)return l}return null}function hp(t,e,n){const{mode:i="xy",scaleMode:s,overScaleMode:o}=t||{},l=LT(e,n),c=pc(i,n),u=pc(s,n);if(o){const d=pc(o,n);for(const p of["x","y"])d[p]&&(u[p]=c[p],c[p]=!1)}if(l&&u[l.axis])return[l];const h=[];return pt(n.scales,function(d){c[d.axis]&&h.push(d)}),h}const Cc=new WeakMap;function Ft(t){let e=Cc.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},Cc.set(t,e)),e}function NT(t){Cc.delete(t)}function dp(t,e,n,i){const s=Math.max(0,Math.min(1,(t-e)/n||0)),o=1-s;return{min:i*s,max:i*o}}function gp(t,e){const n=t.isHorizontal()?e.x:e.y;return t.getValueForPixel(n)}function pp(t,e,n){const i=t.max-t.min,s=i*(e-1),o=gp(t,n);return dp(o,t.min,i,s)}function BT(t,e,n){const i=gp(t,n);if(i===void 0)return{min:t.min,max:t.max};const s=Math.log10(t.min),o=Math.log10(t.max),l=Math.log10(i),c=o-s,u=c*(e-1),h=dp(l,s,c,u);return{min:Math.pow(10,s+h.min),max:Math.pow(10,o-h.max)}}function FT(t,e){return e&&(e[t.id]||e[t.axis])||{}}function Hd(t,e,n,i,s){let o=n[i];if(o==="original"){const l=t.originalScaleLimits[e.id][i];o=lt(l.options,l.scale)}return lt(o,s)}function WT(t,e,n){const i=t.getValueForPixel(e),s=t.getValueForPixel(n);return{min:Math.min(i,s),max:Math.max(i,s)}}function zT(t,{min:e,max:n,minLimit:i,maxLimit:s},o){const l=(t-n+e)/2;e-=l,n+=l;const c=o.min.options??o.min.scale,u=o.max.options??o.max.scale,h=t/1e6;return ji(e,c,h)&&(e=c),ji(n,u,h)&&(n=u),e<i?(e=i,n=Math.min(i+t,s)):n>s&&(n=s,e=Math.max(s-t,i)),{min:e,max:n}}function is(t,{min:e,max:n},i,s=!1){const o=Ft(t.chart),{options:l}=t,c=FT(t,i),{minRange:u=0}=c,h=Hd(o,t,c,"min",-1/0),d=Hd(o,t,c,"max",1/0);if(s==="pan"&&(e<h||n>d))return!0;const p=t.max-t.min,_=s?Math.max(n-e,u):p;if(s&&_===u&&p<=u)return!0;const v=zT(_,{min:e,max:n,minLimit:h,maxLimit:d},o.originalScaleLimits[t.id]);return l.min=v.min,l.max=v.max,o.updatedScaleLimits[t.id]=v,t.parse(v.min)!==t.min||t.parse(v.max)!==t.max}function HT(t,e,n,i){const s=pp(t,e,n),o={min:t.min+s.min,max:t.max-s.max};return is(t,o,i,!0)}function UT(t,e,n,i){const s=BT(t,e,n);return is(t,s,i,!0)}function VT(t,e,n,i){is(t,WT(t,e,n),i,!0)}const Ud=t=>t===0||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);function $T(t){const n=t.getLabels().length-1;t.min>0&&(t.min-=1),t.max<n&&(t.max+=1)}function GT(t,e,n,i){const s=pp(t,e,n);t.min===t.max&&e<1&&$T(t);const o={min:t.min+Ud(s.min),max:t.max-Ud(s.max)};return is(t,o,i,!0)}function YT(t){return t.isHorizontal()?t.width:t.height}function XT(t,e,n){const s=t.getLabels().length-1;let{min:o,max:l}=t;const c=Math.max(l-o,1),u=Math.round(YT(t)/Math.max(c,10)),h=Math.round(Math.abs(e/u));let d;return e<-u?(l=Math.min(l+h,s),o=c===1?l:l-c,d=l===s):e>u&&(o=Math.max(0,o-h),l=c===1?o:o+c,d=o===0),is(t,{min:o,max:l},n)||d}const KT={second:500,minute:30*1e3,hour:30*60*1e3,day:12*60*60*1e3,week:3.5*24*60*60*1e3,month:15*24*60*60*1e3,quarter:60*24*60*60*1e3,year:182*24*60*60*1e3};function mp(t,e,n,i=!1){const{min:s,max:o,options:l}=t,c=l.time&&l.time.round,u=KT[c]||0,h=t.getValueForPixel(t.getPixelForValue(s+u)-e),d=t.getValueForPixel(t.getPixelForValue(o+u)-e);return isNaN(h)||isNaN(d)?!0:is(t,{min:h,max:d},n,i?"pan":!1)}function Vd(t,e,n){return mp(t,e,n,!0)}const kc={category:GT,default:HT,logarithmic:UT},Ec={default:VT},Ic={category:XT,default:mp,logarithmic:Vd,timeseries:Vd};function qT(t,e,n){const{id:i,options:{min:s,max:o}}=t;if(!e[i]||!n[i])return!0;const l=n[i];return l.min!==s||l.max!==o}function $d(t,e){pt(t,(n,i)=>{e[i]||delete t[i]})}function Ws(t,e){const{scales:n}=t,{originalScaleLimits:i,updatedScaleLimits:s}=e;return pt(n,function(o){qT(o,i,s)&&(i[o.id]={min:{scale:o.min,options:o.options.min},max:{scale:o.max,options:o.options.max}})}),$d(i,n),$d(s,n),i}function Gd(t,e,n,i){const s=kc[t.type]||kc.default;it(s,[t,e,n,i])}function Yd(t,e,n,i){const s=Ec[t.type]||Ec.default;it(s,[t,e,n,i])}function jT(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function rf(t,e,n="none",i="api"){const{x:s=1,y:o=1,focalPoint:l=jT(t)}=typeof e=="number"?{x:e,y:e}:e,c=Ft(t),{options:{limits:u,zoom:h}}=c;Ws(t,c);const d=s!==1,p=o!==1,_=hp(h,l,t);pt(_||t.scales,function(v){v.isHorizontal()&&d?Gd(v,s,l,u):!v.isHorizontal()&&p&&Gd(v,o,l,u)}),t.update(n),it(h.onZoom,[{chart:t,trigger:i}])}function _p(t,e,n,i="none",s="api"){const o=Ft(t),{options:{limits:l,zoom:c}}=o,{mode:u="xy"}=c;Ws(t,o);const h=Ti(u,"x",t),d=Ti(u,"y",t);pt(t.scales,function(p){p.isHorizontal()&&h?Yd(p,e.x,n.x,l):!p.isHorizontal()&&d&&Yd(p,e.y,n.y,l)}),t.update(i),it(c.onZoom,[{chart:t,trigger:s}])}function ZT(t,e,n,i="none",s="api"){const o=Ft(t);Ws(t,o);const l=t.scales[e];is(l,n,void 0,!0),t.update(i),it(o.options.zoom?.onZoom,[{chart:t,trigger:s}])}function JT(t,e="default"){const n=Ft(t),i=Ws(t,n);pt(t.scales,function(s){const o=s.options;i[s.id]?(o.min=i[s.id].min.options,o.max=i[s.id].max.options):(delete o.min,delete o.max),delete n.updatedScaleLimits[s.id]}),t.update(e),it(n.options.zoom.onZoomComplete,[{chart:t}])}function QT(t,e){const n=t.originalScaleLimits[e];if(!n)return;const{min:i,max:s}=n;return lt(s.options,s.scale)-lt(i.options,i.scale)}function t2(t){const e=Ft(t);let n=1,i=1;return pt(t.scales,function(s){const o=QT(e,s.id);if(o){const l=Math.round(o/(s.max-s.min)*100)/100;n=Math.min(n,l),i=Math.max(i,l)}}),n<1?n:i}function Xd(t,e,n,i){const{panDelta:s}=i,o=s[t.id]||0;an(o)===an(e)&&(e+=o);const l=Ic[t.type]||Ic.default;it(l,[t,e,n])?s[t.id]=0:s[t.id]=e}function bp(t,e,n,i="none"){const{x:s=0,y:o=0}=typeof e=="number"?{x:e,y:e}:e,l=Ft(t),{options:{pan:c,limits:u}}=l,{onPan:h}=c||{};Ws(t,l);const d=s!==0,p=o!==0;pt(n||t.scales,function(_){_.isHorizontal()&&d?Xd(_,s,u,l):!_.isHorizontal()&&p&&Xd(_,o,u,l)}),t.update(i),it(h,[{chart:t}])}function xp(t){const e=Ft(t);Ws(t,e);const n={};for(const i of Object.keys(t.scales)){const{min:s,max:o}=e.originalScaleLimits[i]||{min:{},max:{}};n[i]={min:s.scale,max:o.scale}}return n}function e2(t){const e=Ft(t),n={};for(const i of Object.keys(t.scales))n[i]=e.updatedScaleLimits[i];return n}function n2(t){const e=xp(t);for(const n of Object.keys(t.scales)){const{min:i,max:s}=e[n];if(i!==void 0&&t.scales[n].min!==i||s!==void 0&&t.scales[n].max!==s)return!0}return!1}function Kd(t){const e=Ft(t);return e.panning||e.dragging}const qd=(t,e,n)=>Math.min(n,Math.max(e,t));function Oe(t,e){const{handlers:n}=Ft(t),i=n[e];i&&i.target&&(i.target.removeEventListener(e,i),delete n[e])}function Dr(t,e,n,i){const{handlers:s,options:o}=Ft(t),l=s[n];if(l&&l.target===e)return;Oe(t,n),s[n]=u=>i(t,u,o),s[n].target=e;const c=n==="wheel"?!1:void 0;e.addEventListener(n,s[n],{passive:c})}function i2(t,e){const n=Ft(t);n.dragStart&&(n.dragging=!0,n.dragEnd=e,t.update("none"))}function s2(t,e){const n=Ft(t);!n.dragStart||e.key!=="Escape"||(Oe(t,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,t.update("none"))}function Ac(t,e){if(t.target!==e.canvas){const n=e.canvas.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}}return Tn(t,e)}function yp(t,e,n){const{onZoomStart:i,onZoomRejected:s}=n;if(i){const o=Ac(e,t);if(it(i,[{chart:t,event:e,point:o}])===!1)return it(s,[{chart:t,event:e}]),!1}}function r2(t,e){if(t.legend){const o=Tn(e,t);if(Ns(o,t.legend))return}const n=Ft(t),{pan:i,zoom:s={}}=n.options;if(e.button!==0||up(Ur(i),e)||sf(Ur(s.drag),e))return it(s.onZoomRejected,[{chart:t,event:e}]);yp(t,e,s)!==!1&&(n.dragStart=e,Dr(t,t.canvas.ownerDocument,"mousemove",i2),Dr(t,window.document,"keydown",s2))}function o2({begin:t,end:e},n){let i=e.x-t.x,s=e.y-t.y;const o=Math.abs(i/s);o>n?i=Math.sign(i)*Math.abs(s*n):o<n&&(s=Math.sign(s)*Math.abs(i/n)),e.x=t.x+i,e.y=t.y+s}function jd(t,e,n,{min:i,max:s,prop:o}){t[i]=qd(Math.min(n.begin[o],n.end[o]),e[i],e[s]),t[s]=qd(Math.max(n.begin[o],n.end[o]),e[i],e[s])}function a2(t,e,n){const i={begin:Ac(e.dragStart,t),end:Ac(e.dragEnd,t)};if(n){const s=t.chartArea.width/t.chartArea.height;o2(i,s)}return i}function vp(t,e,n,i){const s=Ti(e,"x",t),o=Ti(e,"y",t),{top:l,left:c,right:u,bottom:h,width:d,height:p}=t.chartArea,_={top:l,left:c,right:u,bottom:h},v=a2(t,n,i&&s&&o);s&&jd(_,t.chartArea,v,{min:"left",max:"right",prop:"x"}),o&&jd(_,t.chartArea,v,{min:"top",max:"bottom",prop:"y"});const T=_.right-_.left,M=_.bottom-_.top;return{..._,width:T,height:M,zoomX:s&&T?1+(d-T)/d:1,zoomY:o&&M?1+(p-M)/p:1}}function l2(t,e){const n=Ft(t);if(!n.dragStart)return;Oe(t,"mousemove");const{mode:i,onZoomComplete:s,drag:{threshold:o=0,maintainAspectRatio:l}}=n.options.zoom,c=vp(t,i,{dragStart:n.dragStart,dragEnd:e},l),u=Ti(i,"x",t)?c.width:0,h=Ti(i,"y",t)?c.height:0,d=Math.sqrt(u*u+h*h);if(n.dragStart=n.dragEnd=null,d<=o){n.dragging=!1,t.update("none");return}_p(t,{x:c.left,y:c.top},{x:c.right,y:c.bottom},"zoom","drag"),n.dragging=!1,n.filterNextClick=!0,it(s,[{chart:t}])}function c2(t,e,n){if(sf(Ur(n.wheel),e)){it(n.onZoomRejected,[{chart:t,event:e}]);return}if(yp(t,e,n)!==!1&&(e.cancelable&&e.preventDefault(),e.deltaY!==void 0))return!0}function f2(t,e){const{handlers:{onZoomComplete:n},options:{zoom:i}}=Ft(t);if(!c2(t,e,i))return;const s=e.target.getBoundingClientRect(),o=i.wheel.speed,l=e.deltaY>=0?2-1/(1-o):1+o,c={x:l,y:l,focalPoint:{x:e.clientX-s.left,y:e.clientY-s.top}};rf(t,c,"zoom","wheel"),it(n,[{chart:t}])}function u2(t,e,n,i){n&&(Ft(t).handlers[e]=RT(()=>it(n,[{chart:t}]),i))}function h2(t,e){const n=t.canvas,{wheel:i,drag:s,onZoomComplete:o}=e.zoom;i.enabled?(Dr(t,n,"wheel",f2),u2(t,"onZoomComplete",o,250)):Oe(t,"wheel"),s.enabled?(Dr(t,n,"mousedown",r2),Dr(t,n.ownerDocument,"mouseup",l2)):(Oe(t,"mousedown"),Oe(t,"mousemove"),Oe(t,"mouseup"),Oe(t,"keydown"))}function d2(t){Oe(t,"mousedown"),Oe(t,"mousemove"),Oe(t,"mouseup"),Oe(t,"wheel"),Oe(t,"click"),Oe(t,"keydown")}function g2(t,e){return function(n,i){const{pan:s,zoom:o={}}=e.options;if(!s||!s.enabled)return!1;const l=i&&i.srcEvent;return l&&!e.panning&&i.pointerType==="mouse"&&(sf(Ur(s),l)||up(Ur(o.drag),l))?(it(s.onPanRejected,[{chart:t,event:i}]),!1):!0}}function p2(t,e){const n=Math.abs(t.clientX-e.clientX),i=Math.abs(t.clientY-e.clientY),s=n/i;let o,l;return s>.3&&s<1.7?o=l=!0:n>i?o=!0:l=!0,{x:o,y:l}}function Sp(t,e,n){if(e.scale){const{center:i,pointers:s}=n,o=1/e.scale*n.scale,l=n.target.getBoundingClientRect(),c=p2(s[0],s[1]),u=e.options.zoom.mode,h={x:c.x&&Ti(u,"x",t)?o:1,y:c.y&&Ti(u,"y",t)?o:1,focalPoint:{x:i.x-l.left,y:i.y-l.top}};rf(t,h,"zoom","pinch"),e.scale=n.scale}}function m2(t,e,n){if(e.options.zoom.pinch.enabled){const i=Tn(n,t);it(e.options.zoom.onZoomStart,[{chart:t,event:n,point:i}])===!1?(e.scale=null,it(e.options.zoom.onZoomRejected,[{chart:t,event:n}])):e.scale=1}}function _2(t,e,n){e.scale&&(Sp(t,e,n),e.scale=null,it(e.options.zoom.onZoomComplete,[{chart:t}]))}function wp(t,e,n){const i=e.delta;i&&(e.panning=!0,bp(t,{x:n.deltaX-i.x,y:n.deltaY-i.y},e.panScales),e.delta={x:n.deltaX,y:n.deltaY})}function b2(t,e,n){const{enabled:i,onPanStart:s,onPanRejected:o}=e.options.pan;if(!i)return;const l=n.target.getBoundingClientRect(),c={x:n.center.x-l.left,y:n.center.y-l.top};if(it(s,[{chart:t,event:n,point:c}])===!1)return it(o,[{chart:t,event:n}]);e.panScales=hp(e.options.pan,c,t),e.delta={x:0,y:0},wp(t,e,n)}function x2(t,e){e.delta=null,e.panning&&(e.panning=!1,e.filterNextClick=!0,it(e.options.pan.onPanComplete,[{chart:t}]))}const Oc=new WeakMap;function Zd(t,e){const n=Ft(t),i=t.canvas,{pan:s,zoom:o}=e,l=new Or.Manager(i);o&&o.pinch.enabled&&(l.add(new Or.Pinch),l.on("pinchstart",c=>m2(t,n,c)),l.on("pinch",c=>Sp(t,n,c)),l.on("pinchend",c=>_2(t,n,c))),s&&s.enabled&&(l.add(new Or.Pan({threshold:s.threshold,enable:g2(t,n)})),l.on("panstart",c=>b2(t,n,c)),l.on("panmove",c=>wp(t,n,c)),l.on("panend",()=>x2(t,n))),Oc.set(t,l)}function Jd(t){const e=Oc.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),Oc.delete(t))}function y2(t,e){const{pan:n,zoom:i}=t,{pan:s,zoom:o}=e;return i?.zoom?.pinch?.enabled!==o?.zoom?.pinch?.enabled||n?.enabled!==s?.enabled||n?.threshold!==s?.threshold}var v2="2.2.0";function sa(t,e,n){const i=n.zoom.drag,{dragStart:s,dragEnd:o}=Ft(t);if(i.drawTime!==e||!o)return;const{left:l,top:c,width:u,height:h}=vp(t,n.zoom.mode,{dragStart:s,dragEnd:o},i.maintainAspectRatio),d=t.ctx;d.save(),d.beginPath(),d.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",d.fillRect(l,c,u,h),i.borderWidth>0&&(d.lineWidth=i.borderWidth,d.strokeStyle=i.borderColor||"rgba(225,225,225)",d.strokeRect(l,c,u,h)),d.restore()}var HC={id:"zoom",version:v2,defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,n){const i=Ft(t);i.options=n,Object.prototype.hasOwnProperty.call(n.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(n.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(n.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),Or&&Zd(t,n),t.pan=(s,o,l)=>bp(t,s,o,l),t.zoom=(s,o)=>rf(t,s,o),t.zoomRect=(s,o,l)=>_p(t,s,o,l),t.zoomScale=(s,o,l)=>ZT(t,s,o,l),t.resetZoom=s=>JT(t,s),t.getZoomLevel=()=>t2(t),t.getInitialScaleBounds=()=>xp(t),t.getZoomedScaleBounds=()=>e2(t),t.isZoomedOrPanned=()=>n2(t),t.isZoomingOrPanning=()=>Kd(t)},beforeEvent(t,{event:e}){if(Kd(t))return!1;if(e.type==="click"||e.type==="mouseup"){const n=Ft(t);if(n.filterNextClick)return n.filterNextClick=!1,!1}},beforeUpdate:function(t,e,n){const i=Ft(t),s=i.options;i.options=n,y2(s,n)&&(Jd(t),Zd(t,n)),h2(t,n)},beforeDatasetsDraw(t,e,n){sa(t,"beforeDatasetsDraw",n)},afterDatasetsDraw(t,e,n){sa(t,"afterDatasetsDraw",n)},beforeDraw(t,e,n){sa(t,"beforeDraw",n)},afterDraw(t,e,n){sa(t,"afterDraw",n)},stop:function(t){d2(t),Or&&Jd(t),NT(t)},panFunctions:Ic,zoomFunctions:kc,zoomRectFunctions:Ec};/*!
|
|
30
|
-
* chartjs-plugin-datalabels v2.2.0
|
|
31
|
-
* https://chartjs-plugin-datalabels.netlify.app
|
|
32
|
-
* (c) 2017-2022 chartjs-plugin-datalabels contributors
|
|
33
|
-
* Released under the MIT license
|
|
34
|
-
*/var Qd=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),Rr={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(`
|
|
35
|
-
`)):Array.isArray(n)?t.push.apply(t,n):xt(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var i=[].concat(e),s=i.length,o=t.font,l=0,c;for(t.font=n.string,c=0;c<s;++c)l=Math.max(t.measureText(i[c]).width,l);return t.font=o,{height:s*n.lineHeight,width:l}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n=t.slice(),i=[],s,o,l,c;for(s=0,l=e.length;s<l;++s)c=e[s],o=n.indexOf(c),o===-1?i.push([c,1]):n.splice(o,1);for(s=0,l=n.length;s<l;++s)i.push([n[s],-1]);return i},rasterize:function(t){return Math.round(t*Qd)/Qd}};function mc(t,e){var n=e.x,i=e.y;if(n===null)return{x:0,y:-1};if(i===null)return{x:1,y:0};var s=t.x-n,o=t.y-i,l=Math.sqrt(s*s+o*o);return{x:l?s/l:0,y:l?o/l:-1}}function S2(t,e,n,i,s){switch(s){case"center":n=i=0;break;case"bottom":n=0,i=1;break;case"right":n=1,i=0;break;case"left":n=-1,i=0;break;case"top":n=0,i=-1;break;case"start":n=-n,i=-i;break;case"end":break;default:s*=Math.PI/180,n=Math.cos(s),i=Math.sin(s);break}return{x:t,y:e,vx:n,vy:i}}var w2=0,Mp=1,Tp=2,Pp=4,Cp=8;function ra(t,e,n){var i=w2;return t<n.left?i|=Mp:t>n.right&&(i|=Tp),e<n.top?i|=Cp:e>n.bottom&&(i|=Pp),i}function M2(t,e){for(var n=t.x0,i=t.y0,s=t.x1,o=t.y1,l=ra(n,i,e),c=ra(s,o,e),u,h,d;!(!(l|c)||l&c);)u=l||c,u&Cp?(h=n+(s-n)*(e.top-i)/(o-i),d=e.top):u&Pp?(h=n+(s-n)*(e.bottom-i)/(o-i),d=e.bottom):u&Tp?(d=i+(o-i)*(e.right-n)/(s-n),h=e.right):u&Mp&&(d=i+(o-i)*(e.left-n)/(s-n),h=e.left),u===l?(n=h,i=d,l=ra(n,i,e)):(s=h,o=d,c=ra(s,o,e));return{x0:n,x1:s,y0:i,y1:o}}function oa(t,e){var n=e.anchor,i=t,s,o;return e.clamp&&(i=M2(i,e.area)),n==="start"?(s=i.x0,o=i.y0):n==="end"?(s=i.x1,o=i.y1):(s=(i.x0+i.x1)/2,o=(i.y0+i.y1)/2),S2(s,o,t.vx,t.vy,e.align)}var aa={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,i=Math.cos(n),s=Math.sin(n),o=t.innerRadius,l=t.outerRadius;return oa({x0:t.x+i*o,y0:t.y+s*o,x1:t.x+i*l,y1:t.y+s*l,vx:i,vy:s},e)},point:function(t,e){var n=mc(t,e.origin),i=n.x*t.options.radius,s=n.y*t.options.radius;return oa({x0:t.x-i,y0:t.y-s,x1:t.x+i,y1:t.y+s,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=mc(t,e.origin),i=t.x,s=t.y,o=0,l=0;return t.horizontal?(i=Math.min(t.x,t.base),o=Math.abs(t.base-t.x)):(s=Math.min(t.y,t.base),l=Math.abs(t.base-t.y)),oa({x0:i,y0:s+l,x1:i+o,y1:s,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=mc(t,e.origin);return oa({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},ti=Rr.rasterize;function T2(t){var e=t.borderWidth||0,n=t.padding,i=t.size.height,s=t.size.width,o=-s/2,l=-i/2;return{frame:{x:o-n.left-e,y:l-n.top-e,w:s+n.width+e*2,h:i+n.height+e*2},text:{x:o,y:l,w:s,h:i}}}function P2(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var i=n.getBasePixel();return t.horizontal?{x:i,y:null}:{x:null,y:i}}function C2(t){return t instanceof MM?aa.arc:t instanceof RM?aa.point:t instanceof zM?aa.bar:aa.fallback}function k2(t,e,n,i,s,o){var l=Math.PI/2;if(o){var c=Math.min(o,s/2,i/2),u=e+c,h=n+c,d=e+i-c,p=n+s-c;t.moveTo(e,h),u<d&&h<p?(t.arc(u,h,c,-Math.PI,-l),t.arc(d,h,c,-l,0),t.arc(d,p,c,0,l),t.arc(u,p,c,l,Math.PI)):u<d?(t.moveTo(u,n),t.arc(d,h,c,-l,l),t.arc(u,h,c,l,Math.PI+l)):h<p?(t.arc(u,h,c,-Math.PI,0),t.arc(u,p,c,0,Math.PI)):t.arc(u,h,c,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,s)}function E2(t,e,n){var i=n.backgroundColor,s=n.borderColor,o=n.borderWidth;!i&&(!s||!o)||(t.beginPath(),k2(t,ti(e.x)+o/2,ti(e.y)+o/2,ti(e.w)-o,ti(e.h)-o,n.borderRadius),t.closePath(),i&&(t.fillStyle=i,t.fill()),s&&o&&(t.strokeStyle=s,t.lineWidth=o,t.lineJoin="miter",t.stroke()))}function I2(t,e,n){var i=n.lineHeight,s=t.w,o=t.x,l=t.y+i/2;return e==="center"?o+=s/2:(e==="end"||e==="right")&&(o+=s),{h:i,w:s,x:o,y:l}}function A2(t,e,n){var i=t.shadowBlur,s=n.stroked,o=ti(n.x),l=ti(n.y),c=ti(n.w);s&&t.strokeText(e,o,l,c),n.filled&&(i&&s&&(t.shadowBlur=0),t.fillText(e,o,l,c),i&&s&&(t.shadowBlur=i))}function O2(t,e,n,i){var s=i.textAlign,o=i.color,l=!!o,c=i.font,u=e.length,h=i.textStrokeColor,d=i.textStrokeWidth,p=h&&d,_;if(!(!u||!l&&!p))for(n=I2(n,s,c),t.font=c.string,t.textAlign=s,t.textBaseline="middle",t.shadowBlur=i.textShadowBlur,t.shadowColor=i.textShadowColor,l&&(t.fillStyle=o),p&&(t.lineJoin="round",t.lineWidth=d,t.strokeStyle=h),_=0,u=e.length;_<u;++_)A2(t,e[_],{stroked:p,filled:l,w:n.w,x:n.x,y:n.y+n.h*_})}var kp=function(t,e,n,i){var s=this;s._config=t,s._index=i,s._model=null,s._rects=null,s._ctx=e,s._el=n};Cn(kp.prototype,{_modelize:function(t,e,n,i){var s=this,o=s._index,l=fe(Lt([n.font,{}],i,o)),c=Lt([n.color,It.color],i,o);return{align:Lt([n.align,"center"],i,o),anchor:Lt([n.anchor,"center"],i,o),area:i.chart.chartArea,backgroundColor:Lt([n.backgroundColor,null],i,o),borderColor:Lt([n.borderColor,null],i,o),borderRadius:Lt([n.borderRadius,0],i,o),borderWidth:Lt([n.borderWidth,0],i,o),clamp:Lt([n.clamp,!1],i,o),clip:Lt([n.clip,!1],i,o),color:c,display:t,font:l,lines:e,offset:Lt([n.offset,4],i,o),opacity:Lt([n.opacity,1],i,o),origin:P2(s._el,i),padding:Ge(Lt([n.padding,4],i,o)),positioner:C2(s._el),rotation:Lt([n.rotation,0],i,o)*(Math.PI/180),size:Rr.textSize(s._ctx,e,l),textAlign:Lt([n.textAlign,"start"],i,o),textShadowBlur:Lt([n.textShadowBlur,0],i,o),textShadowColor:Lt([n.textShadowColor,c],i,o),textStrokeColor:Lt([n.textStrokeColor,c],i,o),textStrokeWidth:Lt([n.textStrokeWidth,0],i,o)}},update:function(t){var e=this,n=null,i=null,s=e._index,o=e._config,l,c,u,h=Lt([o.display,!0],t,s);h&&(l=t.dataset.data[s],c=lt(it(o.formatter,[l,t]),l),u=xt(c)?[]:Rr.toTextLines(c),u.length&&(n=e._modelize(h,u,o,t),i=T2(n))),e._model=n,e._rects=i},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 n=this,i=t.ctx,s=n._model,o=n._rects,l;this.visible()&&(i.save(),s.clip&&(l=s.area,i.beginPath(),i.rect(l.left,l.top,l.right-l.left,l.bottom-l.top),i.clip()),i.globalAlpha=Rr.bound(0,s.opacity,1),i.translate(ti(e.x),ti(e.y)),i.rotate(s.rotation),E2(i,o.frame,s),O2(i,s.lines,o.text,s),i.restore())}});var D2=Number.MIN_SAFE_INTEGER||-9007199254740991,R2=Number.MAX_SAFE_INTEGER||9007199254740991;function Mr(t,e,n){var i=Math.cos(n),s=Math.sin(n),o=e.x,l=e.y;return{x:o+i*(t.x-o)-s*(t.y-l),y:l+s*(t.x-o)+i*(t.y-l)}}function tg(t,e){var n=R2,i=D2,s=e.origin,o,l,c,u,h;for(o=0;o<t.length;++o)l=t[o],c=l.x-s.x,u=l.y-s.y,h=e.vx*c+e.vy*u,n=Math.min(n,h),i=Math.max(i,h);return{min:n,max:i}}function la(t,e){var n=e.x-t.x,i=e.y-t.y,s=Math.sqrt(n*n+i*i);return{vx:(e.x-t.x)/s,vy:(e.y-t.y)/s,origin:t,ln:s}}var Ep=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Cn(Ep.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,n=1,i=e._rect;return t=Mr(t,e.center(),-e._rotation),!(t.x<i.x-n||t.y<i.y-n||t.x>i.x+i.w+n*2||t.y>i.y+i.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),i=[la(e[0],e[1]),la(e[0],e[3])],s,o,l;for(this._rotation!==t._rotation&&i.push(la(n[0],n[1]),la(n[0],n[3])),s=0;s<i.length;++s)if(o=tg(e,i[s]),l=tg(n,i[s]),o.max<l.min||l.max<o.min)return!1;return!0},_points:function(){var t=this,e=t._rect,n=t._rotation,i=t.center();return[Mr({x:e.x,y:e.y},i,n),Mr({x:e.x+e.w,y:e.y},i,n),Mr({x:e.x+e.w,y:e.y+e.h},i,n),Mr({x:e.x,y:e.y+e.h},i,n)]}});function Ip(t,e,n){var i=e.positioner(t,e),s=i.vx,o=i.vy;if(!s&&!o)return{x:i.x,y:i.y};var l=n.w,c=n.h,u=e.rotation,h=Math.abs(l/2*Math.cos(u))+Math.abs(c/2*Math.sin(u)),d=Math.abs(l/2*Math.sin(u))+Math.abs(c/2*Math.cos(u)),p=1/Math.max(Math.abs(s),Math.abs(o));return h*=s*p,d*=o*p,h+=e.offset*s,d+=e.offset*o,{x:i.x+h,y:i.y+d}}function L2(t,e){var n,i,s,o;for(n=t.length-1;n>=0;--n)for(s=t[n].$layout,i=n-1;i>=0&&s._visible;--i)o=t[i].$layout,o._visible&&s._box.intersects(o._box)&&e(s,o);return t}function N2(t){var e,n,i,s,o,l,c;for(e=0,n=t.length;e<n;++e)i=t[e],s=i.$layout,s._visible&&(c=new Proxy(i._el,{get:(u,h)=>u.getProps([h],!0)[h]}),o=i.geometry(),l=Ip(c,i.model(),o),s._box.update(l,o,i.rotation()));return L2(t,function(u,h){var d=u._hidable,p=h._hidable;d&&p||p?h._visible=!1:d&&(u._visible=!1)})}var Lr={prepare:function(t){var e=[],n,i,s,o,l;for(n=0,s=t.length;n<s;++n)for(i=0,o=t[n].length;i<o;++i)l=t[n][i],e.push(l),l.$layout={_box:new Ep,_hidable:!1,_visible:!0,_set:n,_idx:l._index};return e.sort(function(c,u){var h=c.$layout,d=u.$layout;return h._idx===d._idx?d._set-h._set:d._idx-h._idx}),this.update(e),e},update:function(t){var e=!1,n,i,s,o,l;for(n=0,i=t.length;n<i;++n)s=t[n],o=s.model(),l=s.$layout,l._hidable=o&&o.display==="auto",l._visible=s.visible(),e|=l._hidable;e&&N2(t)},lookup:function(t,e){var n,i;for(n=t.length-1;n>=0;--n)if(i=t[n].$layout,i&&i._visible&&i._box.contains(e))return t[n];return null},draw:function(t,e){var n,i,s,o,l,c;for(n=0,i=e.length;n<i;++n)s=e[n],o=s.$layout,o._visible&&(l=s.geometry(),c=Ip(s._el,s.model(),l),o._box.update(c,l,s.rotation()),s.draw(t,c))}},B2=function(t){if(xt(t))return null;var e=t,n,i,s;if(_t(t))if(!xt(t.label))e=t.label;else if(!xt(t.r))e=t.r;else for(e="",n=Object.keys(t),s=0,i=n.length;s<i;++s)e+=(s!==0?", ":"")+n[s]+": "+t[n[s]];return""+e},F2={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:B2,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},Ie="$datalabels",Ap="$default";function W2(t,e){var n=t.datalabels,i={},s=[],o,l;return n===!1?null:(n===!0&&(n={}),e=Cn({},[e,n]),o=e.labels||{},l=Object.keys(o),delete e.labels,l.length?l.forEach(function(c){o[c]&&s.push(Cn({},[e,o[c],{_key:c}]))}):s.push(e),i=s.reduce(function(c,u){return pt(u.listeners||{},function(h,d){c[d]=c[d]||{},c[d][u._key||Ap]=h}),delete u.listeners,c},{}),{labels:s,listeners:i})}function Dc(t,e,n,i){if(e){var s=n.$context,o=n.$groups,l;e[o._set]&&(l=e[o._set][o._key],l&&it(l,[s,i])===!0&&(t[Ie]._dirty=!0,n.update(s)))}}function z2(t,e,n,i,s){var o,l;!n&&!i||(n?i?n!==i&&(l=o=!0):l=!0:o=!0,l&&Dc(t,e.leave,n,s),o&&Dc(t,e.enter,i,s))}function H2(t,e){var n=t[Ie],i=n._listeners,s,o;if(!(!i.enter&&!i.leave)){if(e.type==="mousemove")o=Lr.lookup(n._labels,e);else if(e.type!=="mouseout")return;s=n._hovered,n._hovered=o,z2(t,i,s,o,e)}}function U2(t,e){var n=t[Ie],i=n._listeners.click,s=i&&Lr.lookup(n._labels,e);s&&Dc(t,i,s,e)}var UC={id:"datalabels",defaults:F2,beforeInit:function(t){t[Ie]={_actives:[]}},beforeUpdate:function(t){var e=t[Ie];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var i=e.index,s=t[Ie],o=s._datasets[i]=[],l=t.isDatasetVisible(i),c=t.data.datasets[i],u=W2(c,n),h=e.meta.data||[],d=t.ctx,p,_,v,T,M,k,A,D;for(d.save(),p=0,v=h.length;p<v;++p)if(A=h[p],A[Ie]=[],l&&A&&t.getDataVisibility(p)&&!A.skip)for(_=0,T=u.labels.length;_<T;++_)M=u.labels[_],k=M._key,D=new kp(M,d,A,p),D.$groups={_set:i,_key:k||Ap},D.$context={active:!1,chart:t,dataIndex:p,dataset:c,datasetIndex:i},D.update(D.$context),A[Ie].push(D),o.push(D);d.restore(),Cn(s._listeners,u.listeners,{merger:function(W,U,N){U[W]=U[W]||{},U[W][e.index]=N[W],s._listened=!0}})},afterUpdate:function(t){t[Ie]._labels=Lr.prepare(t[Ie]._datasets)},afterDatasetsDraw:function(t){Lr.draw(t,t[Ie]._labels)},beforeEvent:function(t,e){if(t[Ie]._listened){var n=e.event;switch(n.type){case"mousemove":case"mouseout":H2(t,n);break;case"click":U2(t,n);break}}},afterEvent:function(t){var e=t[Ie],n=e._actives,i=e._actives=t.getActiveElements(),s=Rr.arrayDiff(n,i),o,l,c,u,h,d,p;for(o=0,l=s.length;o<l;++o)if(h=s[o],h[1])for(p=h[0].element[Ie]||[],c=0,u=p.length;c<u;++c)d=p[c],d.$context.active=h[1]===1,d.update(d.$context);(e._dirty||s.length)&&(Lr.update(e._labels),t.render()),delete e._dirty}},_c,eg;function V2(){return eg||(eg=1,_c=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,s,o;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(s=i;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=i;s--!==0;){var l=o[s];if(!t(e[l],n[l]))return!1}return!0}return e!==e&&n!==n}),_c}var $2=V2();const G2=Fc($2);var kr={exports:{}};/**
|
|
36
|
-
* @license
|
|
37
|
-
* Lodash <https://lodash.com/>
|
|
38
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
39
|
-
* Released under MIT license <https://lodash.com/license>
|
|
40
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
41
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
42
|
-
*/var Y2=kr.exports,ng;function X2(){return ng||(ng=1,function(t,e){(function(){var n,i="4.17.21",s=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,_=2,v=4,T=1,M=2,k=1,A=2,D=4,W=8,U=16,N=32,G=64,$=128,X=256,Z=512,rt=30,st="...",ft=800,Wt=16,Vt=1,vt=2,Pt=3,St=1/0,zt=9007199254740991,$t=17976931348623157e292,Re=NaN,se=4294967295,ye=se-1,En=se>>>1,Le=[["ary",$],["bind",k],["bindKey",A],["curry",W],["curryRight",U],["flip",Z],["partial",N],["partialRight",G],["rearg",X]],ve="[object Arguments]",Se="[object Array]",re="[object AsyncFunction]",Ne="[object Boolean]",kt="[object Date]",ue="[object DOMException]",In="[object Error]",mn="[object Function]",ni="[object GeneratorFunction]",oe="[object Map]",ln="[object Number]",Xe="[object Null]",ae="[object Object]",Hs="[object Promise]",qr="[object Proxy]",_n="[object RegExp]",Ot="[object Set]",Ci="[object String]",rs="[object Symbol]",Da="[object Undefined]",ki="[object WeakMap]",Ra="[object WeakSet]",ii="[object ArrayBuffer]",An="[object DataView]",os="[object Float32Array]",as="[object Float64Array]",si="[object Int8Array]",Ei="[object Int16Array]",Us="[object Int32Array]",Vs="[object Uint8Array]",$s="[object Uint8ClampedArray]",Gs="[object Uint16Array]",Ys="[object Uint32Array]",ls=/\b__p \+= '';/g,La=/\b(__p \+=) '' \+/g,Na=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xs=/&(?:amp|lt|gt|quot|#39);/g,Ks=/[&<>"']/g,qs=RegExp(Xs.source),Ba=RegExp(Ks.source),Fa=/<%-([\s\S]+?)%>/g,Wa=/<%([\s\S]+?)%>/g,js=/<%=([\s\S]+?)%>/g,za=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ha=/^\w*$/,Ua=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ri=/[\\^$.*+?()[\]{}|]/g,Va=RegExp(ri.source),Zs=/^\s+/,jr=/\s/,Js=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$a=/\{\n\/\* \[wrapped with (.+)\] \*/,Zr=/,? & /,Ga=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jr=/[()=,{}\[\]\/\s]/,Qr=/\\(\\)?/g,to=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Qs=/\w*$/,tr=/^[-+]0x[0-9a-f]+$/i,On=/^0b[01]+$/i,Ii=/^\[object .+?Constructor\]$/,Ai=/^0o[0-7]+$/i,cs=/^(?:0|[1-9]\d*)$/,er=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fs=/($^)/,Ya=/['\n\r\u2028\u2029\\]/g,Dn="\\ud800-\\udfff",we="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",bn="\\u20d0-\\u20ff",Ke=we+oi+bn,ai="\\u2700-\\u27bf",Be="a-z\\xdf-\\xf6\\xf8-\\xff",cn="\\xac\\xb1\\xd7\\xf7",eo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",no="\\u2000-\\u206f",us=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Oi="\\ufe0e\\ufe0f",hs=cn+eo+no+us,Di="['’]",nr="["+Dn+"]",ds="["+hs+"]",Rn="["+Ke+"]",fn="\\d+",Xa="["+ai+"]",ir="["+Be+"]",gs="[^"+Dn+hs+fn+ai+Be+Me+"]",ps="\\ud83c[\\udffb-\\udfff]",Ka="(?:"+Rn+"|"+ps+")",io="[^"+Dn+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",P="["+Me+"]",O="\\u200d",V="(?:"+ir+"|"+gs+")",q="(?:"+P+"|"+gs+")",ht="(?:"+Di+"(?:d|ll|m|re|s|t|ve))?",Gt="(?:"+Di+"(?:D|LL|M|RE|S|T|VE))?",jt=Ka+"?",ee="["+Oi+"]?",qe="(?:"+O+"(?:"+[io,b,S].join("|")+")"+ee+jt+")*",Zp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ff=ee+jt+qe,Qp="(?:"+[Xa,b,S].join("|")+")"+ff,tm="(?:"+[io+Rn+"?",Rn,b,S,nr].join("|")+")",em=RegExp(Di,"g"),nm=RegExp(Rn,"g"),qa=RegExp(ps+"(?="+ps+")|"+tm+ff,"g"),im=RegExp([P+"?"+ir+"+"+ht+"(?="+[ds,P,"$"].join("|")+")",q+"+"+Gt+"(?="+[ds,P+V,"$"].join("|")+")",P+"?"+V+"+"+ht,P+"+"+Gt,Jp,Zp,fn,Qp].join("|"),"g"),sm=RegExp("["+O+Dn+Ke+Oi+"]"),rm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,om=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],am=-1,At={};At[os]=At[as]=At[si]=At[Ei]=At[Us]=At[Vs]=At[$s]=At[Gs]=At[Ys]=!0,At[ve]=At[Se]=At[ii]=At[Ne]=At[An]=At[kt]=At[In]=At[mn]=At[oe]=At[ln]=At[ae]=At[_n]=At[Ot]=At[Ci]=At[ki]=!1;var Et={};Et[ve]=Et[Se]=Et[ii]=Et[An]=Et[Ne]=Et[kt]=Et[os]=Et[as]=Et[si]=Et[Ei]=Et[Us]=Et[oe]=Et[ln]=Et[ae]=Et[_n]=Et[Ot]=Et[Ci]=Et[rs]=Et[Vs]=Et[$s]=Et[Gs]=Et[Ys]=!0,Et[In]=Et[mn]=Et[ki]=!1;var lm={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},cm={"&":"&","<":"<",">":">",'"':""","'":"'"},fm={"&":"&","<":"<",">":">",""":'"',"'":"'"},um={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},hm=parseFloat,dm=parseInt,uf=typeof $o=="object"&&$o&&$o.Object===Object&&$o,gm=typeof self=="object"&&self&&self.Object===Object&&self,le=uf||gm||Function("return this")(),ja=e&&!e.nodeType&&e,Ri=ja&&!0&&t&&!t.nodeType&&t,hf=Ri&&Ri.exports===ja,Za=hf&&uf.process,je=function(){try{var E=Ri&&Ri.require&&Ri.require("util").types;return E||Za&&Za.binding&&Za.binding("util")}catch{}}(),df=je&&je.isArrayBuffer,gf=je&&je.isDate,pf=je&&je.isMap,mf=je&&je.isRegExp,_f=je&&je.isSet,bf=je&&je.isTypedArray;function Fe(E,L,R){switch(R.length){case 0:return E.call(L);case 1:return E.call(L,R[0]);case 2:return E.call(L,R[0],R[1]);case 3:return E.call(L,R[0],R[1],R[2])}return E.apply(L,R)}function pm(E,L,R,j){for(var ot=-1,wt=E==null?0:E.length;++ot<wt;){var Jt=E[ot];L(j,Jt,R(Jt),E)}return j}function Ze(E,L){for(var R=-1,j=E==null?0:E.length;++R<j&&L(E[R],R,E)!==!1;);return E}function mm(E,L){for(var R=E==null?0:E.length;R--&&L(E[R],R,E)!==!1;);return E}function xf(E,L){for(var R=-1,j=E==null?0:E.length;++R<j;)if(!L(E[R],R,E))return!1;return!0}function li(E,L){for(var R=-1,j=E==null?0:E.length,ot=0,wt=[];++R<j;){var Jt=E[R];L(Jt,R,E)&&(wt[ot++]=Jt)}return wt}function so(E,L){var R=E==null?0:E.length;return!!R&&ms(E,L,0)>-1}function Ja(E,L,R){for(var j=-1,ot=E==null?0:E.length;++j<ot;)if(R(L,E[j]))return!0;return!1}function Dt(E,L){for(var R=-1,j=E==null?0:E.length,ot=Array(j);++R<j;)ot[R]=L(E[R],R,E);return ot}function ci(E,L){for(var R=-1,j=L.length,ot=E.length;++R<j;)E[ot+R]=L[R];return E}function Qa(E,L,R,j){var ot=-1,wt=E==null?0:E.length;for(j&&wt&&(R=E[++ot]);++ot<wt;)R=L(R,E[ot],ot,E);return R}function _m(E,L,R,j){var ot=E==null?0:E.length;for(j&&ot&&(R=E[--ot]);ot--;)R=L(R,E[ot],ot,E);return R}function tl(E,L){for(var R=-1,j=E==null?0:E.length;++R<j;)if(L(E[R],R,E))return!0;return!1}var bm=el("length");function xm(E){return E.split("")}function ym(E){return E.match(Ga)||[]}function yf(E,L,R){var j;return R(E,function(ot,wt,Jt){if(L(ot,wt,Jt))return j=wt,!1}),j}function ro(E,L,R,j){for(var ot=E.length,wt=R+(j?1:-1);j?wt--:++wt<ot;)if(L(E[wt],wt,E))return wt;return-1}function ms(E,L,R){return L===L?Om(E,L,R):ro(E,vf,R)}function vm(E,L,R,j){for(var ot=R-1,wt=E.length;++ot<wt;)if(j(E[ot],L))return ot;return-1}function vf(E){return E!==E}function Sf(E,L){var R=E==null?0:E.length;return R?il(E,L)/R:Re}function el(E){return function(L){return L==null?n:L[E]}}function nl(E){return function(L){return E==null?n:E[L]}}function wf(E,L,R,j,ot){return ot(E,function(wt,Jt,Ct){R=j?(j=!1,wt):L(R,wt,Jt,Ct)}),R}function Sm(E,L){var R=E.length;for(E.sort(L);R--;)E[R]=E[R].value;return E}function il(E,L){for(var R,j=-1,ot=E.length;++j<ot;){var wt=L(E[j]);wt!==n&&(R=R===n?wt:R+wt)}return R}function sl(E,L){for(var R=-1,j=Array(E);++R<E;)j[R]=L(R);return j}function wm(E,L){return Dt(L,function(R){return[R,E[R]]})}function Mf(E){return E&&E.slice(0,kf(E)+1).replace(Zs,"")}function We(E){return function(L){return E(L)}}function rl(E,L){return Dt(L,function(R){return E[R]})}function sr(E,L){return E.has(L)}function Tf(E,L){for(var R=-1,j=E.length;++R<j&&ms(L,E[R],0)>-1;);return R}function Pf(E,L){for(var R=E.length;R--&&ms(L,E[R],0)>-1;);return R}function Mm(E,L){for(var R=E.length,j=0;R--;)E[R]===L&&++j;return j}var Tm=nl(lm),Pm=nl(cm);function Cm(E){return"\\"+um[E]}function km(E,L){return E==null?n:E[L]}function _s(E){return sm.test(E)}function Em(E){return rm.test(E)}function Im(E){for(var L,R=[];!(L=E.next()).done;)R.push(L.value);return R}function ol(E){var L=-1,R=Array(E.size);return E.forEach(function(j,ot){R[++L]=[ot,j]}),R}function Cf(E,L){return function(R){return E(L(R))}}function fi(E,L){for(var R=-1,j=E.length,ot=0,wt=[];++R<j;){var Jt=E[R];(Jt===L||Jt===d)&&(E[R]=d,wt[ot++]=R)}return wt}function oo(E){var L=-1,R=Array(E.size);return E.forEach(function(j){R[++L]=j}),R}function Am(E){var L=-1,R=Array(E.size);return E.forEach(function(j){R[++L]=[j,j]}),R}function Om(E,L,R){for(var j=R-1,ot=E.length;++j<ot;)if(E[j]===L)return j;return-1}function Dm(E,L,R){for(var j=R+1;j--;)if(E[j]===L)return j;return j}function bs(E){return _s(E)?Lm(E):bm(E)}function un(E){return _s(E)?Nm(E):xm(E)}function kf(E){for(var L=E.length;L--&&jr.test(E.charAt(L)););return L}var Rm=nl(fm);function Lm(E){for(var L=qa.lastIndex=0;qa.test(E);)++L;return L}function Nm(E){return E.match(qa)||[]}function Bm(E){return E.match(im)||[]}var Fm=function E(L){L=L==null?le:xs.defaults(le.Object(),L,xs.pick(le,om));var R=L.Array,j=L.Date,ot=L.Error,wt=L.Function,Jt=L.Math,Ct=L.Object,al=L.RegExp,Wm=L.String,Je=L.TypeError,ao=R.prototype,zm=wt.prototype,ys=Ct.prototype,lo=L["__core-js_shared__"],co=zm.toString,Tt=ys.hasOwnProperty,Hm=0,Ef=function(){var r=/[^.]+$/.exec(lo&&lo.keys&&lo.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),fo=ys.toString,Um=co.call(Ct),Vm=le._,$m=al("^"+co.call(Tt).replace(ri,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uo=hf?L.Buffer:n,ui=L.Symbol,ho=L.Uint8Array,If=uo?uo.allocUnsafe:n,go=Cf(Ct.getPrototypeOf,Ct),Af=Ct.create,Of=ys.propertyIsEnumerable,po=ao.splice,Df=ui?ui.isConcatSpreadable:n,rr=ui?ui.iterator:n,Li=ui?ui.toStringTag:n,mo=function(){try{var r=zi(Ct,"defineProperty");return r({},"",{}),r}catch{}}(),Gm=L.clearTimeout!==le.clearTimeout&&L.clearTimeout,Ym=j&&j.now!==le.Date.now&&j.now,Xm=L.setTimeout!==le.setTimeout&&L.setTimeout,_o=Jt.ceil,bo=Jt.floor,ll=Ct.getOwnPropertySymbols,Km=uo?uo.isBuffer:n,Rf=L.isFinite,qm=ao.join,jm=Cf(Ct.keys,Ct),Qt=Jt.max,he=Jt.min,Zm=j.now,Jm=L.parseInt,Lf=Jt.random,Qm=ao.reverse,cl=zi(L,"DataView"),or=zi(L,"Map"),fl=zi(L,"Promise"),vs=zi(L,"Set"),ar=zi(L,"WeakMap"),lr=zi(Ct,"create"),xo=ar&&new ar,Ss={},t0=Hi(cl),e0=Hi(or),n0=Hi(fl),i0=Hi(vs),s0=Hi(ar),yo=ui?ui.prototype:n,cr=yo?yo.valueOf:n,Nf=yo?yo.toString:n;function x(r){if(Ht(r)&&!at(r)&&!(r instanceof bt)){if(r instanceof Qe)return r;if(Tt.call(r,"__wrapped__"))return Bu(r)}return new Qe(r)}var ws=function(){function r(){}return function(a){if(!Nt(a))return{};if(Af)return Af(a);r.prototype=a;var f=new r;return r.prototype=n,f}}();function vo(){}function Qe(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}x.templateSettings={escape:Fa,evaluate:Wa,interpolate:js,variable:"",imports:{_:x}},x.prototype=vo.prototype,x.prototype.constructor=x,Qe.prototype=ws(vo.prototype),Qe.prototype.constructor=Qe;function bt(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function r0(){var r=new bt(this.__wrapped__);return r.__actions__=Te(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Te(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Te(this.__views__),r}function o0(){if(this.__filtered__){var r=new bt(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function a0(){var r=this.__wrapped__.value(),a=this.__dir__,f=at(r),g=a<0,m=f?r.length:0,y=x_(0,m,this.__views__),w=y.start,C=y.end,I=C-w,B=g?C:w-1,F=this.__iteratees__,H=F.length,K=0,J=he(I,this.__takeCount__);if(!f||!g&&m==I&&J==I)return ou(r,this.__actions__);var et=[];t:for(;I--&&K<J;){B+=a;for(var dt=-1,nt=r[B];++dt<H;){var mt=F[dt],yt=mt.iteratee,Ue=mt.type,be=yt(nt);if(Ue==vt)nt=be;else if(!be){if(Ue==Vt)continue t;break t}}et[K++]=nt}return et}bt.prototype=ws(vo.prototype),bt.prototype.constructor=bt;function Ni(r){var a=-1,f=r==null?0:r.length;for(this.clear();++a<f;){var g=r[a];this.set(g[0],g[1])}}function l0(){this.__data__=lr?lr(null):{},this.size=0}function c0(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function f0(r){var a=this.__data__;if(lr){var f=a[r];return f===u?n:f}return Tt.call(a,r)?a[r]:n}function u0(r){var a=this.__data__;return lr?a[r]!==n:Tt.call(a,r)}function h0(r,a){var f=this.__data__;return this.size+=this.has(r)?0:1,f[r]=lr&&a===n?u:a,this}Ni.prototype.clear=l0,Ni.prototype.delete=c0,Ni.prototype.get=f0,Ni.prototype.has=u0,Ni.prototype.set=h0;function Ln(r){var a=-1,f=r==null?0:r.length;for(this.clear();++a<f;){var g=r[a];this.set(g[0],g[1])}}function d0(){this.__data__=[],this.size=0}function g0(r){var a=this.__data__,f=So(a,r);if(f<0)return!1;var g=a.length-1;return f==g?a.pop():po.call(a,f,1),--this.size,!0}function p0(r){var a=this.__data__,f=So(a,r);return f<0?n:a[f][1]}function m0(r){return So(this.__data__,r)>-1}function _0(r,a){var f=this.__data__,g=So(f,r);return g<0?(++this.size,f.push([r,a])):f[g][1]=a,this}Ln.prototype.clear=d0,Ln.prototype.delete=g0,Ln.prototype.get=p0,Ln.prototype.has=m0,Ln.prototype.set=_0;function Nn(r){var a=-1,f=r==null?0:r.length;for(this.clear();++a<f;){var g=r[a];this.set(g[0],g[1])}}function b0(){this.size=0,this.__data__={hash:new Ni,map:new(or||Ln),string:new Ni}}function x0(r){var a=Ro(this,r).delete(r);return this.size-=a?1:0,a}function y0(r){return Ro(this,r).get(r)}function v0(r){return Ro(this,r).has(r)}function S0(r,a){var f=Ro(this,r),g=f.size;return f.set(r,a),this.size+=f.size==g?0:1,this}Nn.prototype.clear=b0,Nn.prototype.delete=x0,Nn.prototype.get=y0,Nn.prototype.has=v0,Nn.prototype.set=S0;function Bi(r){var a=-1,f=r==null?0:r.length;for(this.__data__=new Nn;++a<f;)this.add(r[a])}function w0(r){return this.__data__.set(r,u),this}function M0(r){return this.__data__.has(r)}Bi.prototype.add=Bi.prototype.push=w0,Bi.prototype.has=M0;function hn(r){var a=this.__data__=new Ln(r);this.size=a.size}function T0(){this.__data__=new Ln,this.size=0}function P0(r){var a=this.__data__,f=a.delete(r);return this.size=a.size,f}function C0(r){return this.__data__.get(r)}function k0(r){return this.__data__.has(r)}function E0(r,a){var f=this.__data__;if(f instanceof Ln){var g=f.__data__;if(!or||g.length<s-1)return g.push([r,a]),this.size=++f.size,this;f=this.__data__=new Nn(g)}return f.set(r,a),this.size=f.size,this}hn.prototype.clear=T0,hn.prototype.delete=P0,hn.prototype.get=C0,hn.prototype.has=k0,hn.prototype.set=E0;function Bf(r,a){var f=at(r),g=!f&&Ui(r),m=!f&&!g&&mi(r),y=!f&&!g&&!m&&Cs(r),w=f||g||m||y,C=w?sl(r.length,Wm):[],I=C.length;for(var B in r)(a||Tt.call(r,B))&&!(w&&(B=="length"||m&&(B=="offset"||B=="parent")||y&&(B=="buffer"||B=="byteLength"||B=="byteOffset")||zn(B,I)))&&C.push(B);return C}function Ff(r){var a=r.length;return a?r[vl(0,a-1)]:n}function I0(r,a){return Lo(Te(r),Fi(a,0,r.length))}function A0(r){return Lo(Te(r))}function ul(r,a,f){(f!==n&&!dn(r[a],f)||f===n&&!(a in r))&&Bn(r,a,f)}function fr(r,a,f){var g=r[a];(!(Tt.call(r,a)&&dn(g,f))||f===n&&!(a in r))&&Bn(r,a,f)}function So(r,a){for(var f=r.length;f--;)if(dn(r[f][0],a))return f;return-1}function O0(r,a,f,g){return hi(r,function(m,y,w){a(g,m,f(m),w)}),g}function Wf(r,a){return r&&yn(a,ne(a),r)}function D0(r,a){return r&&yn(a,Ce(a),r)}function Bn(r,a,f){a=="__proto__"&&mo?mo(r,a,{configurable:!0,enumerable:!0,value:f,writable:!0}):r[a]=f}function hl(r,a){for(var f=-1,g=a.length,m=R(g),y=r==null;++f<g;)m[f]=y?n:Yl(r,a[f]);return m}function Fi(r,a,f){return r===r&&(f!==n&&(r=r<=f?r:f),a!==n&&(r=r>=a?r:a)),r}function tn(r,a,f,g,m,y){var w,C=a&p,I=a&_,B=a&v;if(f&&(w=m?f(r,g,m,y):f(r)),w!==n)return w;if(!Nt(r))return r;var F=at(r);if(F){if(w=v_(r),!C)return Te(r,w)}else{var H=de(r),K=H==mn||H==ni;if(mi(r))return cu(r,C);if(H==ae||H==ve||K&&!m){if(w=I||K?{}:ku(r),!C)return I?f_(r,D0(w,r)):c_(r,Wf(w,r))}else{if(!Et[H])return m?r:{};w=S_(r,H,C)}}y||(y=new hn);var J=y.get(r);if(J)return J;y.set(r,w),ih(r)?r.forEach(function(nt){w.add(tn(nt,a,f,nt,r,y))}):eh(r)&&r.forEach(function(nt,mt){w.set(mt,tn(nt,a,f,mt,r,y))});var et=B?I?Ol:Al:I?Ce:ne,dt=F?n:et(r);return Ze(dt||r,function(nt,mt){dt&&(mt=nt,nt=r[mt]),fr(w,mt,tn(nt,a,f,mt,r,y))}),w}function R0(r){var a=ne(r);return function(f){return zf(f,r,a)}}function zf(r,a,f){var g=f.length;if(r==null)return!g;for(r=Ct(r);g--;){var m=f[g],y=a[m],w=r[m];if(w===n&&!(m in r)||!y(w))return!1}return!0}function Hf(r,a,f){if(typeof r!="function")throw new Je(l);return _r(function(){r.apply(n,f)},a)}function ur(r,a,f,g){var m=-1,y=so,w=!0,C=r.length,I=[],B=a.length;if(!C)return I;f&&(a=Dt(a,We(f))),g?(y=Ja,w=!1):a.length>=s&&(y=sr,w=!1,a=new Bi(a));t:for(;++m<C;){var F=r[m],H=f==null?F:f(F);if(F=g||F!==0?F:0,w&&H===H){for(var K=B;K--;)if(a[K]===H)continue t;I.push(F)}else y(a,H,g)||I.push(F)}return I}var hi=gu(xn),Uf=gu(gl,!0);function L0(r,a){var f=!0;return hi(r,function(g,m,y){return f=!!a(g,m,y),f}),f}function wo(r,a,f){for(var g=-1,m=r.length;++g<m;){var y=r[g],w=a(y);if(w!=null&&(C===n?w===w&&!He(w):f(w,C)))var C=w,I=y}return I}function N0(r,a,f,g){var m=r.length;for(f=ut(f),f<0&&(f=-f>m?0:m+f),g=g===n||g>m?m:ut(g),g<0&&(g+=m),g=f>g?0:rh(g);f<g;)r[f++]=a;return r}function Vf(r,a){var f=[];return hi(r,function(g,m,y){a(g,m,y)&&f.push(g)}),f}function ce(r,a,f,g,m){var y=-1,w=r.length;for(f||(f=M_),m||(m=[]);++y<w;){var C=r[y];a>0&&f(C)?a>1?ce(C,a-1,f,g,m):ci(m,C):g||(m[m.length]=C)}return m}var dl=pu(),$f=pu(!0);function xn(r,a){return r&&dl(r,a,ne)}function gl(r,a){return r&&$f(r,a,ne)}function Mo(r,a){return li(a,function(f){return Hn(r[f])})}function Wi(r,a){a=gi(a,r);for(var f=0,g=a.length;r!=null&&f<g;)r=r[vn(a[f++])];return f&&f==g?r:n}function Gf(r,a,f){var g=a(r);return at(r)?g:ci(g,f(r))}function me(r){return r==null?r===n?Da:Xe:Li&&Li in Ct(r)?b_(r):A_(r)}function pl(r,a){return r>a}function B0(r,a){return r!=null&&Tt.call(r,a)}function F0(r,a){return r!=null&&a in Ct(r)}function W0(r,a,f){return r>=he(a,f)&&r<Qt(a,f)}function ml(r,a,f){for(var g=f?Ja:so,m=r[0].length,y=r.length,w=y,C=R(y),I=1/0,B=[];w--;){var F=r[w];w&&a&&(F=Dt(F,We(a))),I=he(F.length,I),C[w]=!f&&(a||m>=120&&F.length>=120)?new Bi(w&&F):n}F=r[0];var H=-1,K=C[0];t:for(;++H<m&&B.length<I;){var J=F[H],et=a?a(J):J;if(J=f||J!==0?J:0,!(K?sr(K,et):g(B,et,f))){for(w=y;--w;){var dt=C[w];if(!(dt?sr(dt,et):g(r[w],et,f)))continue t}K&&K.push(et),B.push(J)}}return B}function z0(r,a,f,g){return xn(r,function(m,y,w){a(g,f(m),y,w)}),g}function hr(r,a,f){a=gi(a,r),r=Ou(r,a);var g=r==null?r:r[vn(nn(a))];return g==null?n:Fe(g,r,f)}function Yf(r){return Ht(r)&&me(r)==ve}function H0(r){return Ht(r)&&me(r)==ii}function U0(r){return Ht(r)&&me(r)==kt}function dr(r,a,f,g,m){return r===a?!0:r==null||a==null||!Ht(r)&&!Ht(a)?r!==r&&a!==a:V0(r,a,f,g,dr,m)}function V0(r,a,f,g,m,y){var w=at(r),C=at(a),I=w?Se:de(r),B=C?Se:de(a);I=I==ve?ae:I,B=B==ve?ae:B;var F=I==ae,H=B==ae,K=I==B;if(K&&mi(r)){if(!mi(a))return!1;w=!0,F=!1}if(K&&!F)return y||(y=new hn),w||Cs(r)?Tu(r,a,f,g,m,y):m_(r,a,I,f,g,m,y);if(!(f&T)){var J=F&&Tt.call(r,"__wrapped__"),et=H&&Tt.call(a,"__wrapped__");if(J||et){var dt=J?r.value():r,nt=et?a.value():a;return y||(y=new hn),m(dt,nt,f,g,y)}}return K?(y||(y=new hn),__(r,a,f,g,m,y)):!1}function $0(r){return Ht(r)&&de(r)==oe}function _l(r,a,f,g){var m=f.length,y=m,w=!g;if(r==null)return!y;for(r=Ct(r);m--;){var C=f[m];if(w&&C[2]?C[1]!==r[C[0]]:!(C[0]in r))return!1}for(;++m<y;){C=f[m];var I=C[0],B=r[I],F=C[1];if(w&&C[2]){if(B===n&&!(I in r))return!1}else{var H=new hn;if(g)var K=g(B,F,I,r,a,H);if(!(K===n?dr(F,B,T|M,g,H):K))return!1}}return!0}function Xf(r){if(!Nt(r)||P_(r))return!1;var a=Hn(r)?$m:Ii;return a.test(Hi(r))}function G0(r){return Ht(r)&&me(r)==_n}function Y0(r){return Ht(r)&&de(r)==Ot}function X0(r){return Ht(r)&&Ho(r.length)&&!!At[me(r)]}function Kf(r){return typeof r=="function"?r:r==null?ke:typeof r=="object"?at(r)?Zf(r[0],r[1]):jf(r):mh(r)}function bl(r){if(!mr(r))return jm(r);var a=[];for(var f in Ct(r))Tt.call(r,f)&&f!="constructor"&&a.push(f);return a}function K0(r){if(!Nt(r))return I_(r);var a=mr(r),f=[];for(var g in r)g=="constructor"&&(a||!Tt.call(r,g))||f.push(g);return f}function xl(r,a){return r<a}function qf(r,a){var f=-1,g=Pe(r)?R(r.length):[];return hi(r,function(m,y,w){g[++f]=a(m,y,w)}),g}function jf(r){var a=Rl(r);return a.length==1&&a[0][2]?Iu(a[0][0],a[0][1]):function(f){return f===r||_l(f,r,a)}}function Zf(r,a){return Nl(r)&&Eu(a)?Iu(vn(r),a):function(f){var g=Yl(f,r);return g===n&&g===a?Xl(f,r):dr(a,g,T|M)}}function To(r,a,f,g,m){r!==a&&dl(a,function(y,w){if(m||(m=new hn),Nt(y))q0(r,a,w,f,To,g,m);else{var C=g?g(Fl(r,w),y,w+"",r,a,m):n;C===n&&(C=y),ul(r,w,C)}},Ce)}function q0(r,a,f,g,m,y,w){var C=Fl(r,f),I=Fl(a,f),B=w.get(I);if(B){ul(r,f,B);return}var F=y?y(C,I,f+"",r,a,w):n,H=F===n;if(H){var K=at(I),J=!K&&mi(I),et=!K&&!J&&Cs(I);F=I,K||J||et?at(C)?F=C:Yt(C)?F=Te(C):J?(H=!1,F=cu(I,!0)):et?(H=!1,F=fu(I,!0)):F=[]:br(I)||Ui(I)?(F=C,Ui(C)?F=oh(C):(!Nt(C)||Hn(C))&&(F=ku(I))):H=!1}H&&(w.set(I,F),m(F,I,g,y,w),w.delete(I)),ul(r,f,F)}function Jf(r,a){var f=r.length;if(f)return a+=a<0?f:0,zn(a,f)?r[a]:n}function Qf(r,a,f){a.length?a=Dt(a,function(y){return at(y)?function(w){return Wi(w,y.length===1?y[0]:y)}:y}):a=[ke];var g=-1;a=Dt(a,We(tt()));var m=qf(r,function(y,w,C){var I=Dt(a,function(B){return B(y)});return{criteria:I,index:++g,value:y}});return Sm(m,function(y,w){return l_(y,w,f)})}function j0(r,a){return tu(r,a,function(f,g){return Xl(r,g)})}function tu(r,a,f){for(var g=-1,m=a.length,y={};++g<m;){var w=a[g],C=Wi(r,w);f(C,w)&&gr(y,gi(w,r),C)}return y}function Z0(r){return function(a){return Wi(a,r)}}function yl(r,a,f,g){var m=g?vm:ms,y=-1,w=a.length,C=r;for(r===a&&(a=Te(a)),f&&(C=Dt(r,We(f)));++y<w;)for(var I=0,B=a[y],F=f?f(B):B;(I=m(C,F,I,g))>-1;)C!==r&&po.call(C,I,1),po.call(r,I,1);return r}function eu(r,a){for(var f=r?a.length:0,g=f-1;f--;){var m=a[f];if(f==g||m!==y){var y=m;zn(m)?po.call(r,m,1):Ml(r,m)}}return r}function vl(r,a){return r+bo(Lf()*(a-r+1))}function J0(r,a,f,g){for(var m=-1,y=Qt(_o((a-r)/(f||1)),0),w=R(y);y--;)w[g?y:++m]=r,r+=f;return w}function Sl(r,a){var f="";if(!r||a<1||a>zt)return f;do a%2&&(f+=r),a=bo(a/2),a&&(r+=r);while(a);return f}function gt(r,a){return Wl(Au(r,a,ke),r+"")}function Q0(r){return Ff(ks(r))}function t_(r,a){var f=ks(r);return Lo(f,Fi(a,0,f.length))}function gr(r,a,f,g){if(!Nt(r))return r;a=gi(a,r);for(var m=-1,y=a.length,w=y-1,C=r;C!=null&&++m<y;){var I=vn(a[m]),B=f;if(I==="__proto__"||I==="constructor"||I==="prototype")return r;if(m!=w){var F=C[I];B=g?g(F,I,C):n,B===n&&(B=Nt(F)?F:zn(a[m+1])?[]:{})}fr(C,I,B),C=C[I]}return r}var nu=xo?function(r,a){return xo.set(r,a),r}:ke,e_=mo?function(r,a){return mo(r,"toString",{configurable:!0,enumerable:!1,value:ql(a),writable:!0})}:ke;function n_(r){return Lo(ks(r))}function en(r,a,f){var g=-1,m=r.length;a<0&&(a=-a>m?0:m+a),f=f>m?m:f,f<0&&(f+=m),m=a>f?0:f-a>>>0,a>>>=0;for(var y=R(m);++g<m;)y[g]=r[g+a];return y}function i_(r,a){var f;return hi(r,function(g,m,y){return f=a(g,m,y),!f}),!!f}function Po(r,a,f){var g=0,m=r==null?g:r.length;if(typeof a=="number"&&a===a&&m<=En){for(;g<m;){var y=g+m>>>1,w=r[y];w!==null&&!He(w)&&(f?w<=a:w<a)?g=y+1:m=y}return m}return wl(r,a,ke,f)}function wl(r,a,f,g){var m=0,y=r==null?0:r.length;if(y===0)return 0;a=f(a);for(var w=a!==a,C=a===null,I=He(a),B=a===n;m<y;){var F=bo((m+y)/2),H=f(r[F]),K=H!==n,J=H===null,et=H===H,dt=He(H);if(w)var nt=g||et;else B?nt=et&&(g||K):C?nt=et&&K&&(g||!J):I?nt=et&&K&&!J&&(g||!dt):J||dt?nt=!1:nt=g?H<=a:H<a;nt?m=F+1:y=F}return he(y,ye)}function iu(r,a){for(var f=-1,g=r.length,m=0,y=[];++f<g;){var w=r[f],C=a?a(w):w;if(!f||!dn(C,I)){var I=C;y[m++]=w===0?0:w}}return y}function su(r){return typeof r=="number"?r:He(r)?Re:+r}function ze(r){if(typeof r=="string")return r;if(at(r))return Dt(r,ze)+"";if(He(r))return Nf?Nf.call(r):"";var a=r+"";return a=="0"&&1/r==-St?"-0":a}function di(r,a,f){var g=-1,m=so,y=r.length,w=!0,C=[],I=C;if(f)w=!1,m=Ja;else if(y>=s){var B=a?null:g_(r);if(B)return oo(B);w=!1,m=sr,I=new Bi}else I=a?[]:C;t:for(;++g<y;){var F=r[g],H=a?a(F):F;if(F=f||F!==0?F:0,w&&H===H){for(var K=I.length;K--;)if(I[K]===H)continue t;a&&I.push(H),C.push(F)}else m(I,H,f)||(I!==C&&I.push(H),C.push(F))}return C}function Ml(r,a){return a=gi(a,r),r=Ou(r,a),r==null||delete r[vn(nn(a))]}function ru(r,a,f,g){return gr(r,a,f(Wi(r,a)),g)}function Co(r,a,f,g){for(var m=r.length,y=g?m:-1;(g?y--:++y<m)&&a(r[y],y,r););return f?en(r,g?0:y,g?y+1:m):en(r,g?y+1:0,g?m:y)}function ou(r,a){var f=r;return f instanceof bt&&(f=f.value()),Qa(a,function(g,m){return m.func.apply(m.thisArg,ci([g],m.args))},f)}function Tl(r,a,f){var g=r.length;if(g<2)return g?di(r[0]):[];for(var m=-1,y=R(g);++m<g;)for(var w=r[m],C=-1;++C<g;)C!=m&&(y[m]=ur(y[m]||w,r[C],a,f));return di(ce(y,1),a,f)}function au(r,a,f){for(var g=-1,m=r.length,y=a.length,w={};++g<m;){var C=g<y?a[g]:n;f(w,r[g],C)}return w}function Pl(r){return Yt(r)?r:[]}function Cl(r){return typeof r=="function"?r:ke}function gi(r,a){return at(r)?r:Nl(r,a)?[r]:Nu(Mt(r))}var s_=gt;function pi(r,a,f){var g=r.length;return f=f===n?g:f,!a&&f>=g?r:en(r,a,f)}var lu=Gm||function(r){return le.clearTimeout(r)};function cu(r,a){if(a)return r.slice();var f=r.length,g=If?If(f):new r.constructor(f);return r.copy(g),g}function kl(r){var a=new r.constructor(r.byteLength);return new ho(a).set(new ho(r)),a}function r_(r,a){var f=a?kl(r.buffer):r.buffer;return new r.constructor(f,r.byteOffset,r.byteLength)}function o_(r){var a=new r.constructor(r.source,Qs.exec(r));return a.lastIndex=r.lastIndex,a}function a_(r){return cr?Ct(cr.call(r)):{}}function fu(r,a){var f=a?kl(r.buffer):r.buffer;return new r.constructor(f,r.byteOffset,r.length)}function uu(r,a){if(r!==a){var f=r!==n,g=r===null,m=r===r,y=He(r),w=a!==n,C=a===null,I=a===a,B=He(a);if(!C&&!B&&!y&&r>a||y&&w&&I&&!C&&!B||g&&w&&I||!f&&I||!m)return 1;if(!g&&!y&&!B&&r<a||B&&f&&m&&!g&&!y||C&&f&&m||!w&&m||!I)return-1}return 0}function l_(r,a,f){for(var g=-1,m=r.criteria,y=a.criteria,w=m.length,C=f.length;++g<w;){var I=uu(m[g],y[g]);if(I){if(g>=C)return I;var B=f[g];return I*(B=="desc"?-1:1)}}return r.index-a.index}function hu(r,a,f,g){for(var m=-1,y=r.length,w=f.length,C=-1,I=a.length,B=Qt(y-w,0),F=R(I+B),H=!g;++C<I;)F[C]=a[C];for(;++m<w;)(H||m<y)&&(F[f[m]]=r[m]);for(;B--;)F[C++]=r[m++];return F}function du(r,a,f,g){for(var m=-1,y=r.length,w=-1,C=f.length,I=-1,B=a.length,F=Qt(y-C,0),H=R(F+B),K=!g;++m<F;)H[m]=r[m];for(var J=m;++I<B;)H[J+I]=a[I];for(;++w<C;)(K||m<y)&&(H[J+f[w]]=r[m++]);return H}function Te(r,a){var f=-1,g=r.length;for(a||(a=R(g));++f<g;)a[f]=r[f];return a}function yn(r,a,f,g){var m=!f;f||(f={});for(var y=-1,w=a.length;++y<w;){var C=a[y],I=g?g(f[C],r[C],C,f,r):n;I===n&&(I=r[C]),m?Bn(f,C,I):fr(f,C,I)}return f}function c_(r,a){return yn(r,Ll(r),a)}function f_(r,a){return yn(r,Pu(r),a)}function ko(r,a){return function(f,g){var m=at(f)?pm:O0,y=a?a():{};return m(f,r,tt(g,2),y)}}function Ms(r){return gt(function(a,f){var g=-1,m=f.length,y=m>1?f[m-1]:n,w=m>2?f[2]:n;for(y=r.length>3&&typeof y=="function"?(m--,y):n,w&&_e(f[0],f[1],w)&&(y=m<3?n:y,m=1),a=Ct(a);++g<m;){var C=f[g];C&&r(a,C,g,y)}return a})}function gu(r,a){return function(f,g){if(f==null)return f;if(!Pe(f))return r(f,g);for(var m=f.length,y=a?m:-1,w=Ct(f);(a?y--:++y<m)&&g(w[y],y,w)!==!1;);return f}}function pu(r){return function(a,f,g){for(var m=-1,y=Ct(a),w=g(a),C=w.length;C--;){var I=w[r?C:++m];if(f(y[I],I,y)===!1)break}return a}}function u_(r,a,f){var g=a&k,m=pr(r);function y(){var w=this&&this!==le&&this instanceof y?m:r;return w.apply(g?f:this,arguments)}return y}function mu(r){return function(a){a=Mt(a);var f=_s(a)?un(a):n,g=f?f[0]:a.charAt(0),m=f?pi(f,1).join(""):a.slice(1);return g[r]()+m}}function Ts(r){return function(a){return Qa(gh(dh(a).replace(em,"")),r,"")}}function pr(r){return function(){var a=arguments;switch(a.length){case 0:return new r;case 1:return new r(a[0]);case 2:return new r(a[0],a[1]);case 3:return new r(a[0],a[1],a[2]);case 4:return new r(a[0],a[1],a[2],a[3]);case 5:return new r(a[0],a[1],a[2],a[3],a[4]);case 6:return new r(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new r(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var f=ws(r.prototype),g=r.apply(f,a);return Nt(g)?g:f}}function h_(r,a,f){var g=pr(r);function m(){for(var y=arguments.length,w=R(y),C=y,I=Ps(m);C--;)w[C]=arguments[C];var B=y<3&&w[0]!==I&&w[y-1]!==I?[]:fi(w,I);if(y-=B.length,y<f)return vu(r,a,Eo,m.placeholder,n,w,B,n,n,f-y);var F=this&&this!==le&&this instanceof m?g:r;return Fe(F,this,w)}return m}function _u(r){return function(a,f,g){var m=Ct(a);if(!Pe(a)){var y=tt(f,3);a=ne(a),f=function(C){return y(m[C],C,m)}}var w=r(a,f,g);return w>-1?m[y?a[w]:w]:n}}function bu(r){return Wn(function(a){var f=a.length,g=f,m=Qe.prototype.thru;for(r&&a.reverse();g--;){var y=a[g];if(typeof y!="function")throw new Je(l);if(m&&!w&&Do(y)=="wrapper")var w=new Qe([],!0)}for(g=w?g:f;++g<f;){y=a[g];var C=Do(y),I=C=="wrapper"?Dl(y):n;I&&Bl(I[0])&&I[1]==($|W|N|X)&&!I[4].length&&I[9]==1?w=w[Do(I[0])].apply(w,I[3]):w=y.length==1&&Bl(y)?w[C]():w.thru(y)}return function(){var B=arguments,F=B[0];if(w&&B.length==1&&at(F))return w.plant(F).value();for(var H=0,K=f?a[H].apply(this,B):F;++H<f;)K=a[H].call(this,K);return K}})}function Eo(r,a,f,g,m,y,w,C,I,B){var F=a&$,H=a&k,K=a&A,J=a&(W|U),et=a&Z,dt=K?n:pr(r);function nt(){for(var mt=arguments.length,yt=R(mt),Ue=mt;Ue--;)yt[Ue]=arguments[Ue];if(J)var be=Ps(nt),Ve=Mm(yt,be);if(g&&(yt=hu(yt,g,m,J)),y&&(yt=du(yt,y,w,J)),mt-=Ve,J&&mt<B){var Xt=fi(yt,be);return vu(r,a,Eo,nt.placeholder,f,yt,Xt,C,I,B-mt)}var gn=H?f:this,Vn=K?gn[r]:r;return mt=yt.length,C?yt=O_(yt,C):et&&mt>1&&yt.reverse(),F&&I<mt&&(yt.length=I),this&&this!==le&&this instanceof nt&&(Vn=dt||pr(Vn)),Vn.apply(gn,yt)}return nt}function xu(r,a){return function(f,g){return z0(f,r,a(g),{})}}function Io(r,a){return function(f,g){var m;if(f===n&&g===n)return a;if(f!==n&&(m=f),g!==n){if(m===n)return g;typeof f=="string"||typeof g=="string"?(f=ze(f),g=ze(g)):(f=su(f),g=su(g)),m=r(f,g)}return m}}function El(r){return Wn(function(a){return a=Dt(a,We(tt())),gt(function(f){var g=this;return r(a,function(m){return Fe(m,g,f)})})})}function Ao(r,a){a=a===n?" ":ze(a);var f=a.length;if(f<2)return f?Sl(a,r):a;var g=Sl(a,_o(r/bs(a)));return _s(a)?pi(un(g),0,r).join(""):g.slice(0,r)}function d_(r,a,f,g){var m=a&k,y=pr(r);function w(){for(var C=-1,I=arguments.length,B=-1,F=g.length,H=R(F+I),K=this&&this!==le&&this instanceof w?y:r;++B<F;)H[B]=g[B];for(;I--;)H[B++]=arguments[++C];return Fe(K,m?f:this,H)}return w}function yu(r){return function(a,f,g){return g&&typeof g!="number"&&_e(a,f,g)&&(f=g=n),a=Un(a),f===n?(f=a,a=0):f=Un(f),g=g===n?a<f?1:-1:Un(g),J0(a,f,g,r)}}function Oo(r){return function(a,f){return typeof a=="string"&&typeof f=="string"||(a=sn(a),f=sn(f)),r(a,f)}}function vu(r,a,f,g,m,y,w,C,I,B){var F=a&W,H=F?w:n,K=F?n:w,J=F?y:n,et=F?n:y;a|=F?N:G,a&=~(F?G:N),a&D||(a&=-4);var dt=[r,a,m,J,H,et,K,C,I,B],nt=f.apply(n,dt);return Bl(r)&&Du(nt,dt),nt.placeholder=g,Ru(nt,r,a)}function Il(r){var a=Jt[r];return function(f,g){if(f=sn(f),g=g==null?0:he(ut(g),292),g&&Rf(f)){var m=(Mt(f)+"e").split("e"),y=a(m[0]+"e"+(+m[1]+g));return m=(Mt(y)+"e").split("e"),+(m[0]+"e"+(+m[1]-g))}return a(f)}}var g_=vs&&1/oo(new vs([,-0]))[1]==St?function(r){return new vs(r)}:Jl;function Su(r){return function(a){var f=de(a);return f==oe?ol(a):f==Ot?Am(a):wm(a,r(a))}}function Fn(r,a,f,g,m,y,w,C){var I=a&A;if(!I&&typeof r!="function")throw new Je(l);var B=g?g.length:0;if(B||(a&=-97,g=m=n),w=w===n?w:Qt(ut(w),0),C=C===n?C:ut(C),B-=m?m.length:0,a&G){var F=g,H=m;g=m=n}var K=I?n:Dl(r),J=[r,a,f,g,m,F,H,y,w,C];if(K&&E_(J,K),r=J[0],a=J[1],f=J[2],g=J[3],m=J[4],C=J[9]=J[9]===n?I?0:r.length:Qt(J[9]-B,0),!C&&a&(W|U)&&(a&=-25),!a||a==k)var et=u_(r,a,f);else a==W||a==U?et=h_(r,a,C):(a==N||a==(k|N))&&!m.length?et=d_(r,a,f,g):et=Eo.apply(n,J);var dt=K?nu:Du;return Ru(dt(et,J),r,a)}function wu(r,a,f,g){return r===n||dn(r,ys[f])&&!Tt.call(g,f)?a:r}function Mu(r,a,f,g,m,y){return Nt(r)&&Nt(a)&&(y.set(a,r),To(r,a,n,Mu,y),y.delete(a)),r}function p_(r){return br(r)?n:r}function Tu(r,a,f,g,m,y){var w=f&T,C=r.length,I=a.length;if(C!=I&&!(w&&I>C))return!1;var B=y.get(r),F=y.get(a);if(B&&F)return B==a&&F==r;var H=-1,K=!0,J=f&M?new Bi:n;for(y.set(r,a),y.set(a,r);++H<C;){var et=r[H],dt=a[H];if(g)var nt=w?g(dt,et,H,a,r,y):g(et,dt,H,r,a,y);if(nt!==n){if(nt)continue;K=!1;break}if(J){if(!tl(a,function(mt,yt){if(!sr(J,yt)&&(et===mt||m(et,mt,f,g,y)))return J.push(yt)})){K=!1;break}}else if(!(et===dt||m(et,dt,f,g,y))){K=!1;break}}return y.delete(r),y.delete(a),K}function m_(r,a,f,g,m,y,w){switch(f){case An:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case ii:return!(r.byteLength!=a.byteLength||!y(new ho(r),new ho(a)));case Ne:case kt:case ln:return dn(+r,+a);case In:return r.name==a.name&&r.message==a.message;case _n:case Ci:return r==a+"";case oe:var C=ol;case Ot:var I=g&T;if(C||(C=oo),r.size!=a.size&&!I)return!1;var B=w.get(r);if(B)return B==a;g|=M,w.set(r,a);var F=Tu(C(r),C(a),g,m,y,w);return w.delete(r),F;case rs:if(cr)return cr.call(r)==cr.call(a)}return!1}function __(r,a,f,g,m,y){var w=f&T,C=Al(r),I=C.length,B=Al(a),F=B.length;if(I!=F&&!w)return!1;for(var H=I;H--;){var K=C[H];if(!(w?K in a:Tt.call(a,K)))return!1}var J=y.get(r),et=y.get(a);if(J&&et)return J==a&&et==r;var dt=!0;y.set(r,a),y.set(a,r);for(var nt=w;++H<I;){K=C[H];var mt=r[K],yt=a[K];if(g)var Ue=w?g(yt,mt,K,a,r,y):g(mt,yt,K,r,a,y);if(!(Ue===n?mt===yt||m(mt,yt,f,g,y):Ue)){dt=!1;break}nt||(nt=K=="constructor")}if(dt&&!nt){var be=r.constructor,Ve=a.constructor;be!=Ve&&"constructor"in r&&"constructor"in a&&!(typeof be=="function"&&be instanceof be&&typeof Ve=="function"&&Ve instanceof Ve)&&(dt=!1)}return y.delete(r),y.delete(a),dt}function Wn(r){return Wl(Au(r,n,zu),r+"")}function Al(r){return Gf(r,ne,Ll)}function Ol(r){return Gf(r,Ce,Pu)}var Dl=xo?function(r){return xo.get(r)}:Jl;function Do(r){for(var a=r.name+"",f=Ss[a],g=Tt.call(Ss,a)?f.length:0;g--;){var m=f[g],y=m.func;if(y==null||y==r)return m.name}return a}function Ps(r){var a=Tt.call(x,"placeholder")?x:r;return a.placeholder}function tt(){var r=x.iteratee||jl;return r=r===jl?Kf:r,arguments.length?r(arguments[0],arguments[1]):r}function Ro(r,a){var f=r.__data__;return T_(a)?f[typeof a=="string"?"string":"hash"]:f.map}function Rl(r){for(var a=ne(r),f=a.length;f--;){var g=a[f],m=r[g];a[f]=[g,m,Eu(m)]}return a}function zi(r,a){var f=km(r,a);return Xf(f)?f:n}function b_(r){var a=Tt.call(r,Li),f=r[Li];try{r[Li]=n;var g=!0}catch{}var m=fo.call(r);return g&&(a?r[Li]=f:delete r[Li]),m}var Ll=ll?function(r){return r==null?[]:(r=Ct(r),li(ll(r),function(a){return Of.call(r,a)}))}:Ql,Pu=ll?function(r){for(var a=[];r;)ci(a,Ll(r)),r=go(r);return a}:Ql,de=me;(cl&&de(new cl(new ArrayBuffer(1)))!=An||or&&de(new or)!=oe||fl&&de(fl.resolve())!=Hs||vs&&de(new vs)!=Ot||ar&&de(new ar)!=ki)&&(de=function(r){var a=me(r),f=a==ae?r.constructor:n,g=f?Hi(f):"";if(g)switch(g){case t0:return An;case e0:return oe;case n0:return Hs;case i0:return Ot;case s0:return ki}return a});function x_(r,a,f){for(var g=-1,m=f.length;++g<m;){var y=f[g],w=y.size;switch(y.type){case"drop":r+=w;break;case"dropRight":a-=w;break;case"take":a=he(a,r+w);break;case"takeRight":r=Qt(r,a-w);break}}return{start:r,end:a}}function y_(r){var a=r.match($a);return a?a[1].split(Zr):[]}function Cu(r,a,f){a=gi(a,r);for(var g=-1,m=a.length,y=!1;++g<m;){var w=vn(a[g]);if(!(y=r!=null&&f(r,w)))break;r=r[w]}return y||++g!=m?y:(m=r==null?0:r.length,!!m&&Ho(m)&&zn(w,m)&&(at(r)||Ui(r)))}function v_(r){var a=r.length,f=new r.constructor(a);return a&&typeof r[0]=="string"&&Tt.call(r,"index")&&(f.index=r.index,f.input=r.input),f}function ku(r){return typeof r.constructor=="function"&&!mr(r)?ws(go(r)):{}}function S_(r,a,f){var g=r.constructor;switch(a){case ii:return kl(r);case Ne:case kt:return new g(+r);case An:return r_(r,f);case os:case as:case si:case Ei:case Us:case Vs:case $s:case Gs:case Ys:return fu(r,f);case oe:return new g;case ln:case Ci:return new g(r);case _n:return o_(r);case Ot:return new g;case rs:return a_(r)}}function w_(r,a){var f=a.length;if(!f)return r;var g=f-1;return a[g]=(f>1?"& ":"")+a[g],a=a.join(f>2?", ":" "),r.replace(Js,`{
|
|
43
|
-
/* [wrapped with `+a+`] */
|
|
44
|
-
`)}function M_(r){return at(r)||Ui(r)||!!(Df&&r&&r[Df])}function zn(r,a){var f=typeof r;return a=a??zt,!!a&&(f=="number"||f!="symbol"&&cs.test(r))&&r>-1&&r%1==0&&r<a}function _e(r,a,f){if(!Nt(f))return!1;var g=typeof a;return(g=="number"?Pe(f)&&zn(a,f.length):g=="string"&&a in f)?dn(f[a],r):!1}function Nl(r,a){if(at(r))return!1;var f=typeof r;return f=="number"||f=="symbol"||f=="boolean"||r==null||He(r)?!0:Ha.test(r)||!za.test(r)||a!=null&&r in Ct(a)}function T_(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function Bl(r){var a=Do(r),f=x[a];if(typeof f!="function"||!(a in bt.prototype))return!1;if(r===f)return!0;var g=Dl(f);return!!g&&r===g[0]}function P_(r){return!!Ef&&Ef in r}var C_=lo?Hn:tc;function mr(r){var a=r&&r.constructor,f=typeof a=="function"&&a.prototype||ys;return r===f}function Eu(r){return r===r&&!Nt(r)}function Iu(r,a){return function(f){return f==null?!1:f[r]===a&&(a!==n||r in Ct(f))}}function k_(r){var a=Wo(r,function(g){return f.size===h&&f.clear(),g}),f=a.cache;return a}function E_(r,a){var f=r[1],g=a[1],m=f|g,y=m<(k|A|$),w=g==$&&f==W||g==$&&f==X&&r[7].length<=a[8]||g==($|X)&&a[7].length<=a[8]&&f==W;if(!(y||w))return r;g&k&&(r[2]=a[2],m|=f&k?0:D);var C=a[3];if(C){var I=r[3];r[3]=I?hu(I,C,a[4]):C,r[4]=I?fi(r[3],d):a[4]}return C=a[5],C&&(I=r[5],r[5]=I?du(I,C,a[6]):C,r[6]=I?fi(r[5],d):a[6]),C=a[7],C&&(r[7]=C),g&$&&(r[8]=r[8]==null?a[8]:he(r[8],a[8])),r[9]==null&&(r[9]=a[9]),r[0]=a[0],r[1]=m,r}function I_(r){var a=[];if(r!=null)for(var f in Ct(r))a.push(f);return a}function A_(r){return fo.call(r)}function Au(r,a,f){return a=Qt(a===n?r.length-1:a,0),function(){for(var g=arguments,m=-1,y=Qt(g.length-a,0),w=R(y);++m<y;)w[m]=g[a+m];m=-1;for(var C=R(a+1);++m<a;)C[m]=g[m];return C[a]=f(w),Fe(r,this,C)}}function Ou(r,a){return a.length<2?r:Wi(r,en(a,0,-1))}function O_(r,a){for(var f=r.length,g=he(a.length,f),m=Te(r);g--;){var y=a[g];r[g]=zn(y,f)?m[y]:n}return r}function Fl(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var Du=Lu(nu),_r=Xm||function(r,a){return le.setTimeout(r,a)},Wl=Lu(e_);function Ru(r,a,f){var g=a+"";return Wl(r,w_(g,D_(y_(g),f)))}function Lu(r){var a=0,f=0;return function(){var g=Zm(),m=Wt-(g-f);if(f=g,m>0){if(++a>=ft)return arguments[0]}else a=0;return r.apply(n,arguments)}}function Lo(r,a){var f=-1,g=r.length,m=g-1;for(a=a===n?g:a;++f<a;){var y=vl(f,m),w=r[y];r[y]=r[f],r[f]=w}return r.length=a,r}var Nu=k_(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(Ua,function(f,g,m,y){a.push(m?y.replace(Qr,"$1"):g||f)}),a});function vn(r){if(typeof r=="string"||He(r))return r;var a=r+"";return a=="0"&&1/r==-St?"-0":a}function Hi(r){if(r!=null){try{return co.call(r)}catch{}try{return r+""}catch{}}return""}function D_(r,a){return Ze(Le,function(f){var g="_."+f[0];a&f[1]&&!so(r,g)&&r.push(g)}),r.sort()}function Bu(r){if(r instanceof bt)return r.clone();var a=new Qe(r.__wrapped__,r.__chain__);return a.__actions__=Te(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function R_(r,a,f){(f?_e(r,a,f):a===n)?a=1:a=Qt(ut(a),0);var g=r==null?0:r.length;if(!g||a<1)return[];for(var m=0,y=0,w=R(_o(g/a));m<g;)w[y++]=en(r,m,m+=a);return w}function L_(r){for(var a=-1,f=r==null?0:r.length,g=0,m=[];++a<f;){var y=r[a];y&&(m[g++]=y)}return m}function N_(){var r=arguments.length;if(!r)return[];for(var a=R(r-1),f=arguments[0],g=r;g--;)a[g-1]=arguments[g];return ci(at(f)?Te(f):[f],ce(a,1))}var B_=gt(function(r,a){return Yt(r)?ur(r,ce(a,1,Yt,!0)):[]}),F_=gt(function(r,a){var f=nn(a);return Yt(f)&&(f=n),Yt(r)?ur(r,ce(a,1,Yt,!0),tt(f,2)):[]}),W_=gt(function(r,a){var f=nn(a);return Yt(f)&&(f=n),Yt(r)?ur(r,ce(a,1,Yt,!0),n,f):[]});function z_(r,a,f){var g=r==null?0:r.length;return g?(a=f||a===n?1:ut(a),en(r,a<0?0:a,g)):[]}function H_(r,a,f){var g=r==null?0:r.length;return g?(a=f||a===n?1:ut(a),a=g-a,en(r,0,a<0?0:a)):[]}function U_(r,a){return r&&r.length?Co(r,tt(a,3),!0,!0):[]}function V_(r,a){return r&&r.length?Co(r,tt(a,3),!0):[]}function $_(r,a,f,g){var m=r==null?0:r.length;return m?(f&&typeof f!="number"&&_e(r,a,f)&&(f=0,g=m),N0(r,a,f,g)):[]}function Fu(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var m=f==null?0:ut(f);return m<0&&(m=Qt(g+m,0)),ro(r,tt(a,3),m)}function Wu(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var m=g-1;return f!==n&&(m=ut(f),m=f<0?Qt(g+m,0):he(m,g-1)),ro(r,tt(a,3),m,!0)}function zu(r){var a=r==null?0:r.length;return a?ce(r,1):[]}function G_(r){var a=r==null?0:r.length;return a?ce(r,St):[]}function Y_(r,a){var f=r==null?0:r.length;return f?(a=a===n?1:ut(a),ce(r,a)):[]}function X_(r){for(var a=-1,f=r==null?0:r.length,g={};++a<f;){var m=r[a];g[m[0]]=m[1]}return g}function Hu(r){return r&&r.length?r[0]:n}function K_(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var m=f==null?0:ut(f);return m<0&&(m=Qt(g+m,0)),ms(r,a,m)}function q_(r){var a=r==null?0:r.length;return a?en(r,0,-1):[]}var j_=gt(function(r){var a=Dt(r,Pl);return a.length&&a[0]===r[0]?ml(a):[]}),Z_=gt(function(r){var a=nn(r),f=Dt(r,Pl);return a===nn(f)?a=n:f.pop(),f.length&&f[0]===r[0]?ml(f,tt(a,2)):[]}),J_=gt(function(r){var a=nn(r),f=Dt(r,Pl);return a=typeof a=="function"?a:n,a&&f.pop(),f.length&&f[0]===r[0]?ml(f,n,a):[]});function Q_(r,a){return r==null?"":qm.call(r,a)}function nn(r){var a=r==null?0:r.length;return a?r[a-1]:n}function tb(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var m=g;return f!==n&&(m=ut(f),m=m<0?Qt(g+m,0):he(m,g-1)),a===a?Dm(r,a,m):ro(r,vf,m,!0)}function eb(r,a){return r&&r.length?Jf(r,ut(a)):n}var nb=gt(Uu);function Uu(r,a){return r&&r.length&&a&&a.length?yl(r,a):r}function ib(r,a,f){return r&&r.length&&a&&a.length?yl(r,a,tt(f,2)):r}function sb(r,a,f){return r&&r.length&&a&&a.length?yl(r,a,n,f):r}var rb=Wn(function(r,a){var f=r==null?0:r.length,g=hl(r,a);return eu(r,Dt(a,function(m){return zn(m,f)?+m:m}).sort(uu)),g});function ob(r,a){var f=[];if(!(r&&r.length))return f;var g=-1,m=[],y=r.length;for(a=tt(a,3);++g<y;){var w=r[g];a(w,g,r)&&(f.push(w),m.push(g))}return eu(r,m),f}function zl(r){return r==null?r:Qm.call(r)}function ab(r,a,f){var g=r==null?0:r.length;return g?(f&&typeof f!="number"&&_e(r,a,f)?(a=0,f=g):(a=a==null?0:ut(a),f=f===n?g:ut(f)),en(r,a,f)):[]}function lb(r,a){return Po(r,a)}function cb(r,a,f){return wl(r,a,tt(f,2))}function fb(r,a){var f=r==null?0:r.length;if(f){var g=Po(r,a);if(g<f&&dn(r[g],a))return g}return-1}function ub(r,a){return Po(r,a,!0)}function hb(r,a,f){return wl(r,a,tt(f,2),!0)}function db(r,a){var f=r==null?0:r.length;if(f){var g=Po(r,a,!0)-1;if(dn(r[g],a))return g}return-1}function gb(r){return r&&r.length?iu(r):[]}function pb(r,a){return r&&r.length?iu(r,tt(a,2)):[]}function mb(r){var a=r==null?0:r.length;return a?en(r,1,a):[]}function _b(r,a,f){return r&&r.length?(a=f||a===n?1:ut(a),en(r,0,a<0?0:a)):[]}function bb(r,a,f){var g=r==null?0:r.length;return g?(a=f||a===n?1:ut(a),a=g-a,en(r,a<0?0:a,g)):[]}function xb(r,a){return r&&r.length?Co(r,tt(a,3),!1,!0):[]}function yb(r,a){return r&&r.length?Co(r,tt(a,3)):[]}var vb=gt(function(r){return di(ce(r,1,Yt,!0))}),Sb=gt(function(r){var a=nn(r);return Yt(a)&&(a=n),di(ce(r,1,Yt,!0),tt(a,2))}),wb=gt(function(r){var a=nn(r);return a=typeof a=="function"?a:n,di(ce(r,1,Yt,!0),n,a)});function Mb(r){return r&&r.length?di(r):[]}function Tb(r,a){return r&&r.length?di(r,tt(a,2)):[]}function Pb(r,a){return a=typeof a=="function"?a:n,r&&r.length?di(r,n,a):[]}function Hl(r){if(!(r&&r.length))return[];var a=0;return r=li(r,function(f){if(Yt(f))return a=Qt(f.length,a),!0}),sl(a,function(f){return Dt(r,el(f))})}function Vu(r,a){if(!(r&&r.length))return[];var f=Hl(r);return a==null?f:Dt(f,function(g){return Fe(a,n,g)})}var Cb=gt(function(r,a){return Yt(r)?ur(r,a):[]}),kb=gt(function(r){return Tl(li(r,Yt))}),Eb=gt(function(r){var a=nn(r);return Yt(a)&&(a=n),Tl(li(r,Yt),tt(a,2))}),Ib=gt(function(r){var a=nn(r);return a=typeof a=="function"?a:n,Tl(li(r,Yt),n,a)}),Ab=gt(Hl);function Ob(r,a){return au(r||[],a||[],fr)}function Db(r,a){return au(r||[],a||[],gr)}var Rb=gt(function(r){var a=r.length,f=a>1?r[a-1]:n;return f=typeof f=="function"?(r.pop(),f):n,Vu(r,f)});function $u(r){var a=x(r);return a.__chain__=!0,a}function Lb(r,a){return a(r),r}function No(r,a){return a(r)}var Nb=Wn(function(r){var a=r.length,f=a?r[0]:0,g=this.__wrapped__,m=function(y){return hl(y,r)};return a>1||this.__actions__.length||!(g instanceof bt)||!zn(f)?this.thru(m):(g=g.slice(f,+f+(a?1:0)),g.__actions__.push({func:No,args:[m],thisArg:n}),new Qe(g,this.__chain__).thru(function(y){return a&&!y.length&&y.push(n),y}))});function Bb(){return $u(this)}function Fb(){return new Qe(this.value(),this.__chain__)}function Wb(){this.__values__===n&&(this.__values__=sh(this.value()));var r=this.__index__>=this.__values__.length,a=r?n:this.__values__[this.__index__++];return{done:r,value:a}}function zb(){return this}function Hb(r){for(var a,f=this;f instanceof vo;){var g=Bu(f);g.__index__=0,g.__values__=n,a?m.__wrapped__=g:a=g;var m=g;f=f.__wrapped__}return m.__wrapped__=r,a}function Ub(){var r=this.__wrapped__;if(r instanceof bt){var a=r;return this.__actions__.length&&(a=new bt(this)),a=a.reverse(),a.__actions__.push({func:No,args:[zl],thisArg:n}),new Qe(a,this.__chain__)}return this.thru(zl)}function Vb(){return ou(this.__wrapped__,this.__actions__)}var $b=ko(function(r,a,f){Tt.call(r,f)?++r[f]:Bn(r,f,1)});function Gb(r,a,f){var g=at(r)?xf:L0;return f&&_e(r,a,f)&&(a=n),g(r,tt(a,3))}function Yb(r,a){var f=at(r)?li:Vf;return f(r,tt(a,3))}var Xb=_u(Fu),Kb=_u(Wu);function qb(r,a){return ce(Bo(r,a),1)}function jb(r,a){return ce(Bo(r,a),St)}function Zb(r,a,f){return f=f===n?1:ut(f),ce(Bo(r,a),f)}function Gu(r,a){var f=at(r)?Ze:hi;return f(r,tt(a,3))}function Yu(r,a){var f=at(r)?mm:Uf;return f(r,tt(a,3))}var Jb=ko(function(r,a,f){Tt.call(r,f)?r[f].push(a):Bn(r,f,[a])});function Qb(r,a,f,g){r=Pe(r)?r:ks(r),f=f&&!g?ut(f):0;var m=r.length;return f<0&&(f=Qt(m+f,0)),Uo(r)?f<=m&&r.indexOf(a,f)>-1:!!m&&ms(r,a,f)>-1}var tx=gt(function(r,a,f){var g=-1,m=typeof a=="function",y=Pe(r)?R(r.length):[];return hi(r,function(w){y[++g]=m?Fe(a,w,f):hr(w,a,f)}),y}),ex=ko(function(r,a,f){Bn(r,f,a)});function Bo(r,a){var f=at(r)?Dt:qf;return f(r,tt(a,3))}function nx(r,a,f,g){return r==null?[]:(at(a)||(a=a==null?[]:[a]),f=g?n:f,at(f)||(f=f==null?[]:[f]),Qf(r,a,f))}var ix=ko(function(r,a,f){r[f?0:1].push(a)},function(){return[[],[]]});function sx(r,a,f){var g=at(r)?Qa:wf,m=arguments.length<3;return g(r,tt(a,4),f,m,hi)}function rx(r,a,f){var g=at(r)?_m:wf,m=arguments.length<3;return g(r,tt(a,4),f,m,Uf)}function ox(r,a){var f=at(r)?li:Vf;return f(r,zo(tt(a,3)))}function ax(r){var a=at(r)?Ff:Q0;return a(r)}function lx(r,a,f){(f?_e(r,a,f):a===n)?a=1:a=ut(a);var g=at(r)?I0:t_;return g(r,a)}function cx(r){var a=at(r)?A0:n_;return a(r)}function fx(r){if(r==null)return 0;if(Pe(r))return Uo(r)?bs(r):r.length;var a=de(r);return a==oe||a==Ot?r.size:bl(r).length}function ux(r,a,f){var g=at(r)?tl:i_;return f&&_e(r,a,f)&&(a=n),g(r,tt(a,3))}var hx=gt(function(r,a){if(r==null)return[];var f=a.length;return f>1&&_e(r,a[0],a[1])?a=[]:f>2&&_e(a[0],a[1],a[2])&&(a=[a[0]]),Qf(r,ce(a,1),[])}),Fo=Ym||function(){return le.Date.now()};function dx(r,a){if(typeof a!="function")throw new Je(l);return r=ut(r),function(){if(--r<1)return a.apply(this,arguments)}}function Xu(r,a,f){return a=f?n:a,a=r&&a==null?r.length:a,Fn(r,$,n,n,n,n,a)}function Ku(r,a){var f;if(typeof a!="function")throw new Je(l);return r=ut(r),function(){return--r>0&&(f=a.apply(this,arguments)),r<=1&&(a=n),f}}var Ul=gt(function(r,a,f){var g=k;if(f.length){var m=fi(f,Ps(Ul));g|=N}return Fn(r,g,a,f,m)}),qu=gt(function(r,a,f){var g=k|A;if(f.length){var m=fi(f,Ps(qu));g|=N}return Fn(a,g,r,f,m)});function ju(r,a,f){a=f?n:a;var g=Fn(r,W,n,n,n,n,n,a);return g.placeholder=ju.placeholder,g}function Zu(r,a,f){a=f?n:a;var g=Fn(r,U,n,n,n,n,n,a);return g.placeholder=Zu.placeholder,g}function Ju(r,a,f){var g,m,y,w,C,I,B=0,F=!1,H=!1,K=!0;if(typeof r!="function")throw new Je(l);a=sn(a)||0,Nt(f)&&(F=!!f.leading,H="maxWait"in f,y=H?Qt(sn(f.maxWait)||0,a):y,K="trailing"in f?!!f.trailing:K);function J(Xt){var gn=g,Vn=m;return g=m=n,B=Xt,w=r.apply(Vn,gn),w}function et(Xt){return B=Xt,C=_r(mt,a),F?J(Xt):w}function dt(Xt){var gn=Xt-I,Vn=Xt-B,_h=a-gn;return H?he(_h,y-Vn):_h}function nt(Xt){var gn=Xt-I,Vn=Xt-B;return I===n||gn>=a||gn<0||H&&Vn>=y}function mt(){var Xt=Fo();if(nt(Xt))return yt(Xt);C=_r(mt,dt(Xt))}function yt(Xt){return C=n,K&&g?J(Xt):(g=m=n,w)}function Ue(){C!==n&&lu(C),B=0,g=I=m=C=n}function be(){return C===n?w:yt(Fo())}function Ve(){var Xt=Fo(),gn=nt(Xt);if(g=arguments,m=this,I=Xt,gn){if(C===n)return et(I);if(H)return lu(C),C=_r(mt,a),J(I)}return C===n&&(C=_r(mt,a)),w}return Ve.cancel=Ue,Ve.flush=be,Ve}var gx=gt(function(r,a){return Hf(r,1,a)}),px=gt(function(r,a,f){return Hf(r,sn(a)||0,f)});function mx(r){return Fn(r,Z)}function Wo(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new Je(l);var f=function(){var g=arguments,m=a?a.apply(this,g):g[0],y=f.cache;if(y.has(m))return y.get(m);var w=r.apply(this,g);return f.cache=y.set(m,w)||y,w};return f.cache=new(Wo.Cache||Nn),f}Wo.Cache=Nn;function zo(r){if(typeof r!="function")throw new Je(l);return function(){var a=arguments;switch(a.length){case 0:return!r.call(this);case 1:return!r.call(this,a[0]);case 2:return!r.call(this,a[0],a[1]);case 3:return!r.call(this,a[0],a[1],a[2])}return!r.apply(this,a)}}function _x(r){return Ku(2,r)}var bx=s_(function(r,a){a=a.length==1&&at(a[0])?Dt(a[0],We(tt())):Dt(ce(a,1),We(tt()));var f=a.length;return gt(function(g){for(var m=-1,y=he(g.length,f);++m<y;)g[m]=a[m].call(this,g[m]);return Fe(r,this,g)})}),Vl=gt(function(r,a){var f=fi(a,Ps(Vl));return Fn(r,N,n,a,f)}),Qu=gt(function(r,a){var f=fi(a,Ps(Qu));return Fn(r,G,n,a,f)}),xx=Wn(function(r,a){return Fn(r,X,n,n,n,a)});function yx(r,a){if(typeof r!="function")throw new Je(l);return a=a===n?a:ut(a),gt(r,a)}function vx(r,a){if(typeof r!="function")throw new Je(l);return a=a==null?0:Qt(ut(a),0),gt(function(f){var g=f[a],m=pi(f,0,a);return g&&ci(m,g),Fe(r,this,m)})}function Sx(r,a,f){var g=!0,m=!0;if(typeof r!="function")throw new Je(l);return Nt(f)&&(g="leading"in f?!!f.leading:g,m="trailing"in f?!!f.trailing:m),Ju(r,a,{leading:g,maxWait:a,trailing:m})}function wx(r){return Xu(r,1)}function Mx(r,a){return Vl(Cl(a),r)}function Tx(){if(!arguments.length)return[];var r=arguments[0];return at(r)?r:[r]}function Px(r){return tn(r,v)}function Cx(r,a){return a=typeof a=="function"?a:n,tn(r,v,a)}function kx(r){return tn(r,p|v)}function Ex(r,a){return a=typeof a=="function"?a:n,tn(r,p|v,a)}function Ix(r,a){return a==null||zf(r,a,ne(a))}function dn(r,a){return r===a||r!==r&&a!==a}var Ax=Oo(pl),Ox=Oo(function(r,a){return r>=a}),Ui=Yf(function(){return arguments}())?Yf:function(r){return Ht(r)&&Tt.call(r,"callee")&&!Of.call(r,"callee")},at=R.isArray,Dx=df?We(df):H0;function Pe(r){return r!=null&&Ho(r.length)&&!Hn(r)}function Yt(r){return Ht(r)&&Pe(r)}function Rx(r){return r===!0||r===!1||Ht(r)&&me(r)==Ne}var mi=Km||tc,Lx=gf?We(gf):U0;function Nx(r){return Ht(r)&&r.nodeType===1&&!br(r)}function Bx(r){if(r==null)return!0;if(Pe(r)&&(at(r)||typeof r=="string"||typeof r.splice=="function"||mi(r)||Cs(r)||Ui(r)))return!r.length;var a=de(r);if(a==oe||a==Ot)return!r.size;if(mr(r))return!bl(r).length;for(var f in r)if(Tt.call(r,f))return!1;return!0}function Fx(r,a){return dr(r,a)}function Wx(r,a,f){f=typeof f=="function"?f:n;var g=f?f(r,a):n;return g===n?dr(r,a,n,f):!!g}function $l(r){if(!Ht(r))return!1;var a=me(r);return a==In||a==ue||typeof r.message=="string"&&typeof r.name=="string"&&!br(r)}function zx(r){return typeof r=="number"&&Rf(r)}function Hn(r){if(!Nt(r))return!1;var a=me(r);return a==mn||a==ni||a==re||a==qr}function th(r){return typeof r=="number"&&r==ut(r)}function Ho(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=zt}function Nt(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function Ht(r){return r!=null&&typeof r=="object"}var eh=pf?We(pf):$0;function Hx(r,a){return r===a||_l(r,a,Rl(a))}function Ux(r,a,f){return f=typeof f=="function"?f:n,_l(r,a,Rl(a),f)}function Vx(r){return nh(r)&&r!=+r}function $x(r){if(C_(r))throw new ot(o);return Xf(r)}function Gx(r){return r===null}function Yx(r){return r==null}function nh(r){return typeof r=="number"||Ht(r)&&me(r)==ln}function br(r){if(!Ht(r)||me(r)!=ae)return!1;var a=go(r);if(a===null)return!0;var f=Tt.call(a,"constructor")&&a.constructor;return typeof f=="function"&&f instanceof f&&co.call(f)==Um}var Gl=mf?We(mf):G0;function Xx(r){return th(r)&&r>=-zt&&r<=zt}var ih=_f?We(_f):Y0;function Uo(r){return typeof r=="string"||!at(r)&&Ht(r)&&me(r)==Ci}function He(r){return typeof r=="symbol"||Ht(r)&&me(r)==rs}var Cs=bf?We(bf):X0;function Kx(r){return r===n}function qx(r){return Ht(r)&&de(r)==ki}function jx(r){return Ht(r)&&me(r)==Ra}var Zx=Oo(xl),Jx=Oo(function(r,a){return r<=a});function sh(r){if(!r)return[];if(Pe(r))return Uo(r)?un(r):Te(r);if(rr&&r[rr])return Im(r[rr]());var a=de(r),f=a==oe?ol:a==Ot?oo:ks;return f(r)}function Un(r){if(!r)return r===0?r:0;if(r=sn(r),r===St||r===-St){var a=r<0?-1:1;return a*$t}return r===r?r:0}function ut(r){var a=Un(r),f=a%1;return a===a?f?a-f:a:0}function rh(r){return r?Fi(ut(r),0,se):0}function sn(r){if(typeof r=="number")return r;if(He(r))return Re;if(Nt(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=Nt(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=Mf(r);var f=On.test(r);return f||Ai.test(r)?dm(r.slice(2),f?2:8):tr.test(r)?Re:+r}function oh(r){return yn(r,Ce(r))}function Qx(r){return r?Fi(ut(r),-zt,zt):r===0?r:0}function Mt(r){return r==null?"":ze(r)}var t1=Ms(function(r,a){if(mr(a)||Pe(a)){yn(a,ne(a),r);return}for(var f in a)Tt.call(a,f)&&fr(r,f,a[f])}),ah=Ms(function(r,a){yn(a,Ce(a),r)}),Vo=Ms(function(r,a,f,g){yn(a,Ce(a),r,g)}),e1=Ms(function(r,a,f,g){yn(a,ne(a),r,g)}),n1=Wn(hl);function i1(r,a){var f=ws(r);return a==null?f:Wf(f,a)}var s1=gt(function(r,a){r=Ct(r);var f=-1,g=a.length,m=g>2?a[2]:n;for(m&&_e(a[0],a[1],m)&&(g=1);++f<g;)for(var y=a[f],w=Ce(y),C=-1,I=w.length;++C<I;){var B=w[C],F=r[B];(F===n||dn(F,ys[B])&&!Tt.call(r,B))&&(r[B]=y[B])}return r}),r1=gt(function(r){return r.push(n,Mu),Fe(lh,n,r)});function o1(r,a){return yf(r,tt(a,3),xn)}function a1(r,a){return yf(r,tt(a,3),gl)}function l1(r,a){return r==null?r:dl(r,tt(a,3),Ce)}function c1(r,a){return r==null?r:$f(r,tt(a,3),Ce)}function f1(r,a){return r&&xn(r,tt(a,3))}function u1(r,a){return r&&gl(r,tt(a,3))}function h1(r){return r==null?[]:Mo(r,ne(r))}function d1(r){return r==null?[]:Mo(r,Ce(r))}function Yl(r,a,f){var g=r==null?n:Wi(r,a);return g===n?f:g}function g1(r,a){return r!=null&&Cu(r,a,B0)}function Xl(r,a){return r!=null&&Cu(r,a,F0)}var p1=xu(function(r,a,f){a!=null&&typeof a.toString!="function"&&(a=fo.call(a)),r[a]=f},ql(ke)),m1=xu(function(r,a,f){a!=null&&typeof a.toString!="function"&&(a=fo.call(a)),Tt.call(r,a)?r[a].push(f):r[a]=[f]},tt),_1=gt(hr);function ne(r){return Pe(r)?Bf(r):bl(r)}function Ce(r){return Pe(r)?Bf(r,!0):K0(r)}function b1(r,a){var f={};return a=tt(a,3),xn(r,function(g,m,y){Bn(f,a(g,m,y),g)}),f}function x1(r,a){var f={};return a=tt(a,3),xn(r,function(g,m,y){Bn(f,m,a(g,m,y))}),f}var y1=Ms(function(r,a,f){To(r,a,f)}),lh=Ms(function(r,a,f,g){To(r,a,f,g)}),v1=Wn(function(r,a){var f={};if(r==null)return f;var g=!1;a=Dt(a,function(y){return y=gi(y,r),g||(g=y.length>1),y}),yn(r,Ol(r),f),g&&(f=tn(f,p|_|v,p_));for(var m=a.length;m--;)Ml(f,a[m]);return f});function S1(r,a){return ch(r,zo(tt(a)))}var w1=Wn(function(r,a){return r==null?{}:j0(r,a)});function ch(r,a){if(r==null)return{};var f=Dt(Ol(r),function(g){return[g]});return a=tt(a),tu(r,f,function(g,m){return a(g,m[0])})}function M1(r,a,f){a=gi(a,r);var g=-1,m=a.length;for(m||(m=1,r=n);++g<m;){var y=r==null?n:r[vn(a[g])];y===n&&(g=m,y=f),r=Hn(y)?y.call(r):y}return r}function T1(r,a,f){return r==null?r:gr(r,a,f)}function P1(r,a,f,g){return g=typeof g=="function"?g:n,r==null?r:gr(r,a,f,g)}var fh=Su(ne),uh=Su(Ce);function C1(r,a,f){var g=at(r),m=g||mi(r)||Cs(r);if(a=tt(a,4),f==null){var y=r&&r.constructor;m?f=g?new y:[]:Nt(r)?f=Hn(y)?ws(go(r)):{}:f={}}return(m?Ze:xn)(r,function(w,C,I){return a(f,w,C,I)}),f}function k1(r,a){return r==null?!0:Ml(r,a)}function E1(r,a,f){return r==null?r:ru(r,a,Cl(f))}function I1(r,a,f,g){return g=typeof g=="function"?g:n,r==null?r:ru(r,a,Cl(f),g)}function ks(r){return r==null?[]:rl(r,ne(r))}function A1(r){return r==null?[]:rl(r,Ce(r))}function O1(r,a,f){return f===n&&(f=a,a=n),f!==n&&(f=sn(f),f=f===f?f:0),a!==n&&(a=sn(a),a=a===a?a:0),Fi(sn(r),a,f)}function D1(r,a,f){return a=Un(a),f===n?(f=a,a=0):f=Un(f),r=sn(r),W0(r,a,f)}function R1(r,a,f){if(f&&typeof f!="boolean"&&_e(r,a,f)&&(a=f=n),f===n&&(typeof a=="boolean"?(f=a,a=n):typeof r=="boolean"&&(f=r,r=n)),r===n&&a===n?(r=0,a=1):(r=Un(r),a===n?(a=r,r=0):a=Un(a)),r>a){var g=r;r=a,a=g}if(f||r%1||a%1){var m=Lf();return he(r+m*(a-r+hm("1e-"+((m+"").length-1))),a)}return vl(r,a)}var L1=Ts(function(r,a,f){return a=a.toLowerCase(),r+(f?hh(a):a)});function hh(r){return Kl(Mt(r).toLowerCase())}function dh(r){return r=Mt(r),r&&r.replace(er,Tm).replace(nm,"")}function N1(r,a,f){r=Mt(r),a=ze(a);var g=r.length;f=f===n?g:Fi(ut(f),0,g);var m=f;return f-=a.length,f>=0&&r.slice(f,m)==a}function B1(r){return r=Mt(r),r&&Ba.test(r)?r.replace(Ks,Pm):r}function F1(r){return r=Mt(r),r&&Va.test(r)?r.replace(ri,"\\$&"):r}var W1=Ts(function(r,a,f){return r+(f?"-":"")+a.toLowerCase()}),z1=Ts(function(r,a,f){return r+(f?" ":"")+a.toLowerCase()}),H1=mu("toLowerCase");function U1(r,a,f){r=Mt(r),a=ut(a);var g=a?bs(r):0;if(!a||g>=a)return r;var m=(a-g)/2;return Ao(bo(m),f)+r+Ao(_o(m),f)}function V1(r,a,f){r=Mt(r),a=ut(a);var g=a?bs(r):0;return a&&g<a?r+Ao(a-g,f):r}function $1(r,a,f){r=Mt(r),a=ut(a);var g=a?bs(r):0;return a&&g<a?Ao(a-g,f)+r:r}function G1(r,a,f){return f||a==null?a=0:a&&(a=+a),Jm(Mt(r).replace(Zs,""),a||0)}function Y1(r,a,f){return(f?_e(r,a,f):a===n)?a=1:a=ut(a),Sl(Mt(r),a)}function X1(){var r=arguments,a=Mt(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var K1=Ts(function(r,a,f){return r+(f?"_":"")+a.toLowerCase()});function q1(r,a,f){return f&&typeof f!="number"&&_e(r,a,f)&&(a=f=n),f=f===n?se:f>>>0,f?(r=Mt(r),r&&(typeof a=="string"||a!=null&&!Gl(a))&&(a=ze(a),!a&&_s(r))?pi(un(r),0,f):r.split(a,f)):[]}var j1=Ts(function(r,a,f){return r+(f?" ":"")+Kl(a)});function Z1(r,a,f){return r=Mt(r),f=f==null?0:Fi(ut(f),0,r.length),a=ze(a),r.slice(f,f+a.length)==a}function J1(r,a,f){var g=x.templateSettings;f&&_e(r,a,f)&&(a=n),r=Mt(r),a=Vo({},a,g,wu);var m=Vo({},a.imports,g.imports,wu),y=ne(m),w=rl(m,y),C,I,B=0,F=a.interpolate||fs,H="__p += '",K=al((a.escape||fs).source+"|"+F.source+"|"+(F===js?to:fs).source+"|"+(a.evaluate||fs).source+"|$","g"),J="//# sourceURL="+(Tt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++am+"]")+`
|
|
45
|
-
`;r.replace(K,function(nt,mt,yt,Ue,be,Ve){return yt||(yt=Ue),H+=r.slice(B,Ve).replace(Ya,Cm),mt&&(C=!0,H+=`' +
|
|
46
|
-
__e(`+mt+`) +
|
|
47
|
-
'`),be&&(I=!0,H+=`';
|
|
48
|
-
`+be+`;
|
|
49
|
-
__p += '`),yt&&(H+=`' +
|
|
50
|
-
((__t = (`+yt+`)) == null ? '' : __t) +
|
|
51
|
-
'`),B=Ve+nt.length,nt}),H+=`';
|
|
52
|
-
`;var et=Tt.call(a,"variable")&&a.variable;if(!et)H=`with (obj) {
|
|
53
|
-
`+H+`
|
|
54
|
-
}
|
|
55
|
-
`;else if(Jr.test(et))throw new ot(c);H=(I?H.replace(ls,""):H).replace(La,"$1").replace(Na,"$1;"),H="function("+(et||"obj")+`) {
|
|
56
|
-
`+(et?"":`obj || (obj = {});
|
|
57
|
-
`)+"var __t, __p = ''"+(C?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
|
|
58
|
-
function print() { __p += __j.call(arguments, '') }
|
|
59
|
-
`:`;
|
|
60
|
-
`)+H+`return __p
|
|
61
|
-
}`;var dt=ph(function(){return wt(y,J+"return "+H).apply(n,w)});if(dt.source=H,$l(dt))throw dt;return dt}function Q1(r){return Mt(r).toLowerCase()}function ty(r){return Mt(r).toUpperCase()}function ey(r,a,f){if(r=Mt(r),r&&(f||a===n))return Mf(r);if(!r||!(a=ze(a)))return r;var g=un(r),m=un(a),y=Tf(g,m),w=Pf(g,m)+1;return pi(g,y,w).join("")}function ny(r,a,f){if(r=Mt(r),r&&(f||a===n))return r.slice(0,kf(r)+1);if(!r||!(a=ze(a)))return r;var g=un(r),m=Pf(g,un(a))+1;return pi(g,0,m).join("")}function iy(r,a,f){if(r=Mt(r),r&&(f||a===n))return r.replace(Zs,"");if(!r||!(a=ze(a)))return r;var g=un(r),m=Tf(g,un(a));return pi(g,m).join("")}function sy(r,a){var f=rt,g=st;if(Nt(a)){var m="separator"in a?a.separator:m;f="length"in a?ut(a.length):f,g="omission"in a?ze(a.omission):g}r=Mt(r);var y=r.length;if(_s(r)){var w=un(r);y=w.length}if(f>=y)return r;var C=f-bs(g);if(C<1)return g;var I=w?pi(w,0,C).join(""):r.slice(0,C);if(m===n)return I+g;if(w&&(C+=I.length-C),Gl(m)){if(r.slice(C).search(m)){var B,F=I;for(m.global||(m=al(m.source,Mt(Qs.exec(m))+"g")),m.lastIndex=0;B=m.exec(F);)var H=B.index;I=I.slice(0,H===n?C:H)}}else if(r.indexOf(ze(m),C)!=C){var K=I.lastIndexOf(m);K>-1&&(I=I.slice(0,K))}return I+g}function ry(r){return r=Mt(r),r&&qs.test(r)?r.replace(Xs,Rm):r}var oy=Ts(function(r,a,f){return r+(f?" ":"")+a.toUpperCase()}),Kl=mu("toUpperCase");function gh(r,a,f){return r=Mt(r),a=f?n:a,a===n?Em(r)?Bm(r):ym(r):r.match(a)||[]}var ph=gt(function(r,a){try{return Fe(r,n,a)}catch(f){return $l(f)?f:new ot(f)}}),ay=Wn(function(r,a){return Ze(a,function(f){f=vn(f),Bn(r,f,Ul(r[f],r))}),r});function ly(r){var a=r==null?0:r.length,f=tt();return r=a?Dt(r,function(g){if(typeof g[1]!="function")throw new Je(l);return[f(g[0]),g[1]]}):[],gt(function(g){for(var m=-1;++m<a;){var y=r[m];if(Fe(y[0],this,g))return Fe(y[1],this,g)}})}function cy(r){return R0(tn(r,p))}function ql(r){return function(){return r}}function fy(r,a){return r==null||r!==r?a:r}var uy=bu(),hy=bu(!0);function ke(r){return r}function jl(r){return Kf(typeof r=="function"?r:tn(r,p))}function dy(r){return jf(tn(r,p))}function gy(r,a){return Zf(r,tn(a,p))}var py=gt(function(r,a){return function(f){return hr(f,r,a)}}),my=gt(function(r,a){return function(f){return hr(r,f,a)}});function Zl(r,a,f){var g=ne(a),m=Mo(a,g);f==null&&!(Nt(a)&&(m.length||!g.length))&&(f=a,a=r,r=this,m=Mo(a,ne(a)));var y=!(Nt(f)&&"chain"in f)||!!f.chain,w=Hn(r);return Ze(m,function(C){var I=a[C];r[C]=I,w&&(r.prototype[C]=function(){var B=this.__chain__;if(y||B){var F=r(this.__wrapped__),H=F.__actions__=Te(this.__actions__);return H.push({func:I,args:arguments,thisArg:r}),F.__chain__=B,F}return I.apply(r,ci([this.value()],arguments))})}),r}function _y(){return le._===this&&(le._=Vm),this}function Jl(){}function by(r){return r=ut(r),gt(function(a){return Jf(a,r)})}var xy=El(Dt),yy=El(xf),vy=El(tl);function mh(r){return Nl(r)?el(vn(r)):Z0(r)}function Sy(r){return function(a){return r==null?n:Wi(r,a)}}var wy=yu(),My=yu(!0);function Ql(){return[]}function tc(){return!1}function Ty(){return{}}function Py(){return""}function Cy(){return!0}function ky(r,a){if(r=ut(r),r<1||r>zt)return[];var f=se,g=he(r,se);a=tt(a),r-=se;for(var m=sl(g,a);++f<r;)a(f);return m}function Ey(r){return at(r)?Dt(r,vn):He(r)?[r]:Te(Nu(Mt(r)))}function Iy(r){var a=++Hm;return Mt(r)+a}var Ay=Io(function(r,a){return r+a},0),Oy=Il("ceil"),Dy=Io(function(r,a){return r/a},1),Ry=Il("floor");function Ly(r){return r&&r.length?wo(r,ke,pl):n}function Ny(r,a){return r&&r.length?wo(r,tt(a,2),pl):n}function By(r){return Sf(r,ke)}function Fy(r,a){return Sf(r,tt(a,2))}function Wy(r){return r&&r.length?wo(r,ke,xl):n}function zy(r,a){return r&&r.length?wo(r,tt(a,2),xl):n}var Hy=Io(function(r,a){return r*a},1),Uy=Il("round"),Vy=Io(function(r,a){return r-a},0);function $y(r){return r&&r.length?il(r,ke):0}function Gy(r,a){return r&&r.length?il(r,tt(a,2)):0}return x.after=dx,x.ary=Xu,x.assign=t1,x.assignIn=ah,x.assignInWith=Vo,x.assignWith=e1,x.at=n1,x.before=Ku,x.bind=Ul,x.bindAll=ay,x.bindKey=qu,x.castArray=Tx,x.chain=$u,x.chunk=R_,x.compact=L_,x.concat=N_,x.cond=ly,x.conforms=cy,x.constant=ql,x.countBy=$b,x.create=i1,x.curry=ju,x.curryRight=Zu,x.debounce=Ju,x.defaults=s1,x.defaultsDeep=r1,x.defer=gx,x.delay=px,x.difference=B_,x.differenceBy=F_,x.differenceWith=W_,x.drop=z_,x.dropRight=H_,x.dropRightWhile=U_,x.dropWhile=V_,x.fill=$_,x.filter=Yb,x.flatMap=qb,x.flatMapDeep=jb,x.flatMapDepth=Zb,x.flatten=zu,x.flattenDeep=G_,x.flattenDepth=Y_,x.flip=mx,x.flow=uy,x.flowRight=hy,x.fromPairs=X_,x.functions=h1,x.functionsIn=d1,x.groupBy=Jb,x.initial=q_,x.intersection=j_,x.intersectionBy=Z_,x.intersectionWith=J_,x.invert=p1,x.invertBy=m1,x.invokeMap=tx,x.iteratee=jl,x.keyBy=ex,x.keys=ne,x.keysIn=Ce,x.map=Bo,x.mapKeys=b1,x.mapValues=x1,x.matches=dy,x.matchesProperty=gy,x.memoize=Wo,x.merge=y1,x.mergeWith=lh,x.method=py,x.methodOf=my,x.mixin=Zl,x.negate=zo,x.nthArg=by,x.omit=v1,x.omitBy=S1,x.once=_x,x.orderBy=nx,x.over=xy,x.overArgs=bx,x.overEvery=yy,x.overSome=vy,x.partial=Vl,x.partialRight=Qu,x.partition=ix,x.pick=w1,x.pickBy=ch,x.property=mh,x.propertyOf=Sy,x.pull=nb,x.pullAll=Uu,x.pullAllBy=ib,x.pullAllWith=sb,x.pullAt=rb,x.range=wy,x.rangeRight=My,x.rearg=xx,x.reject=ox,x.remove=ob,x.rest=yx,x.reverse=zl,x.sampleSize=lx,x.set=T1,x.setWith=P1,x.shuffle=cx,x.slice=ab,x.sortBy=hx,x.sortedUniq=gb,x.sortedUniqBy=pb,x.split=q1,x.spread=vx,x.tail=mb,x.take=_b,x.takeRight=bb,x.takeRightWhile=xb,x.takeWhile=yb,x.tap=Lb,x.throttle=Sx,x.thru=No,x.toArray=sh,x.toPairs=fh,x.toPairsIn=uh,x.toPath=Ey,x.toPlainObject=oh,x.transform=C1,x.unary=wx,x.union=vb,x.unionBy=Sb,x.unionWith=wb,x.uniq=Mb,x.uniqBy=Tb,x.uniqWith=Pb,x.unset=k1,x.unzip=Hl,x.unzipWith=Vu,x.update=E1,x.updateWith=I1,x.values=ks,x.valuesIn=A1,x.without=Cb,x.words=gh,x.wrap=Mx,x.xor=kb,x.xorBy=Eb,x.xorWith=Ib,x.zip=Ab,x.zipObject=Ob,x.zipObjectDeep=Db,x.zipWith=Rb,x.entries=fh,x.entriesIn=uh,x.extend=ah,x.extendWith=Vo,Zl(x,x),x.add=Ay,x.attempt=ph,x.camelCase=L1,x.capitalize=hh,x.ceil=Oy,x.clamp=O1,x.clone=Px,x.cloneDeep=kx,x.cloneDeepWith=Ex,x.cloneWith=Cx,x.conformsTo=Ix,x.deburr=dh,x.defaultTo=fy,x.divide=Dy,x.endsWith=N1,x.eq=dn,x.escape=B1,x.escapeRegExp=F1,x.every=Gb,x.find=Xb,x.findIndex=Fu,x.findKey=o1,x.findLast=Kb,x.findLastIndex=Wu,x.findLastKey=a1,x.floor=Ry,x.forEach=Gu,x.forEachRight=Yu,x.forIn=l1,x.forInRight=c1,x.forOwn=f1,x.forOwnRight=u1,x.get=Yl,x.gt=Ax,x.gte=Ox,x.has=g1,x.hasIn=Xl,x.head=Hu,x.identity=ke,x.includes=Qb,x.indexOf=K_,x.inRange=D1,x.invoke=_1,x.isArguments=Ui,x.isArray=at,x.isArrayBuffer=Dx,x.isArrayLike=Pe,x.isArrayLikeObject=Yt,x.isBoolean=Rx,x.isBuffer=mi,x.isDate=Lx,x.isElement=Nx,x.isEmpty=Bx,x.isEqual=Fx,x.isEqualWith=Wx,x.isError=$l,x.isFinite=zx,x.isFunction=Hn,x.isInteger=th,x.isLength=Ho,x.isMap=eh,x.isMatch=Hx,x.isMatchWith=Ux,x.isNaN=Vx,x.isNative=$x,x.isNil=Yx,x.isNull=Gx,x.isNumber=nh,x.isObject=Nt,x.isObjectLike=Ht,x.isPlainObject=br,x.isRegExp=Gl,x.isSafeInteger=Xx,x.isSet=ih,x.isString=Uo,x.isSymbol=He,x.isTypedArray=Cs,x.isUndefined=Kx,x.isWeakMap=qx,x.isWeakSet=jx,x.join=Q_,x.kebabCase=W1,x.last=nn,x.lastIndexOf=tb,x.lowerCase=z1,x.lowerFirst=H1,x.lt=Zx,x.lte=Jx,x.max=Ly,x.maxBy=Ny,x.mean=By,x.meanBy=Fy,x.min=Wy,x.minBy=zy,x.stubArray=Ql,x.stubFalse=tc,x.stubObject=Ty,x.stubString=Py,x.stubTrue=Cy,x.multiply=Hy,x.nth=eb,x.noConflict=_y,x.noop=Jl,x.now=Fo,x.pad=U1,x.padEnd=V1,x.padStart=$1,x.parseInt=G1,x.random=R1,x.reduce=sx,x.reduceRight=rx,x.repeat=Y1,x.replace=X1,x.result=M1,x.round=Uy,x.runInContext=E,x.sample=ax,x.size=fx,x.snakeCase=K1,x.some=ux,x.sortedIndex=lb,x.sortedIndexBy=cb,x.sortedIndexOf=fb,x.sortedLastIndex=ub,x.sortedLastIndexBy=hb,x.sortedLastIndexOf=db,x.startCase=j1,x.startsWith=Z1,x.subtract=Vy,x.sum=$y,x.sumBy=Gy,x.template=J1,x.times=ky,x.toFinite=Un,x.toInteger=ut,x.toLength=rh,x.toLower=Q1,x.toNumber=sn,x.toSafeInteger=Qx,x.toString=Mt,x.toUpper=ty,x.trim=ey,x.trimEnd=ny,x.trimStart=iy,x.truncate=sy,x.unescape=ry,x.uniqueId=Iy,x.upperCase=oy,x.upperFirst=Kl,x.each=Gu,x.eachRight=Yu,x.first=Hu,Zl(x,function(){var r={};return xn(x,function(a,f){Tt.call(x.prototype,f)||(r[f]=a)}),r}(),{chain:!1}),x.VERSION=i,Ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){x[r].placeholder=x}),Ze(["drop","take"],function(r,a){bt.prototype[r]=function(f){f=f===n?1:Qt(ut(f),0);var g=this.__filtered__&&!a?new bt(this):this.clone();return g.__filtered__?g.__takeCount__=he(f,g.__takeCount__):g.__views__.push({size:he(f,se),type:r+(g.__dir__<0?"Right":"")}),g},bt.prototype[r+"Right"]=function(f){return this.reverse()[r](f).reverse()}}),Ze(["filter","map","takeWhile"],function(r,a){var f=a+1,g=f==Vt||f==Pt;bt.prototype[r]=function(m){var y=this.clone();return y.__iteratees__.push({iteratee:tt(m,3),type:f}),y.__filtered__=y.__filtered__||g,y}}),Ze(["head","last"],function(r,a){var f="take"+(a?"Right":"");bt.prototype[r]=function(){return this[f](1).value()[0]}}),Ze(["initial","tail"],function(r,a){var f="drop"+(a?"":"Right");bt.prototype[r]=function(){return this.__filtered__?new bt(this):this[f](1)}}),bt.prototype.compact=function(){return this.filter(ke)},bt.prototype.find=function(r){return this.filter(r).head()},bt.prototype.findLast=function(r){return this.reverse().find(r)},bt.prototype.invokeMap=gt(function(r,a){return typeof r=="function"?new bt(this):this.map(function(f){return hr(f,r,a)})}),bt.prototype.reject=function(r){return this.filter(zo(tt(r)))},bt.prototype.slice=function(r,a){r=ut(r);var f=this;return f.__filtered__&&(r>0||a<0)?new bt(f):(r<0?f=f.takeRight(-r):r&&(f=f.drop(r)),a!==n&&(a=ut(a),f=a<0?f.dropRight(-a):f.take(a-r)),f)},bt.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},bt.prototype.toArray=function(){return this.take(se)},xn(bt.prototype,function(r,a){var f=/^(?:filter|find|map|reject)|While$/.test(a),g=/^(?:head|last)$/.test(a),m=x[g?"take"+(a=="last"?"Right":""):a],y=g||/^find/.test(a);m&&(x.prototype[a]=function(){var w=this.__wrapped__,C=g?[1]:arguments,I=w instanceof bt,B=C[0],F=I||at(w),H=function(mt){var yt=m.apply(x,ci([mt],C));return g&&K?yt[0]:yt};F&&f&&typeof B=="function"&&B.length!=1&&(I=F=!1);var K=this.__chain__,J=!!this.__actions__.length,et=y&&!K,dt=I&&!J;if(!y&&F){w=dt?w:new bt(this);var nt=r.apply(w,C);return nt.__actions__.push({func:No,args:[H],thisArg:n}),new Qe(nt,K)}return et&&dt?r.apply(this,C):(nt=this.thru(H),et?g?nt.value()[0]:nt.value():nt)})}),Ze(["pop","push","shift","sort","splice","unshift"],function(r){var a=ao[r],f=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",g=/^(?:pop|shift)$/.test(r);x.prototype[r]=function(){var m=arguments;if(g&&!this.__chain__){var y=this.value();return a.apply(at(y)?y:[],m)}return this[f](function(w){return a.apply(at(w)?w:[],m)})}}),xn(bt.prototype,function(r,a){var f=x[a];if(f){var g=f.name+"";Tt.call(Ss,g)||(Ss[g]=[]),Ss[g].push({name:a,func:f})}}),Ss[Eo(n,A).name]=[{name:"wrapper",func:n}],bt.prototype.clone=r0,bt.prototype.reverse=o0,bt.prototype.value=a0,x.prototype.at=Nb,x.prototype.chain=Bb,x.prototype.commit=Fb,x.prototype.next=Wb,x.prototype.plant=Hb,x.prototype.reverse=Ub,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=Vb,x.prototype.first=x.prototype.head,rr&&(x.prototype[rr]=zb),x},xs=Fm();Ri?((Ri.exports=xs)._=xs,ja._=xs):le._=xs}).call(Y2)}(kr,kr.exports)),kr.exports}var qn=X2();typeof BigInt>"u"&&(BigInt=function(t){if(isNaN(t))throw new Error("");return t});const Q=BigInt(0),ct=BigInt(1),Vr=BigInt(2),Rc=BigInt(5),Ae=BigInt(10),K2=2e3,Y={s:ct,n:Q,d:ct};function Gn(t,e){try{t=BigInt(t)}catch{throw _i()}return t*e}function pn(t){return typeof t=="bigint"?t:Math.floor(t)}function Rt(t,e){if(e===Q)throw of();const n=Object.create(Xr.prototype);n.s=t<Q?-ct:ct,t=t<Q?-t:t;const i=Ki(t,e);return n.n=t/i,n.d=e/i,n}function As(t){const e={};let n=t,i=Vr,s=Rc-ct;for(;s<=n;){for(;n%i===Q;)n/=i,e[i]=(e[i]||Q)+ct;s+=ct+Vr*i++}return n!==t?n>1&&(e[n]=(e[n]||Q)+ct):e[t]=(e[t]||Q)+ct,e}const ie=function(t,e){let n=Q,i=ct,s=ct;if(t!=null)if(e!==void 0){if(typeof t=="bigint")n=t;else{if(isNaN(t))throw _i();if(t%1!==0)throw ig();n=BigInt(t)}if(typeof e=="bigint")i=e;else{if(isNaN(e))throw _i();if(e%1!==0)throw ig();i=BigInt(e)}s=n*i}else if(typeof t=="object"){if("d"in t&&"n"in t)n=BigInt(t.n),i=BigInt(t.d),"s"in t&&(n*=BigInt(t.s));else if(0 in t)n=BigInt(t[0]),1 in t&&(i=BigInt(t[1]));else if(typeof t=="bigint")n=t;else throw _i();s=n*i}else if(typeof t=="number"){if(isNaN(t))throw _i();if(t<0&&(s=-ct,t=-t),t%1===0)n=BigInt(t);else if(t>0){let o=1,l=0,c=1,u=1,h=1,d=1e7;for(t>=1&&(o=10**Math.floor(1+Math.log10(t)),t/=o);c<=d&&h<=d;){let p=(l+u)/(c+h);if(t===p){c+h<=d?(n=l+u,i=c+h):h>c?(n=u,i=h):(n=l,i=c);break}else t>p?(l+=u,c+=h):(u+=l,h+=c),c>d?(n=u,i=h):(n=l,i=c)}n=BigInt(n)*BigInt(o),i=BigInt(i)}}else if(typeof t=="string"){let o=0,l=Q,c=Q,u=Q,h=ct,d=ct,p=t.replace(/_/g,"").match(/\d+|./g);if(p===null)throw _i();if(p[o]==="-"?(s=-ct,o++):p[o]==="+"&&o++,p.length===o+1?c=Gn(p[o++],s):p[o+1]==="."||p[o]==="."?(p[o]!=="."&&(l=Gn(p[o++],s)),o++,(o+1===p.length||p[o+1]==="("&&p[o+3]===")"||p[o+1]==="'"&&p[o+3]==="'")&&(c=Gn(p[o],s),h=Ae**BigInt(p[o].length),o++),(p[o]==="("&&p[o+2]===")"||p[o]==="'"&&p[o+2]==="'")&&(u=Gn(p[o+1],s),d=Ae**BigInt(p[o+1].length)-ct,o+=3)):p[o+1]==="/"||p[o+1]===":"?(c=Gn(p[o],s),h=Gn(p[o+2],ct),o+=3):p[o+3]==="/"&&p[o+1]===" "&&(l=Gn(p[o],s),c=Gn(p[o+2],s),h=Gn(p[o+4],ct),o+=5),p.length<=o)i=h*d,s=n=u+i*l+d*c;else throw _i()}else if(typeof t=="bigint")n=t,s=t,i=ct;else throw _i();if(i===Q)throw of();Y.s=s<Q?-ct:ct,Y.n=n<Q?-n:n,Y.d=i<Q?-i:i};function q2(t,e,n){let i=ct;for(;e>Q;t=t*t%n,e>>=ct)e&ct&&(i=i*t%n);return i}function j2(t,e){for(;e%Vr===Q;e/=Vr);for(;e%Rc===Q;e/=Rc);if(e===ct)return Q;let n=Ae%e,i=1;for(;n!==ct;i++)if(n=n*Ae%e,i>K2)return Q;return BigInt(i)}function Z2(t,e,n){let i=ct,s=q2(Ae,n,e);for(let o=0;o<300;o++){if(i===s)return BigInt(o);i=i*Ae%e,s=s*Ae%e}return 0}function Ki(t,e){if(!t)return e;if(!e)return t;for(;;){if(t%=e,!t)return e;if(e%=t,!e)return t}}function Xr(t,e){if(ie(t,e),this instanceof Xr)t=Ki(Y.d,Y.n),this.s=Y.s,this.n=Y.n/t,this.d=Y.d/t;else return Rt(Y.s*Y.n,Y.d)}var of=function(){return new Error("Division by Zero")},_i=function(){return new Error("Invalid argument")},ig=function(){return new Error("Parameters must be integer")};Xr.prototype={s:ct,n:Q,d:ct,abs:function(){return Rt(this.n,this.d)},neg:function(){return Rt(-this.s*this.n,this.d)},add:function(t,e){return ie(t,e),Rt(this.s*this.n*Y.d+Y.s*this.d*Y.n,this.d*Y.d)},sub:function(t,e){return ie(t,e),Rt(this.s*this.n*Y.d-Y.s*this.d*Y.n,this.d*Y.d)},mul:function(t,e){return ie(t,e),Rt(this.s*Y.s*this.n*Y.n,this.d*Y.d)},div:function(t,e){return ie(t,e),Rt(this.s*Y.s*this.n*Y.d,this.d*Y.n)},clone:function(){return Rt(this.s*this.n,this.d)},mod:function(t,e){if(t===void 0)return Rt(this.s*this.n%this.d,ct);if(ie(t,e),Q===Y.n*this.d)throw of();return Rt(this.s*(Y.d*this.n)%(Y.n*this.d),Y.d*this.d)},gcd:function(t,e){return ie(t,e),Rt(Ki(Y.n,this.n)*Ki(Y.d,this.d),Y.d*this.d)},lcm:function(t,e){return ie(t,e),Y.n===Q&&this.n===Q?Rt(Q,ct):Rt(Y.n*this.n,Ki(Y.n,this.n)*Ki(Y.d,this.d))},inverse:function(){return Rt(this.s*this.d,this.n)},pow:function(t,e){if(ie(t,e),Y.d===ct)return Y.s<Q?Rt((this.s*this.d)**Y.n,this.n**Y.n):Rt((this.s*this.n)**Y.n,this.d**Y.n);if(this.s<Q)return null;let n=As(this.n),i=As(this.d),s=ct,o=ct;for(let l in n)if(l!=="1"){if(l==="0"){s=Q;break}if(n[l]*=Y.n,n[l]%Y.d===Q)n[l]/=Y.d;else return null;s*=BigInt(l)**n[l]}for(let l in i)if(l!=="1"){if(i[l]*=Y.n,i[l]%Y.d===Q)i[l]/=Y.d;else return null;o*=BigInt(l)**i[l]}return Y.s<Q?Rt(o,s):Rt(s,o)},log:function(t,e){if(ie(t,e),this.s<=Q||Y.s<=Q)return null;const n={},i=As(Y.n),s=As(Y.d),o=As(this.n),l=As(this.d);for(const h in s)i[h]=(i[h]||Q)-s[h];for(const h in l)o[h]=(o[h]||Q)-l[h];for(const h in i)h!=="1"&&(n[h]=!0);for(const h in o)h!=="1"&&(n[h]=!0);let c=null,u=null;for(const h in n){const d=i[h]||Q,p=o[h]||Q;if(d===Q){if(p!==Q)return null;continue}let _=p,v=d;const T=Ki(_,v);if(_/=T,v/=T,c===null&&u===null)c=_,u=v;else if(_*u!==c*v)return null}return c!==null&&u!==null?Rt(c,u):null},equals:function(t,e){return ie(t,e),this.s*this.n*Y.d===Y.s*Y.n*this.d},lt:function(t,e){return ie(t,e),this.s*this.n*Y.d<Y.s*Y.n*this.d},lte:function(t,e){return ie(t,e),this.s*this.n*Y.d<=Y.s*Y.n*this.d},gt:function(t,e){return ie(t,e),this.s*this.n*Y.d>Y.s*Y.n*this.d},gte:function(t,e){return ie(t,e),this.s*this.n*Y.d>=Y.s*Y.n*this.d},compare:function(t,e){ie(t,e);let n=this.s*this.n*Y.d-Y.s*Y.n*this.d;return(Q<n)-(n<Q)},ceil:function(t){return t=Ae**BigInt(t||0),Rt(pn(this.s*t*this.n/this.d)+(t*this.n%this.d>Q&&this.s>=Q?ct:Q),t)},floor:function(t){return t=Ae**BigInt(t||0),Rt(pn(this.s*t*this.n/this.d)-(t*this.n%this.d>Q&&this.s<Q?ct:Q),t)},round:function(t){return t=Ae**BigInt(t||0),Rt(pn(this.s*t*this.n/this.d)+this.s*((this.s>=Q?ct:Q)+Vr*(t*this.n%this.d)>this.d?ct:Q),t)},roundTo:function(t,e){ie(t,e);const n=this.n*Y.d,i=this.d*Y.n,s=n%i;let o=pn(n/i);return s+s>=i&&o++,Rt(this.s*o*Y.n,Y.d)},divisible:function(t,e){return ie(t,e),!(!(Y.n*this.d)||this.n*Y.d%(Y.n*this.d))},valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(t){let e=this.n,n=this.d;t=t||15;let i=j2(e,n),s=Z2(e,n,i),o=this.s<Q?"-":"";if(o+=pn(e/n),e%=n,e*=Ae,e&&(o+="."),i){for(let l=s;l--;)o+=pn(e/n),e%=n,e*=Ae;o+="(";for(let l=i;l--;)o+=pn(e/n),e%=n,e*=Ae;o+=")"}else for(let l=t;e&&l--;)o+=pn(e/n),e%=n,e*=Ae;return o},toFraction:function(t){let e=this.n,n=this.d,i=this.s<Q?"-":"";if(n===ct)i+=e;else{let s=pn(e/n);t&&s>Q&&(i+=s,i+=" ",e%=n),i+=e,i+="/",i+=n}return i},toLatex:function(t){let e=this.n,n=this.d,i=this.s<Q?"-":"";if(n===ct)i+=e;else{let s=pn(e/n);t&&s>Q&&(i+=s,e%=n),i+="\\frac{",i+=e,i+="}{",i+=n,i+="}"}return i},toContinued:function(){let t=this.n,e=this.d,n=[];do{n.push(pn(t/e));let i=t%e;t=e,e=i}while(t!==ct);return n},simplify:function(t){const e=BigInt(1/(t||.001)|0),n=this.abs(),i=n.toContinued();for(let s=1;s<i.length;s++){let o=Rt(i[s-1],ct);for(let c=s-2;c>=0;c--)o=o.inverse().add(i[c]);let l=o.sub(n);if(l.n*e<l.d)return o.mul(this.s)}return this}};const sg={maximumFractionDigits:20};function J2(t,e){let n;try{e&&(n=new Intl.NumberFormat(e,sg))}catch{n=new Intl.NumberFormat(void 0,sg)}return n.format(t)}const Op=t=>typeof t=="string"&&$r(t)?lf(t):t,Kr=t=>{const e=Op(t);if(bP(e)||Number.isNaN(e)||e===1/0||e===-1/0)return!0;if(!(gP(e)||pP(e)||xP(e)||yP(e)||mP(e)||_P(e))){const n=zs(String(e));if(n.includes(Zn))return!1;const i=af(n)?Bp(n):Ye(n)?parseFloat(n):n;if(i===1/0||i===-1/0)return!0;if(!Ye(i))return!1;if(!Number.isNaN(i))return!0}return!1},Ia=t=>typeof t=="string"?Kr(t)&&t.toLowerCase().includes("e"):!1,kn=(t,e,n)=>{const i=t,s=Op(t);if(Kr(s)){const o=zs(String(s)),l=af(o)?Bp(o):Ye(o)?parseFloat(o):o;return l===1/0||l===-1/0?l:Number.isNaN(l)||!Ye(l)?i:l}else return i},Q2=t=>{if(Kr(t)){if(typeof t=="string")return t;if(typeof t=="number")return Number.isNaN(t)||!Number.isFinite(t)?String(t):Lp(t,{noThousandsSeparator:!0})}return t},Dp=(t,e=!1)=>{const n=e?/0+((?=[|eE])|$)/:/(0+|0+\.0+)((?=[|eE])|$)/;return typeof t=="string"&&(!e||t.includes(".")||t.includes(","))?t?.match(n)?.[0]?.replaceAll(/[.,]/g,"")?.length??0:0},tP=t=>Dp(t)>0,ts=(t,e=!1)=>{const n=typeof t=="string",i=n&&$r(t),s=i?LP(t):null,o=zs(i?lf(t):t);return{number:e&&tP(t)?o:kn(o),unit:s,isString:n}},eP=(t,e)=>String(e?t:Q2(t)),Aa=({value:t,unit:e,isString:n,isScientific:i})=>{const s=typeof t=="number"&&n?eP(t,i):t;return e?BP(s,e):s},nP=Number.EPSILON,iP=(t,e)=>{const{number:n,unit:i}=ts(t),{number:s,unit:o}=ts(e),c=i&&o&&i!==o?NP(s,i,o):s;return{firstNumber:n,secondNumber:c}},sP=t=>{if(t!=null){if(Ye(t)&&typeof t=="number")return t;if(vP(t)){const e=kn(t?.toString().replace("%",""));if(Ye(e))return e/100}}return null},rP=(t,e,n={relativeDiff:nP})=>{const{relativeDiff:i,absoluteDiff:s}=n,l=sP(i??s);if(t===null||e===null)return!1;const c=$r(t),u=$r(e);if(c&&!u||!c&&u)throw new Error(`Parameters must either both have units or both not have units. Received "${t}" and "${e}"`);if(l===null)return console.warn("Tolerance number is not defined!"),t===e;if(l<=0||l<Number.EPSILON)throw Error("Unpredictable results - toleranceNumber should be bigger than zero or less then EPSILON");const{firstNumber:h,secondNumber:d}=iP(t,e);if((h===1/0||h==="Infinity")&&(d===1/0||d==="Infinity")||(h===-1/0||h==="-Infinity")&&(d===-1/0||d==="-Infinity"))return!0;if(typeof h=="number"&&typeof d=="number"){if(h===d)return!0;if(s||h===0||d===0){const p=Math.abs(h-d);return rP(p,l,{relativeDiff:"1%"})||p<l}else return 2*Math.abs((h-d)/(h+d))<l}return!1},Pi=4,Lc=(t,e=Pi)=>{const n=10**e;return Math.round(t*n)/n},Rp=(t,e=Pi)=>{if(typeof t=="number")return Lc(t,e);if(t===null||Number.isNaN(t)||t===1/0||t===-1/0||t===void 0)return t;const{number:n,unit:i,isString:s}=ts(t),o=!Ye(n)||typeof n=="string"&&n.endsWith(".")?t:Lc(n,e);return Aa({value:o,unit:i,isString:s,isScientific:Ia(t)})},Nc=(t,e=Pi)=>Number(t.toPrecision(e)),oP=(t,e=Pi)=>{const n=kn(t).toPrecision(e),[i,s]=n.split(".");if(s){const o=e-i.length;return`${i}.${s.padEnd(o,"0")}`}else return i},VC=(t,e=Pi)=>{if(typeof t=="number")return Nc(t,e);if(t===null||Number.isNaN(t)||t===1/0||t===-1/0||t===void 0)return t;const{number:n,unit:i,isString:s}=ts(t),o=!Ye(n)||typeof n=="string"&&n.endsWith(".")?t:Nc(n,e);return Aa({value:o,unit:i,isString:s,isScientific:Ia(t)})},rg=(t,e=Pi,n=!1)=>{const i=10**e,s=i&&t>i?Lc(t,0):n?oP(t,e):Nc(t,e);return n?String(s):s},$C=(t,e=Pi)=>{if(typeof t=="number")return rg(t,e);if(t===null||Number.isNaN(t)||t===1/0||t===-1/0||t===void 0)return t;const{number:n,unit:i,isString:s}=ts(t),o=!Ye(n)||typeof n=="string"&&n.endsWith(".")?t:rg(n,e);return Aa({value:o,unit:i,isString:s,isScientific:Ia(t)})},GC=(t,e=Pi)=>{if(t===null||Number.isNaN(t)||t===1/0||t===-1/0||t===void 0)return t;if(typeof t=="number")return t.toFixed(e);const{number:n,unit:i,isString:s}=ts(t),o=!Ye(n)||typeof n=="string"&&n.endsWith(".")?t:n.toFixed(e);return Aa({value:o,unit:i,isString:s,isScientific:Ia(t)})},aP=1e-4,lP=1e7,cP={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻"},fP=(t,e)=>{const n="0".repeat(e);return e>0&&t!=="0"?t.includes(".")?`${t}${n}`:`${t}.${n}`:t},uP=(t,e,n=!1)=>{const i=J2(kn(t),"en-US").replaceAll(",",e);return n?fP(i,Dp(t,!0)):i},Lp=(t,e)=>{const{nonBreakingSpace:n}=e??{};if(t==="")return t;if(t==null)return"";if(!Kr(t))return Sa(t.toString());const i=e?.noThousandsSeparator?"":n?" ":" ";return uP(t,i,e?.preserveTrailingZeros)},hP=(t,e)=>{const{roundScientificCoefficient:n,eNotation:i}=e??{};if(Number.isNaN(t))return"Invalid";if(t==null)return"";if(!Kr(t)||t==="")return Sa(t.toString());const s=kn(t);if(!Number.isFinite(s))return Sa(t.toString());const o=i?"e":"·10",[l,c]=s.toExponential().split("e"),u=typeof n=="number"?Rp(l,n):l,h=c==="+0"||c==="-0",d=[...c.replaceAll("+","")].map(p=>i?p:cP[p]).join("");return h?u:`${u}${o}${d}`},dP=(t,e)=>{const n=Math.abs(kn(t));return(e?.scientific==="auto"&&e?.autoScientificBelow&&e?.autoScientificAbove?n<e?.autoScientificBelow||n>e?.autoScientificAbove:e?.scientific)?hP(t,e):Lp(t,e)},YC=(t,e)=>{const n={scientific:e?.scientific??"auto",eNotation:e?.eNotation??!1,autoScientificBelow:e?.autoScientificBelow??aP,autoScientificAbove:e?.autoScientificAbove??lP,withUnit:e?.withUnit??!1,nonBreakingSpace:e?.nonBreakingSpace??!1,roundScientificCoefficient:e?.roundScientificCoefficient},{withUnit:i}=n;if(t==null)return"";const{number:s,unit:o}=ts(t),l=dP(s,n),c=o?CP?.[o]:"";return i&&o?l===""?c:`${l} ${c}`:l},gP=t=>t===null,pP=t=>t===void 0,mP=t=>t&&t.constructor===Array,_P=t=>t&&t.constructor===Object,bP=t=>t==="",xP=t=>t&&t[t.length-1]===".",yP=t=>t&&t[t.length-1]===",",vP=t=>typeof t=="string"&&/^\d+(\.\d+)?%$/.test(t),Np=t=>t.trim().replace(/\s+/g," "),af=t=>{if(typeof t!="string"||!t.includes("/"))return!1;try{return new Xr(Np(t)),!0}catch(e){return e.message==="Division by Zero"}};function Ye(t){if(t==null||Array.isArray(t)||typeof t=="object"||Number.isNaN(t)||t==="NaN"||t===1/0||t===-1/0||t==="Infinity"||t==="-Infinity")return!1;if(af(t))return!0;const e=parseFloat(t);return typeof t=="string"?!isNaN(e)&&(Up.test(t)||isFinite(t)):isFinite(t)}function bi(t,e){const n=(t+"")[0];let i=0,s=e.indexOf(n,0)+1;for(;s>0;)s=e.indexOf(n,s)+1,i+=1;return i}function Bp(t){if(t instanceof Array||t===null||t===void 0||t===""||t===1/0||t===-1/0||t==="Infinity"||t==="-Infinity"||Number.isNaN(t)||t==="NaN")return t;typeof t=="string"&&(t=Np(t));let e=t;try{const n=new Xr(t);n!==void 0&&(e=n.valueOf())}catch(n){if(n.message==="Division by Zero")return t.charAt(0)==="-"?-1/0:1/0;console.warn("Error in numFraction() method: ",t)}return e.valueOf()}const Sa=t=>t.trim().replace(/[\t\r\n]/g,"");function zs(t){let e=Sa(t+"");const n=bi("/",e),i=bi(" ",e)+bi(" ",e);let s=bi(".",e),o=bi(",",e);return n===0&&i>0&&(e=e.replace(/\s/g,"")),o>1&&(e=e.replace(/,/g,"")),s>1&&(e=e.replace(/\./g,"")),o=bi(",",e),s=bi(".",e),s===1&&o===1?(e.indexOf(",")>e.indexOf(".")?(e=e.replace(".",""),e=e.replace(",",".")):e=e.replace(",",""),e.indexOf(".")===0&&(e=0+e),e):(!s&&o&&(e=e.replace(",",".")),e.indexOf(".")===0&&(e=0+e),e)}const XC=t=>{const e=t?.[0]==="-",n=/^-/mg,i=/^(?:0+(?=[1-9])|0+(?=0))/mg,s=t.replace(n,"").replace(i,"");return e?`-${s}`:s};function SP(t){return typeof t=="number"?t:parseFloat(zs(t))}const wP=t=>!Ye(t),{abs:Fp,exp:Wp,sqrt:Bc}=Math;function MP(t,e,n,i=1e-8,s=30){let o=n,l=0,c=1;for(;c>i&&l<s;){const u=o-t(o)/e(o);if(c=Fp(t(u)-t(o)),c<i)return[u,!0,l];o=u,l++}return[n,!1,l]}function zp(t){const e=1/(1+.5*Fp(t)),n=1-e*Wp(-(t**2)-1.26551223+e*(1.00002368+e*(.37409196+e*(.09678418+e*(-.18628806+e*(.27886807+e*(-1.13520398+e*(1.48851587+e*(-.82215223+e*.17087277)))))))));return t>=0?n:-n}function TP(t){const e=s=>t-zp(s/Bc(2)),n=s=>-Bc(2/Math.PI)*Wp(-.5*s**2),[i]=MP(e,n,1);return i}function PP(t){return zp(t/Bc(2))}const CP=Object.freeze({in:"in",mm:"mm",cm:"cm",m:"m",microM:"μm",km:"km",ft:"ft",usft:"usft",in2:"in²",cm2:"cm²",m2:"m²",kg:"kg",tonnes:"t",mt:"mt",kip:"kip",bbl:"bbl",m3:"m³",Mm3:"Mm³",MMSCF:"MMSCF",lbm:"lbm","kg/mol":"kg/mol","lbf/mol":"lbf/mol",sg:"sg",ppg:"ppg","kg/m3":"kg/m³","lbm/ft3":"lbm/ft³",s:"s",min:"min",h:"h",d:"d",month:"month",year:"year","bbl/ft":"bbl/ft",lpm:"L/min",lps:"L/s",bpm:"bbl/min","m3/min":"m³/min","m3/s":"m³/s",MMSCFD:"MMSCFD",bar:"Bar",Pa:"Pa",kPa:"kPa",MPa:"MPa",GPa:"GPa",kPsi:"Psi",ksi:"ksi","lbf/100ft2":"lbf/100ft²","1/Pa":"Pa⁻¹","1/kPa":"kPa⁻¹","1/MPa":"MPa⁻¹","1/GPa":"GPa⁻¹","1/psi":"psi⁻¹","kPa/m":"kPa/m","1/bar":"bar⁻¹",klbf:"klbf","psi/ft":"Psi/ft","bar/100m":"bar/100m","psi/100ft":"psi/100ft","kPa/100m":"kPa/100m",C:"°C",F:"°F",K:"K","C/100m":"°C/100m","C/m":"°C/m","Pa/C":"Pa/°C","Bar/C":"Bar/°C","psi/F":"psi/°F","psi/C":"psi/°C","F/100ft":"°F/100ft","F/ft":"°F/ft","K/100m":"K/100m","K/m":"K/m","lbf/ft":"lbf/ft",N:"N",kN:"kN","N/m":"N/m","daN/m":"daN/m",lbf:"lbf",kgf:"kgf",rad:"rad","BTU/lbm":"BTU/lbm",ppf:"ppf","kg/m":"kg/m","E-06/degC":"10⁻⁶/°C","E-06/degF":"10⁻⁶/°F","1/K":"K⁻¹",km2:"km²",ft2:"ft²",mm2:"mm²",mile2:"mile²",ft3:"ft³","g/cm3":"g/cm³",Sm3:"Sm³","ft3/s":"ft³/s","ft3/d":"ft³/d","m3/d":"m³/d","1/m3/d":"1/m³/d","s/m3":"s/m³","1/MMSCFD":"1/MMSCFD","bbl/d":"bbl/d",tonneForce:"tonne-force",USGal:"US gal","g/mol":"g/mol",Nm:"N⋅m",kNm:"kN⋅m",ftlbf:"ft⋅lbf","J/(kg*degC)":"J/(kg⋅°C)","J/(kg*degK)":"J/(kg⋅K)","J/(s*m*degK)":"J/(s⋅m⋅K)","BTU/(lbm*degF)":"BTU/(lbm⋅°F)","BTU/(h*ft*degF)":"BTU/(h⋅ft⋅°F)",l:"L","l/m":"L/m","kJ/kg":"kJ/kg","J/kg":"J/kg",deg:"°","W/(mK)":"W/(m⋅K)",psi:"psi","deg/100ft":"°/100ft","deg/30m":"°/30m","deg/10m":"°/10m","%":"%",Hz:"Hz","1/s":"1/s",rpm:"rpm","Pa/m":"Pa/m","bar/m":"bar/m",gpm:"gpm","kg/s":"kg/s","lbm/s":"lbm/s","deg/m":"°/m","deg/ft":"°/ft","rad/m":"rad/m","rad/ft":"rad/ft","dyn/cm":"dyn/cm","mN/m":"mN/m","m/s":"m/s","ft/s":"ft/s","m/min":"m/min","ft/min":"ft/min","m/h":"m/h","ft/h":"ft/h",mph:"mph","km/h":"km/h","m/s2":"m/s²","ft/s2":"ft/s²","Pa*s":"Pa⋅s",P:"P","mPa*s":"mPa⋅s",cP:"cP",W:"W",hhp:"hhp",hp:"hp",kW:"kW",MW:"MW","BTU/h":"BTU/h","W/m2":"W/m²","hhp/in2":"hhp/in²","hhp/ft2":"hhp/ft²","Mm3/d":"Mm³/d","STB/d":"STB/d","Sm3/d":"Sm³/d","MSm3/d":"MSm³/d","SCF/STB":"SCF / STB","Sm3/Sm3":"Sm³ / Sm³","SCF/d":"SCF/d",STB:"STB",SCF:"SCF",MSm3:"MSm³",Gsg:"sg",Gppg:"ppg","Gkg/m3":"kg/m³","Glbm/ft3":"lbm/ft³","lb/ft3":"lb/ft³","°N":"°N","°S":"°S","°W":"°W","°E":"°E",fr:" ",mD:"mD",CI:"CI",Sigma:"σ","Sm3/d/bar":"Sm³/d/bar","STB/d/psi":"STB/d/psi","m3/s/bar":"m³/s/bar","lb/ft":"lb/ft","E-09/bar":"10⁻⁹/bar","E-10/psi":"10⁻¹⁰/psi","E-14/pa":"10⁻¹⁴/pa","m3/m":" m³/m","cm3/m":"cm³/m","mm3/m":"mm³/m","ft3/ft":"ft³/ft","in3/ft":"in³/ft",lk:"lk",ftCla:"ftCla",lkCla:"lkCla",ftSe:"ftSe",ydSe:"ydSe",chSe:"chSe","chSe(T)":"chSe(T)",ftGC:"ftGC",ydInd:"ydInd","d/stand":"d/stand","h/stand":"h/stand","min/stand":"min/stand","s/stand":"s/stand","m3/t":"m3/t","L/100kg":"L/100kg"}),kP=Object.freeze({acceleration:["ft/s2","m/s2"],angleGradient:["deg/30m","rad/m","deg/m","deg/ft","rad/ft","deg/100ft","deg/10m"],angles:["deg","rad"],areaOther:["in2","ft2","mm2","cm2","m2","mile2","km2"],areaTubular:["in2","cm2","ft2","m2"],blowoutFlowRate:["lpm","bpm","m3/min","ft3/s","m3/s","MMSCFD","ft3/d","m3/d","bbl/d","Mm3/d","STB/d","Sm3/d","MSm3/d","SCF/d"],blowoutGasFlowRate:["MMSCFD","Sm3/d","MSm3/d","SCF/d"],blowoutOilFlowRate:["Sm3/d","STB/d"],deg:["deg","rad"],density:["sg","ppg","kg/m3","lbm/ft3","g/cm3","lb/ft3","kPa/m"],densityGas:["Gsg","Gppg","Gkg/m3","Glbm/ft3"],densityOil:["sg","ppg","kg/m3","lbm/ft3"],densityOilGas:["ppg","kg/m3","lbm/ft3"],densitySolid:["sg","ppg","kg/m3","lbm/ft3"],depth:["m","ft"],diameters:["in","m","cm","ft","mm"],distance:["m","ft"],dls:["deg/10m","deg/30m","deg/100ft"],doglegSeverity:["deg/10m","deg/30m","deg/100ft"],duration:["s","h","d","min"],durationShort:["s","min","h","d"],durationLong:["min","h","d","month","year"],flowrate:["lpm","gpm","bpm","ft3/d","ft3/s","m3/s","m3/d","m3/min","Mm3/d","bbl/d","MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],fluidCompressibility:["1/bar","1/psi","1/Pa","1/kPa","1/MPa","1/GPa"],force:["tonnes","lbf","kgf","N","kN","tonneForce","klbf"],forceGradient:["lbf/ft","N/m"],frequency:["Hz"],gasVolume:["MMSCF","Sm3","MSm3","SCF"],gor:["Sm3/Sm3","SCF/STB"],height:["m","ft"],intensity:["W/m2","hhp/in2","hhp/ft2"],interfacialTension:["dyn/cm","N/m","lbf/ft","mN/m"],latitude:["°N","°S"],length:["m","cm","ft","km","in","mm"],linearCapacity:["l/m","bbl/ft"],longitude:["°E","°W"],massFlowRate:["kg/s","lbm/s"],moleWeight:["kg/mol","lbf/mol","g/mol"],oilVolume:["STB","Sm3"],percentage:["%","fr"],permeability:["mD","m2"],power:["hp","W","hhp","MW","kW","BTU/h"],pressure:["bar","psi","Pa","kPa","MPa","ksi","GPa","lbf/100ft2"],pressureGradient:["bar/100m","Pa/m","bar/m","psi/100ft","psi/ft","kPa/m"],pressurechange:["bar","psi","Pa","MPa","kPa"],gasliftFlowRate:["STB/d","Sm3/d","SCF/d"],productionFlowRate:["MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],productionFlowRateOil:["MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],productionFlowRateGas:["MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],injectionFlowRate:["lpm","lps","bpm","gpm","MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],pumpRate:["lpm","lps","bpm","m3/s","ft3/s","gpm"],rotationalSpeed:["rpm","Hz"],roughness:["m","microM","in"],rpm:["rpm","Hz"],sdstats:["CI","Sigma"],specificHeatCapacity:["J/(kg*degC)","J/(kg*degK)","BTU/(lbm*degF)"],speed:["km/h","ft/min","mph","ft/h","ft/s","m/min","m/s","m/h"],inverseStandSpeed:["d/stand","h/stand","min/stand","s/stand"],rop:["ft/h","ft/min","ft/s","km/h","m/h","m/min","m/s","mph"],stress:["MPa","kPa","psi","bar","Pa","ksi","lbf/100ft2"],temperature:["C","F","K"],pressurePerTemperature:["Pa/C","Bar/C","psi/F","psi/C"],tempgrad:["C/100m","F/100ft","K/100m","C/m","F/ft","K/m"],thermalConductivity:["BTU/(h*ft*degF)","W/(mK)"],thermalExpansionCoefficient:["E-06/degC","E-06/degF","1/K"],torque:["Nm","ftlbf","kNm"],torqueGradient:["N","lbf","tonnes"],turbulentSkin:["s/m3","1/m3/d","1/MMSCFD"],viscosity:["Pa*s","P","mPa*s","cP"],inflowProductivityIndex:["Sm3/d/bar","STB/d/psi","m3/s/bar"],volume:["m3","bbl","Mm3","l","USGal","ft3","STB","Sm3","MMSCF","MSm3","SCF"],kickToleranceVolume:["m3","bbl","USGal","ft3","STB","Sm3","SCF"],weight:["tonnes","kg","lbf","mt","kip","N"],weightGradient:["ppf","kg/m"],wgrad:["sg","ppg"],wltubulars:["ppf","kg/m"],youngsModulus:["Pa","psi"],massPerLength:["kg/m","lb/ft"],wearFactor:["E-09/bar","E-10/psi","E-14/pa"],volumeGradient:["m3/m","cm3/m","mm3/m","ft3/ft","in3/ft"],shearStress:["Pa","lbf/100ft2"],location:["lk","ftCla","lkCla","ftSe","ydSe","chSe","chSe(T)","ftGC","ydInd","ft","m","usft"],mixingRequirements:["m3/t","L/100kg"],entalphy:["J/kg","kJ/kg","BTU/lbm"]}),z=Object.freeze({g:.0980665175317196,ft_to_m:.3048,inch_to_m:.0254,lbf_to_kg:.45359237,kg_to_lbf:2.20462262184877,ppf_to_kgm:.45359237/.3048,kg_cm3:.0293984025938081,bar_to_psi:14.503773773022,bar_to_pascal:1e5,sg_to_ppg:8.345404265,bbl_to_m3:.158987294928,USGal_to_m3:.003785411784,kelvin_to_degrees:273.15,tonnes_to_pascal:9806.65,therm_exp_coeff:1242e-8,psi_to_pascal:6894.757293168361,ft3_to_m3:.028316846592,ft3_to_in3:1728,day_to_second:60*60*24,m3_per_m_to_ft3_per_ft:10.763910416709722,in3_per_ft_to_m3_per_m:537633333333e-16}),EP=Object.freeze({"m|mm":t=>t*1e3,"m|cm":t=>t*100,"m|km":t=>t/1e3,"m|ft":t=>t/z.ft_to_m,"m|in":t=>t/z.inch_to_m,"m|microM":t=>t*1e6,"mm|m":t=>t/1e3,"cm|m":t=>t/100,"km|m":t=>t*1e3,"ft|m":t=>t*z.ft_to_m,"in|m":t=>t*z.inch_to_m,"microM|m":t=>t/1e6,"m2|mm2":t=>t*1e6,"m2|cm2":t=>t*1e4,"m2|km2":t=>t/1e6,"m2|in2":t=>t*1550.0031,"m2|ft2":t=>t*10.76391,"m2|mile2":t=>t*3861022e-13,"mm2|m2":t=>t/1e6,"cm2|m2":t=>t/1e4,"km2|m2":t=>t*1e6,"in2|m2":t=>t/1550.0031,"ft2|m2":t=>t/10.76391,"mile2|m2":t=>t/3861022e-13,"m3|bbl":t=>t/z.bbl_to_m3,"m3|ft3":t=>t/z.ft3_to_m3,"m3|l":t=>t*1e3,"m3|Mm3":t=>t/1e6,"m3|USGal":t=>t/z.USGal_to_m3,"bbl|m3":t=>t*z.bbl_to_m3,"ft3|m3":t=>t*z.ft3_to_m3,"Mm3|m3":t=>t*1e6,"l|m3":t=>t/1e3,"USGal|m3":t=>t*z.USGal_to_m3,"m3|Sm3":t=>t*1,"m3|STB":t=>t*6.289512957422142,"Sm3|m3":t=>t*1,"STB|m3":t=>t*.1589948230919721,"m3|MMSCF":t=>t*1e6/z.ft3_to_m3,"m3|MSm3":t=>t*1e-6,"m3|SCF":t=>t/z.ft3_to_m3,"MMSCF|m3":t=>t*1e-6*z.ft3_to_m3,"MSm3|m3":t=>t*1e6,"SCF|m3":t=>t*z.ft3_to_m3,"kg/m3|sg":t=>t*.001,"kg/m3|g/cm3":t=>t*.001,"kg/m3|lbm/ft3":t=>t/16.01846337,"kg/m3|lb/ft3":t=>t/16.01846337,"kg/m3|ppg":t=>t*.008345404265,"sg|kg/m3":t=>t*1e3,"g/cm3|kg/m3":t=>t*1e3,"lbm/ft3|kg/m3":t=>t*16.01846337,"lb/ft3|kg/m3":t=>t*16.01846337,"ppg|kg/m3":t=>t/.008345404265,"sg|kPa/m":t=>t*9.81,"kPa/m|sg":t=>t/9.81,"Gkg/m3|Gsg":t=>t/1.225,"Gkg/m3|Glbm/ft3":t=>t/16.0176516725,"Gkg/m3|Gppg":t=>t/119.8659491193,"Gsg|Gkg/m3":t=>t*1.225,"Glbm/ft3|Gkg/m3":t=>t*16.0176516725,"Gppg|Gkg/m3":t=>t*119.8659491193,"ppf|kg/m":t=>t*.45359237/.3048,"kg/m|ppf":t=>t*1/(.45359237/.3048),"kg/m|lbf/ft":t=>t/.67196897675131,"lbf/ft|kg/m":t=>t*.67196897675131,"Pa|psi":t=>t/z.psi_to_pascal,"psi|Pa":t=>t*z.psi_to_pascal,"Pa|bar":t=>t*1e-5,"Pa|kPa":t=>t*.001,"Pa|MPa":t=>t*1e-6,"Pa|GPa":t=>t*1e-9,"bar|Pa":t=>t*1e5,"kPa|Pa":t=>t*1e3,"MPa|Pa":t=>t*1e6,"GPa|Pa":t=>t*1e9,"psi|ksi":t=>t/1e3,"ksi|psi":t=>t*1e3,"psi|lbf/100ft2":t=>t*14400,"lbf/100ft2|psi":t=>t/14400,"1/psi|1/Pa":t=>t/z.psi_to_pascal,"1/bar|1/Pa":t=>t*1e-5,"1/kPa|1/Pa":t=>t*.001,"1/MPa|1/Pa":t=>t*1e-6,"1/GPa|1/Pa":t=>t*1e-9,"1/Pa|1/psi":t=>t*z.psi_to_pascal,"1/Pa|1/bar":t=>t*1e5,"1/Pa|1/kPa":t=>t*1e3,"1/Pa|1/MPa":t=>t*1e6,"1/Pa|1/GPa":t=>t*1e9,"C|F":t=>t*1.8+32,"F|C":t=>(t-32)*5/9,"K|C":t=>t-z.kelvin_to_degrees,"C|K":t=>t+z.kelvin_to_degrees,"C/100m|F/100ft":t=>t*1.8*z.ft_to_m,"F/100ft|C/100m":t=>t*5/9/z.ft_to_m,"C/100m|C/m":t=>t/100,"C/m|C/100m":t=>t*100,"C/100m|F/ft":t=>t*1.8/100*z.ft_to_m,"F/ft|C/100m":t=>t*5/9*100/z.ft_to_m,"C/100m|K/m":t=>t/100,"K/m|C/100m":t=>t*100,"K/100m|C/100m":t=>t,"C/100m|K/100m":t=>t,"Pa/C|Bar/C":t=>t*1e-5,"Pa/C|psi/F":t=>t/1.8/z.psi_to_pascal,"Pa/C|psi/C":t=>t/z.psi_to_pascal,"Bar/C|Pa/C":t=>t*1e5,"psi/F|Pa/C":t=>t*1.8*z.psi_to_pascal,"psi/C|Pa/C":t=>t*z.psi_to_pascal,"psi/F|psi/C":t=>t*1.8,"psi/C|psi/F":t=>t/1.8,"kg|kgf":t=>t,"kg|lbf":t=>t*z.kg_to_lbf,"kg|t":t=>t/1e3,"kg|tonnes":t=>t/1e3,"kg|mt":t=>t/1e3,"kg|kip":t=>t*z.kg_to_lbf*.001,"kgf|kg":t=>t,"lbf|kg":t=>t*z.lbf_to_kg,"t|kg":t=>t*1e3,"tonnes|kg":t=>t*1e3,"mt|kg":t=>t*1e3,"kip|kg":t=>t*1e3*z.lbf_to_kg,"tonnes|lbf":t=>t*1e3*z.kg_to_lbf,"lbf|tonnes":t=>t*z.lbf_to_kg/1e3,"t|lbf":t=>t*1e3*z.kg_to_lbf,"lbf|t":t=>t*z.lbf_to_kg/1e3,"mt|lbf":t=>t*1e3*z.kg_to_lbf,"lbf|mt":t=>t/(1e3*z.kg_to_lbf),"kgf|lbf":t=>t*z.kg_to_lbf,"lbf|kgf":t=>t*z.lbf_to_kg,"kg|g":t=>t*1e3,"g|kg":t=>t/1e3,"kgf|t":t=>t/1e3,"t|kgf":t=>t*1e3,"kgf|tonnes":t=>t/1e3,"tonnes|kgf":t=>t*1e3,"kg/m|lb/ft":t=>t*1.4881639435695537,"lb/ft|kg/m":t=>t*.6719689751395069,"kg|N":t=>t*z.g*100,"N|kg":t=>t/(z.g*100),"m/s|km/h":t=>t*3.6,"km/h|m/s":t=>t/3.6,"m/s|ft/s":t=>t/z.ft_to_m,"m/s|ft/min":t=>t*60/z.ft_to_m,"m/s|ft/h":t=>t*3600/z.ft_to_m,"m/s|m/min":t=>t*60,"m/s|m/h":t=>t*3600,"ft/s|m/s":t=>t*z.ft_to_m,"ft/min|m/s":t=>t*z.ft_to_m/60,"ft/h|m/s":t=>t*z.ft_to_m/3600,"m/min|m/s":t=>t/60,"m/h|m/s":t=>t/3600,"m/s|mph":t=>t*2.2369362920544,"mph|m/s":t=>t/2.2369362920544,"ft/h|ft/d":t=>t*24,"ft/d|ft/h":t=>t/24,"ft/h|m/h":t=>t*z.ft_to_m,"m/h|ft/h":t=>t/z.ft_to_m,"ft/d|m/h":t=>t*z.ft_to_m/24,"m/h|ft/d":t=>t*24/z.ft_to_m,"ft/d|m/d":t=>t*z.ft_to_m,"m/d|ft/d":t=>t/z.ft_to_m,"m/h|m/d":t=>t*24,"m/d|m/h":t=>t/24,"l/m|bbl/ft":t=>t*.0019171343228277056,"bbl/ft|l/m":t=>t/.0019171343228277056,"m3/s|ft3/s":t=>t/z.ft3_to_m3,"m3/s|lpm":t=>t*6e4,"m3/s|bpm":t=>t*377.388646,"m3/s|m3/min":t=>t*60,"m3/s|m3/d":t=>t*z.day_to_second,"m3/s|bbl/d":t=>t*543439.6505653338,"m3/s|ft3/d":t=>t*z.day_to_second/z.ft3_to_m3,"m3/s|gpm":t=>t*25e11/157725491,"m3/s|MMSCFD":t=>t/.32774128,"m3/s|STB/d":t=>t*1346875e8/247854343,"m3/s|Sm3/d":t=>t*z.day_to_second,"m3/s|MSm3/d":t=>t/11.59722222222222,"m3/s|SCF/d":t=>t*3.0511872047366146e6,"ft3/s|m3/s":t=>t*z.ft3_to_m3,"lpm|m3/s":t=>t/6e4,"lps|lpm":t=>t*60,"lpm|lps":t=>t/60,"bpm|m3/s":t=>t/377.388646,"m3/d|m3/s":t=>t/z.day_to_second,"m3/min|m3/s":t=>t/60,"bbl/d|m3/s":t=>t/z.day_to_second*z.bbl_to_m3,"ft3/d|m3/s":t=>t/z.day_to_second*z.ft3_to_m3,"ft3/d|m3/d":t=>t*z.ft3_to_m3,"m3/d|ft3/d":t=>t/z.ft3_to_m3,"m3/d|ft3/s":t=>t/z.ft3_to_m3/z.day_to_second,"gpm|m3/s":t=>t*157725491/25e11,"MMSCFD|m3/s":t=>t*.32774128,"Mm3/d|m3/d":t=>t*1e6,"m3/d|Mm3/d":t=>t*1e-6,"STB/d|m3/s":t=>t*184021785986e-17,"Sm3/d|m3/d":t=>t,"m3/d|Sm3/d":t=>t,"Sm3/d|m3/s":t=>t/z.day_to_second,"MSm3/d|Sm3/d":t=>t*1e6,"Sm3/d|MSm3/d":t=>t*1e-6,"MSm3/d|m3/s":t=>t*11.59722222222222,"SCF/d|m3/s":t=>t*32774128e-14,"1/m3/d|1/MMSCFD":t=>t*28316.85,"1/MMSCFD|1/m3/d":t=>t/28316.85,"s/m3|1/m3/d":t=>t/86400,"1/m3/d|s/m3":t=>t*86400,"kg/s|lbm/s":t=>t*2.20462262,"lbm/s|kg/s":t=>t/2.20462262,"mD|m2":t=>t*9869233e-19,"m2|mD":t=>t/9869233e-19,"N/m|lbf/ft":t=>t*.22480894387096*z.ft_to_m,"lbf/ft|N/m":t=>t/.22480894387096/z.ft_to_m,"dyn/cm|mN/m":t=>t,"mN/m|dyn/cm":t=>t,"dyn/cm|N/m":t=>t*.001,"N/m|dyn/cm":t=>t*1e3,"mN/m|N/m":t=>t*.001,"N/m|mN/m":t=>t*1e3,"Nm|ftlbf":t=>t*.737562058700684,"Nm|kNm":t=>t/1e3,"kNm|Nm":t=>t*1e3,"ftlbf|Nm":t=>t/.737562058700684,"N|kN":t=>t*.001,"N|kgf":t=>t*2e4/196133,"N|lbf":t=>t*2e12/8896443230521,"kN|lbf":t=>t*1e3*2e12/8896443230521,"N|tonneForce":t=>t*20/196133,"kN|N":t=>t/.001,"kgf|N":t=>t*196133/2e4,"lbf|N":t=>t*8896443230521/2e12,"lbf|kN":t=>t*8896443230521/(2e12*1e3),"lbf|tonneForce":t=>t*45359237/1e11,"klbf|tonneForce":t=>t*45359237/(1e11*.001),"tonneForce|N":t=>t*196133/20,"tonneForce|lbf":t=>t*1e11/45359237,"tonneForce|klbf":t=>t*1e11/(45359237*1e3),"klbf|lbf":t=>t*1e3,"lbf|klbf":t=>t/1e3,"s|min":t=>t/60,"s|h":t=>t/3600,"s|d":t=>t/(24*3600),"min|s":t=>t*60,"h|s":t=>t*3600,"d|s":t=>t*24*3600,"year|d":t=>t*365.25,"d|year":t=>t/365.25,"year|month":t=>t*12,"month|year":t=>t/12,"month|d":t=>t*30.4375,"d|month":t=>t/30.4375,"s/stand|min/stand":t=>t/60,"s/stand|h/stand":t=>t/3600,"s/stand|d/stand":t=>t/86400,"min/stand|s/stand":t=>t*60,"h/stand|s/stand":t=>t*3600,"d/stand|s/stand":t=>t*86400,"min/stand|h/stand":t=>t/60,"min/stand|d/stand":t=>t/1440,"h/stand|min/stand":t=>t*60,"h/stand|d/stand":t=>t/24,"d/stand|min/stand":t=>t*1440,"d/stand|h/stand":t=>t*24,"%|fr":t=>t*.01,"fr|%":t=>t/.01,"deg|rad":t=>t*Math.PI/180,"rad|deg":t=>t*180/Math.PI,"W|hp":t=>t/745.699872,"hp|W":t=>t*745.699872,"W|kW":t=>t/1e3,"W|MW":t=>t/1e6,"kW|W":t=>t*1e3,"MW|W":t=>t*1e6,"W|BTU/h":t=>t*3.4121416351331,"BTU/h|W":t=>t/3.4121416351331,"hhp|hp":t=>t,"hp|hhp":t=>t,"°N|°S":t=>t,"°S|°N":t=>t,"°W|°E":t=>t,"°E|°W":t=>t,"BTU/(Kg*K)|BTU/(lbm*degF)":t=>t/4186.798188,"BTU/(lbm*degF)|J/(kg*degC)":t=>t*4186.798188,"BTU/(lbm*degF)|BTU/(Kg*K)":t=>t*4186.798188,"J/(kg*degK)|J/(kg*degC)":t=>t,"J/(kg*degC)|BTU/(lbm*degF)":t=>t/4186.798188,"J/(kg*degC)|J/(kg*degK)":t=>t,"J/(kg*degC)|J/(s*m*degK)":t=>t,"BTU/(h*ft*degF)|W/(mK)":t=>t*1.7295772056,"BTU/(h*ft*degF)|J/(s*m*degK)":t=>t*1.7295772056,"W/(mK)|BTU/(h*ft*degF)":t=>t/1.7295772056,"W/(mK)|J/(s*m*degK)":t=>t,"W/(m*degK)|J/(s*m*degK)":t=>t,"W/(m*degK)|BTU/(h*ft*degF)":t=>t/1.7295772056,"J/(s*m*degK)|BTU/(h*ft*degF)":t=>t/1.7295772056,"J/(s*m*degK)|W/(m*degK)":t=>t,"J/(s*m*degK)|W/(mK)":t=>t,"J/(s*m*degK)|J/(kg*degC)":t=>t,"E-06/degF|E-06/degC":t=>t*1.8,"E-06/degC|E-06/degF":t=>t/1.8,"E-06/degC|1/K":t=>t/1e6,"1/K|E-06/degC":t=>t*1e6,"rpm|Hz":t=>t/60,"Hz|rpm":t=>t*60,"CI|Sigma":t=>TP(t),"Sigma|CI":t=>PP(t),"g/mol|kg/mol":t=>t/1e3,"kg/mol|g/mol":t=>t*1e3,"lbf/mol|kg/mol":t=>t/z.kg_to_lbf,"kg/mol|lbf/mol":t=>t*z.kg_to_lbf,"m/s2|ft/s2":t=>t/z.ft_to_m,"ft/s2|m/s2":t=>t*z.ft_to_m,"Pa*s|P":t=>t*10,"P|Pa*s":t=>t/10,"mPa*s|Pa*s":t=>t/1e3,"Pa*s|mPa*s":t=>t*1e3,"cP|Pa*s":t=>t*.001,"Pa*s|cP":t=>t/.001,"Pa/m|bar/m":t=>t*1e-5,"bar/m|Pa/m":t=>t*1e5,"Pa/m|kPa/m":t=>t/1e3,"kPa/m|Pa/m":t=>t*1e3,"Pa/m|bar/100m":t=>t*.001,"bar/100m|Pa/m":t=>t*1e3,"bar/m|bar/100m":t=>t*100,"bar/100m|bar/m":t=>t/100,"psi/ft|Pa/m":t=>t*z.psi_to_pascal/z.ft_to_m,"Pa/m|psi/ft":t=>t/z.psi_to_pascal*z.ft_to_m,"psi/100ft|Pa/m":t=>t*68.9475729/z.ft_to_m,"Pa/m|psi/100ft":t=>t/68.9475729*z.ft_to_m,"deg/30m|deg/100ft":t=>t*(100*z.ft_to_m/30),"deg/100ft|deg/30m":t=>t/(100*z.ft_to_m/30),"deg/30m|deg/m":t=>t/30,"deg/m|deg/30m":t=>t*30,"deg/100ft|deg/ft":t=>t/100,"deg/ft|deg/100ft":t=>t*100,"deg/100ft|deg/m":t=>t/(100*z.ft_to_m),"deg/m|deg/100ft":t=>t*(100*z.ft_to_m),"deg/ft|deg/m":t=>t/z.ft_to_m,"deg/m|deg/ft":t=>t*z.ft_to_m,"deg/m|rad/m":t=>t*Math.PI/180,"rad/m|deg/m":t=>t*180/Math.PI,"rad/ft|deg/m":t=>t*180/Math.PI/z.ft_to_m,"deg/m|rad/ft":t=>t*Math.PI/180*z.ft_to_m,"deg/10m|deg/100ft":t=>t*(10*z.ft_to_m),"deg/100ft|deg/10m":t=>t/(10*z.ft_to_m),"deg/10m|deg/m":t=>t/10,"deg/m|deg/10m":t=>t*10,"deg/30m|deg/10m":t=>t/3,"deg/10m|deg/30m":t=>t*3,"deg/10m|rad/m":t=>t*Math.PI/180/10,"rad/m|deg/10m":t=>t*180/Math.PI*10,"W/m2|hhp/in2":t=>t*(1/745.699872/1550.0031),"W/m2|hhp/ft2":t=>t*(1/745.699872/10.76391),"hhp/in2|W/m2":t=>t/(1/745.699872/1550.0031),"hhp/ft2|W/m2":t=>t/(1/745.699872/10.76391),"SCF/STB|Sm3/Sm3":t=>t*.178099173553719,"Sm3/Sm3|SCF/STB":t=>t*5.614849187935035,"Sm3/d/bar|m3/s/bar":t=>t/86400,"STB/d/psi|m3/s/bar":t=>t/37468.77736,"m3/s/bar|Sm3/d/bar":t=>t*86400,"m3/s/bar|STB/d/psi":t=>t*37468.77736,"E-10/psi|E-09/bar":t=>t*1.450377378,"E-10/psi|E-14/pa":t=>t*1.450377378,"E-14/pa|E-10/psi":t=>t/1.450377378,"E-09/bar|E-10/psi":t=>t/1.450377378,"E-14/pa|1/Pa":t=>t/Math.pow(10,14),"E-09/bar|1/bar":t=>t/Math.pow(10,9),"E-10/psi|1/psi":t=>t/Math.pow(10,10),"1/Pa|E-14/pa":t=>t*Math.pow(10,14),"1/bar|E-09/bar":t=>t*Math.pow(10,9),"1/psi|E-10/psi":t=>t*Math.pow(10,10),"m3/m|cm3/m":t=>t*10**6,"m3/m|mm3/m":t=>t*10**9,"m3/m|ft3/ft":t=>t*z.m3_per_m_to_ft3_per_ft,"m3/m|in3/ft":t=>t*z.m3_per_m_to_ft3_per_ft*z.ft3_to_in3,"cm3/m|m3/m":t=>t*1e-6,"cm3/m|mm3/m":t=>t*1e3,"cm3/m|ft3/ft":t=>t*z.m3_per_m_to_ft3_per_ft*1e-6,"cm3/m|in3/ft":t=>t*z.m3_per_m_to_ft3_per_ft*1e-6*z.ft3_to_in3,"mm3/m|m3/m":t=>t*1e-9,"mm3/m|cm3/m":t=>t*.001,"mm3/m|ft3/ft":t=>t*z.m3_per_m_to_ft3_per_ft*1e-9,"mm3/m|in3/ft":t=>t*z.m3_per_m_to_ft3_per_ft*1e-9*z.ft3_to_in3,"ft3/ft|m3/m":t=>t*.09290304,"ft3/ft|cm3/m":t=>t*92903.04,"ft3/ft|mm3/m":t=>t*92903040,"ft3/ft|in3/ft":t=>t*1728,"in3/ft|m3/m":t=>t*z.in3_per_ft_to_m3_per_m,"in3/ft|cm3/m":t=>t*z.in3_per_ft_to_m3_per_m*1e6,"in3/ft|mm3/m":t=>t*z.in3_per_ft_to_m3_per_m*1e9,"in3/ft|ft3/ft":t=>t/z.ft3_to_in3,"Pa|lbf/100ft2":t=>t*2.088543423315013,"lbf/100ft2|Pa":t=>t*.4788025898033584,"usft|m":t=>t*.30480060960121924,"lk|m":t=>t*.201168,"ftCla|m":t=>t*.3047972651151,"lkCla|m":t=>t*.2011057269733667,"ftGC|m":t=>t*.30479971018150875,"ydInd|m":t=>t*.9143985307444408,"ftSe|m":t=>t*(12/39.370147),"ydSe|m":t=>t*.9143991154275526,"chSe|m":t=>t*20.11676512155263,"chSe(T)|m":t=>t*20.116756,"m|usft":t=>t/.30480060960121924,"m|lk":t=>t/.201168,"m|ftCla":t=>t/.3047972651151,"m|lkCla":t=>t/.2011057269733667,"m|ftGC":t=>t/.30479971018150875,"m|ydInd":t=>t/.9143985307444408,"m|ftSe":t=>t/(12/39.370147),"m|ydSe":t=>t/.9143991154275526,"m|chSe":t=>t/20.11676512155263,"m|chSe(T)":t=>t/20.116756,"m3/t|L/100kg":t=>t*100,"L/100kg|m3/t":t=>t*.01,"kJ/kg|J/kg":t=>t*1e3,"J/kg|kJ/kg":t=>t/1e3,"BTU/lbm|J/kg":t=>t*2326,"J/kg|BTU/lbm":t=>t/2326}),Os=Object.freeze({"N-m":"Nm","ft-lbf":"ftlbf","BTU/hr":"BTU/h","BTU/(htf*degF)":"BTU/(h*ft*degF)","BTU/(hft*degF)":"BTU/(h*ft*degF)"}),ca=Object.freeze({"lbs/ft":"lb/ft","lbm/ft":"lb/ft",ftUS:"usft"}),og=Object.freeze({mm:"m",cm:"m",km:"m",ft:"m",in:"m",microM:"m",lbf:"kg",t:"kg",tonnes:"kg",mt:"kg",kip:"kg",kW:"W",MW:"W",hp:"W",hhp:"hp",mm2:"m2",cm2:"m2",km2:"m2",in2:"m2",ft2:"m2",mile2:"m2",bbl:"m3",ft3:"m3",Mm3:"m3",l:"m3",USGal:"m3",Sm3:"m3",STB:"m3",MMSCF:"m3",MSm3:"m3",SCF:"m3",kN:"N",kgf:"N",tonneForce:"N",klbf:"lbf",psi:"Pa",bar:"Pa",kPa:"Pa",MPa:"Pa",ksi:"psi","lbf/100ft2":"psi","psi/100ft":"Pa/m","psi/ft":"Pa/m","bar/100m":"Pa/m","bar/m":"Pa/m","Pa/m":"kPa/m",sg:"kg/m3","g/cm3":"kg/m3","lbm/ft3":"kg/m3","lb/ft3":"kg/m3",ppg:"kg/m3","kPa/m":"sg",Gsg:"Gkg/m3",Gppg:"Gkg/m3","Glbm/ft3":"Gkg/m3","1/psi":"1/Pa","1/bar":"1/Pa","1/kPa":"1/Pa","1/MPa":"1/Pa","1/GPa":"1/Pa","ft/s":"m/s","ft/min":"m/s","ft/h":"m/s","m/min":"m/s","m/h":"m/s",mph:"m/s","ft3/s":"m3/s",lpm:"m3/s",lps:"lpm",bpm:"m3/s","m3/d":"m3/s","bbl/d":"m3/s","ft3/d":"m3/s","STB/d":"m3/s","Sm3/d":"m3/s",gpm:"m3/s",MMSCFD:"m3/s","Mm3/d":"m3/d","m3/min":"m3/s","MSm3/d":"m3/s","lbf/ft":"N/m",min:"s",h:"s",d:"s",month:"d",year:"d","J/(kg*degK)":"J/(kg*degC)","BTU/(lbm*degF)":"J/(kg*degC)","BTU/(Kg*K)":"J/(kg*degC)","BTU/(h*ft*degF)":"J/(s*m*degK)","W/(m*degK)":"J/(s*m*degK)","W/(mK)":"J/(s*m*degK)",K:"C","C/m":"C/100m","F/ft":"C/100m","K/m":"C/100m","F/100ft":"C/100m","K/100m":"C/100m","Bar/C":"Pa/C","s/m3":"1/m3/d","1/MMSCFD":"1/m3/d",P:"Pa*s","mPa*s":"Pa*s",cP:"Pa*s","hhp/in2":"W/m2","hhp/ft2":"W/m2","Sm3/d/bar":"m3/s/bar","STB/d/psi":"m3/s/bar","deg/100ft":"deg/m","deg/30m":"deg/m","deg/10m":"deg/m","deg/ft":"deg/m","rad/ft":"deg/m","lbf/mol":"kg/mol","g/mol":"kg/mol","1/K":"E-06/degC","E-09/bar":"E-10/psi","E-14/pa":"E-10/psi","1/Pa":"E-14/pa",kNm:"Nm",ftlbf:"Nm",lk:"m",ftCla:"m",lkCla:"m",ftSe:"m",ydSe:"m",chSe:"m","chSe(T)":"m",ftGC:"m",ydInd:"m","BTU/lbm":"J/kg"}),IP=Object.freeze(Array.from(new Set(Object.values(kP).flat()))),AP=[NaN,-1/0,1/0],OP=AP.map(t=>t.toString());var fa={},ag;function DP(){if(ag)return fa;ag=1,Object.defineProperty(fa,"__esModule",{value:!0});function t(e){const n=e.length;let i=0,s=0,o;for(;s<n;)i++,o=e.charCodeAt(s++),o>=55296&&o<=56319&&s<n&&(o=e.charCodeAt(s),(o&64512)===56320&&s++);return i}return fa.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',fa}const ua=Hp;function Hp(t,{instancePath:e="",parentData:n,parentDataProperty:i,rootData:s=t}={}){let o=null,l=0;if(!(typeof t=="number"&&isFinite(t))){const c={instancePath:e,schemaPath:"#/type",keyword:"type",params:{type:"number"},message:"must be number"};o===null?o=[c]:o.push(c),l++}if(l>0){const c=[];for(const h of o)h.keyword!=="errorMessage"&&!h.emUsed&&(h.instancePath===e||h.instancePath.indexOf(e)===0&&h.instancePath[e.length]==="/")&&h.schemaPath.indexOf("#")===0&&h.schemaPath[1]==="/"&&(c.push(h),h.emUsed=!0);if(c.length){const h={instancePath:e,schemaPath:"#/errorMessage",keyword:"errorMessage",params:{errors:c},message:"Must be a numerical value"};o===null?o=[h]:o.push(h),l++}const u=[];for(const h of o)h.emUsed||u.push(h);o=u,l=u.length}return Hp.errors=o,l===0}DP().default;const lg=t=>t?.map(({message:e})=>e),Zn="|",RP=/^(-?[0-9., /]*?(?:e[-+]?[0-9]+)?)([^0-9-., /].*)?$/,Up=/^[-+]?[0-9]*\.?[0-9]+(?:\/[0-9]*\.?[0-9]+)?(?:[eE][-+]?[0-9]+)?$/;function Vp(t){const e=/\.{2,}/,n=/,/;if(typeof t=="string")for(;e.test(t)||n.test(t);)t=t.replace(e,"."),t=t.replace(n,".");return t}function Kn(t,e,n){if(t=Vp(t),n==="undefined"&&console.warn('Inconsistent "to unit" - debug call to "Units.to()"'),e==="undefined"&&(e=n,console.warn('Inconsistent "from unit" - debug call to "Units.to()"')),e===n)return kn(t);if(t===1/0||t==="Infinity")return 1/0;if(t===-1/0||t==="-Infinity")return-1/0;if(wP(t)&&t!=="")return NaN;const i=EP[e+"|"+n];if(i)return i(kn(t));if(Os[e])return console.warn(`Unit '${e}' is deprecated - use '${Os[e]}' instead.`),Kn(t,Os[e],n);if(Os[n])return console.warn(`Unit '${n}' is deprecated - use '${Os[n]}' instead.`),Kn(t,e,Os[n]);if(ca[n])return Kn(t,e,ca[n]);if(ca[e])return Kn(t,ca[e],n);const s=og[e];if(s){const o=Kn(t,e,s);return Kn(o,s,n)}else{const o=og[n];if(n&&o&&o!==n){const l=Kn(t,e,o);return Kn(l,o,n)}}throw console.error("no conversions found",t,e,"->",n),new Error("No conversions found: "+t+" "+e+" -> "+n)}function Oa(t){let e,n=t!=null?String(t):"";return bi(Zn,n)>1&&(e=n.split(Zn),n=e.slice(0,-1).join("")+Zn+e.slice(-1)),n.indexOf(Zn)>=0?e=n.split(Zn):OP.includes(n)?e=[n,""]:(e=zs(n).match(RP),e&&(e=e.slice(1))),e||(e=["0",""]),e[1]==null&&(e[1]=""),[e[0],e[1]]}function lf(t){return Oa(t)[0]}function LP(t){return Oa(t)[1]}function $p(t,e,n){if(t==null||t==="")return 0;if(typeof t=="string"&&t.startsWith("NaN")||typeof t=="number"&&isNaN(t))return NaN;const i=zs(t).replaceAll("+",""),s=Oa(i);if(!s){if(e&&n)return $p(t+n,e);throw new Error("unum: invalid number: "+t)}if(s[0]==null&&(s[0]="0"),s[1]&&(n=s[1]),!n&&e!==n)throw new Error(`unum: unable to figure out unit: ${t} fromUnit ${n}`);if(e===n){const o=s[0]?kn(s[0]):0;if(o===1/0||o==="Infinity")return 1/0;if(o===-1/0||o==="-Infinity")return-1/0;if(typeof o=="string"&&Up.test(o))return parseFloat(o);if(!Ye(o)&&o!==1/0&&o!==-1/0)throw new Error("unum: invalid number: "+o+", "+typeof o);return SP(o)}return Kn(s[0],n,e)}function $r(t){if(!t)return!1;const e=String(t).split(Zn);return e.length===2&&IP.includes(e[1])}function NP(t,e,n){return $p(t,e,n)}function BP(t,e,n=""){if((t===null||t===""||t===void 0)&&(t=n),e===null)return String(t);let[i,s]=String(t).includes(Zn)?Oa(String(t)):[t,e];return s||(s=e),[i,s].join(Zn)}function KC(t){let e=t;return typeof t=="string"&&$r(t)&&(e=lf(t)),e=Vp(e),Ye(e)?{valid:ua(kn(e)),errors:lg(ua.errors)}:{valid:ua(e),errors:lg(ua.errors)}}var bc={exports:{}};/*!
|
|
62
|
-
Copyright (c) 2018 Jed Watson.
|
|
63
|
-
Licensed under the MIT License (MIT), see
|
|
64
|
-
http://jedwatson.github.io/classnames
|
|
65
|
-
*/var cg;function FP(){return cg||(cg=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",l=0;l<arguments.length;l++){var c=arguments[l];c&&(o=s(o,i(c)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var l="";for(var c in o)e.call(o,c)&&o[c]&&(l=s(l,c));return l}function s(o,l){return l?o?o+" "+l:o+l:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(bc)),bc.exports}var WP=FP();const zP=Fc(WP),fg=10,HP=t=>t?.reduce((e,n,i)=>{if(i===0)return e;const s=Math.abs(n-t?.[i-1]);return Math.max(s,e)},0),UP=(t,e,n)=>{const{axis:i,left:s,top:o,right:l,bottom:c}=n??{},u=i==="x",h=u?s:o,d=u?l:c,p=t>h,_=t<d,v=e.indexOf(t)!==-1;return p&&_&&!v},VP=(t,e)=>{const n=t?.sort((c,u)=>c-u),i=HP(t)/10,s=t[0],o=(t.length+1)*fg;return[...Array(o)].map((c,u)=>{const h=s+(u-fg+1)*i;return parseFloat(h?.toFixed(1))})?.filter(c=>UP(c,n,e))},$P=t=>{const{chart:e,ctx:n}=t??{};if(!n||n?.canvas===null)return;const i=e?.config;if(!i?.options?.scales?.[t?.id]?.grid?.drawOnChartArea||i?.options?.indexAxis===t?.axis)return;const s=t?.axis==="x",o=t?.ticks?.map((c,u)=>t?.getPixelForTick(u))?.sort((c,u)=>c-u),l=VP(o,t);n?.save?.(),n.strokeStyle=i?._config?.options?.scales?.[t.id]?.grid?.color||"rgba(0,0,0,0.06)",n.lineWidth=.5,l?.forEach(c=>{if(n.beginPath(),s){const{top:u,bottom:h}=e?.chartArea??{};n?.moveTo?.(c,u),n?.lineTo?.(c,h)}else{const{left:u,right:h}=e?.chartArea??{};n?.moveTo?.(u,c),n?.lineTo?.(h,c)}n?.stroke?.()}),n?.restore?.()},GP={id:"minorGridlines",beforeDatasetsDraw:t=>{const{scales:e}=t??{};Object.keys(e)?.forEach(n=>$P(e?.[n]))}},Pn={ZERO:0,INITIAL:2,HOVERED:6,POINT_HOVERED:8},YP="rgba(0,0,0,0.1)",XP=[10,2],KP=12,Gp='"Roobert", "Noto Sans", sans-serif',Yp="hsl(60, 10.34482759%, 12.5%)",ug=12,qC=8,jC=4,ha="transparent",ZC=[1,10,100,1e3,1e4],qP=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac"],JC="99",jP=16777215,QC="auto",tk={NO:0,FAST:1e3},hg="new_chart",ZP="htmlLegend",JP=9,ek=1/10**JP,nk=[{offset:0,color:"rgba(144,238,144,0.8)"},{offset:.6,color:"rgba(255,255,224,0.8)"},{offset:.8,color:"rgba(255,255,224,0.8)"},{offset:.92,color:"rgba(255,182,193,0.5)"},{offset:.99,color:"rgba(255,182,193,0.8)"}];var cf=(t=>(t.X="x",t.Y="y",t))(cf||{}),Si=(t=>(t.Bottom="bottom",t.Top="top",t.Left="left",t.Right="right",t.TopRight="top-right",t.TopLeft="top-left",t.BottomLeft="bottom-left",t.BottomRight="bottom-right",t))(Si||{}),QP=(t=>(t.Line="line",t.Bar="bar",t))(QP||{}),ss=(t=>(t.Pointer="pointer",t.Initial="initial",t.Grab="grab",t.Grabbing="grabbing",t.Crosshair="crosshair",t.Move="move",t))(ss||{}),tC=(t=>(t.Category="category",t.Linear="linear",t.Logarithmic="logarithmic",t))(tC||{}),Xp=(t=>(t.Vertical="vertical",t))(Xp||{}),eC=(t=>(t.Y="yLabel",t.X="xLabel",t))(eC||{}),nC=(t=>(t.End="end",t.Start="start",t.Center="center",t.Right="right",t.Left="left",t))(nC||{}),iC=(t=>(t.Box="box",t.Ellipse="ellipse",t.Line="line",t.Text="text",t))(iC||{}),Kp=(t=>(t.Circle="circle",t.Square="rect",t.Diamond="rectRot",t.Triangle="triangle",t))(Kp||{}),sC=(t=>(t.Nearest="nearest",t))(sC||{}),rC=(t=>(t.X="x",t.Y="y",t.XY="xy",t.Z="z",t))(rC||{}),oC=(t=>(t.Shift="Shift",t))(oC||{}),aC=(t=>(t.Mousemove="mousemove",t.Mouseout="mouseout",t.Click="click",t.Touchstart="touchstart",t.Touchmove="touchmove",t.Dblclick="dblclick",t))(aC||{});const lC={id:"chartAreaBorder",beforeDraw(t,e,n){if(!t?.ctx||!t.chartArea)return;const{ctx:i,chartArea:s}=t??{},{left:o,top:l,width:c,height:u}=s??{};i?.save?.(),i.strokeStyle=n?.borderColor,i.lineWidth=n?.borderWidth,i?.setLineDash?.(n?.borderDash||[]),i.lineDashOffset=n?.borderDashOffset??0,i?.strokeRect?.(o,l,c,u),i?.restore?.()}},ik=(t,e)=>{let n=[];t?.showMinorGridlines&&n.push(GP);const i=e?.customLegend;return i?.customLegendPlugin&&i?.customLegendContainerID&&n.push({id:ZP,...e?.customLegend?.customLegendPlugin}),n.push(lC),n},cC=t=>{const e=`#${Math.floor(Math.random()*jP).toString(16)}`;return t.includes(e)?cC(t):(t.push(e),t)},sk=t=>t.title!==""?{display:!0,text:t?.title??""}:{},rk=t=>t===Xp.Vertical,ok=(t,e)=>{const[n,i]=t===cf.Y?[Si.Left,Si.Right]:[Si.Top,Si.Bottom];return e%2===0?n:i},ak=(t,e)=>{const{width:n,height:i,staticChartHeight:s=!1,squareAspectRatio:o=0}=t,l=o?e?.squareAspectRatio:"";let c="";return n||i?c="":c=s?e?.fixedHeight:e?.stretchHeight,zP(e?.chart,c,l)},lk=(t,e)=>{const{legend:n}=t||{};return{position:n?.position||Si.Top,display:n?.display,align:n?.align,labels:{boxHeight:ug,boxWidth:n?.usePointStyle?ug:void 0,usePointStyle:n?.usePointStyle},onClick:e}},ck=t=>{const{error:e=null}=t?.dataset?.data?.[t?.dataIndex]??{};return e?`Error: ${Rp(e,4)}`:""},fk=(t,e)=>{const n=t?.dataset?.data?.[t?.dataIndex]?.label,i=Array.isArray(n)?n?.join(" , "):n??"";return e&&i?.length?` (${i})`:""},fC=t=>t.toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,""),uk=t=>qn.isEmpty(t)||qn.isNil(t)?hg:t.map((e,n)=>fC(e.label??`${n}`)).join("_")||hg,hk=()=>{It.font.size=KP,It.font.family=Gp,It.color=Yp,It.borderColor=YP},dk=t=>t==="",uC="TOGGLE_DATA_VISIBILITY",hC="RESET_STATE",qp="SET_ANNOTATION",dC={datasets:[],annotation:[]},gC=(t,e)=>{switch(e.type){case qp:return{...t,annotation:e.payload};case hC:return e.payload;case uC:{const{chartInstance:n,dsConfig:i,annotationConfig:s}=e.payload,{datasetIndex:o,datasets:l,dataset:c}=i,{annotationIndex:u}=s,h=qn.cloneDeep(t),d=qn.defaultTo(n?.isDatasetVisible(o),!0);if(o>=0&&(n?.setDatasetVisibility(o,!d),qn.set(h,["datasets",o,"hidden"],d),c?.displayGroup)){const p=c.displayGroup;l.forEach((_,v)=>{_.displayGroup===p&&(n?.setDatasetVisibility(Number(v),!d),qn.set(h,["datasets",v,"hidden"],d))})}if(u>=0){const p=qn.findIndex(h.annotation,{annotationIndex:u});if(p>=0){const _=qn.defaultTo(h.annotation[p]?.display,!1);qn.set(h,["annotation",p,"display"],!_)}}return h}default:return t}};var pC=(t=>(t.MOUSEDOWN="mousedown",t.MOUSEMOVE="mousemove",t.MOUSEUP="mouseup",t))(pC||{}),Kt=(t=>(t.POINT="point",t.BOX="box",t.LINE="line",t.ELLIPSE="ellipse",t))(Kt||{}),mC=(t=>(t.X="x",t.Y="y",t.Both="both",t))(mC||{});const _C=(t,e,n)=>{e.canvas.style.cursor=ss.Pointer,t.options.scaleID?.includes(cf.X)&&t.options.label&&(t.options.label.xAdjust=e.chartArea.left),t.options.borderWidth=Pn.HOVERED,t.options.label&&(t.label.options.display=!0,t.options.label.enabled=!0),n?.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update("none")),e.draw()},bC=(t,e,n)=>{t.options.borderWidth=Pn.INITIAL,e.canvas.style.cursor=ss.Initial,e.hoveredAnnotationId=null,t.options.label&&(t.label.options.display=!1,t.options.label.enabled=!1),n?.enableDrag&&(e.hoveredAnnotationId=null,e.update("none")),e.draw()},xC=(t,e,n)=>{n?.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update("none"),t.options.borderWidth=Pn.HOVERED,e.canvas.style.cursor=ss.Pointer),e.draw()},yC=(t,e,n)=>{n?.enableDrag&&(e.hoveredAnnotationId=null,t.options.borderWidth=Pn.INITIAL,e.canvas.style.cursor=ss.Initial,e.update("none")),e.draw()},vC=(t,e,n)=>{n?.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update("none"),t.options.borderWidth=Pn.POINT_HOVERED,e.canvas.style.cursor=ss.Pointer),e.draw()},SC=(t,e,n)=>{n?.enableDrag&&(e.hoveredAnnotationId=null,t.options.borderWidth=Pn.INITIAL,e.canvas.style.cursor=ss.Initial,e.update("none")),e.draw()},wC=t=>t?.map((e,n)=>{const i=e?.annotationAxis??void 0,s=e?.color??qP[n],o=e?.type??Kt.LINE,l=e?.adjustScaleRange,c={[Kt.LINE]:s,[Kt.POINT]:s,[Kt.BOX]:s,[Kt.ELLIPSE]:ha}[o]||ha,u={[Kt.LINE]:Pn.INITIAL,[Kt.BOX]:Pn.ZERO,[Kt.POINT]:Pn.ZERO,[Kt.ELLIPSE]:e?.borderWidth??0}[o]??0,h=o===Kt.LINE?XP:void 0,d={content:e?.label,display:!0,font:{weight:"normal"}},p={[Kt.LINE]:{backgroundColor:s,content:e?.label,display:!1,position:Si.Top},[Kt.POINT]:{backgroundColor:e?.labelConfig?.backgroundColor??ha,content:e?.label,display:e?.labelConfig?.display??!!e?.label,position:e?.labelConfig?.position??Si.Bottom,color:e?.labelConfig?.color??Yp,font:e?.labelConfig?.font??`12px ${Gp}`,borderWidth:Pn.INITIAL,padding:5,borderRadius:3,borderColor:e?.labelConfig?.borderColor??ha},[Kt.BOX]:d,[Kt.ELLIPSE]:d}[o]||d,_=({element:A},{chart:D})=>{switch(o){case Kt.LINE:_C(A,D,e);break;case Kt.BOX:xC(A,D,e);break;case Kt.POINT:vC(A,D,e);break}},v=({element:A},{chart:D})=>{switch(o){case Kt.LINE:bC(A,D,e);break;case Kt.BOX:yC(A,D,e);break;case Kt.POINT:SC(A,D,e);break}},T=()=>(A,D)=>e?.onDragStart?e?.onDragStart(A,D):void 0,M=()=>(A,D)=>e?.onDrag?e?.onDrag(A,D):void 0,k=()=>(A,D)=>e?.onDragEnd?e?.onDragEnd(A,D):void 0;return{...e,display:e?.display,annotationIndex:n,id:`${e?.label}-${e?.value}-${n}`,scaleID:i,label:p,backgroundColor:s,borderColor:c,borderWidth:u,borderDash:h,type:o,adjustScaleRange:l,enter:_,leave:v,onDragStart:T,onDrag:M,onDragEnd:k,pointStyle:e?.pointStyle??Kp.Circle,resizable:e?.resizable??!0,displayDragCoordinates:e?.displayDragCoordinates??!0}}),jp=({showAnnotations:t,annotationsData:e})=>t&&e&&e?.length?wC(e)??[]:[],MC=(t,e)=>{const n=xe.useRef(null);xe.useEffect(()=>{const{showAnnotations:i=!0,annotationsData:s=[]}=t?.annotations??{},o=n.current;if(!o||o.showAnnotations!==i||!G2(o.annotationsData,s)){const c=jp({showAnnotations:i,annotationsData:s});e({type:qp,payload:c}),n.current={showAnnotations:i,annotationsData:s}}},[t,e])},TC=xe.createContext(void 0),PC=({children:t,options:e,datasets:n})=>{const{showAnnotations:i=!0,annotationsData:s=[]}=e?.annotations??{},o=n?.map((p,_)=>({[_]:{...p,hidden:!1}}))??[],l=jp({showAnnotations:i,annotationsData:s}),c={...dC,annotation:l,datasets:o},[u,h]=xe.useReducer(gC,c),d=xe.useMemo(()=>({state:u,dispatch:h}),[u,e,h]);return MC(e,h),Yy.jsx(TC.Provider,{value:d,children:t})};PC.__docgenInfo={description:"",methods:[],displayName:"LegendProvider",props:{children:{required:!0,tsType:{name:"ReactNode"},description:""},options:{required:!0,tsType:{name:"union",raw:`| ILineChartOptions
|
|
66
|
-
| IBarOptions
|
|
67
|
-
| IPieOptions
|
|
68
|
-
| IScatterOptions`,elements:[{name:"ILineChartOptions"},{name:"IBarOptions"},{name:"IPieOptions"},{name:"IScatterOptions"}]},description:""},datasets:{required:!1,tsType:{name:"Array",elements:[{name:"ICommonDataset"}],raw:"ICommonDataset[]"},description:""}}};export{XP as $,JC as A,YP as B,tf as C,KP as D,ef as E,DC as F,LC as G,zM as H,IC as I,OC as J,AC as K,ZC as L,EC as M,HC as N,UC as O,Si as P,$p as Q,qn as R,tC as S,jC as T,Gp as U,Yp as V,G2 as W,oC as X,rC as Y,dk as Z,Pn as _,QP as a,rP as a0,ek as a1,JP as a2,Kp as a3,aC as a4,Kt as a5,ss as a6,mC as a7,pC as a8,BC as a9,te as aA,Mh as aB,Bt as aC,Cv as aD,Ls as aE,fe as aF,yg as aG,It as aH,kn as aI,GC as aJ,Q2 as aK,KC as aL,zs as aM,XC as aN,Ia as aO,VC as aP,TC as aQ,uC as aR,lk as aS,ZP as aT,iC as aU,uk as aa,zP as ab,WC as ac,MM as ad,nk as ae,zC as af,_t as ag,qt as ah,ei as ai,Jn as aj,yc as ak,Br as al,Ge as am,Ut as an,Ma as ao,Ta as ap,Mi as aq,wv as ar,ba as as,Ds as at,ow as au,Hg as av,lt as aw,Zt as ax,it as ay,Vi as az,qP as b,ok as c,cf as d,nC as e,QC as f,cC as g,ck as h,rk as i,ug as j,qC as k,sC as l,fk as m,eC as n,YC as o,$C as p,sk as q,Rp as r,tk as s,PC as t,hk as u,ak as v,FC as w,ik as x,RC as y,RM as z};
|