@oliasoft-open-source/charts-library 5.1.4 → 5.1.6
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/index.js +32 -34
- package/package.json +1 -1
- package/dist/assets/Color-YHDXOIA2-Bw7frVc4.js +0 -1
- package/dist/assets/DocsRenderer-CFRXHY34-Ddfpn1tl.js +0 -580
- package/dist/assets/bar-chart-const-Cgj9sgUU.js +0 -1
- package/dist/assets/bar-chart.stories-BOmiGyRJ.js +0 -136
- package/dist/assets/chunk-XP5HYGXS-D5tuasO7.js +0 -1
- package/dist/assets/client-DnE3718B.js +0 -1
- package/dist/assets/entry-preview-C1S3a8Ki.js +0 -2
- package/dist/assets/entry-preview-docs-Cet2djRm.js +0 -46
- package/dist/assets/get-custom-legend-plugin-example-Bx2dNJXg.js +0 -1
- package/dist/assets/get-draggableData-DwR56Jcm.js +0 -2
- package/dist/assets/iframe-Bxryd8aq.js +0 -217
- package/dist/assets/index-BhTLYoCu.js +0 -24
- package/dist/assets/index-CgYGpm1H.js +0 -1
- package/dist/assets/index-DHw5ixvP.js +0 -1
- package/dist/assets/index-Dytf1aFS.js +0 -8
- package/dist/assets/index-YTOF1_EJ.js +0 -9
- package/dist/assets/index-uDG1oqxT.js +0 -1
- package/dist/assets/jsx-runtime-W3oueGCa.js +0 -9
- package/dist/assets/legend-context-C_u_4J2t.js +0 -68
- package/dist/assets/legend-oIKfg-IX.js +0 -1367
- package/dist/assets/line-chart-DRDZItEY.js +0 -6
- package/dist/assets/line-chart.stories-DW8IZszu.js +0 -1162
- package/dist/assets/line-chart.test-case.stories-BznLYsnQ.js +0 -430
- package/dist/assets/pie-chart.stories-BcF2NKWC.js +0 -45
- package/dist/assets/preview-Bnn3MLlY.js +0 -3
- package/dist/assets/preview-Cr9g82CZ.js +0 -2
- package/dist/assets/preview-DD_OYowb.js +0 -1
- package/dist/assets/react-18-BdgjDjvZ.js +0 -1
- package/dist/assets/scatter-chart.stories-qmWyacKn.js +0 -41
- package/dist/assets/test-utils-BBHUGUfi.js +0 -9
- package/dist/bar-chart/bar-chart-const.d.ts +0 -2
- package/dist/bar-chart/bar-chart-default-props.d.ts +0 -2
- package/dist/bar-chart/bar-chart.d.ts +0 -3
- package/dist/bar-chart/bar-chart.interface.d.ts +0 -96
- package/dist/bar-chart/utils/get-bar-chart-data-labels.d.ts +0 -10
- package/dist/bar-chart/utils/get-bar-chart-scales.d.ts +0 -3
- package/dist/bar-chart/utils/get-bar-chart-tooltips.d.ts +0 -6
- package/dist/bar-chart/utils/use-bar-chart-config.d.ts +0 -13
- package/dist/bar-chart/utils/use-bar-chart-options.d.ts +0 -55
- package/dist/common/common.interface.d.ts +0 -210
- package/dist/common/controls-portal.d.ts +0 -7
- package/dist/common/enums.d.ts +0 -10
- package/dist/common/helpers/chart-border-plugin.d.ts +0 -16
- package/dist/common/helpers/chart-consts.d.ts +0 -39
- package/dist/common/helpers/chart-utils.d.ts +0 -86
- package/dist/common/helpers/container.d.ts +0 -18
- package/dist/common/helpers/custom-format-number.d.ts +0 -1
- package/dist/common/helpers/download-pgn.d.ts +0 -3
- package/dist/common/helpers/enums.d.ts +0 -80
- package/dist/common/helpers/get-chart-annotation.d.ts +0 -91
- package/dist/common/helpers/get-custom-legend-plugin-example.d.ts +0 -8
- package/dist/common/helpers/get-draggableData.d.ts +0 -18
- package/dist/common/helpers/range/estimate-data-series-have-close-values.d.ts +0 -8
- package/dist/common/helpers/range/range.d.ts +0 -33
- package/dist/common/helpers/text.d.ts +0 -1
- package/dist/common/helpers/to-annotation.d.ts +0 -4
- package/dist/common/hooks/use-generated-labels.d.ts +0 -4
- package/dist/common/hooks/use-legend-state.d.ts +0 -28
- package/dist/common/hooks/use-legend.d.ts +0 -4
- package/dist/common/hooks/use-reset.d.ts +0 -3
- package/dist/common/legend-component/legend-dropzone.d.ts +0 -3
- package/dist/common/legend-component/legend-interface.d.ts +0 -48
- package/dist/common/legend-component/legend-item/LegendItemLine.d.ts +0 -5
- package/dist/common/legend-component/legend-item/legend-item.d.ts +0 -3
- package/dist/common/legend-component/legend-panel.d.ts +0 -3
- package/dist/common/legend-component/legend.d.ts +0 -3
- package/dist/common/legend-component/state/legend-action-types.d.ts +0 -2
- package/dist/common/legend-component/state/legend-context.d.ts +0 -14
- package/dist/common/legend-component/state/legend-state-reducer.d.ts +0 -27
- package/dist/common/legend-component/utils/create-style-object.d.ts +0 -27
- package/dist/common/legend-component/utils/get-generated-labels.d.ts +0 -2
- package/dist/common/plugins/annotation-dragger-plugin/annotation-dragger-plugin.d.ts +0 -15
- package/dist/common/plugins/annotation-dragger-plugin/enums.d.ts +0 -20
- package/dist/common/plugins/annotation-dragger-plugin/event-helpers.d.ts +0 -6
- package/dist/common/plugins/annotation-dragger-plugin/helpers.d.ts +0 -53
- package/dist/common/plugins/annotation-dragger-plugin/point-annotation-label.d.ts +0 -5
- package/dist/common/plugins/ellipsis-annotation-plugin/compute-ellipse-geometry.d.ts +0 -9
- package/dist/common/plugins/ellipsis-annotation-plugin/ellipsis-annotation-plugin.d.ts +0 -18
- package/dist/common/plugins/gradient-background-plugin/enums.d.ts +0 -10
- package/dist/common/plugins/gradient-background-plugin/gradient-background-plugin.d.ts +0 -2
- package/dist/favicon.svg +0 -1
- package/dist/iframe.html +0 -666
- package/dist/index.html +0 -149
- package/dist/index.json +0 -1
- package/dist/line-chart/constants/default-translations.d.ts +0 -25
- package/dist/line-chart/constants/line-chart-consts.d.ts +0 -13
- package/dist/line-chart/controls/axes-options/axes-options-interfaces.d.ts +0 -57
- package/dist/line-chart/controls/axes-options/axes-options.d.ts +0 -6
- package/dist/line-chart/controls/axes-options/axes-validation.d.ts +0 -8
- package/dist/line-chart/controls/controls-interfaces.d.ts +0 -20
- package/dist/line-chart/controls/controls.d.ts +0 -3
- package/dist/line-chart/controls/drag-options-interfaces.d.ts +0 -14
- package/dist/line-chart/controls/drag-options.d.ts +0 -23
- package/dist/line-chart/controls/line-options.d.ts +0 -19
- package/dist/line-chart/hooks/use-chart-functions.d.ts +0 -33
- package/dist/line-chart/hooks/use-chart-options.d.ts +0 -16
- package/dist/line-chart/hooks/use-chart-plugins.d.ts +0 -7
- package/dist/line-chart/hooks/use-chart-state.d.ts +0 -12
- package/dist/line-chart/hooks/use-toggle-handler.d.ts +0 -12
- package/dist/line-chart/initialize/config.d.ts +0 -12
- package/dist/line-chart/initialize/initialize-line-chart.d.ts +0 -12
- package/dist/line-chart/line-chart-get-default-props.d.ts +0 -2
- package/dist/line-chart/line-chart.d.ts +0 -3
- package/dist/line-chart/line-chart.interface.d.ts +0 -150
- package/dist/line-chart/plugins/chart-area-text-plugin.d.ts +0 -17
- package/dist/line-chart/plugins/line-chart.minor-gridlines-plugin.d.ts +0 -8
- package/dist/line-chart/plugins/plugin-constants.d.ts +0 -11
- package/dist/line-chart/plugins/plugins.interface.d.ts +0 -9
- package/dist/line-chart/state/action-types.d.ts +0 -12
- package/dist/line-chart/state/helpers.d.ts +0 -13
- package/dist/line-chart/state/initial-state.d.ts +0 -11
- package/dist/line-chart/state/line-chart-reducer.d.ts +0 -2
- package/dist/line-chart/state/manage-state-in-local-storage.d.ts +0 -15
- package/dist/line-chart/state/state.interfaces.d.ts +0 -26
- package/dist/line-chart/utils/axis-formatting/axis-formatting.d.ts +0 -2
- package/dist/line-chart/utils/axis-scales/axis-scales.d.ts +0 -9
- package/dist/line-chart/utils/check-custom-option/check-custom-option.d.ts +0 -12
- package/dist/line-chart/utils/datalabels-alignment/datalabels-alignment.interface.d.ts +0 -20
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-condition.d.ts +0 -8
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-data.d.ts +0 -11
- package/dist/line-chart/utils/datalabels-alignment/get-datalabels-position.d.ts +0 -6
- package/dist/line-chart/utils/enums.d.ts +0 -4
- package/dist/line-chart/utils/generate-line-chart-datasets.d.ts +0 -8
- package/dist/line-chart/utils/get-annotations-data.d.ts +0 -1
- package/dist/line-chart/utils/get-axes-data-from-metasets.d.ts +0 -1
- package/dist/line-chart/utils/get-axes-ranges-from-chart.d.ts +0 -9
- package/dist/line-chart/utils/get-axis-range-by-type.d.ts +0 -10
- package/dist/line-chart/utils/get-generated-labels.d.ts +0 -2
- package/dist/line-chart/utils/get-line-chart-data-labels.d.ts +0 -16
- package/dist/line-chart/utils/get-line-chart-scales.d.ts +0 -4
- package/dist/line-chart/utils/get-line-chart-tooltips.d.ts +0 -34
- package/dist/line-chart/utils/line-chart-utils.d.ts +0 -24
- package/dist/line-chart/utils/translations/get-translations.d.ts +0 -8
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/pie-chart/pie-chart-defalut-props.interface.d.ts +0 -50
- package/dist/pie-chart/pie-chart-get-default-props.d.ts +0 -3
- package/dist/pie-chart/pie-chart.d.ts +0 -3
- package/dist/pie-chart/pie-chart.interface.d.ts +0 -70
- package/dist/pie-chart/use-pie-chart-config.d.ts +0 -42
- package/dist/project.json +0 -1
- package/dist/sb-addons/actions-1/manager-bundle.js +0 -3
- package/dist/sb-addons/docs-2/manager-bundle.js +0 -242
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js +0 -5
- package/dist/sb-common-assets/favicon.svg +0 -1
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +0 -1051
- package/dist/sb-manager/globals-runtime.js +0 -41591
- package/dist/sb-manager/globals.js +0 -48
- package/dist/sb-manager/runtime.js +0 -12048
- package/dist/scatter-chart/hooks/use-scatter-chart-config.d.ts +0 -113
- package/dist/scatter-chart/scatter-chart-default-props.interface.d.ts +0 -71
- package/dist/scatter-chart/scatter-chart-get-default-props.d.ts +0 -3
- package/dist/scatter-chart/scatter-chart.d.ts +0 -3
- package/dist/scatter-chart/scatter-chart.interface.d.ts +0 -81
- package/dist/scatter-chart/utils/get-scales-config.d.ts +0 -49
- package/dist/scatter-chart/utils/get-tooltip-config.d.ts +0 -21
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var iv=Object.defineProperty;var sv=(t,e,n)=>e in t?iv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var j=(t,e,n)=>sv(t,typeof e!="symbol"?e+"":e,n);import{r as Ge,R as Tg,g as Pg,c as qo}from"./index-YTOF1_EJ.js";import{j as rv}from"./jsx-runtime-W3oueGCa.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 Zr(t){return t+.5|0}const vi=(t,e,n)=>Math.max(Math.min(t,n),e);function Er(t){return vi(Zr(t*2.55),0,255)}function Ti(t){return vi(Zr(t*255),0,255)}function Jn(t){return vi(Zr(t/2.55)/100,0,1)}function Eh(t){return vi(Zr(t*100),0,100)}const on={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},Ic=[..."0123456789ABCDEF"],ov=t=>Ic[t&15],av=t=>Ic[(t&240)>>4]+Ic[t&15],jo=t=>(t&240)>>4===(t&15),lv=t=>jo(t.r)&&jo(t.g)&&jo(t.b)&&jo(t.a);function cv(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&on[t[1]]*17,g:255&on[t[2]]*17,b:255&on[t[3]]*17,a:e===5?on[t[4]]*17:255}:(e===7||e===9)&&(n={r:on[t[1]]<<4|on[t[2]],g:on[t[3]]<<4|on[t[4]],b:on[t[5]]<<4|on[t[6]],a:e===9?on[t[7]]<<4|on[t[8]]:255})),n}const fv=(t,e)=>t<255?e(t):"";function uv(t){var e=lv(t)?ov:av;return t?"#"+e(t.r)+e(t.g)+e(t.b)+fv(t.a,e):void 0}const hv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Cg(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 dv(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 gv(t,e,n){const i=Cg(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 mv(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 Zc(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=mv(n,i,s,d,o),u=u*60+.5),[u|0,h||0,c]}function Jc(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(Ti)}function Qc(t,e,n){return Jc(Cg,t,e,n)}function pv(t,e,n){return Jc(gv,t,e,n)}function _v(t,e,n){return Jc(dv,t,e,n)}function kg(t){return(t%360+360)%360}function bv(t){const e=hv.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?Er(+e[5]):Ti(+e[5]));const s=kg(+e[2]),o=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?i=pv(s,o,l):e[1]==="hsv"?i=_v(s,o,l):i=Qc(s,o,l),{r:i[0],g:i[1],b:i[2],a:n}}function xv(t,e){var n=Zc(t);n[0]=kg(n[0]+e),n=Qc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function yv(t){if(!t)return;const e=Zc(t),n=e[0],i=Eh(e[1]),s=Eh(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${Jn(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const Ih={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"},Ah={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 vv(){const t={},e=Object.keys(Ah),n=Object.keys(Ih);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,Ih[o]);o=parseInt(Ah[l],16),t[c]=[o>>16&255,o>>8&255,o&255]}return t}let Zo;function Sv(t){Zo||(Zo=vv(),Zo.transparent=[0,0,0,0]);const e=Zo[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const wv=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Mv(t){const e=wv.exec(t);let n=255,i,s,o;if(e){if(e[7]!==i){const l=+e[7];n=e[8]?Er(l):vi(l*255,0,255)}return i=+e[1],s=+e[3],o=+e[5],i=255&(e[2]?Er(i):vi(i,0,255)),s=255&(e[4]?Er(s):vi(s,0,255)),o=255&(e[6]?Er(o):vi(o,0,255)),{r:i,g:s,b:o,a:n}}}function Tv(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Jn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const hc=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Ds=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Pv(t,e,n){const i=Ds(Jn(t.r)),s=Ds(Jn(t.g)),o=Ds(Jn(t.b));return{r:Ti(hc(i+n*(Ds(Jn(e.r))-i))),g:Ti(hc(s+n*(Ds(Jn(e.g))-s))),b:Ti(hc(o+n*(Ds(Jn(e.b))-o))),a:t.a+n*(e.a-t.a)}}function Jo(t,e,n){if(t){let i=Zc(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=Qc(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Eg(t,e){return t&&Object.assign(e||{},t)}function Oh(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=Ti(t[3]))):(e=Eg(t,{r:0,g:0,b:0,a:1}),e.a=Ti(e.a)),e}function Cv(t){return t.charAt(0)==="r"?Mv(t):bv(t)}class Ur{constructor(e){if(e instanceof Ur)return e;const n=typeof e;let i;n==="object"?i=Oh(e):n==="string"&&(i=cv(e)||Sv(e)||Cv(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Eg(this._rgb);return e&&(e.a=Jn(e.a)),e}set rgb(e){this._rgb=Oh(e)}rgbString(){return this._valid?Tv(this._rgb):void 0}hexString(){return this._valid?uv(this._rgb):void 0}hslString(){return this._valid?yv(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=Pv(this._rgb,e._rgb,n)),this}clone(){return new Ur(this.rgb)}alpha(e){return this._rgb.a=Ti(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Zr(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 Jo(this._rgb,2,e),this}darken(e){return Jo(this._rgb,2,-e),this}saturate(e){return Jo(this._rgb,1,e),this}desaturate(e){return Jo(this._rgb,1,-e),this}rotate(e){return xv(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 Yn(){}const kv=(()=>{let t=0;return()=>t++})();function yt(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 bt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Jt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function $e(t,e){return Jt(t)?t:e}function ft(t,e){return typeof t>"u"?e:t}const Ev=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Ig=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ot(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(bt(t))for(l=Object.keys(t),o=l.length,s=0;s<o;s++)e.call(n,t[l[s]],l[s])}function Ta(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 Pa(t){if(qt(t))return t.map(Pa);if(bt(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let s=0;for(;s<i;++s)e[n[s]]=Pa(t[n[s]]);return e}return t}function Ag(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Iv(t,e,n,i){if(!Ag(t))return;const s=e[t],o=n[t];bt(s)&&bt(o)?En(s,o,i):e[t]=Pa(o)}function En(t,e,n){const i=qt(e)?e:[e],s=i.length;if(!bt(t))return t;n=n||{};const o=n.merger||Iv;let l;for(let c=0;c<s;++c){if(l=i[c],!bt(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 Lr(t,e){return En(t,e,{merger:Av})}function Av(t,e,n){if(!Ag(t))return;const i=e[t],s=n[t];bt(i)&&bt(s)?Lr(i,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Pa(s))}const Dh={"":t=>t,x:t=>t.x,y:t=>t.y};function Ov(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 Dv(t){const e=Ov(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function ns(t,e){return(Dh[e]||(Dh[e]=Dv(e)))(t)}function tf(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Vr=t=>typeof t<"u",Ci=t=>typeof t=="function",Rh=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Rv(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ut=Math.PI,Ft=2*Ut,Lv=Ft+Ut,Ca=Number.POSITIVE_INFINITY,Nv=Ut/180,ee=Ut/2,Yi=Ut/4,Lh=Ut*2/3,Si=Math.log10,ln=Math.sign;function ts(t,e,n){return Math.abs(t-e)<n}function Nh(t){const e=Math.round(t);t=ts(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Si(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Bv(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 Fv(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Ws(t){return!Fv(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Wv(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Og(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 ti(t){return t*(Ut/180)}function zv(t){return t*(180/Ut)}function Bh(t){if(!Jt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Dg(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+=Ft),{angle:o,distance:s}}function Ac(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Hv(t,e){return(t-e+Lv)%Ft-Ut}function Pn(t){return(t%Ft+Ft)%Ft}function $r(t,e,n,i){const s=Pn(t),o=Pn(e),l=Pn(n),c=Pn(o-s),u=Pn(l-s),h=Pn(s-o),d=Pn(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 Uv(t){return pe(t,-32768,32767)}function ei(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function ef(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 Ji=(t,e,n,i)=>ef(t,n,i?s=>{const o=t[s][e];return o<n||o===n&&t[s+1][e]===n}:s=>t[s][e]<n),Vv=(t,e,n)=>ef(t,n,i=>t[i][e]>=n);function $v(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 Rg=["push","pop","shift","splice","unshift"];function Gv(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Rg.forEach(n=>{const i="_onData"+tf(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 Fh(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)&&(Rg.forEach(o=>{delete t[o]}),delete t._chartjs)}function Lg(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ng=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Bg(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,Ng.call(window,()=>{i=!1,t.apply(e,n)}))}}function Yv(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const nf=t=>t==="start"?"left":t==="end"?"right":"center",me=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Xv=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function Fg(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:m,max:_,minDefined:v,maxDefined:M}=l.getUserBounds();if(v){if(s=Math.min(Ji(u,d,m).lo,n?i:Ji(e,d,l.getPixelForValue(m)).lo),h){const T=u.slice(0,s+1).reverse().findIndex(k=>!yt(k[c.axis]));s-=Math.max(0,T)}s=pe(s,0,i-1)}if(M){let T=Math.max(Ji(u,l.axis,_,!0).hi+1,n?0:Ji(e,d,l.getPixelForValue(_),!0).hi+1);if(h){const k=u.slice(T-1).findIndex(A=>!yt(A[c.axis]));T+=Math.max(0,k)}o=pe(T,s,i)-s}else o=i-s}return{start:s,count:o}}function Wg(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 Qo=t=>t===0||t===1,Wh=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ft/n)),zh=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ft/n)+1,Nr={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*ee)+1,easeOutSine:t=>Math.sin(t*ee),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=>Qo(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=>Qo(t)?t:Wh(t,.075,.3),easeOutElastic:t=>Qo(t)?t:zh(t,.075,.3),easeInOutElastic(t){return Qo(t)?t:t<.5?.5*Wh(t*2,.1125,.45):.5+.5*zh(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-Nr.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?Nr.easeInBounce(t*2)*.5:Nr.easeOutBounce(t*2-1)*.5+.5};function sf(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Hh(t){return sf(t)?t:new Ur(t)}function dc(t){return sf(t)?t:new Ur(t).saturate(.5).darken(.1).hexString()}const Kv=["x","y","borderWidth","radius","tension"],qv=["color","borderColor","backgroundColor"];function jv(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:qv},numbers:{type:"number",properties:Kv}}),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 Zv(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Uh=new Map;function Jv(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Uh.get(n);return i||(i=new Intl.NumberFormat(t,e),Uh.set(n,i)),i}function Ra(t,e,n){return Jv(e,n).format(t)}const zg={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=Qv(t,n)}const l=Si(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),Ra(t,i,u)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Si(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?zg.numeric.call(this,t,e,n):""}};function Qv(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 rf={formatters:zg};function tS(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:rf.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 is=Object.create(null),Oc=Object.create(null);function Br(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 gc(t,e,n){return typeof e=="string"?En(Br(t,e),n):En(Br(t,""),e)}class eS{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)=>dc(s.backgroundColor),this.hoverBorderColor=(i,s)=>dc(s.borderColor),this.hoverColor=(i,s)=>dc(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 gc(this,e,n)}get(e){return Br(this,e)}describe(e,n){return gc(Oc,e,n)}override(e,n){return gc(is,e,n)}route(e,n,i,s){const o=Br(this,e),l=Br(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 bt(u)?Object.assign({},h,u):ft(u,h)},set(u){this[c]=u}}})}apply(e){e.forEach(n=>n(this))}}var At=new eS({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[jv,Zv,tS]);function nS(t){return!t||yt(t.size)||yt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Vh(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 Xi(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 $h(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Dc(t,e,n,i){Hg(t,e,n,i,null)}function Hg(t,e,n,i,s){let o,l,c,u,h,d,m,_;const v=e.pointStyle,M=e.rotation,T=e.radius;let k=(M||0)*Nv;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(T)||T<=0)){switch(t.beginPath(),v){default:s?t.ellipse(n,i,s/2,T,0,0,Ft):t.arc(n,i,T,0,Ft),t.closePath();break;case"triangle":d=s?s/2:T,t.moveTo(n+Math.sin(k)*d,i-Math.cos(k)*T),k+=Lh,t.lineTo(n+Math.sin(k)*d,i-Math.cos(k)*T),k+=Lh,t.lineTo(n+Math.sin(k)*d,i-Math.cos(k)*T),t.closePath();break;case"rectRounded":h=T*.516,u=T-h,l=Math.cos(k+Yi)*u,m=Math.cos(k+Yi)*(s?s/2-h:u),c=Math.sin(k+Yi)*u,_=Math.sin(k+Yi)*(s?s/2-h:u),t.arc(n-m,i-c,h,k-Ut,k-ee),t.arc(n+_,i-l,h,k-ee,k),t.arc(n+m,i+c,h,k,k+ee),t.arc(n-_,i+l,h,k+ee,k+Ut),t.closePath();break;case"rect":if(!M){u=Math.SQRT1_2*T,d=s?s/2:u,t.rect(n-d,i-u,2*d,2*u);break}k+=Yi;case"rectRot":m=Math.cos(k)*(s?s/2:T),l=Math.cos(k)*T,c=Math.sin(k)*T,_=Math.sin(k)*(s?s/2:T),t.moveTo(n-m,i-c),t.lineTo(n+_,i-l),t.lineTo(n+m,i+c),t.lineTo(n-_,i+l),t.closePath();break;case"crossRot":k+=Yi;case"cross":m=Math.cos(k)*(s?s/2:T),l=Math.cos(k)*T,c=Math.sin(k)*T,_=Math.sin(k)*(s?s/2:T),t.moveTo(n-m,i-c),t.lineTo(n+m,i+c),t.moveTo(n+_,i-l),t.lineTo(n-_,i+l);break;case"star":m=Math.cos(k)*(s?s/2:T),l=Math.cos(k)*T,c=Math.sin(k)*T,_=Math.sin(k)*(s?s/2:T),t.moveTo(n-m,i-c),t.lineTo(n+m,i+c),t.moveTo(n+_,i-l),t.lineTo(n-_,i+l),k+=Yi,m=Math.cos(k)*(s?s/2:T),l=Math.cos(k)*T,c=Math.sin(k)*T,_=Math.sin(k)*(s?s/2:T),t.moveTo(n-m,i-c),t.lineTo(n+m,i+c),t.moveTo(n+_,i-l),t.lineTo(n-_,i+l);break;case"line":l=s?s/2:Math.cos(k)*T,c=Math.sin(k)*T,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:T),i+Math.sin(k)*T);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function zs(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 La(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Na(t){t.restore()}function iS(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 sS(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 rS(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),yt(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 oS(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 aS(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Gr(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,rS(t,o),u=0;u<l.length;++u)h=l[u],o.backdrop&&aS(t,o.backdrop),c&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),yt(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,n,i,o.maxWidth)),t.fillText(h,n,i,o.maxWidth),oS(t,n,i,h,o),i+=Number(s.lineHeight);t.restore()}function ka(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,ee,!0),t.lineTo(n+s-l.bottomRight,i+o),t.arc(n+s-l.bottomRight,i+o-l.bottomRight,l.bottomRight,ee,0,!0),t.lineTo(n+s,i+l.topRight),t.arc(n+s-l.topRight,i+l.topRight,l.topRight,0,-ee,!0),t.lineTo(n+l.topLeft,i)}const lS=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,cS=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function fS(t,e){const n=(""+t).match(lS);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 uS=t=>+t||0;function of(t,e){const n={},i=bt(e),s=i?Object.keys(e):e,o=bt(t)?i?l=>ft(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of s)n[l]=uS(o(l));return n}function Ug(t){return of(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Bs(t){return of(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ye(t){const e=Ug(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ue(t,e){t=t||{},e=e||At.font;let n=ft(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=ft(t.style,e.style);i&&!(""+i).match(cS)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:ft(t.family,e.family),lineHeight:fS(ft(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:ft(t.weight,e.weight),string:""};return s.string=nS(s),s}function Nt(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 hS(t,e,n){const{min:i,max:s}=t,o=Ig(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 rs(t,e){return Object.assign(Object.create(t),e)}function af(t,e=[""],n,i,s=()=>t[0]){const o=n||t;typeof i>"u"&&(i=Yg("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:s,override:c=>af([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 $g(c,u,()=>yS(u,e,t,c))},getOwnPropertyDescriptor(c,u){return Reflect.getOwnPropertyDescriptor(c._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(c,u){return Yh(c).includes(u)},ownKeys(c){return Yh(c)},set(c,u,h){const d=c._storage||(c._storage=s());return c[u]=d[u]=h,delete c._keys,!0}})}function Hs(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Vg(t,i),setContext:o=>Hs(t,o,n,i),override:o=>Hs(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 $g(o,l,()=>gS(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 Vg(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:Ci(n)?n:()=>n,isIndexable:Ci(i)?i:()=>i}}const dS=(t,e)=>t?t+tf(e):e,lf=(t,e)=>bt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function $g(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function gS(t,e,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:l}=t;let c=i[e];return Ci(c)&&l.isScriptable(e)&&(c=mS(e,c,t,n)),qt(c)&&c.length&&(c=pS(e,c,t,l.isIndexable)),lf(e,c)&&(c=Hs(c,s,o&&o[e],l)),c}function mS(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),lf(t,u)&&(u=cf(s._scopes,s,t,u)),u}function pS(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(bt(e[0])){const u=e,h=s._scopes.filter(d=>d!==u);e=[];for(const d of u){const m=cf(h,s,t,d);e.push(Hs(m,o,l&&l[t],c))}}return e}function Gg(t,e,n){return Ci(t)?t(e,n):t}const _S=(t,e)=>t===!0?e:typeof t=="string"?ns(e,t):void 0;function bS(t,e,n,i,s){for(const o of e){const l=_S(n,o);if(l){t.add(l);const c=Gg(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 cf(t,e,n,i){const s=e._rootScopes,o=Gg(e._fallback,n,i),l=[...t,...s],c=new Set;c.add(i);let u=Gh(c,l,n,o||n,i);return u===null||typeof o<"u"&&o!==n&&(u=Gh(c,l,o,u,i),u===null)?!1:af(Array.from(c),[""],s,o,()=>xS(e,n,i))}function Gh(t,e,n,i,s){for(;n;)n=bS(t,e,n,i,s);return n}function xS(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return qt(s)&&bt(n)?n:s||{}}function yS(t,e,n,i){let s;for(const o of e)if(s=Yg(dS(o,t),n),typeof s<"u")return lf(t,s)?cf(n,i,t,s):s}function Yg(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function Yh(t){let e=t._keys;return e||(e=t._keys=vS(t._scopes)),e}function vS(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 SS=Number.EPSILON||1e-14,Us=(t,e)=>e<t.length&&!t[e].skip&&t[e],Xg=t=>t==="x"?"y":"x";function wS(t,e,n,i){const s=t.skip?e:t,o=e,l=n.skip?e:n,c=Ac(o,s),u=Ac(l,o);let h=c/(c+u),d=u/(c+u);h=isNaN(h)?0:h,d=isNaN(d)?0:d;const m=i*h,_=i*d;return{previous:{x:o.x-m*(l.x-s.x),y:o.y-m*(l.y-s.y)},next:{x:o.x+_*(l.x-s.x),y:o.y+_*(l.y-s.y)}}}function MS(t,e,n){const i=t.length;let s,o,l,c,u,h=Us(t,0);for(let d=0;d<i-1;++d)if(u=h,h=Us(t,d+1),!(!u||!h)){if(ts(e[d],0,SS)){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 TS(t,e,n="x"){const i=Xg(n),s=t.length;let o,l,c,u=Us(t,0);for(let h=0;h<s;++h){if(l=c,c=u,u=Us(t,h+1),!c)continue;const d=c[n],m=c[i];l&&(o=(d-l[n])/3,c[`cp1${n}`]=d-o,c[`cp1${i}`]=m-o*e[h]),u&&(o=(u[n]-d)/3,c[`cp2${n}`]=d+o,c[`cp2${i}`]=m+o*e[h])}}function PS(t,e="x"){const n=Xg(e),i=t.length,s=Array(i).fill(0),o=Array(i);let l,c,u,h=Us(t,0);for(l=0;l<i;++l)if(c=u,u=h,h=Us(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?ln(s[l-1])!==ln(s[l])?0:(s[l-1]+s[l])/2:s[l-1]:s[l]}MS(t,s,o),TS(t,o,e)}function ta(t,e,n){return Math.max(Math.min(t,n),e)}function CS(t,e){let n,i,s,o,l,c=zs(t[0],e);for(n=0,i=t.length;n<i;++n)l=o,o=c,c=n<i-1&&zs(t[n+1],e),o&&(s=t[n],l&&(s.cp1x=ta(s.cp1x,e.left,e.right),s.cp1y=ta(s.cp1y,e.top,e.bottom)),c&&(s.cp2x=ta(s.cp2x,e.left,e.right),s.cp2y=ta(s.cp2y,e.top,e.bottom)))}function kS(t,e,n,i,s){let o,l,c,u;if(e.spanGaps&&(t=t.filter(h=>!h.skip)),e.cubicInterpolationMode==="monotone")PS(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=wS(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&&CS(t,n)}function ff(){return typeof window<"u"&&typeof document<"u"}function uf(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Ea(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 Ba=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function ES(t,e){return Ba(t).getPropertyValue(e)}const IS=["top","right","bottom","left"];function es(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=IS[s];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const AS=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function OS(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:o}=i;let l=!1,c,u;if(AS(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 Cn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Ba(n),o=s.boxSizing==="border-box",l=es(s,"padding"),c=es(s,"border","width"),{x:u,y:h,box:d}=OS(t,n),m=l.left+(d&&c.left),_=l.top+(d&&c.top);let{width:v,height:M}=e;return o&&(v-=l.width+c.width,M-=l.height+c.height),{x:Math.round((u-m)/v*n.width/i),y:Math.round((h-_)/M*n.height/i)}}function DS(t,e,n){let i,s;if(e===void 0||n===void 0){const o=t&&uf(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const l=o.getBoundingClientRect(),c=Ba(o),u=es(c,"border","width"),h=es(c,"padding");e=l.width-h.width-u.width,n=l.height-h.height-u.height,i=Ea(c.maxWidth,o,"clientWidth"),s=Ea(c.maxHeight,o,"clientHeight")}}return{width:e,height:n,maxWidth:i||Ca,maxHeight:s||Ca}}const ea=t=>Math.round(t*10)/10;function RS(t,e,n,i){const s=Ba(t),o=es(s,"margin"),l=Ea(s.maxWidth,t,"clientWidth")||Ca,c=Ea(s.maxHeight,t,"clientHeight")||Ca,u=DS(t,e,n);let{width:h,height:d}=u;if(s.boxSizing==="content-box"){const _=es(s,"border","width"),v=es(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=ea(Math.min(h,l,u.maxWidth)),d=ea(Math.min(d,c,u.maxHeight)),h&&!d&&(d=ea(h/2)),(e!==void 0||n!==void 0)&&i&&u.height&&d>u.height&&(d=u.height,h=ea(Math.floor(d*i))),{width:h,height:d}}function Xh(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 LS=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ff()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Kh(t,e){const n=ES(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ji(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function NS(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 BS(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},l=ji(t,s,n),c=ji(s,o,n),u=ji(o,e,n),h=ji(l,c,n),d=ji(c,u,n);return ji(h,d,n)}const FS=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}}},WS=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Fs(t,e,n){return t?FS(e,n):WS()}function Kg(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 qg(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function jg(t){return t==="angle"?{between:$r,compare:Hv,normalize:Pn}:{between:ei,compare:(e,n)=>e-n,normalize:e=>e}}function qh({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 zS(t,e,n){const{property:i,start:s,end:o}=n,{between:l,normalize:c}=jg(i),u=e.length;let{start:h,end:d,loop:m}=t,_,v;if(m){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:m,style:t.style}}function Zg(t,e,n){if(!n)return[t];const{property:i,start:s,end:o}=n,l=e.length,{compare:c,between:u,normalize:h}=jg(i),{start:d,end:m,loop:_,style:v}=zS(t,e,n),M=[];let T=!1,k=null,A,R,W;const z=()=>u(s,W,A)&&c(s,W)!==0,L=()=>c(o,A)===0||u(o,W,A),Y=()=>T||z(),V=()=>!T||L();for(let G=d,J=d;G<=m;++G)R=e[G%l],!R.skip&&(A=h(R[i]),A!==W&&(T=u(A,s,o),k===null&&Y()&&(k=c(A,s)===0?G:J),k!==null&&V()&&(M.push(qh({start:k,end:G,loop:_,count:l,style:v})),k=null),J=G,W=A));return k!==null&&M.push(qh({start:k,end:m,loop:_,count:l,style:v})),M}function Jg(t,e){const n=[],i=t.segments;for(let s=0;s<i.length;s++){const o=Zg(i[s],t.points,e);o.length&&n.push(...o)}return n}function HS(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 US(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 VS(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const o=!!t._loop,{start:l,end:c}=HS(n,s,o,i);if(i===!0)return jh(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 jh(t,US(n,l,u,h),n,e)}function jh(t,e,n,i){return!i||!i.setContext||!n?e:$S(t,e,n,i)}function $S(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,m=e[0].start,_=m;function v(M,T,k,A){const R=c?-1:1;if(M!==T){for(M+=u;n[M%u].skip;)M-=R;for(;n[T%u].skip;)T+=R;M%u!==T%u&&(h.push({start:M%u,end:T%u,loop:k,style:A}),d=A,m=T%u)}}for(const M of e){m=c?m:M.start;let T=n[m%u],k;for(_=m+1;_<=M.end;_++){const A=n[_%u];k=Zh(i.setContext(rs(s,{type:"segment",p0:T,p1:A,p0DataIndex:(_-1)%u,p1DataIndex:_%u,datasetIndex:l}))),GS(k,d)&&v(m,_-1,M.loop,d),T=A,d=k}m<_-1&&v(m,_-1,M.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 GS(t,e){if(!e)return!1;const n=[],i=function(s,o){return sf(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function na(t,e,n){return t.options.clip?t[n]:e[n]}function YS(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:na(n,e,"left"),right:na(n,e,"right"),top:na(i,e,"top"),bottom:na(i,e,"bottom")}:e}function Qg(t,e){const n=e._clip;if(n.disabled)return!1;const i=YS(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 XS{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=Ng.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 Kn=new XS;const Jh="transparent",KS={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Hh(t||Jh),s=i.valid&&Hh(e||Jh);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class qS{constructor(e,n,i,s){const o=n[i];s=Nt([e.to,s,o,e.from]);const l=Nt([e.from,o,s]);this._active=!0,this._fn=e.fn||KS[e.type||typeof l],this._easing=Nr[e.easing]||Nr.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=Nt([e.to,n,s,e.from]),this._from=Nt([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 tm{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!bt(e))return;const n=Object.keys(At.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!bt(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=ZS(e,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&jS(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 m=o[h];const _=i.get(h);if(m)if(_&&m.active()){m.update(_,d,c);continue}else m.cancel();if(!_||!_.duration){e[h]=d;continue}o[h]=m=new qS(_,e,h,d),s.push(m)}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 Kn.add(this._chart,i),!0}}function jS(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 ZS(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 Qh(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 JS(t,e,n){if(n===!1)return!1;const i=Qh(t,n),s=Qh(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function QS(t){let e,n,i,s;return bt(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 em(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 td(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],Jt(h)&&(o||e===0||ln(e)===ln(h))&&(e+=h)}return!d&&!i.all?0:e}function tw(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 mc(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function ew(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function nw(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 iw(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function ed(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 nd(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=ew(o,l,i),m=e.length;let _;for(let v=0;v<m;++v){const M=e[v],{[u]:T,[h]:k}=M,A=M._stacks||(M._stacks={});_=A[h]=iw(s,d,T),_[c]=k,_._top=ed(_,l,!0,i.type),_._bottom=ed(_,l,!1,i.type);const R=_._visualValues||(_._visualValues={});R[c]=k}}function pc(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function sw(t,e){return rs(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function rw(t,e,n){return rs(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function wr(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 _c=t=>t==="reset"||t==="none",id=(t,e)=>e?t:Object.assign({},t),ow=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:em(n,!0),values:null};class Pi{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=mc(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&&wr(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(m,_,v,M)=>m==="x"?_:m==="r"?M:v,o=n.xAxisID=ft(i.xAxisID,pc(e,"x")),l=n.yAxisID=ft(i.yAxisID,pc(e,"y")),c=n.rAxisID=ft(i.rAxisID,pc(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&&Fh(this._data,this),e._stacked&&wr(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(bt(n)){const s=this._cachedMeta;this._data=tw(n,s)}else if(i!==n){if(i){Fh(i,this);const s=this._cachedMeta;wr(s),s._parsed=[]}n&&Object.isExtensible(n)&&Gv(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=mc(n.vScale,n),n.stack!==i.stack&&(s=!0,wr(n),n.stack=i.stack),this._resyncElements(e),(s||o!==n._stacked)&&(nd(this,n._parsed),n._stacked=mc(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,m,_;if(this._parsing===!1)i._parsed=s,i._sorted=!0,_=s;else{qt(s[e])?_=this.parseArrayData(i,s,e,n):bt(s[e])?_=this.parseObjectData(i,s,e,n):_=this.parsePrimitiveData(i,s,e,n);const v=()=>m[c]===null||h&&m[c]<h[c];for(d=0;d<n;++d)i._parsed[d+e]=m=_[d],u&&(v()&&(u=!1),h=m);i._sorted=u}l&&nd(this,_)}parsePrimitiveData(e,n,i,s){const{iScale:o,vScale:l}=e,c=o.axis,u=l.axis,h=o.getLabels(),d=o===l,m=new Array(s);let _,v,M;for(_=0,v=s;_<v;++_)M=_+i,m[_]={[c]:d||o.parse(h[M],M),[u]:l.parse(n[M],M)};return m}parseArrayData(e,n,i,s){const{xScale:o,yScale:l}=e,c=new Array(s);let u,h,d,m;for(u=0,h=s;u<h;++u)d=u+i,m=n[d],c[u]={x:o.parse(m[0],d),y:l.parse(m[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,m,_,v;for(d=0,m=s;d<m;++d)_=d+i,v=n[_],h[d]={x:o.parse(ns(v,c),_),y:l.parse(ns(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:em(s,!0),values:n._stacks[e.axis]._visualValues};return td(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=td(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=ow(n,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:m}=nw(c);let _,v;function M(){v=s[_];const T=v[c.axis];return!Jt(v[e.axis])||d>T||m<T}for(_=0;_<l&&!(!M()&&(this.updateRangeFromParsed(h,e,v,u),o));++_);if(o){for(_=l-1;_>=0;--_)if(!M()){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],Jt(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=QS(ft(this.options.clip,JS(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 m=s[d];m.hidden||(m.active&&h?l.push(m):m.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=rw(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=sw(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&&Vr(i);if(c)return id(c,u);const h=this.chart.config,d=h.datasetElementScopeKeys(this._type,e),m=s?[`${e}Hover`,"hover",e,""]:[e,""],_=h.getOptionScopes(this.getDataset(),d),v=Object.keys(At.elements[e]),M=()=>this.getContext(i,s,n),T=h.resolveNamedOptions(_,v,M,m);return T.$shared&&(T.$shared=u,o[l]=Object.freeze(id(T,u))),T}_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,m=d.datasetAnimationScopeKeys(this._type,n),_=d.getOptionScopes(this.getDataset(),m);u=d.createResolver(_,this.getContext(e,i,n))}const h=new tm(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||_c(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){_c(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!_c(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&&wr(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])}}j(Pi,"defaults",{}),j(Pi,"datasetElementType",null),j(Pi,"dataElementType",null);function aw(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=Lg(i.sort((s,o)=>s-o))}return t._cache.$bar}function lw(t){const e=t.iScale,n=aw(e,t.type);let i=e._length,s,o,l,c;const u=()=>{l===32767||l===-32768||(Vr(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 cw(t,e,n,i){const s=n.barThickness;let o,l;return yt(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 fw(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 uw(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 nm(t,e,n,i){return qt(t)?uw(t,e,n,i):e[n.axis]=n.parse(t,i),e}function sd(t,e,n,i){const s=t.iScale,o=t.vScale,l=s.getLabels(),c=s===o,u=[];let h,d,m,_;for(h=n,d=n+i;h<d;++h)_=e[h],m={},m[s.axis]=c||s.parse(l[h],h),u.push(nm(_,m,o,h));return u}function bc(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function hw(t,e,n){return t!==0?ln(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function dw(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 gw(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}=dw(t);s==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=h:(n._bottom||0)===i?s=d:(o[rd(d,l,c,u)]=!0,s=h)),o[rd(s,l,c,u)]=!0,t.borderSkipped=o}function rd(t,e,n,i){return i?(t=mw(t,e,n),t=od(t,n,e)):t=od(t,e,n),t}function mw(t,e,n){return t===e?n:t===n?e:t}function od(t,e,n){return t==="start"?e:t==="end"?n:t}function pw(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class ba extends Pi{parsePrimitiveData(e,n,i,s){return sd(e,n,i,s)}parseArrayData(e,n,i,s){return sd(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,m=[];let _,v,M,T;for(_=i,v=i+s;_<v;++_)T=n[_],M={},M[o.axis]=o.parse(ns(T,h),_),m.push(nm(ns(T,d),M,l,_));return m}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=bc(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:m,includeOptions:_}=this._getSharedOptions(n,s);for(let v=n;v<n+i;v++){const M=this.getParsed(v),T=o||yt(M[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(v),k=this._calculateBarIndexPixels(v,d),A=(M._stacks||{})[c.axis],R={horizontal:h,base:T.base,enableBorderRadius:!A||bc(M._custom)||l===A._top||l===A._bottom,x:h?T.head:k.center,y:h?k.center:T.head,height:h?k.size:Math.abs(T.size),width:h?Math.abs(T.size):k.size};_&&(R.options=m||this.resolveDataElementOptions(v,e[v].active?"active":s));const W=R.options||e[v].options;gw(R,W,A,l),pw(R,W,d.ratio),this.updateElement(e[v],v,R,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 m=d._parsed.find(v=>v[i.axis]===u),_=m&&m[d.vScale.axis];if(yt(_)||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||lw(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=bc(h);let m=u[n.axis],_=0,v=i?this.applyStack(n,u,i):m,M,T;v!==m&&(_=v-m,v=m),d&&(m=h.barStart,v=h.barEnd-h.barStart,m!==0&&ln(m)!==ln(h.barEnd)&&(_=0),_+=m);const k=!yt(o)&&!d?o:_;let A=n.getPixelForValue(k);if(this.chart.getDataVisibility(e)?M=n.getPixelForValue(_+v):M=A,T=M-A,Math.abs(T)<l){T=hw(T,n,c)*l,m===c&&(A-=T/2);const R=n.getPixelForDecimal(0),W=n.getPixelForDecimal(1),z=Math.min(R,W),L=Math.max(R,W);A=Math.max(Math.min(A,L),z),M=A+T,i&&!d&&(u._stacks[n.axis]._visualValues[s]=n.getValueForPixel(M)-n.getValueForPixel(A))}if(A===n.getPixelForValue(c)){const R=ln(T)*n.getLineWidthForValue(c)/2;A+=R,T-=R}return{size:T,base:A,head:M,center:M+T/2}}_calculateBarIndexPixels(e,n){const i=n.scale,s=this.options,o=s.skipNull,l=ft(s.maxBarThickness,1/0);let c,u;if(n.grouped){const h=o?this._getStackCount(e):n.stackCount,d=s.barThickness==="flex"?fw(e,n,s,h):cw(e,n,s,h),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);c=d.start+d.chunk*m+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)}}j(ba,"id","bar"),j(ba,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),j(ba,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function _w(t,e,n){let i=1,s=1,o=0,l=0;if(e<Ft){const c=t,u=c+e,h=Math.cos(c),d=Math.sin(c),m=Math.cos(u),_=Math.sin(u),v=(W,z,L)=>$r(W,c,u,!0)?1:Math.max(z,z*n,L,L*n),M=(W,z,L)=>$r(W,c,u,!0)?-1:Math.min(z,z*n,L,L*n),T=v(0,h,m),k=v(ee,d,_),A=M(Ut,h,m),R=M(Ut+ee,d,_);i=(T-A)/2,s=(k-R)/2,o=-(T+A)/2,l=-(k+R)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:l}}class Ir extends Pi{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(bt(i[e])){const{key:u="value"}=this._parsing;o=h=>+ns(i[h],u)}let l,c;for(l=e,c=e+n;l<c;++l)s._parsed[l]=o(l)}}_getRotation(){return ti(this.options.rotation-90)}_getCircumference(){return ti(this.options.circumference)}_getRotationExtents(){let e=Ft,n=-Ft;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(Ev(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:d,rotation:m}=this._getRotationExtents(),{ratioX:_,ratioY:v,offsetX:M,offsetY:T}=_w(m,d,u),k=(i.width-l)/_,A=(i.height-l)/v,R=Math.max(Math.min(k,A)/2,0),W=Ig(this.options.radius,R),z=Math.max(W*u,0),L=(W-z)/this._getVisibleDatasetWeightTotal();this.offsetX=M*W,this.offsetY=T*W,s.total=this.calculateTotal(),this.outerRadius=W-L*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-L*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/Ft)}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,m=(c.top+c.bottom)/2,_=o&&h.animateScale,v=_?0:this.innerRadius,M=_?0:this.outerRadius,{sharedOptions:T,includeOptions:k}=this._getSharedOptions(n,s);let A=this._getRotation(),R;for(R=0;R<n;++R)A+=this._circumference(R,o);for(R=n;R<n+i;++R){const W=this._circumference(R,o),z=e[R],L={x:d+this.offsetX,y:m+this.offsetY,startAngle:A,endAngle:A+W,circumference:W,outerRadius:M,innerRadius:v};k&&(L.options=T||this.resolveDataElementOptions(R,z.active?"active":s)),A+=W,this.updateElement(z,R,L,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)?Ft*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=Ra(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(ft(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}j(Ir,"id","doughnut"),j(Ir,"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"}),j(Ir,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),j(Ir,"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()}}}});class xa extends Pi{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}=Fg(n,s,l);this._drawStart=c,this._drawCount=u,Wg(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:m}=this._getSharedOptions(n,s),_=l.axis,v=c.axis,{spanGaps:M,segment:T}=this.options,k=Ws(M)?M:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||o||s==="none",R=n+i,W=e.length;let z=n>0&&this.getParsed(n-1);for(let L=0;L<W;++L){const Y=e[L],V=A?Y:{};if(L<n||L>=R){V.skip=!0;continue}const G=this.getParsed(L),J=yt(G[v]),rt=V[_]=l.getPixelForValue(G[_],L),et=V[v]=o||J?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,G,u):G[v],L);V.skip=isNaN(rt)||isNaN(et)||J,V.stop=L>0&&Math.abs(G[_]-z[_])>k,T&&(V.parsed=G,V.raw=h.data[L]),m&&(V.options=d||this.resolveDataElementOptions(L,Y.active?"active":s)),A||this.updateElement(Y,L,V,s),z=G}}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()}}j(xa,"id","line"),j(xa,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),j(xa,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Rc extends Ir{}j(Rc,"id","pie"),j(Rc,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ya extends Pi{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}=Fg(n,i,s);if(this._drawStart=o,this._drawCount=l,Wg(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),m=this.getSharedOptions(d),_=this.includeOptions(s,m),v=l.axis,M=c.axis,{spanGaps:T,segment:k}=this.options,A=Ws(T)?T:Number.POSITIVE_INFINITY,R=this.chart._animationsDisabled||o||s==="none";let W=n>0&&this.getParsed(n-1);for(let z=n;z<n+i;++z){const L=e[z],Y=this.getParsed(z),V=R?L:{},G=yt(Y[M]),J=V[v]=l.getPixelForValue(Y[v],z),rt=V[M]=o||G?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,Y,u):Y[M],z);V.skip=isNaN(J)||isNaN(rt)||G,V.stop=z>0&&Math.abs(Y[v]-W[v])>A,k&&(V.parsed=Y,V.raw=h.data[z]),_&&(V.options=m||this.resolveDataElementOptions(z,L.active?"active":s)),R||this.updateElement(L,z,V,s),W=Y}this.updateSharedOptions(m,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}}j(ya,"id","scatter"),j(ya,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),j(ya,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function Ki(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hf{constructor(e){j(this,"options");this.options=e||{}}static override(e){Object.assign(hf.prototype,e)}init(){}formats(){return Ki()}parse(){return Ki()}format(){return Ki()}add(){return Ki()}diff(){return Ki()}startOf(){return Ki()}endOf(){return Ki()}}var bw={_date:hf};function xw(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?Vv:Ji;if(i){if(s._sharedOptions){const d=o[0],m=typeof d.getRange=="function"&&d.getRange(e);if(m){const _=h(o,e,n-m),v=h(o,e,n+m);return{lo:_.lo,hi:v.hi}}}}else{const d=h(o,e,n);if(u){const{vScale:m}=s._cachedMeta,{_parsed:_}=t,v=_.slice(0,d.lo+1).reverse().findIndex(T=>!yt(T[m.axis]));d.lo-=Math.max(0,v);const M=_.slice(d.hi).findIndex(T=>!yt(T[m.axis]));d.hi+=Math.max(0,M)}return d}}return{lo:0,hi:o.length-1}}function Fa(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:m,hi:_}=xw(o[c],e,l,s);for(let v=m;v<=_;++v){const M=d[v];M.skip||i(M,h,v)}}}function yw(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 xc(t,e,n,i,s){const o=[];return!s&&!t.isPointInArea(e)||Fa(t,n,e,function(c,u,h){!s&&!zs(c,t.chartArea,0)||c.inRange(e.x,e.y,i)&&o.push({element:c,datasetIndex:u,index:h})},!0),o}function vw(t,e,n,i){let s=[];function o(l,c,u){const{startAngle:h,endAngle:d}=l.getProps(["startAngle","endAngle"],i),{angle:m}=Dg(l,{x:e.x,y:e.y});$r(m,h,d)&&s.push({element:l,datasetIndex:c,index:u})}return Fa(t,n,e,o),s}function Sw(t,e,n,i,s,o){let l=[];const c=yw(n);let u=Number.POSITIVE_INFINITY;function h(d,m,_){const v=d.inRange(e.x,e.y,s);if(i&&!v)return;const M=d.getCenterPoint(s);if(!(!!o||t.isPointInArea(M))&&!v)return;const k=c(e,M);k<u?(l=[{element:d,datasetIndex:m,index:_}],u=k):k===u&&l.push({element:d,datasetIndex:m,index:_})}return Fa(t,n,e,h),l}function yc(t,e,n,i,s,o){return!o&&!t.isPointInArea(e)?[]:n==="r"&&!i?vw(t,e,n,s):Sw(t,e,n,i,s,o)}function ad(t,e,n,i,s){const o=[],l=n==="x"?"inXRange":"inYRange";let c=!1;return Fa(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 ww={modes:{index(t,e,n,i){const s=Cn(e,t),o=n.axis||"x",l=n.includeInvisible||!1,c=n.intersect?xc(t,s,o,i,l):yc(t,s,o,!1,i,l),u=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{const d=c[0].index,m=h.data[d];m&&!m.skip&&u.push({element:m,datasetIndex:h.index,index:d})}),u):[]},dataset(t,e,n,i){const s=Cn(e,t),o=n.axis||"xy",l=n.includeInvisible||!1;let c=n.intersect?xc(t,s,o,i,l):yc(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=Cn(e,t),o=n.axis||"xy",l=n.includeInvisible||!1;return xc(t,s,o,i,l)},nearest(t,e,n,i){const s=Cn(e,t),o=n.axis||"xy",l=n.includeInvisible||!1;return yc(t,s,o,n.intersect,i,l)},x(t,e,n,i){const s=Cn(e,t);return ad(t,s,"x",n.intersect,i)},y(t,e,n,i){const s=Cn(e,t);return ad(t,s,"y",n.intersect,i)}}};const im=["left","top","right","bottom"];function Mr(t,e){return t.filter(n=>n.pos===e)}function ld(t,e){return t.filter(n=>im.indexOf(n.pos)===-1&&n.box.axis===e)}function Tr(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 Tw(t){const e={};for(const n of t){const{stack:i,pos:s,stackWeight:o}=n;if(!i||!im.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 Pw(t,e){const n=Tw(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 Cw(t){const e=Mw(t),n=Tr(e.filter(h=>h.box.fullSize),!0),i=Tr(Mr(e,"left"),!0),s=Tr(Mr(e,"right")),o=Tr(Mr(e,"top"),!0),l=Tr(Mr(e,"bottom")),c=ld(e,"x"),u=ld(e,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:s.concat(u).concat(l).concat(c),chartArea:Mr(e,"chartArea"),vertical:i.concat(s).concat(u),horizontal:o.concat(l).concat(c)}}function cd(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function sm(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 kw(t,e,n,i){const{pos:s,box:o}=n,l=t.maxPadding;if(!bt(s)){n.size&&(t[s]-=n.size);const m=i[n.stack]||{size:0,count:1};m.size=Math.max(m.size,n.horizontal?o.height:o.width),n.size=m.size/m.count,t[s]+=n.size}o.getPadding&&sm(l,o.getPadding());const c=Math.max(0,e.outerWidth-cd(l,t,"left","right")),u=Math.max(0,e.outerHeight-cd(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 Ew(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 Iw(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 Ar(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,Iw(c.horizontal,e));const{same:m,other:_}=kw(e,n,c,i);h|=m&&s.length,d=d||_,u.fullSize||s.push(c)}return h&&Ar(s,e,n,i)||d}function ia(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 fd(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 m=e.w*d,_=h.size||u.height;Vr(h.start)&&(l=h.start),u.fullSize?ia(u,s.left,l,n.outerWidth-s.right-s.left,_):ia(u,e.left+h.placed,l,m,_),h.start=l,h.placed+=m,l=u.bottom}else{const m=e.h*d,_=h.size||u.width;Vr(h.start)&&(o=h.start),u.fullSize?ia(u,o,s.top,_,n.outerHeight-s.bottom-s.top):ia(u,o,e.top+h.placed,_,m),h.start=o,h.placed+=m,o=u.right}}e.x=o,e.y=l}var an={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=Ye(t.options.layout.padding),o=Math.max(e-s.width,0),l=Math.max(n-s.height,0),c=Cw(t.boxes),u=c.vertical,h=c.horizontal;pt(t.boxes,T=>{typeof T.beforeLayout=="function"&&T.beforeLayout()});const d=u.reduce((T,k)=>k.box.options&&k.box.options.display===!1?T:T+1,0)||1,m=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:o,availableHeight:l,vBoxMaxWidth:o/2/d,hBoxMaxHeight:l/2}),_=Object.assign({},s);sm(_,Ye(i));const v=Object.assign({maxPadding:_,w:o,h:l,x:s.left,y:s.top},s),M=Pw(u.concat(h),m);Ar(c.fullSize,v,m,M),Ar(u,v,m,M),Ar(h,v,m,M)&&Ar(u,v,m,M),Ew(v),fd(c.leftAndTop,v,m,M),v.x+=v.w,v.y+=v.h,fd(c.rightAndBottom,v,m,M),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,T=>{const k=T.box;Object.assign(k,t.chartArea),k.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class rm{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 Aw extends rm{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const va="$chartjs",Ow={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ud=t=>t===null||t==="";function Dw(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[va]={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",ud(s)){const o=Kh(t,"width");o!==void 0&&(t.width=o)}if(ud(i))if(t.style.height==="")t.height=t.width/(e||2);else{const o=Kh(t,"height");o!==void 0&&(t.height=o)}return t}const om=LS?{passive:!0}:!1;function Rw(t,e,n){t&&t.addEventListener(e,n,om)}function Lw(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,om)}function Nw(t,e){const n=Ow[t.type]||t.type,{x:i,y:s}=Cn(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Ia(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Bw(t,e,n){const i=t.canvas,s=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||Ia(c.addedNodes,i),l=l&&!Ia(c.removedNodes,i);l&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Fw(t,e,n){const i=t.canvas,s=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||Ia(c.removedNodes,i),l=l&&!Ia(c.addedNodes,i);l&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Yr=new Map;let hd=0;function am(){const t=window.devicePixelRatio;t!==hd&&(hd=t,Yr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Ww(t,e){Yr.size||window.addEventListener("resize",am),Yr.set(t,e)}function zw(t){Yr.delete(t),Yr.size||window.removeEventListener("resize",am)}function Hw(t,e,n){const i=t.canvas,s=i&&uf(i);if(!s)return;const o=Bg((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),Ww(t,o),l}function vc(t,e,n){n&&n.disconnect(),e==="resize"&&zw(t)}function Uw(t,e,n){const i=t.canvas,s=Bg(o=>{t.ctx!==null&&n(Nw(o,t))},t);return Rw(i,e,s),s}class Vw extends rm{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(Dw(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[va])return!1;const i=n[va].initial;["height","width"].forEach(o=>{const l=i[o];yt(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[va],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),l={attach:Bw,detach:Fw,resize:Hw}[n]||Uw;s[n]=l(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:vc,detach:vc,resize:vc}[n]||Lw)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return RS(e,n,i,s)}isAttached(e){const n=e&&uf(e);return!!(n&&n.isConnected)}}function $w(t){return!ff()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Aw:Vw}class _n{constructor(){j(this,"x");j(this,"y");j(this,"active",!1);j(this,"options");j(this,"$animations")}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Ws(this.x)&&Ws(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}}j(_n,"defaults",{}),j(_n,"defaultRoutes");function Gw(t,e){const n=t.options.ticks,i=Yw(t),s=Math.min(n.maxTicksLimit||i,i),o=n.major.enabled?Kw(e):[],l=o.length,c=o[0],u=o[l-1],h=[];if(l>s)return qw(e,h,o,l/s),h;const d=Xw(o,e,s);if(l>0){let m,_;const v=l>1?Math.round((u-c)/(l-1)):null;for(sa(e,h,d,yt(v)?0:c-v,c),m=0,_=l-1;m<_;m++)sa(e,h,d,o[m],o[m+1]);return sa(e,h,d,u,yt(v)?e.length:u+v),h}return sa(e,h,d),h}function Yw(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 Xw(t,e,n){const i=jw(t),s=e.length/n;if(!i)return Math.max(s,1);const o=Bv(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 Kw(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function qw(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 sa(t,e,n,i,s){const o=ft(i,0),l=Math.min(ft(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 jw(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 Zw=t=>t==="left"?"right":t==="right"?"left":t,dd=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,gd=(t,e)=>Math.min(e||t,t);function md(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 Jw(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 Qw(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 Pr(t){return t.drawTicks?t.tickLength:0}function pd(t,e){if(!t.display)return 0;const n=ue(t.font,e),i=Ye(t.padding);return(qt(t.text)?t.text.length:1)*n.lineHeight+i.height}function tM(t,e){return rs(t,{scale:e,type:"scale"})}function eM(t,e,n){return rs(t,{tick:n,index:e,type:"tick"})}function nM(t,e,n){let i=nf(t);return(n&&e!=="right"||!n&&e==="right")&&(i=Zw(i)),i}function iM(t,e,n,i){const{top:s,left:o,bottom:l,right:c,chart:u}=t,{chartArea:h,scales:d}=u;let m=0,_,v,M;const T=l-s,k=c-o;if(t.isHorizontal()){if(v=me(i,o,c),bt(n)){const A=Object.keys(n)[0],R=n[A];M=d[A].getPixelForValue(R)+T-e}else n==="center"?M=(h.bottom+h.top)/2+T-e:M=dd(t,n,e);_=c-o}else{if(bt(n)){const A=Object.keys(n)[0],R=n[A];v=d[A].getPixelForValue(R)-k+e}else n==="center"?v=(h.left+h.right)/2-k+e:v=dd(t,n,e);M=me(i,l,s),m=n==="left"?-ee:ee}return{titleX:v,titleY:M,maxWidth:_,rotation:m}}class os extends _n{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:Jt(e),maxDefined:Jt(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(){ot(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=hS(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=c<this.ticks.length;this._convertTicksToLabels(u?md(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Gw(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(){ot(this.options.afterUpdate,[this])}beforeSetDimensions(){ot(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(){ot(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ot(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ot(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=ot(n.callback,[o.value,i,e],this)}afterTickToLabelConversion(){ot(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ot(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,i=gd(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(),m=d.widest.width,_=d.highest.height,v=pe(this.chart.width-m,0,this.maxWidth);c=e.offset?this.maxWidth/i:v/(i-1),m+6>c&&(c=v/(i-(e.offset?.5:1)),u=this.maxHeight-Pr(e.grid)-n.padding-pd(e.title,this.chart.options.font),h=Math.sqrt(m*m+_*_),l=zv(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(){ot(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ot(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=pd(s,n.options.font);if(c?(e.width=this.maxWidth,e.height=Pr(o)+u):(e.height=this.maxHeight,e.width=Pr(o)+u),i.display&&this.ticks.length){const{first:h,last:d,widest:m,highest:_}=this._getLabelSizes(),v=i.padding*2,M=ti(this.labelRotation),T=Math.cos(M),k=Math.sin(M);if(c){const A=i.mirror?0:k*m.width+T*_.height;e.height=Math.min(this.maxHeight,e.height+A+v)}else{const A=i.mirror?0:T*m.width+k*_.height;e.width=Math.min(this.maxWidth,e.width+A+v)}this._calculatePadding(h,d,k,T)}}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,m=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-m+l)*this.width/(this.width-m),0)}else{let d=n.height/2,m=e.height/2;o==="start"?(d=0,m=e.height):o==="end"&&(d=n.height,m=0),this.paddingTop=d+l,this.paddingBottom=m+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(){ot(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++)yt(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=md(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/gd(n,i));let h=0,d=0,m,_,v,M,T,k,A,R,W,z,L;for(m=0;m<n;m+=u){if(M=e[m].label,T=this._resolveTickFontOptions(m),s.font=k=T.string,A=o[k]=o[k]||{data:{},gc:[]},R=T.lineHeight,W=z=0,!yt(M)&&!qt(M))W=Vh(s,A.data,A.gc,W,M),z=R;else if(qt(M))for(_=0,v=M.length;_<v;++_)L=M[_],!yt(L)&&!qt(L)&&(W=Vh(s,A.data,A.gc,W,L),z+=R);l.push(W),c.push(z),h=Math.max(W,h),d=Math.max(z,d)}Qw(o,n);const Y=l.indexOf(h),V=c.indexOf(d),G=J=>({width:l[J]||0,height:c[J]||0});return{first:G(0),last:G(n-1),widest:G(Y),highest:G(V),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 Uv(this._alignToPixels?Xi(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=eM(this.getContext(),e,i))}return this.$context||(this.$context=tM(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=ti(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(),m=this.ticks.length+(u?1:0),_=Pr(o),v=[],M=c.setContext(this.getContext()),T=M.display?M.width:0,k=T/2,A=function(Ct){return Xi(i,Ct,T)};let R,W,z,L,Y,V,G,J,rt,et,at,zt;if(l==="top")R=A(this.bottom),V=this.bottom-_,J=R-k,et=A(e.top)+k,zt=e.bottom;else if(l==="bottom")R=A(this.top),et=e.top,zt=A(e.bottom)-k,V=R+k,J=this.top+_;else if(l==="left")R=A(this.right),Y=this.right-_,G=R-k,rt=A(e.left)+k,at=e.right;else if(l==="right")R=A(this.left),rt=e.left,at=A(e.right)-k,Y=R+k,G=this.left+_;else if(n==="x"){if(l==="center")R=A((e.top+e.bottom)/2+.5);else if(bt(l)){const Ct=Object.keys(l)[0],Tt=l[Ct];R=A(this.chart.scales[Ct].getPixelForValue(Tt))}et=e.top,zt=e.bottom,V=R+k,J=V+_}else if(n==="y"){if(l==="center")R=A((e.left+e.right)/2);else if(bt(l)){const Ct=Object.keys(l)[0],Tt=l[Ct];R=A(this.chart.scales[Ct].getPixelForValue(Tt))}Y=R-k,G=Y-_,rt=e.left,at=e.right}const Vt=ft(s.ticks.maxTicksLimit,m),St=Math.max(1,Math.ceil(m/Vt));for(W=0;W<m;W+=St){const Ct=this.getContext(W),Tt=o.setContext(Ct),jt=c.setContext(Ct),$t=Tt.lineWidth,Re=Tt.color,re=jt.dash||[],ye=jt.dashOffset,An=Tt.tickWidth,Le=Tt.tickColor,ve=Tt.tickBorderDash||[],Se=Tt.tickBorderDashOffset;z=Jw(this,W,u),z!==void 0&&(L=Xi(i,z,$t),h?Y=G=rt=at=L:V=J=et=zt=L,v.push({tx1:Y,ty1:V,tx2:G,ty2:J,x1:rt,y1:et,x2:at,y2:zt,width:$t,color:Re,borderDash:re,borderDashOffset:ye,tickWidth:An,tickColor:Le,tickBorderDash:ve,tickBorderDashOffset:Se}))}return this._ticksLength=m,this._borderValue=R,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:m}=o,_=Pr(i.grid),v=_+d,M=m?-d:v,T=-ti(this.labelRotation),k=[];let A,R,W,z,L,Y,V,G,J,rt,et,at,zt="middle";if(s==="top")Y=this.bottom-M,V=this._getXAxisLabelAlignment();else if(s==="bottom")Y=this.top+M,V=this._getXAxisLabelAlignment();else if(s==="left"){const St=this._getYAxisLabelAlignment(_);V=St.textAlign,L=St.x}else if(s==="right"){const St=this._getYAxisLabelAlignment(_);V=St.textAlign,L=St.x}else if(n==="x"){if(s==="center")Y=(e.top+e.bottom)/2+v;else if(bt(s)){const St=Object.keys(s)[0],Ct=s[St];Y=this.chart.scales[St].getPixelForValue(Ct)+v}V=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")L=(e.left+e.right)/2-v;else if(bt(s)){const St=Object.keys(s)[0],Ct=s[St];L=this.chart.scales[St].getPixelForValue(Ct)}V=this._getYAxisLabelAlignment(_).textAlign}n==="y"&&(u==="start"?zt="top":u==="end"&&(zt="bottom"));const Vt=this._getLabelSizes();for(A=0,R=c.length;A<R;++A){W=c[A],z=W.label;const St=o.setContext(this.getContext(A));G=this.getPixelForTick(A)+o.labelOffset,J=this._resolveTickFontOptions(A),rt=J.lineHeight,et=qt(z)?z.length:1;const Ct=et/2,Tt=St.color,jt=St.textStrokeColor,$t=St.textStrokeWidth;let Re=V;l?(L=G,V==="inner"&&(A===R-1?Re=this.options.reverse?"left":"right":A===0?Re=this.options.reverse?"right":"left":Re="center"),s==="top"?h==="near"||T!==0?at=-et*rt+rt/2:h==="center"?at=-Vt.highest.height/2-Ct*rt+rt:at=-Vt.highest.height+rt/2:h==="near"||T!==0?at=rt/2:h==="center"?at=Vt.highest.height/2-Ct*rt:at=Vt.highest.height-et*rt,m&&(at*=-1),T!==0&&!St.showLabelBackdrop&&(L+=rt/2*Math.sin(T))):(Y=G,at=(1-et)*rt/2);let re;if(St.showLabelBackdrop){const ye=Ye(St.backdropPadding),An=Vt.heights[A],Le=Vt.widths[A];let ve=at-ye.top,Se=0-ye.left;switch(zt){case"middle":ve-=An/2;break;case"bottom":ve-=An;break}switch(V){case"center":Se-=Le/2;break;case"right":Se-=Le;break;case"inner":A===R-1?Se-=Le:A>0&&(Se-=Le/2);break}re={left:Se,top:ve,width:Le+ye.width,height:An+ye.height,color:St.backdropColor}}k.push({label:z,font:J,textOffset:at,options:{rotation:T,color:Tt,strokeColor:jt,strokeWidth:$t,textAlign:Re,textBaseline:zt,translation:[L,Y],backdrop:re}})}return k}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-ti(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,m,_;this.isHorizontal()?(h=Xi(e,this.left,l)-l/2,d=Xi(e,this.right,c)+c/2,m=_=u):(m=Xi(e,this.top,l)-l/2,_=Xi(e,this.bottom,c)+c/2,h=d=u),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(h,m),n.lineTo(d,_),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&La(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;Gr(i,h,0,d,u,c)}s&&Na(i)}drawTitle(){const{ctx:e,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const o=ue(i.font),l=Ye(i.padding),c=i.align;let u=o.lineHeight/2;n==="bottom"||n==="center"||bt(n)?(u+=l.bottom,qt(i.text)&&(u+=o.lineHeight*(i.text.length-1))):u+=l.top;const{titleX:h,titleY:d,maxWidth:m,rotation:_}=iM(this,u,n,c);Gr(e,i.text,0,0,o,{color:i.color,maxWidth:m,rotation:_,textAlign:nM(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=ft(e.grid&&e.grid.z,-1),s=ft(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==os.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 ue(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ra{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;oM(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,sM(e,l,i),this.override&&At.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 At[s]&&(delete At[s][i],this.override&&delete is[i])}}function sM(t,e,n){const i=En(Object.create(null),[n?At.get(n):{},At.get(e),t.defaults]);At.set(e,i),t.defaultRoutes&&rM(e,t.defaultRoutes),t.descriptors&&At.describe(e,t.descriptors)}function rM(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(".");At.route(o,s,u,c)})}function oM(t){return"id"in t&&"defaults"in t}class aM{constructor(){this.controllers=new ra(Pi,"datasets",!0),this.elements=new ra(_n,"elements"),this.plugins=new ra(Object,"plugins"),this.scales=new ra(os,"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=tf(e);ot(i["before"+s],[],i),n[e](i),ot(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 Tn=new aM;class lM{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(ot(c,u,l)===!1&&s.cancelable)return!1}return!0}invalidate(){yt(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=ft(i.options&&i.options.plugins,{}),o=cM(i);return s===!1&&!n?[]:uM(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 cM(t){const e={},n=[],i=Object.keys(Tn.plugins.items);for(let o=0;o<i.length;o++)n.push(Tn.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 fM(t,e){return!e&&t===!1?null:t===!0?{}:t}function uM(t,{plugins:e,localIds:n},i,s){const o=[],l=t.getContext();for(const c of e){const u=c.id,h=fM(i[u],s);h!==null&&o.push({plugin:c,options:hM(t.config,{plugin:c,local:n[u]},h,l)})}return o}function hM(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 Lc(t,e){const n=At.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function dM(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function gM(t,e){return t===e?"_index_":"_value_"}function _d(t){if(t==="x"||t==="y"||t==="r")return t}function mM(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Nc(t,...e){if(_d(t))return t;for(const n of e){const i=n.axis||mM(n.position)||t.length>1&&_d(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function bd(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function pM(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 bd(t,"x",n[0])||bd(t,"y",n[0])}return{}}function _M(t,e){const n=is[t.type]||{scales:{}},i=e.scales||{},s=Lc(t.type,e),o=Object.create(null);return Object.keys(i).forEach(l=>{const c=i[l];if(!bt(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=Nc(l,c,pM(l,t),At.scales[c.type]),h=gM(u,s),d=n.scales||{};o[l]=Lr(Object.create(null),[{axis:u},c,d[u],d[h]])}),t.data.datasets.forEach(l=>{const c=l.type||t.type,u=l.indexAxis||Lc(c,e),d=(is[c]||{}).scales||{};Object.keys(d).forEach(m=>{const _=dM(m,u),v=l[_+"AxisID"]||_;o[v]=o[v]||Object.create(null),Lr(o[v],[{axis:_},i[v],d[m]])})}),Object.keys(o).forEach(l=>{const c=o[l];Lr(c,[At.scales[c.type],At.scale])}),o}function lm(t){const e=t.options||(t.options={});e.plugins=ft(e.plugins,{}),e.scales=_M(t,e)}function cm(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function bM(t){return t=t||{},t.data=cm(t.data),lm(t),t}const xd=new Map,fm=new Set;function oa(t,e){let n=xd.get(t);return n||(n=e(),xd.set(t,n),fm.add(n)),n}const Cr=(t,e,n)=>{const i=ns(e,n);i!==void 0&&t.add(i)};class xM{constructor(e){this._config=bM(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=cm(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(),lm(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return oa(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return oa(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return oa(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return oa(`${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(m=>Cr(u,e,m))),d.forEach(m=>Cr(u,s,m)),d.forEach(m=>Cr(u,is[o]||{},m)),d.forEach(m=>Cr(u,At,m)),d.forEach(m=>Cr(u,Oc,m))});const h=Array.from(u);return h.length===0&&h.push(Object.create(null)),fm.has(n)&&l.set(n,h),h}chartOptionScopes(){const{options:e,type:n}=this;return[e,is[n]||{},At.datasets[n]||{},{type:n},At,Oc]}resolveNamedOptions(e,n,i,s=[""]){const o={$shared:!0},{resolver:l,subPrefixes:c}=yd(this._resolverCache,e,s);let u=l;if(vM(l,n)){o.$shared=!1,i=Ci(i)?i():i;const h=this.createResolver(e,i,c);u=Hs(l,i,h)}for(const h of n)o[h]=u[h];return o}createResolver(e,n,i=[""],s){const{resolver:o}=yd(this._resolverCache,e,i);return bt(n)?Hs(o,n,void 0,s):o}}function yd(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:af(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},i.set(s,o)),o}const yM=t=>bt(t)&&Object.getOwnPropertyNames(t).some(e=>Ci(t[e]));function vM(t,e){const{isScriptable:n,isIndexable:i}=Vg(t);for(const s of e){const o=n(s),l=i(s),c=(l||o)&&t[s];if(o&&(Ci(c)||yM(c))||l&&qt(c))return!0}return!1}var SM="4.4.9";const wM=["top","bottom","left","right","chartArea"];function vd(t,e){return t==="top"||t==="bottom"||wM.indexOf(t)===-1&&e==="x"}function Sd(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function wd(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ot(n&&n.onComplete,[t],e)}function MM(t){const e=t.chart,n=e.options.animation;ot(n&&n.onProgress,[t],e)}function um(t){return ff()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Sa={},Md=t=>{const e=um(t);return Object.values(Sa).filter(n=>n.canvas===e).pop()};function TM(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 PM(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}var bi;let df=(bi=class{static register(...e){Tn.add(...e),Td()}static unregister(...e){Tn.remove(...e),Td()}constructor(e,n){const i=this.config=new xM(n),s=um(e),o=Md(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||$w(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=kv(),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 lM,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yv(m=>this.update(m),l.resizeDelay||0),this._dataChanges=[],Sa[this.id]=this,!c||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Kn.listen(this,"complete",wd),Kn.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 yt(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 Tn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Xh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return $h(this.canvas,this.ctx),this}stop(){return Kn.stop(this),this}resize(e,n){Kn.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,Xh(this,c,!0)&&(this.notifyPlugins("resize",{size:l}),ot(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=Nc(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=Nc(u,c),d=ft(c.type,l.dtype);(c.position===void 0||vd(c.position,h)!==vd(l.dposition))&&(c.position=l.dposition),s[u]=!0;let m=null;if(u in i&&i[u].type===d)m=i[u];else{const _=Tn.getScale(d);m=new _({id:u,type:d,ctx:this.ctx,chart:this}),i[m.id]=m}m.init(c,e)}),pt(s,(l,c)=>{l||delete i[c]}),pt(i,l=>{an.configure(this,l,l.options),an.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(Sd("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||Lc(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=Tn.getController(c),{datasetElementType:h,dataElementType:d}=At.datasets[c];Object.assign(u,{dataElementType:Tn.getElement(d),datasetElementType:h&&Tn.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:m}=this.getDatasetMeta(h),_=!s&&o.indexOf(m)===-1;m.buildOrUpdateElements(_),l=Math.max(+m.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(Sd("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=>{an.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Rh(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;TM(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(!Rh(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;an.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,Ci(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&&(Kn.has(this)?this.attached&&!Kn.running(this)&&Kn.start(this):(this.draw(),wd({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=Qg(this,e);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&La(n,s),e.controller.draw(),s&&Na(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return zs(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const o=ww.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=rs(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);Vr(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(),Kn.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(),$h(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Sa[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}});!Ta(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(m=>d.datasetIndex===m.datasetIndex&&d.index===m.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=Rv(e),h=PM(e,this._lastEvent,i,u);i&&(this._lastEvent=null,ot(o.onHover,[e,c,this],this),u&&ot(o.onClick,[e,c,this],this));const d=!Ta(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)}},j(bi,"defaults",At),j(bi,"instances",Sa),j(bi,"overrides",is),j(bi,"registry",Tn),j(bi,"version",SM),j(bi,"getChart",Md),bi);function Td(){return pt(df.instances,t=>t._plugins.invalidate())}function CM(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+ee,i-ee),t.closePath(),t.clip()}function kM(t){return of(t,["outerStart","outerEnd","innerStart","innerEnd"])}function EM(t,e,n,i){const s=kM(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 Rs(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Aa(t,e,n,i,s,o){const{x:l,y:c,startAngle:u,pixelMargin:h,innerRadius:d}=e,m=Math.max(e.outerRadius+i+n-h,0),_=d>0?d+i+n+h:0;let v=0;const M=s-u;if(i){const St=d>0?d-i:0,Ct=m>0?m-i:0,Tt=(St+Ct)/2,jt=Tt!==0?M*Tt/(Tt+i):M;v=(M-jt)/2}const T=Math.max(.001,M*m-n/Ut)/m,k=(M-T)/2,A=u+k+v,R=s-k-v,{outerStart:W,outerEnd:z,innerStart:L,innerEnd:Y}=EM(e,_,m,R-A),V=m-W,G=m-z,J=A+W/V,rt=R-z/G,et=_+L,at=_+Y,zt=A+L/et,Vt=R-Y/at;if(t.beginPath(),o){const St=(J+rt)/2;if(t.arc(l,c,m,J,St),t.arc(l,c,m,St,rt),z>0){const $t=Rs(G,rt,l,c);t.arc($t.x,$t.y,z,rt,R+ee)}const Ct=Rs(at,R,l,c);if(t.lineTo(Ct.x,Ct.y),Y>0){const $t=Rs(at,Vt,l,c);t.arc($t.x,$t.y,Y,R+ee,Vt+Math.PI)}const Tt=(R-Y/_+(A+L/_))/2;if(t.arc(l,c,_,R-Y/_,Tt,!0),t.arc(l,c,_,Tt,A+L/_,!0),L>0){const $t=Rs(et,zt,l,c);t.arc($t.x,$t.y,L,zt+Math.PI,A-ee)}const jt=Rs(V,A,l,c);if(t.lineTo(jt.x,jt.y),W>0){const $t=Rs(V,J,l,c);t.arc($t.x,$t.y,W,A-ee,J)}}else{t.moveTo(l,c);const St=Math.cos(J)*m+l,Ct=Math.sin(J)*m+c;t.lineTo(St,Ct);const Tt=Math.cos(rt)*m+l,jt=Math.sin(rt)*m+c;t.lineTo(Tt,jt)}t.closePath()}function IM(t,e,n,i,s){const{fullCircles:o,startAngle:l,circumference:c}=e;let u=e.endAngle;if(o){Aa(t,e,n,i,u,s);for(let h=0;h<o;++h)t.fill();isNaN(c)||(u=l+(c%Ft||Ft))}return Aa(t,e,n,i,u,s),t.fill(),u}function AM(t,e,n,i,s){const{fullCircles:o,startAngle:l,circumference:c,options:u}=e,{borderWidth:h,borderJoinStyle:d,borderDash:m,borderDashOffset:_}=u,v=u.borderAlign==="inner";if(!h)return;t.setLineDash(m||[]),t.lineDashOffset=_,v?(t.lineWidth=h*2,t.lineJoin=d||"round"):(t.lineWidth=h,t.lineJoin=d||"bevel");let M=e.endAngle;if(o){Aa(t,e,n,i,M,s);for(let T=0;T<o;++T)t.stroke();isNaN(c)||(M=l+(c%Ft||Ft))}v&&CM(t,e,M),o||(Aa(t,e,n,i,M,s),t.stroke())}class Or extends _n{constructor(n){super();j(this,"circumference");j(this,"endAngle");j(this,"fullCircles");j(this,"innerRadius");j(this,"outerRadius");j(this,"pixelMargin");j(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,i,s){const o=this.getProps(["x","y"],s),{angle:l,distance:c}=Dg(o,{x:n,y:i}),{startAngle:u,endAngle:h,innerRadius:d,outerRadius:m,circumference:_}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),v=(this.options.spacing+this.options.borderWidth)/2,M=ft(_,h-u),T=$r(l,u,h)&&u!==h,k=M>=Ft||T,A=ei(c,d+v,m+v);return k&&A}getCenterPoint(n){const{x:i,y:s,startAngle:o,endAngle:l,innerRadius:c,outerRadius:u}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:h,spacing:d}=this.options,m=(o+l)/2,_=(c+u+d+h)/2;return{x:i+Math.cos(m)*_,y:s+Math.sin(m)*_}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:s}=this,o=(i.offset||0)/4,l=(i.spacing||0)/2,c=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>Ft?Math.floor(s/Ft):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const u=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(u)*o,Math.sin(u)*o);const h=1-Math.sin(Math.min(Ut,s||0)),d=o*h;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,IM(n,this,d,l,c),AM(n,this,d,l,c),n.restore()}}j(Or,"id","arc"),j(Or,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),j(Or,"defaultRoutes",{backgroundColor:"backgroundColor"}),j(Or,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function hm(t,e,n=e){t.lineCap=ft(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ft(n.borderDash,e.borderDash)),t.lineDashOffset=ft(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ft(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ft(n.borderWidth,e.borderWidth),t.strokeStyle=ft(n.borderColor,e.borderColor)}function OM(t,e,n){t.lineTo(n.x,n.y)}function DM(t){return t.stepped?iS:t.tension||t.cubicInterpolationMode==="monotone"?sS:OM}function dm(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 RM(t,e,n,i){const{points:s,options:o}=e,{count:l,start:c,loop:u,ilen:h}=dm(s,n,i),d=DM(o);let{move:m=!0,reverse:_}=i||{},v,M,T;for(v=0;v<=h;++v)M=s[(c+(_?h-v:v))%l],!M.skip&&(m?(t.moveTo(M.x,M.y),m=!1):d(t,T,M,_,o.stepped),T=M);return u&&(M=s[(c+(_?h:0))%l],d(t,T,M,_,o.stepped)),!!u}function LM(t,e,n,i){const s=e.points,{count:o,start:l,ilen:c}=dm(s,n,i),{move:u=!0,reverse:h}=i||{};let d=0,m=0,_,v,M,T,k,A;const R=z=>(l+(h?c-z:z))%o,W=()=>{T!==k&&(t.lineTo(d,k),t.lineTo(d,T),t.lineTo(d,A))};for(u&&(v=s[R(0)],t.moveTo(v.x,v.y)),_=0;_<=c;++_){if(v=s[R(_)],v.skip)continue;const z=v.x,L=v.y,Y=z|0;Y===M?(L<T?T=L:L>k&&(k=L),d=(m*d+z)/++m):(W(),t.lineTo(z,L),M=Y,m=0,T=k=L),A=L}W()}function Bc(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?LM:RM}function NM(t){return t.stepped?NS:t.tension||t.cubicInterpolationMode==="monotone"?BS:ji}function BM(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),hm(t,e.options),t.stroke(s)}function FM(t,e,n,i){const{segments:s,options:o}=e,l=Bc(e);for(const c of s)hm(t,o,c.style),t.beginPath(),l(t,e,c,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const WM=typeof Path2D=="function";function zM(t,e,n,i){WM&&!e.options.segment?BM(t,e,n,i):FM(t,e,n,i)}class Qi extends _n{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;kS(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=VS(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=Jg(this,{property:n,start:s,end:s});if(!l.length)return;const c=[],u=NM(i);let h,d;for(h=0,d=l.length;h<d;++h){const{start:m,end:_}=l[h],v=o[m],M=o[_];if(v===M){c.push(v);continue}const T=Math.abs((s-v[n])/(M[n]-v[n])),k=u(v,M,T,i.stepped);k[n]=e[n],c.push(k)}return c.length===1?c[0]:c}pathSegment(e,n,i){return Bc(this)(e,this,n,i)}path(e,n,i){const s=this.segments,o=Bc(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(),zM(e,this,i,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}j(Qi,"id","line"),j(Qi,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),j(Qi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),j(Qi,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});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 wa extends _n{constructor(n){super();j(this,"parsed");j(this,"skip");j(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,s){const o=this.options,{x:l,y:c}=this.getProps(["x","y"],s);return Math.pow(n-l,2)+Math.pow(i-c,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,i){return Pd(this,n,"x",i)}inYRange(n,i){return Pd(this,n,"y",i)}getCenterPoint(n){const{x:i,y:s}=this.getProps(["x","y"],n);return{x:i,y:s}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const s=i&&n.borderWidth||0;return(i+s)*2}draw(n,i){const s=this.options;this.skip||s.radius<.1||!zs(this,i,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,Dc(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}j(wa,"id","point"),j(wa,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),j(wa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function gm(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,m;return t.horizontal?(m=l/2,c=Math.min(n,s),u=Math.max(n,s),h=i-m,d=i+m):(m=o/2,c=n-m,u=n+m,h=Math.min(i,s),d=Math.max(i,s)),{left:c,top:h,right:u,bottom:d}}function wi(t,e,n,i){return t?0:pe(e,n,i)}function HM(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,o=Ug(i);return{t:wi(s.top,o.top,0,n),r:wi(s.right,o.right,0,e),b:wi(s.bottom,o.bottom,0,n),l:wi(s.left,o.left,0,e)}}function UM(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=Bs(s),l=Math.min(e,n),c=t.borderSkipped,u=i||bt(s);return{topLeft:wi(!u||c.top||c.left,o.topLeft,0,l),topRight:wi(!u||c.top||c.right,o.topRight,0,l),bottomLeft:wi(!u||c.bottom||c.left,o.bottomLeft,0,l),bottomRight:wi(!u||c.bottom||c.right,o.bottomRight,0,l)}}function VM(t){const e=gm(t),n=e.right-e.left,i=e.bottom-e.top,s=HM(t,n/2,i/2),o=UM(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 Sc(t,e,n,i){const s=e===null,o=n===null,c=t&&!(s&&o)&&gm(t,i);return c&&(s||ei(e,c.left,c.right))&&(o||ei(n,c.top,c.bottom))}function $M(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function GM(t,e){t.rect(e.x,e.y,e.w,e.h)}function wc(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 Ma extends _n{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}=VM(this),c=$M(l.radius)?ka:GM;e.save(),(l.w!==o.w||l.h!==o.h)&&(e.beginPath(),c(e,wc(l,n,o)),e.clip(),c(e,wc(o,-n,l)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),c(e,wc(o,n)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,n,i){return Sc(this,e,n,i)}inXRange(e,n){return Sc(this,e,null,n)}inYRange(e,n){return Sc(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}}j(Ma,"id","bar"),j(Ma,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),j(Ma,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function YM(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=gf(u,h,s);const d=Fc(n,s[u],s[h],c.loop);if(!e.segments){l.push({source:c,target:d,start:s[u],end:s[h]});continue}const m=Jg(e,d);for(const _ of m){const v=Fc(n,o[_.start],o[_.end],_.loop),M=Zg(c,s,v);for(const T of M)l.push({source:T,target:_,start:{[n]:Cd(d,v,"start",Math.max)},end:{[n]:Cd(d,v,"end",Math.min)}})}}return l}function Fc(t,e,n,i){if(i)return;let s=e[t],o=n[t];return t==="angle"&&(s=Pn(s),o=Pn(o)),{property:t,start:s,end:o}}function XM(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,o=[];return e.segments.forEach(({start:l,end:c})=>{c=gf(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 gf(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Cd(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function mm(t,e){let n=[],i=!1;return qt(t)?(i=!0,n=t):n=XM(t,e),n.length?new Qi({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function kd(t){return t&&t.fill!==!1}function KM(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(!Jt(s))return s;if(l=t[s],!l)return!1;if(l.visible)return s;o.push(s),s=l.fill}return!1}function qM(t,e,n){const i=QM(t);if(bt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Jt(s)&&Math.floor(s)===s?jM(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function jM(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function ZM(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:bt(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function JM(t,e,n){let i;return t==="start"?i=n:t==="end"?i=e.options.reverse?e.min:e.max:bt(t)?i=t.value:i=e.getBaseValue(),i}function QM(t){const e=t.options,n=e.fill;let i=ft(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function tT(t){const{scale:e,index:n,line:i}=t,s=[],o=i.segments,l=i.points,c=eT(e,n);c.push(mm({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++)nT(s,l[d],c)}return new Qi({points:s,options:{}})}function eT(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 nT(t,e,n){const i=[];for(let s=0;s<n.length;s++){const o=n[s],{first:l,last:c,point:u}=iT(o,e,"x");if(!(!u||l&&c)){if(l)i.unshift(u);else if(t.push(u),!c)break}}t.push(...i)}function iT(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],m=l[d.start][n],_=l[d.end][n];if(ei(s,m,_)){c=s===m,u=s===_;break}}return{first:c,last:u,point:i}}class pm{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:Ft},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 sT(t){const{chart:e,fill:n,line:i}=t;if(Jt(n))return rT(e,n);if(n==="stack")return tT(t);if(n==="shape")return!0;const s=oT(t);return s instanceof pm?s:mm(s,i)}function rT(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function oT(t){return(t.scale||{}).getPointPositionForValue?lT(t):aT(t)}function aT(t){const{scale:e={},fill:n}=t,i=ZM(n,e);if(Jt(i)){const s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function lT(t){const{scale:e,fill:n}=t,i=e.options,s=e.getLabels().length,o=i.reverse?e.max:e.min,l=JM(n,e,o),c=[];if(i.grid.circular){const u=e.getPointPositionForValue(0,o);return new pm({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 Mc(t,e,n){const i=sT(e),{chart:s,index:o,line:l,scale:c,axis:u}=e,h=l.options,d=h.fill,m=h.backgroundColor,{above:_=m,below:v=m}=d||{},M=s.getDatasetMeta(o),T=Qg(s,M);i&&l.points.length&&(La(t,n),cT(t,{line:l,target:i,above:_,below:v,area:n,scale:c,axis:u,clip:T}),Na(t))}function cT(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&&(Ed(t,i,l.top),Id(t,{line:n,target:i,color:s,scale:c,property:h,clip:u}),t.restore(),t.save(),Ed(t,i,l.bottom)),Id(t,{line:n,target:i,color:o,scale:c,property:h,clip:u}),t.restore()}function Ed(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],m=s[gf(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(m.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Id(t,e){const{line:n,target:i,property:s,color:o,scale:l,clip:c}=e,u=YM(n,i,s);for(const{source:h,target:d,start:m,end:_}of u){const{style:{backgroundColor:v=o}={}}=h,M=i!==!0;t.save(),t.fillStyle=v,fT(t,l,c,M&&Fc(s,m,_)),t.beginPath();const T=!!n.pathSegment(t,h);let k;if(M){T?t.closePath():Ad(t,i,_,s);const A=!!i.pathSegment(t,d,{move:T,reverse:!0});k=T&&A,k||Ad(t,i,m,s)}t.closePath(),t.fill(k?"evenodd":"nonzero"),t.restore()}}function fT(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,m;o==="x"?(u=l,h=s.top,d=c,m=s.bottom):(u=s.left,h=l,d=s.right,m=c),t.beginPath(),n&&(u=Math.max(u,n.left),d=Math.min(d,n.right),h=Math.max(h,n.top),m=Math.min(m,n.bottom)),t.rect(u,h,d-u,m-h),t.clip()}}function Ad(t,e,n,i){const s=e.interpolate(n,i);s&&t.lineTo(s.x,s.y)}var OC={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 Qi&&(u={visible:t.isDatasetVisible(l),index:l,fill:qM(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=KM(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&&Mc(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;kd(o)&&Mc(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!kd(i)||n.drawTime!=="beforeDatasetDraw"||Mc(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Od=(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)}},uT=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Dd extends _n{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=ot(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=ue(i.font),o=s.size,l=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=Od(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 m=e;o.textAlign="left",o.textBaseline="middle";let _=-1,v=-d;return this.legendItems.forEach((M,T)=>{const k=i+n/2+o.measureText(M.text).width;(T===0||h[h.length-1]+k+2*c>l)&&(m+=d,h[h.length-(T>0?0:1)]=0,v+=d,_++),u[T]={left:0,top:v,row:_,width:k,height:s},h[h.length-1]+=k+c}),m}_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 m=c,_=0,v=0,M=0,T=0;return this.legendItems.forEach((k,A)=>{const{itemWidth:R,itemHeight:W}=hT(i,n,o,k,s);A>0&&v+W+2*c>d&&(m+=_+c,h.push({width:_,height:v}),M+=_+c,T++,_=v=0),u[A]={left:M,top:v,col:T,width:R,height:W},_=Math.max(_,R),v+=W+c}),m+=_,h.push({width:_,height:v}),m}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:o}}=this,l=Fs(o,this.left,this.width);if(this.isHorizontal()){let c=0,u=me(i,this.left+s,this.right-this.lineWidths[c]);for(const h of n)c!==h.row&&(c=h.row,u=me(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=me(i,this.top+e+s,this.bottom-this.columnSizes[c].height);for(const h of n)h.col!==c&&(c=h.col,u=me(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;La(e,this),this._draw(),Na(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:o,labels:l}=e,c=At.color,u=Fs(e.rtl,this.left,this.width),h=ue(l.font),{padding:d}=l,m=h.size,_=m/2;let v;this.drawTitle(),s.textAlign=u.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:M,boxHeight:T,itemHeight:k}=Od(l,m),A=function(Y,V,G){if(isNaN(M)||M<=0||isNaN(T)||T<0)return;s.save();const J=ft(G.lineWidth,1);if(s.fillStyle=ft(G.fillStyle,c),s.lineCap=ft(G.lineCap,"butt"),s.lineDashOffset=ft(G.lineDashOffset,0),s.lineJoin=ft(G.lineJoin,"miter"),s.lineWidth=J,s.strokeStyle=ft(G.strokeStyle,c),s.setLineDash(ft(G.lineDash,[])),l.usePointStyle){const rt={radius:T*Math.SQRT2/2,pointStyle:G.pointStyle,rotation:G.rotation,borderWidth:J},et=u.xPlus(Y,M/2),at=V+_;Hg(s,rt,et,at,l.pointStyleWidth&&M)}else{const rt=V+Math.max((m-T)/2,0),et=u.leftForLtr(Y,M),at=Bs(G.borderRadius);s.beginPath(),Object.values(at).some(zt=>zt!==0)?ka(s,{x:et,y:rt,w:M,h:T,radius:at}):s.rect(et,rt,M,T),s.fill(),J!==0&&s.stroke()}s.restore()},R=function(Y,V,G){Gr(s,G.text,Y,V+k/2,h,{strikethrough:G.hidden,textAlign:u.textAlign(G.textAlign)})},W=this.isHorizontal(),z=this._computeTitleHeight();W?v={x:me(o,this.left+d,this.right-i[0]),y:this.top+d+z,line:0}:v={x:this.left+d,y:me(o,this.top+z+d,this.bottom-n[0].height),line:0},Kg(this.ctx,e.textDirection);const L=k+d;this.legendItems.forEach((Y,V)=>{s.strokeStyle=Y.fontColor,s.fillStyle=Y.fontColor;const G=s.measureText(Y.text).width,J=u.textAlign(Y.textAlign||(Y.textAlign=l.textAlign)),rt=M+_+G;let et=v.x,at=v.y;u.setWidth(this.width),W?V>0&&et+rt+d>this.right&&(at=v.y+=L,v.line++,et=v.x=me(o,this.left+d,this.right-i[v.line])):V>0&&at+L>this.bottom&&(et=v.x=et+n[v.line].width+d,v.line++,at=v.y=me(o,this.top+z+d,this.bottom-n[v.line].height));const zt=u.x(et);if(A(zt,at,Y),et=Xv(J,et+M+_,W?et+rt:this.right,e.rtl),R(u.x(et),at,Y),W)v.x+=rt+d;else if(typeof Y.text!="string"){const Vt=h.lineHeight;v.y+=_m(Y,Vt)+d}else v.y+=L}),qg(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=ue(n.font),s=Ye(n.padding);if(!n.display)return;const o=Fs(e.rtl,this.left,this.width),l=this.ctx,c=n.position,u=i.size/2,h=s.top+u;let d,m=this.left,_=this.width;if(this.isHorizontal())_=Math.max(...this.lineWidths),d=this.top+h,m=me(e.align,m,this.right-_);else{const M=this.columnSizes.reduce((T,k)=>Math.max(T,k.height),0);d=h+me(e.align,this.top,this.bottom-M-e.labels.padding-this._computeTitleHeight())}const v=me(c,m,m+_);l.textAlign=o.textAlign(nf(c)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=i.string,Gr(l,n.text,v,d,i)}_computeTitleHeight(){const e=this.options.title,n=ue(e.font),i=Ye(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,o;if(ei(e,this.left,this.right)&&ei(n,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],ei(e,s.left,s.left+s.width)&&ei(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(e){const n=this.options;if(!mT(e.type,n))return;const i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,o=uT(s,i);s&&!o&&ot(n.onLeave,[e,s,this],this),this._hoveredItem=i,i&&!o&&ot(n.onHover,[e,i,this],this)}else i&&ot(n.onClick,[e,i,this],this)}}function hT(t,e,n,i,s){const o=dT(i,t,e,n),l=gT(s,i,e.lineHeight);return{itemWidth:o,itemHeight:l}}function dT(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 gT(t,e,n){let i=t;return typeof e.text!="string"&&(i=_m(e,n)),i}function _m(t,e){const n=t.text?t.text.length:0;return e*n}function mT(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var DC={id:"legend",_element:Dd,start(t,e,n){const i=t.legend=new Dd({ctx:t.ctx,options:n,chart:t});an.configure(t,i,n),an.addBox(t,i)},stop(t){an.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;an.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=Ye(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 bm extends _n{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=Ye(i.padding);const o=s*ue(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,m;return this.isHorizontal()?(d=me(c,i,o),m=n+e,h=o-i):(l.position==="left"?(d=i+e,m=me(c,s,n),u=Ut*-.5):(d=o-e,m=me(c,n,s),u=Ut*.5),h=s-n),{titleX:d,titleY:m,maxWidth:h,rotation:u}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=ue(n.font),o=i.lineHeight/2+this._padding.top,{titleX:l,titleY:c,maxWidth:u,rotation:h}=this._drawArgs(o);Gr(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:h,textAlign:nf(n.align),textBaseline:"middle",translation:[l,c]})}}function pT(t,e){const n=new bm({ctx:t.ctx,options:e,chart:t});an.configure(t,n,e),an.addBox(t,n),t.titleBlock=n}var RC={id:"title",_element:bm,start(t,e,n){pT(t,n)},stop(t){const e=t.titleBlock;an.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;an.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 Dr={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=Ac(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 Mn(t,e){return e&&(qt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function qn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
17
|
-
`)>-1?t.split(`
|
|
18
|
-
`):t}function _T(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 Rd(t,e){const n=t.chart.ctx,{body:i,footer:s,title:o}=t,{boxWidth:l,boxHeight:c}=e,u=ue(e.bodyFont),h=ue(e.titleFont),d=ue(e.footerFont),m=o.length,_=s.length,v=i.length,M=Ye(e.padding);let T=M.height,k=0,A=i.reduce((z,L)=>z+L.before.length+L.lines.length+L.after.length,0);if(A+=t.beforeBody.length+t.afterBody.length,m&&(T+=m*h.lineHeight+(m-1)*e.titleSpacing+e.titleMarginBottom),A){const z=e.displayColors?Math.max(c,u.lineHeight):u.lineHeight;T+=v*z+(A-v)*u.lineHeight+(A-1)*e.bodySpacing}_&&(T+=e.footerMarginTop+_*d.lineHeight+(_-1)*e.footerSpacing);let R=0;const W=function(z){k=Math.max(k,n.measureText(z).width+R)};return n.save(),n.font=h.string,pt(t.title,W),n.font=u.string,pt(t.beforeBody.concat(t.afterBody),W),R=e.displayColors?l+2+e.boxPadding:0,pt(i,z=>{pt(z.before,W),pt(z.lines,W),pt(z.after,W)}),R=0,n.font=d.string,pt(t.footer,W),n.restore(),k+=M.width,{width:k,height:T}}function bT(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function xT(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 yT(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"),xT(h,t,e,n)&&(h="center"),h}function Ld(t,e,n){const i=n.yAlign||e.yAlign||bT(t,n);return{xAlign:n.xAlign||e.xAlign||yT(t,e,n,i),yAlign:i}}function vT(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function ST(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function Nd(t,e,n,i){const{caretSize:s,caretPadding:o,cornerRadius:l}=t,{xAlign:c,yAlign:u}=n,h=s+o,{topLeft:d,topRight:m,bottomLeft:_,bottomRight:v}=Bs(l);let M=vT(e,c);const T=ST(e,u,h);return u==="center"?c==="left"?M+=h:c==="right"&&(M-=h):c==="left"?M-=Math.max(d,_)+s:c==="right"&&(M+=Math.max(m,v)+s),{x:pe(M,0,i.width-e.width),y:pe(T,0,i.height-e.height)}}function aa(t,e,n){const i=Ye(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function Bd(t){return Mn([],qn(t))}function wT(t,e,n){return rs(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Fd(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const xm={beforeTitle:Yn,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:Yn,beforeBody:Yn,beforeLabel:Yn,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 yt(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:Yn,afterBody:Yn,beforeFooter:Yn,footer:Yn,afterFooter:Yn};function Ee(t,e,n,i){const s=t[e].call(n,i);return typeof s>"u"?xm[e].call(n,i):s}class Wc extends _n{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 tm(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wT(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=Mn(c,qn(s)),c=Mn(c,qn(o)),c=Mn(c,qn(l)),c}getBeforeBody(e,n){return Bd(Ee(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return pt(e,o=>{const l={before:[],lines:[],after:[]},c=Fd(i,o);Mn(l.before,qn(Ee(c,"beforeLabel",this,o))),Mn(l.lines,Ee(c,"label",this,o)),Mn(l.after,qn(Ee(c,"afterLabel",this,o))),s.push(l)}),s}getAfterBody(e,n){return Bd(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=Mn(c,qn(s)),c=Mn(c,qn(o)),c=Mn(c,qn(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(_T(this.chart,n[u]));return e.filter&&(c=c.filter((d,m,_)=>e.filter(d,m,_,i))),e.itemSort&&(c=c.sort((d,m)=>e.itemSort(d,m,i))),pt(c,d=>{const m=Fd(e.callbacks,d);s.push(Ee(m,"labelColor",this,d)),o.push(Ee(m,"labelPointStyle",this,d)),l.push(Ee(m,"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=Dr[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=Rd(this,i),h=Object.assign({},c,u),d=Ld(this.chart,i,h),m=Nd(i,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:m.x,y:m.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:m}=Bs(c),{x:_,y:v}=e,{width:M,height:T}=n;let k,A,R,W,z,L;return o==="center"?(z=v+T/2,s==="left"?(k=_,A=k-l,W=z+l,L=z-l):(k=_+M,A=k+l,W=z-l,L=z+l),R=k):(s==="left"?A=_+Math.max(u,d)+l:s==="right"?A=_+M-Math.max(h,m)-l:A=this.caretX,o==="top"?(W=v,z=W-l,k=A-l,R=A+l):(W=v+T,z=W+l,k=A+l,R=A-l),L=W),{x1:k,x2:A,x3:R,y1:W,y2:z,y3:L}}drawTitle(e,n,i){const s=this.title,o=s.length;let l,c,u;if(o){const h=Fs(i.rtl,this.x,this.width);for(e.x=aa(this,i.titleAlign,i),n.textAlign=h.textAlign(i.titleAlign),n.textBaseline="middle",l=ue(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=ue(o.bodyFont),m=aa(this,"left",o),_=s.x(m),v=u<d.lineHeight?(d.lineHeight-u)/2:0,M=n.y+v;if(o.usePointStyle){const T={radius:Math.min(h,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},k=s.leftForLtr(_,h)+h/2,A=M+u/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Dc(e,T,k,A),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Dc(e,T,k,A)}else{e.lineWidth=bt(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 T=s.leftForLtr(_,h),k=s.leftForLtr(s.xPlus(_,1),h-2),A=Bs(l.borderRadius);Object.values(A).some(R=>R!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,ka(e,{x:T,y:M,w:h,h:u,radius:A}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),ka(e,{x:k,y:M+1,w:h-2,h:u-2,radius:A}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(T,M,h,u),e.strokeRect(T,M,h,u),e.fillStyle=l.backgroundColor,e.fillRect(k,M+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,m=ue(i.bodyFont);let _=m.lineHeight,v=0;const M=Fs(i.rtl,this.x,this.width),T=function(G){n.fillText(G,M.x(e.x+v),e.y+_/2),e.y+=_+o},k=M.textAlign(l);let A,R,W,z,L,Y,V;for(n.textAlign=l,n.textBaseline="middle",n.font=m.string,e.x=aa(this,k,i),n.fillStyle=i.bodyColor,pt(this.beforeBody,T),v=c&&k!=="right"?l==="center"?h/2+d:h+2+d:0,z=0,Y=s.length;z<Y;++z){for(A=s[z],R=this.labelTextColors[z],n.fillStyle=R,pt(A.before,T),W=A.lines,c&&W.length&&(this._drawColorBox(n,e,z,M,i),_=Math.max(m.lineHeight,u)),L=0,V=W.length;L<V;++L)T(W[L]),_=m.lineHeight;pt(A.after,T)}v=0,_=m.lineHeight,pt(this.afterBody,T),e.y-=o}drawFooter(e,n,i){const s=this.footer,o=s.length;let l,c;if(o){const u=Fs(i.rtl,this.x,this.width);for(e.x=aa(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=u.textAlign(i.footerAlign),n.textBaseline="middle",l=ue(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:m,topRight:_,bottomLeft:v,bottomRight:M}=Bs(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(c+m,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-M),n.quadraticCurveTo(c+h,u+d,c+h-M,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+m),n.quadraticCurveTo(c,u,c+m,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=Dr[e.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=Rd(this,e),u=Object.assign({},l,this._size),h=Ld(n,e,u),d=Nd(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=Ye(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),Kg(e,n.textDirection),o.y+=l.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),qg(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=!Ta(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||!Ta(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=Dr[o.position].call(this,e,n);return l!==!1&&(i!==l.x||s!==l.y)}}j(Wc,"positioners",Dr);var LC={id:"tooltip",_element:Wc,positioners:Dr,afterInit(t,e,n){n&&(t.tooltip=new Wc({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:xm},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 MT=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function TT(t,e,n,i){const s=t.indexOf(e);if(s===-1)return MT(t,e,n,i);const o=t.lastIndexOf(e);return s!==o?n:s}const PT=(t,e)=>t===null?null:pe(Math.round(t),0,e);function Wd(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class zd extends os{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(yt(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:TT(i,e,ft(n,e),this._addedLabels),PT(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 Wd.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}}j(zd,"id","category"),j(zd,"defaults",{ticks:{callback:Wd}});function CT(t,e){const n=[],{bounds:s,step:o,min:l,max:c,precision:u,count:h,maxTicks:d,maxDigits:m,includeBounds:_}=t,v=o||1,M=d-1,{min:T,max:k}=e,A=!yt(l),R=!yt(c),W=!yt(h),z=(k-T)/(m+1);let L=Nh((k-T)/M/v)*v,Y,V,G,J;if(L<1e-14&&!A&&!R)return[{value:T},{value:k}];J=Math.ceil(k/L)-Math.floor(T/L),J>M&&(L=Nh(J*L/M/v)*v),yt(u)||(Y=Math.pow(10,u),L=Math.ceil(L*Y)/Y),s==="ticks"?(V=Math.floor(T/L)*L,G=Math.ceil(k/L)*L):(V=T,G=k),A&&R&&o&&Wv((c-l)/o,L/1e3)?(J=Math.round(Math.min((c-l)/L,d)),L=(c-l)/J,V=l,G=c):W?(V=A?l:V,G=R?c:G,J=h-1,L=(G-V)/J):(J=(G-V)/L,ts(J,Math.round(J),L/1e3)?J=Math.round(J):J=Math.ceil(J));const rt=Math.max(Bh(L),Bh(V));Y=Math.pow(10,yt(u)?rt:u),V=Math.round(V*Y)/Y,G=Math.round(G*Y)/Y;let et=0;for(A&&(_&&V!==l?(n.push({value:l}),V<l&&et++,ts(Math.round((V+et*L)*Y)/Y,l,Hd(l,z,t))&&et++):V<l&&et++);et<J;++et){const at=Math.round((V+et*L)*Y)/Y;if(R&&at>c)break;n.push({value:at})}return R&&_&&G!==c?n.length&&ts(n[n.length-1].value,c,Hd(c,z,t))?n[n.length-1].value=c:n.push({value:c}):(!R||G===c)&&n.push({value:G}),n}function Hd(t,e,{horizontal:n,minRotation:i}){const s=ti(i),o=(n?Math.sin(s):Math.cos(s))||.001,l=.75*e*(""+t).length;return Math.min(e/o,l)}class ym extends os{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 yt(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=ln(s),h=ln(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=CT(s,o);return e.bounds==="ticks"&&Og(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 Ra(e,this.chart.options.locale,this.options.ticks.format)}}class Ud extends ym{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Jt(e)?e:0,this.max=Jt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=ti(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}}j(Ud,"id","linear"),j(Ud,"defaults",{ticks:{callback:rf.formatters.numeric}});const Xr=t=>Math.floor(Si(t)),qi=(t,e)=>Math.pow(10,Xr(t)+e);function Vd(t){return t/Math.pow(10,Xr(t))===1}function $d(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function kT(t,e){const n=e-t;let i=Xr(n);for(;$d(t,e,i)>10;)i++;for(;$d(t,e,i)<10;)i--;return Math.min(i,Xr(t))}function ET(t,{min:e,max:n}){e=$e(t.min,e);const i=[],s=Xr(e);let o=kT(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 m=Math.floor((h-d)/Math.pow(10,o)),_=$e(t.min,Math.round((u+d+m*Math.pow(10,o))*l)/l);for(;_<n;)i.push({value:_,major:Vd(_),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(o++,m=2,l=o>=0?1:l),_=Math.round((u+d+m*Math.pow(10,o))*l)/l;const v=$e(t.max,_);return i.push({value:v,major:Vd(v),significand:m}),i}class Gd extends os{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=ym.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Jt(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Jt(e)?Math.max(0,e):null,this.max=Jt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Jt(this._userMin)&&(this.min=e===qi(this.min,0)?qi(this.min,-1):qi(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(qi(i,-1)),l(qi(s,1)))),i<=0&&o(qi(s,-1)),s<=0&&l(qi(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=ET(n,this);return e.bounds==="ticks"&&Og(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":Ra(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Si(e),this._valueRange=Si(this.max)-Si(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Si(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}j(Gd,"id","logarithmic"),j(Gd,"defaults",{ticks:{callback:rf.formatters.logarithmic,major:{enabled:!0}}});const Wa={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(Wa);function Yd(t,e){return t-e}function Xd(t,e){if(yt(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)),Jt(l)||(l=typeof i=="string"?n.parse(l,i):n.parse(l)),l===null?null:(s&&(l=s==="week"&&(Ws(o)||o===!0)?n.startOf(l,"isoWeek",o):n.startOf(l,s)),+l)}function Kd(t,e,n,i){const s=De.length;for(let o=De.indexOf(t);o<s-1;++o){const l=Wa[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 IT(t,e,n,i,s){for(let o=De.length-1;o>=De.indexOf(n);o--){const l=De[o];if(Wa[l].common&&t._adapter.diff(s,i,l)>=e-1)return l}return De[n?De.indexOf(n):0]}function AT(t){for(let e=De.indexOf(t)+1,n=De.length;e<n;++e)if(Wa[De[e]].common)return De[e]}function qd(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:s}=ef(n,e),o=n[i]>=e?n[i]:n[s];t[o]=!0}}function OT(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 jd(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:OT(t,i,s,n)}class Oa extends os{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 bw._date(e.adapters.date);s.init(n),Lr(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:Xd(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=Jt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),o=Jt(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=$v(s,o,l);return this._unit=n.unit||(i.autoSkip?Kd(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):IT(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:AT(this._unit),this.initOffsets(s),e.reverse&&c.reverse(),jd(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||Kd(o.minUnit,n,i,this._getLabelCapacity(n)),c=ft(s.ticks.stepSize,1),u=l==="week"?o.isoWeekday:!1,h=Ws(u)||u===!0,d={};let m=n,_,v;if(h&&(m=+e.startOf(m,"isoWeek",u)),m=+e.startOf(m,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 M=s.ticks.source==="data"&&this.getDataTimestamps();for(_=m,v=0;_<i;_=+e.add(_,c,l),v++)qd(d,_,M);return(_===i||s.bounds==="ticks"||v===1)&&qd(d,_,M),Object.keys(d).sort(Yd).map(T=>+T)}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 ot(l,[e,n,i],this);const c=o.time.displayFormats,u=this._unit,h=this._majorUnit,d=u&&c[u],m=h&&c[h],_=i[n],v=h&&m&&_&&_.major;return this._adapter.format(e,s||(v?m: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=ti(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,jd(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(Xd(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Lg(e.sort(Yd))}}j(Oa,"id","time"),j(Oa,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function la(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}=Ji(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}=Ji(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 Zd extends Oa{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=la(n,this.min),this._tableRange=la(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(la(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return la(this._table,i*this._tableRange+this._minPos,!0)}}j(Zd,"id","timeseries"),j(Zd,"defaults",Oa.defaults);const vm="label";function Jd(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function DT(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function Sm(t,e){t.labels=e}function wm(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vm;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 RT(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vm;const n={labels:[],datasets:[]};return Sm(n,t.labels),wm(n,t.datasets,e),n}function LT(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:m,..._}=t,v=Ge.useRef(null),M=Ge.useRef(null),T=()=>{v.current&&(M.current=new df(v.current,{type:l,data:RT(c,o),options:u&&{...u},plugins:h}),Jd(e,M.current))},k=()=>{Jd(e,null),M.current&&(M.current.destroy(),M.current=null)};return Ge.useEffect(()=>{!s&&M.current&&u&&DT(M.current,u)},[s,u]),Ge.useEffect(()=>{!s&&M.current&&Sm(M.current.config.data,c.labels)},[s,c.labels]),Ge.useEffect(()=>{!s&&M.current&&c.datasets&&wm(M.current.config.data,c.datasets,o)},[s,c.datasets]),Ge.useEffect(()=>{M.current&&(s?(k(),setTimeout(T)):M.current.update(m))},[s,u,c.labels,c.datasets,m]),Ge.useEffect(()=>{M.current&&(k(),setTimeout(T))},[l]),Ge.useEffect(()=>(T(),()=>k()),[]),Tg.createElement("canvas",{ref:v,role:"img",height:n,width:i,..._},d)}const NT=Ge.forwardRef(LT);function za(t,e){return df.register(e),Ge.forwardRef((n,i)=>Tg.createElement(NT,{...n,ref:i,type:t}))}const NC=za("line",xa),BC=za("bar",ba),FC=za("pie",Rc),WC=za("scatter",ya);var Tc={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 Qd;function BT(){return Qd||(Qd=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 m(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 M(b,S,P){var O="DEPRECATED METHOD: "+S+`
|
|
23
|
-
`+P+` AT
|
|
24
|
-
`;return function(){var $=new Error("get-stack-trace"),q=$&&$.stack?$.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",dt=e.console&&(e.console.warn||e.console.log);return dt&&dt.call(e.console,O,q),b.apply(this,arguments)}}var T;typeof Object.assign!="function"?T=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 $=arguments[O];if($!==s&&$!==null)for(var q in $)$.hasOwnProperty(q)&&(P[q]=$[q])}return P}:T=Object.assign;var k=M(function(S,P,O){for(var $=Object.keys(P),q=0;q<$.length;)(!O||O&&S[$[q]]===s)&&(S[$[q]]=P[$[q]]),q++;return S},"extend","Use `assign`."),A=M(function(S,P){return k(S,P,!0)},"merge","Use `assign`.");function R(b,S,P){var O=S.prototype,$;$=b.prototype=Object.create(O),$.constructor=b,$._super=O,P&&T($,P)}function W(b,S){return function(){return b.apply(S,arguments)}}function z(b,S){return typeof b==c?b.apply(S&&S[0]||s,S):b}function L(b,S){return b===s?S:b}function Y(b,S,P){v(rt(S),function(O){b.addEventListener(O,P,!1)})}function V(b,S,P){v(rt(S),function(O){b.removeEventListener(O,P,!1)})}function G(b,S){for(;b;){if(b==S)return!0;b=b.parentNode}return!1}function J(b,S){return b.indexOf(S)>-1}function rt(b){return b.trim().split(/\s+/g)}function et(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 at(b){return Array.prototype.slice.call(b,0)}function zt(b,S,P){for(var O=[],$=[],q=0;q<b.length;){var dt=b[q][S];et($,dt)<0&&O.push(b[q]),$[q]=dt,q++}return O=O.sort(function(Zt,ne){return Zt[S]>ne[S]}),O}function Vt(b,S){for(var P,O,$=S[0].toUpperCase()+S.slice(1),q=0;q<o.length;){if(P=o[q],O=P?P+$:S,O in b)return O;q++}return s}var St=1;function Ct(){return St++}function Tt(b){var S=b.ownerDocument||b;return S.defaultView||S.parentWindow||e}var jt=/mobile|tablet|ip(ad|hone|od)|android/i,$t="ontouchstart"in e,Re=Vt(e,"PointerEvent")!==s,re=$t&&jt.test(navigator.userAgent),ye="touch",An="pen",Le="mouse",ve="kinect",Se=25,oe=1,Ne=2,Et=4,he=8,On=1,bn=2,ii=4,ae=8,cn=16,Ke=bn|ii,le=ae|cn,Gs=Ke|le,to=["x","y"],xn=["clientX","clientY"];function Dt(b,S){var P=this;this.manager=b,this.callback=S,this.element=b.element,this.target=b.options.inputTarget,this.domHandler=function(O){z(b.options.enable,[b])&&P.handler(O)},this.init()}Dt.prototype={handler:function(){},init:function(){this.evEl&&Y(this.element,this.evEl,this.domHandler),this.evTarget&&Y(this.target,this.evTarget,this.domHandler),this.evWin&&Y(Tt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&V(this.element,this.evEl,this.domHandler),this.evTarget&&V(this.target,this.evTarget,this.domHandler),this.evWin&&V(Tt(this.element),this.evWin,this.domHandler)}};function Ii(b){var S,P=b.options.inputClass;return P?S=P:Re?S=Qs:re?S=oi:$t?S=nr:S=hs,new S(b,cs)}function cs(b,S,P){var O=P.pointers.length,$=P.changedPointers.length,q=S&oe&&O-$===0,dt=S&(Et|he)&&O-$===0;P.isFirst=!!q,P.isFinal=!!dt,q&&(b.session={}),P.eventType=S,$a(b,P),b.emit("hammer.input",P),b.recognize(P),b.session.prevInput=P}function $a(b,S){var P=b.session,O=S.pointers,$=O.length;P.firstInput||(P.firstInput=si(S)),$>1&&!P.firstMultiple?P.firstMultiple=si(S):$===1&&(P.firstMultiple=!1);var q=P.firstInput,dt=P.firstMultiple,Gt=dt?dt.center:q.center,Zt=S.center=Dn(O);S.timeStamp=d(),S.deltaTime=S.timeStamp-q.timeStamp,S.angle=Oi(Gt,Zt),S.distance=ri(Gt,Zt),Ai(P,S),S.offsetDirection=us(S.deltaX,S.deltaY);var ne=fs(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=ne.x,S.overallVelocityY=ne.y,S.overallVelocity=h(ne.x)>h(ne.y)?ne.x:ne.y,S.scale=dt?Xs(dt.pointers,O):1,S.rotation=dt?Ys(dt.pointers,O):0,S.maxPointers=P.prevInput?S.pointers.length>P.prevInput.maxPointers?S.pointers.length:P.prevInput.maxPointers:S.pointers.length,Ga(P,S);var je=b.element;G(S.srcEvent.target,je)&&(je=S.srcEvent.target),S.target=je}function Ai(b,S){var P=S.center,O=b.offsetDelta||{},$=b.prevDelta||{},q=b.prevInput||{};(S.eventType===oe||q.eventType===Et)&&($=b.prevDelta={x:q.deltaX||0,y:q.deltaY||0},O=b.offsetDelta={x:P.x,y:P.y}),S.deltaX=$.x+(P.x-O.x),S.deltaY=$.y+(P.y-O.y)}function Ga(b,S){var P=b.lastInterval||S,O=S.timeStamp-P.timeStamp,$,q,dt,Gt;if(S.eventType!=he&&(O>Se||P.velocity===s)){var Zt=S.deltaX-P.deltaX,ne=S.deltaY-P.deltaY,je=fs(O,Zt,ne);q=je.x,dt=je.y,$=h(je.x)>h(je.y)?je.x:je.y,Gt=us(Zt,ne),b.lastInterval=S}else $=P.velocity,q=P.velocityX,dt=P.velocityY,Gt=P.direction;S.velocity=$,S.velocityX=q,S.velocityY=dt,S.direction=Gt}function si(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:Dn(S),deltaX:b.deltaX,deltaY:b.deltaY}}function Dn(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,$=0;$<S;)P+=b[$].clientX,O+=b[$].clientY,$++;return{x:u(P/S),y:u(O/S)}}function fs(b,S,P){return{x:S/b||0,y:P/b||0}}function us(b,S){return b===S?On:h(b)>=h(S)?b<0?bn:ii:S<0?ae:cn}function ri(b,S,P){P||(P=to);var O=S[P[0]]-b[P[0]],$=S[P[1]]-b[P[1]];return Math.sqrt(O*O+$*$)}function Oi(b,S,P){P||(P=to);var O=S[P[0]]-b[P[0]],$=S[P[1]]-b[P[1]];return Math.atan2($,O)*180/Math.PI}function Ys(b,S){return Oi(S[1],S[0],xn)+Oi(b[1],b[0],xn)}function Xs(b,S){return ri(S[0],S[1],xn)/ri(b[0],b[1],xn)}var Ks={mousedown:oe,mousemove:Ne,mouseup:Et},qs="mousedown",js="mousemove mouseup";function hs(){this.evEl=qs,this.evWin=js,this.pressed=!1,Dt.apply(this,arguments)}R(hs,Dt,{handler:function(S){var P=Ks[S.type];P&oe&&S.button===0&&(this.pressed=!0),P&Ne&&S.which!==1&&(P=Et),this.pressed&&(P&Et&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:Le,srcEvent:S}))}});var Ya={pointerdown:oe,pointermove:Ne,pointerup:Et,pointercancel:he,pointerout:he},Xa={2:ye,3:An,4:Le,5:ve},Zs="pointerdown",Js="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Zs="MSPointerDown",Js="MSPointerMove MSPointerUp MSPointerCancel");function Qs(){this.evEl=Zs,this.evWin=Js,Dt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}R(Qs,Dt,{handler:function(S){var P=this.store,O=!1,$=S.type.toLowerCase().replace("ms",""),q=Ya[$],dt=Xa[S.pointerType]||S.pointerType,Gt=dt==ye,Zt=et(P,S.pointerId,"pointerId");q&oe&&(S.button===0||Gt)?Zt<0&&(P.push(S),Zt=P.length-1):q&(Et|he)&&(O=!0),!(Zt<0)&&(P[Zt]=S,this.callback(this.manager,q,{pointers:P,changedPointers:[S],pointerType:dt,srcEvent:S}),O&&P.splice(Zt,1))}});var Ka={touchstart:oe,touchmove:Ne,touchend:Et,touchcancel:he},qa="touchstart",ja="touchstart touchmove touchend touchcancel";function tr(){this.evTarget=qa,this.evWin=ja,this.started=!1,Dt.apply(this,arguments)}R(tr,Dt,{handler:function(S){var P=Ka[S.type];if(P===oe&&(this.started=!0),!!this.started){var O=Za.call(this,S,P);P&(Et|he)&&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=at(b.touches),O=at(b.changedTouches);return S&(Et|he)&&(P=zt(P.concat(O),"identifier")),[P,O]}var Ja={touchstart:oe,touchmove:Ne,touchend:Et,touchcancel:he},Qa="touchstart touchmove touchend touchcancel";function oi(){this.evTarget=Qa,this.targetIds={},Dt.apply(this,arguments)}R(oi,Dt,{handler:function(S){var P=Ja[S.type],O=tl.call(this,S,P);O&&this.callback(this.manager,P,{pointers:O[0],changedPointers:O[1],pointerType:ye,srcEvent:S})}});function tl(b,S){var P=at(b.touches),O=this.targetIds;if(S&(oe|Ne)&&P.length===1)return O[P[0].identifier]=!0,[P,P];var $,q,dt=at(b.changedTouches),Gt=[],Zt=this.target;if(q=P.filter(function(ne){return G(ne.target,Zt)}),S===oe)for($=0;$<q.length;)O[q[$].identifier]=!0,$++;for($=0;$<dt.length;)O[dt[$].identifier]&&Gt.push(dt[$]),S&(Et|he)&&delete O[dt[$].identifier],$++;if(Gt.length)return[zt(q.concat(Gt),"identifier"),Gt]}var er=2500,eo=25;function nr(){Dt.apply(this,arguments);var b=W(this.handler,this);this.touch=new oi(this.manager,b),this.mouse=new hs(this.manager,b),this.primaryTouch=null,this.lastTouches=[]}R(nr,Dt,{handler:function(S,P,O){var $=O.pointerType==ye,q=O.pointerType==Le;if(!(q&&O.sourceCapabilities&&O.sourceCapabilities.firesTouchEvents)){if($)el.call(this,P,O);else if(q&&nl.call(this,O))return;this.callback(S,P,O)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function el(b,S){b&oe?(this.primaryTouch=S.changedPointers[0].identifier,no.call(this,S)):b&(Et|he)&&no.call(this,S)}function no(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,$=function(){var q=O.indexOf(P);q>-1&&O.splice(q,1)};setTimeout($,er)}}function nl(b){for(var S=b.srcEvent.clientX,P=b.srcEvent.clientY,O=0;O<this.lastTouches.length;O++){var $=this.lastTouches[O],q=Math.abs(S-$.x),dt=Math.abs(P-$.y);if(q<=eo&&dt<=eo)return!0}return!1}var io=Vt(l.style,"touchAction"),so=io!==s,ro="compute",ir="auto",sr="manipulation",Rn="none",Di="pan-x",Ri="pan-y",ds=il();function rr(b,S){this.manager=b,this.set(S)}rr.prototype={set:function(b){b==ro&&(b=this.compute()),so&&this.manager.element.style&&ds[b]&&(this.manager.element.style[io]=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){z(S.options.enable,[S])&&(b=b.concat(S.getTouchAction()))}),gs(b.join(" "))},preventDefaults:function(b){var S=b.srcEvent,P=b.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var O=this.actions,$=J(O,Rn)&&!ds[Rn],q=J(O,Ri)&&!ds[Ri],dt=J(O,Di)&&!ds[Di];if($){var Gt=b.pointers.length===1,Zt=b.distance<2,ne=b.deltaTime<250;if(Gt&&Zt&&ne)return}if(!(dt&&q)&&($||q&&P&Ke||dt&&P&le))return this.preventSrc(S)},preventSrc:function(b){this.manager.session.prevented=!0,b.preventDefault()}};function gs(b){if(J(b,Rn))return Rn;var S=J(b,Di),P=J(b,Ri);return S&&P?Rn:S||P?S?Di:Ri:J(b,sr)?sr:ir}function il(){if(!so)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 Ln=1,we=2,ai=4,yn=8,qe=yn,li=16,Be=32;function fn(b){this.options=T({},this.defaults,b||{}),this.id=Ct(),this.manager=null,this.options.enable=L(this.options.enable,!0),this.state=Ln,this.simultaneous={},this.requireFail=[]}fn.prototype={defaults:{},set:function(b){return T(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=ms(b,this),S[b.id]||(S[b.id]=b,b.recognizeWith(this)),this},dropRecognizeWith:function(b){return _(b,"dropRecognizeWith",this)?this:(b=ms(b,this),delete this.simultaneous[b.id],this)},requireFailure:function(b){if(_(b,"requireFailure",this))return this;var S=this.requireFail;return b=ms(b,this),et(S,b)===-1&&(S.push(b),b.requireFailure(this)),this},dropRequireFailure:function(b){if(_(b,"dropRequireFailure",this))return this;b=ms(b,this);var S=et(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($){S.manager.emit($,b)}P<yn&&O(S.options.event+oo(P)),O(S.options.event),b.additionalEvent&&O(b.additionalEvent),P>=yn&&O(S.options.event+oo(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|Ln)))return!1;b++}return!0},recognize:function(b){var S=T({},b);if(!z(this.options.enable,[this,S])){this.reset(),this.state=Be;return}this.state&(qe|li|Be)&&(this.state=Ln),this.state=this.process(S),this.state&(we|ai|yn|li)&&this.tryEmit(S)},process:function(b){},getTouchAction:function(){},reset:function(){}};function oo(b){return b&li?"cancel":b&yn?"end":b&ai?"move":b&we?"start":""}function ao(b){return b==cn?"down":b==ae?"up":b==bn?"left":b==ii?"right":""}function ms(b,S){var P=S.manager;return P?P.get(b):b}function Me(){fn.apply(this,arguments)}R(Me,fn,{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|ai),$=this.attrTest(b);return O&&(P&he||!$)?S|li:O||$?P&Et?S|yn:S&we?S|ai:we:Be}});function Li(){Me.apply(this,arguments),this.pX=null,this.pY=null}R(Li,Me,{defaults:{event:"pan",threshold:10,pointers:1,direction:Gs},getTouchAction:function(){var b=this.options.direction,S=[];return b&Ke&&S.push(Ri),b&le&&S.push(Di),S},directionTest:function(b){var S=this.options,P=!0,O=b.distance,$=b.direction,q=b.deltaX,dt=b.deltaY;return $&S.direction||(S.direction&Ke?($=q===0?On:q<0?bn:ii,P=q!=this.pX,O=Math.abs(b.deltaX)):($=dt===0?On:dt<0?ae:cn,P=dt!=this.pY,O=Math.abs(b.deltaY))),b.direction=$,P&&O>S.threshold&&$&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=ao(b.direction);S&&(b.additionalEvent=this.options.event+S),this._super.emit.call(this,b)}});function ps(){Me.apply(this,arguments)}R(ps,Me,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Rn]},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 Ni(){fn.apply(this,arguments),this._timer=null,this._input=null}R(Ni,fn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ir]},process:function(b){var S=this.options,P=b.pointers.length===S.pointers,O=b.distance<S.threshold,$=b.deltaTime>S.time;if(this._input=b,!O||!P||b.eventType&(Et|he)&&!$)this.reset();else if(b.eventType&oe)this.reset(),this._timer=m(function(){this.state=qe,this.tryEmit()},S.time,this);else if(b.eventType&Et)return qe;return Be},reset:function(){clearTimeout(this._timer)},emit:function(b){this.state===qe&&(b&&b.eventType&Et?this.manager.emit(this.options.event+"up",b):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function or(){Me.apply(this,arguments)}R(or,Me,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Rn]},attrTest:function(b){return this._super.attrTest.call(this,b)&&(Math.abs(b.rotation)>this.options.threshold||this.state&we)}});function _s(){Me.apply(this,arguments)}R(_s,Me,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ke|le,pointers:1},getTouchAction:function(){return Li.prototype.getTouchAction.call(this)},attrTest:function(b){var S=this.options.direction,P;return S&(Ke|le)?P=b.overallVelocity:S&Ke?P=b.overallVelocityX:S&le&&(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&Et},emit:function(b){var S=ao(b.offsetDirection);S&&this.manager.emit(this.options.event+S,b),this.manager.emit(this.options.event,b)}});function Nn(){fn.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}R(Nn,fn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[sr]},process:function(b){var S=this.options,P=b.pointers.length===S.pointers,O=b.distance<S.threshold,$=b.deltaTime<S.time;if(this.reset(),b.eventType&oe&&this.count===0)return this.failTimeout();if(O&&$&&P){if(b.eventType!=Et)return this.failTimeout();var q=this.pTime?b.timeStamp-this.pTime<S.interval:!0,dt=!this.pCenter||ri(this.pCenter,b.center)<S.posThreshold;this.pTime=b.timeStamp,this.pCenter=b.center,!dt||!q?this.count=1:this.count+=1,this._input=b;var Gt=this.count%S.taps;if(Gt===0)return this.hasRequireFailures()?(this._timer=m(function(){this.state=qe,this.tryEmit()},S.interval,this),we):qe}return Be},failTimeout:function(){return this._timer=m(function(){this.state=Be},this.options.interval,this),Be},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==qe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function un(b,S){return S=S||{},S.recognizers=L(S.recognizers,un.defaults.preset),new bs(b,S)}un.VERSION="2.0.7",un.defaults={domEvents:!1,touchAction:ro,enable:!0,inputTarget:null,inputClass:null,preset:[[or,{enable:!1}],[ps,{enable:!1},["rotate"]],[_s,{direction:Ke}],[Li,{direction:Ke},["swipe"]],[Nn],[Nn,{event:"doubletap",taps:2},["tap"]],[Ni]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var sl=1,ar=2;function bs(b,S){this.options=T({},un.defaults,S||{}),this.options.inputTarget=this.options.inputTarget||b,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=b,this.input=Ii(this),this.touchAction=new rr(this,this.options.touchAction),xs(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)}bs.prototype={set:function(b){return T(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?ar:sl},recognize:function(b){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(b);var P,O=this.recognizers,$=S.curRecognizer;(!$||$&&$.state&qe)&&($=S.curRecognizer=null);for(var q=0;q<O.length;)P=O[q],S.stopped!==ar&&(!$||P==$||P.canRecognizeWith($))?P.recognize(b):P.reset(),!$&&P.state&(we|ai|yn)&&($=S.curRecognizer=P),q++}},get:function(b){if(b instanceof fn)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=et(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(et(P[O],S),1):delete P[O]}),this}},emit:function(b,S){this.options.domEvents&&rl(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&&xs(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function xs(b,S){var P=b.element;if(P.style){var O;v(b.options.cssProps,function($,q){O=Vt(P.style,q),S?(b.oldCssProps[O]=P.style[O],P.style[O]=$):P.style[O]=b.oldCssProps[O]||""}),S||(b.oldCssProps={})}}function rl(b,S){var P=n.createEvent("Event");P.initEvent(b,!0,!0),P.gesture=S,S.target.dispatchEvent(P)}T(un,{INPUT_START:oe,INPUT_MOVE:Ne,INPUT_END:Et,INPUT_CANCEL:he,STATE_POSSIBLE:Ln,STATE_BEGAN:we,STATE_CHANGED:ai,STATE_ENDED:yn,STATE_RECOGNIZED:qe,STATE_CANCELLED:li,STATE_FAILED:Be,DIRECTION_NONE:On,DIRECTION_LEFT:bn,DIRECTION_RIGHT:ii,DIRECTION_UP:ae,DIRECTION_DOWN:cn,DIRECTION_HORIZONTAL:Ke,DIRECTION_VERTICAL:le,DIRECTION_ALL:Gs,Manager:bs,Input:Dt,TouchAction:rr,TouchInput:oi,MouseInput:hs,PointerEventInput:Qs,TouchMouseInput:nr,SingleTouchInput:tr,Recognizer:fn,AttrRecognizer:Me,Tap:Nn,Pan:Li,Swipe:_s,Pinch:ps,Rotate:or,Press:Ni,on:Y,off:V,each:v,merge:A,extend:k,assign:T,inherit:R,bindFn:W,prefixed:Vt});var lo=typeof e<"u"?e:typeof self<"u"?self:{};lo.Hammer=un,t.exports?t.exports=un:e[i]=un})(window,document,"Hammer")}(Tc)),Tc.exports}var FT=BT();const Fr=Pg(FT);/*!
|
|
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 Kr=t=>t&&t.enabled&&t.modifierKey,Mm=(t,e)=>t&&e[t+"Key"],mf=(t,e)=>t&&!e[t+"Key"];function ki(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 WT(t,e){let n;return function(){return clearTimeout(n),n=setTimeout(t,e),e}}function zT({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 Tm(t,e,n){const{mode:i="xy",scaleMode:s,overScaleMode:o}=t||{},l=zT(e,n),c=Pc(i,n),u=Pc(s,n);if(o){const d=Pc(o,n);for(const m of["x","y"])d[m]&&(u[m]=c[m],c[m]=!1)}if(l&&u[l.axis])return[l];const h=[];return pt(n.scales,function(d){c[d.axis]&&h.push(d)}),h}const zc=new WeakMap;function Wt(t){let e=zc.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},zc.set(t,e)),e}function HT(t){zc.delete(t)}function Pm(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 Cm(t,e){const n=t.isHorizontal()?e.x:e.y;return t.getValueForPixel(n)}function km(t,e,n){const i=t.max-t.min,s=i*(e-1),o=Cm(t,n);return Pm(o,t.min,i,s)}function UT(t,e,n){const i=Cm(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=Pm(l,s,c,u);return{min:Math.pow(10,s+h.min),max:Math.pow(10,o-h.max)}}function VT(t,e){return e&&(e[t.id]||e[t.axis])||{}}function tg(t,e,n,i,s){let o=n[i];if(o==="original"){const l=t.originalScaleLimits[e.id][i];o=ft(l.options,l.scale)}return ft(o,s)}function $T(t,e,n){const i=t.getValueForPixel(e),s=t.getValueForPixel(n);return{min:Math.min(i,s),max:Math.max(i,s)}}function GT(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 ts(e,c,h)&&(e=c),ts(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 as(t,{min:e,max:n},i,s=!1){const o=Wt(t.chart),{options:l}=t,c=VT(t,i),{minRange:u=0}=c,h=tg(o,t,c,"min",-1/0),d=tg(o,t,c,"max",1/0);if(s==="pan"&&(e<h||n>d))return!0;const m=t.max-t.min,_=s?Math.max(n-e,u):m;if(s&&_===u&&m<=u)return!0;const v=GT(_,{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 YT(t,e,n,i){const s=km(t,e,n),o={min:t.min+s.min,max:t.max-s.max};return as(t,o,i,!0)}function XT(t,e,n,i){const s=UT(t,e,n);return as(t,s,i,!0)}function KT(t,e,n,i){as(t,$T(t,e,n),i,!0)}const eg=t=>t===0||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);function qT(t){const n=t.getLabels().length-1;t.min>0&&(t.min-=1),t.max<n&&(t.max+=1)}function jT(t,e,n,i){const s=km(t,e,n);t.min===t.max&&e<1&&qT(t);const o={min:t.min+eg(s.min),max:t.max-eg(s.max)};return as(t,o,i,!0)}function ZT(t){return t.isHorizontal()?t.width:t.height}function JT(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(ZT(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),as(t,{min:o,max:l},n)||d}const QT={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 Em(t,e,n,i=!1){const{min:s,max:o,options:l}=t,c=l.time&&l.time.round,u=QT[c]||0,h=t.getValueForPixel(t.getPixelForValue(s+u)-e),d=t.getValueForPixel(t.getPixelForValue(o+u)-e);return isNaN(h)||isNaN(d)?!0:as(t,{min:h,max:d},n,i?"pan":!1)}function ng(t,e,n){return Em(t,e,n,!0)}const Hc={category:jT,default:YT,logarithmic:XT},Uc={default:KT},Vc={category:JT,default:Em,logarithmic:ng,timeseries:ng};function t2(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 ig(t,e){pt(t,(n,i)=>{e[i]||delete t[i]})}function Vs(t,e){const{scales:n}=t,{originalScaleLimits:i,updatedScaleLimits:s}=e;return pt(n,function(o){t2(o,i,s)&&(i[o.id]={min:{scale:o.min,options:o.options.min},max:{scale:o.max,options:o.options.max}})}),ig(i,n),ig(s,n),i}function sg(t,e,n,i){const s=Hc[t.type]||Hc.default;ot(s,[t,e,n,i])}function rg(t,e,n,i){const s=Uc[t.type]||Uc.default;ot(s,[t,e,n,i])}function e2(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function pf(t,e,n="none",i="api"){const{x:s=1,y:o=1,focalPoint:l=e2(t)}=typeof e=="number"?{x:e,y:e}:e,c=Wt(t),{options:{limits:u,zoom:h}}=c;Vs(t,c);const d=s!==1,m=o!==1,_=Tm(h,l,t);pt(_||t.scales,function(v){v.isHorizontal()&&d?sg(v,s,l,u):!v.isHorizontal()&&m&&sg(v,o,l,u)}),t.update(n),ot(h.onZoom,[{chart:t,trigger:i}])}function Im(t,e,n,i="none",s="api"){const o=Wt(t),{options:{limits:l,zoom:c}}=o,{mode:u="xy"}=c;Vs(t,o);const h=ki(u,"x",t),d=ki(u,"y",t);pt(t.scales,function(m){m.isHorizontal()&&h?rg(m,e.x,n.x,l):!m.isHorizontal()&&d&&rg(m,e.y,n.y,l)}),t.update(i),ot(c.onZoom,[{chart:t,trigger:s}])}function n2(t,e,n,i="none",s="api"){var c;const o=Wt(t);Vs(t,o);const l=t.scales[e];as(l,n,void 0,!0),t.update(i),ot((c=o.options.zoom)==null?void 0:c.onZoom,[{chart:t,trigger:s}])}function i2(t,e="default"){const n=Wt(t),i=Vs(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),ot(n.options.zoom.onZoomComplete,[{chart:t}])}function s2(t,e){const n=t.originalScaleLimits[e];if(!n)return;const{min:i,max:s}=n;return ft(s.options,s.scale)-ft(i.options,i.scale)}function r2(t){const e=Wt(t);let n=1,i=1;return pt(t.scales,function(s){const o=s2(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 og(t,e,n,i){const{panDelta:s}=i,o=s[t.id]||0;ln(o)===ln(e)&&(e+=o);const l=Vc[t.type]||Vc.default;ot(l,[t,e,n])?s[t.id]=0:s[t.id]=e}function Am(t,e,n,i="none"){const{x:s=0,y:o=0}=typeof e=="number"?{x:e,y:e}:e,l=Wt(t),{options:{pan:c,limits:u}}=l,{onPan:h}=c||{};Vs(t,l);const d=s!==0,m=o!==0;pt(n||t.scales,function(_){_.isHorizontal()&&d?og(_,s,u,l):!_.isHorizontal()&&m&&og(_,o,u,l)}),t.update(i),ot(h,[{chart:t}])}function Om(t){const e=Wt(t);Vs(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 o2(t){const e=Wt(t),n={};for(const i of Object.keys(t.scales))n[i]=e.updatedScaleLimits[i];return n}function a2(t){const e=Om(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 ag(t){const e=Wt(t);return e.panning||e.dragging}const lg=(t,e,n)=>Math.min(n,Math.max(e,t));function Oe(t,e){const{handlers:n}=Wt(t),i=n[e];i&&i.target&&(i.target.removeEventListener(e,i),delete n[e])}function Wr(t,e,n,i){const{handlers:s,options:o}=Wt(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 l2(t,e){const n=Wt(t);n.dragStart&&(n.dragging=!0,n.dragEnd=e,t.update("none"))}function c2(t,e){const n=Wt(t);!n.dragStart||e.key!=="Escape"||(Oe(t,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,t.update("none"))}function $c(t,e){if(t.target!==e.canvas){const n=e.canvas.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}}return Cn(t,e)}function Dm(t,e,n){const{onZoomStart:i,onZoomRejected:s}=n;if(i){const o=$c(e,t);if(ot(i,[{chart:t,event:e,point:o}])===!1)return ot(s,[{chart:t,event:e}]),!1}}function f2(t,e){if(t.legend){const o=Cn(e,t);if(zs(o,t.legend))return}const n=Wt(t),{pan:i,zoom:s={}}=n.options;if(e.button!==0||Mm(Kr(i),e)||mf(Kr(s.drag),e))return ot(s.onZoomRejected,[{chart:t,event:e}]);Dm(t,e,s)!==!1&&(n.dragStart=e,Wr(t,t.canvas.ownerDocument,"mousemove",l2),Wr(t,window.document,"keydown",c2))}function u2({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 cg(t,e,n,{min:i,max:s,prop:o}){t[i]=lg(Math.min(n.begin[o],n.end[o]),e[i],e[s]),t[s]=lg(Math.max(n.begin[o],n.end[o]),e[i],e[s])}function h2(t,e,n){const i={begin:$c(e.dragStart,t),end:$c(e.dragEnd,t)};if(n){const s=t.chartArea.width/t.chartArea.height;u2(i,s)}return i}function Rm(t,e,n,i){const s=ki(e,"x",t),o=ki(e,"y",t),{top:l,left:c,right:u,bottom:h,width:d,height:m}=t.chartArea,_={top:l,left:c,right:u,bottom:h},v=h2(t,n,i&&s&&o);s&&cg(_,t.chartArea,v,{min:"left",max:"right",prop:"x"}),o&&cg(_,t.chartArea,v,{min:"top",max:"bottom",prop:"y"});const M=_.right-_.left,T=_.bottom-_.top;return{..._,width:M,height:T,zoomX:s&&M?1+(d-M)/d:1,zoomY:o&&T?1+(m-T)/m:1}}function d2(t,e){const n=Wt(t);if(!n.dragStart)return;Oe(t,"mousemove");const{mode:i,onZoomComplete:s,drag:{threshold:o=0,maintainAspectRatio:l}}=n.options.zoom,c=Rm(t,i,{dragStart:n.dragStart,dragEnd:e},l),u=ki(i,"x",t)?c.width:0,h=ki(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}Im(t,{x:c.left,y:c.top},{x:c.right,y:c.bottom},"zoom","drag"),n.dragging=!1,n.filterNextClick=!0,ot(s,[{chart:t}])}function g2(t,e,n){if(mf(Kr(n.wheel),e)){ot(n.onZoomRejected,[{chart:t,event:e}]);return}if(Dm(t,e,n)!==!1&&(e.cancelable&&e.preventDefault(),e.deltaY!==void 0))return!0}function m2(t,e){const{handlers:{onZoomComplete:n},options:{zoom:i}}=Wt(t);if(!g2(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}};pf(t,c,"zoom","wheel"),ot(n,[{chart:t}])}function p2(t,e,n,i){n&&(Wt(t).handlers[e]=WT(()=>ot(n,[{chart:t}]),i))}function _2(t,e){const n=t.canvas,{wheel:i,drag:s,onZoomComplete:o}=e.zoom;i.enabled?(Wr(t,n,"wheel",m2),p2(t,"onZoomComplete",o,250)):Oe(t,"wheel"),s.enabled?(Wr(t,n,"mousedown",f2),Wr(t,n.ownerDocument,"mouseup",d2)):(Oe(t,"mousedown"),Oe(t,"mousemove"),Oe(t,"mouseup"),Oe(t,"keydown"))}function b2(t){Oe(t,"mousedown"),Oe(t,"mousemove"),Oe(t,"mouseup"),Oe(t,"wheel"),Oe(t,"click"),Oe(t,"keydown")}function x2(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"&&(mf(Kr(s),l)||Mm(Kr(o.drag),l))?(ot(s.onPanRejected,[{chart:t,event:i}]),!1):!0}}function y2(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 Lm(t,e,n){if(e.scale){const{center:i,pointers:s}=n,o=1/e.scale*n.scale,l=n.target.getBoundingClientRect(),c=y2(s[0],s[1]),u=e.options.zoom.mode,h={x:c.x&&ki(u,"x",t)?o:1,y:c.y&&ki(u,"y",t)?o:1,focalPoint:{x:i.x-l.left,y:i.y-l.top}};pf(t,h,"zoom","pinch"),e.scale=n.scale}}function v2(t,e,n){if(e.options.zoom.pinch.enabled){const i=Cn(n,t);ot(e.options.zoom.onZoomStart,[{chart:t,event:n,point:i}])===!1?(e.scale=null,ot(e.options.zoom.onZoomRejected,[{chart:t,event:n}])):e.scale=1}}function S2(t,e,n){e.scale&&(Lm(t,e,n),e.scale=null,ot(e.options.zoom.onZoomComplete,[{chart:t}]))}function Nm(t,e,n){const i=e.delta;i&&(e.panning=!0,Am(t,{x:n.deltaX-i.x,y:n.deltaY-i.y},e.panScales),e.delta={x:n.deltaX,y:n.deltaY})}function w2(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(ot(s,[{chart:t,event:n,point:c}])===!1)return ot(o,[{chart:t,event:n}]);e.panScales=Tm(e.options.pan,c,t),e.delta={x:0,y:0},Nm(t,e,n)}function M2(t,e){e.delta=null,e.panning&&(e.panning=!1,e.filterNextClick=!0,ot(e.options.pan.onPanComplete,[{chart:t}]))}const Gc=new WeakMap;function fg(t,e){const n=Wt(t),i=t.canvas,{pan:s,zoom:o}=e,l=new Fr.Manager(i);o&&o.pinch.enabled&&(l.add(new Fr.Pinch),l.on("pinchstart",c=>v2(t,n,c)),l.on("pinch",c=>Lm(t,n,c)),l.on("pinchend",c=>S2(t,n,c))),s&&s.enabled&&(l.add(new Fr.Pan({threshold:s.threshold,enable:x2(t,n)})),l.on("panstart",c=>w2(t,n,c)),l.on("panmove",c=>Nm(t,n,c)),l.on("panend",()=>M2(t,n))),Gc.set(t,l)}function ug(t){const e=Gc.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),Gc.delete(t))}function T2(t,e){var l,c,u,h;const{pan:n,zoom:i}=t,{pan:s,zoom:o}=e;return((c=(l=i==null?void 0:i.zoom)==null?void 0:l.pinch)==null?void 0:c.enabled)!==((h=(u=o==null?void 0:o.zoom)==null?void 0:u.pinch)==null?void 0:h.enabled)||(n==null?void 0:n.enabled)!==(s==null?void 0:s.enabled)||(n==null?void 0:n.threshold)!==(s==null?void 0:s.threshold)}var P2="2.2.0";function ca(t,e,n){const i=n.zoom.drag,{dragStart:s,dragEnd:o}=Wt(t);if(i.drawTime!==e||!o)return;const{left:l,top:c,width:u,height:h}=Rm(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 zC={id:"zoom",version:P2,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=Wt(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)."),Fr&&fg(t,n),t.pan=(s,o,l)=>Am(t,s,o,l),t.zoom=(s,o)=>pf(t,s,o),t.zoomRect=(s,o,l)=>Im(t,s,o,l),t.zoomScale=(s,o,l)=>n2(t,s,o,l),t.resetZoom=s=>i2(t,s),t.getZoomLevel=()=>r2(t),t.getInitialScaleBounds=()=>Om(t),t.getZoomedScaleBounds=()=>o2(t),t.isZoomedOrPanned=()=>a2(t),t.isZoomingOrPanning=()=>ag(t)},beforeEvent(t,{event:e}){if(ag(t))return!1;if(e.type==="click"||e.type==="mouseup"){const n=Wt(t);if(n.filterNextClick)return n.filterNextClick=!1,!1}},beforeUpdate:function(t,e,n){const i=Wt(t),s=i.options;i.options=n,T2(s,n)&&(ug(t),fg(t,n)),_2(t,n)},beforeDatasetsDraw(t,e,n){ca(t,"beforeDatasetsDraw",n)},afterDatasetsDraw(t,e,n){ca(t,"afterDatasetsDraw",n)},beforeDraw(t,e,n){ca(t,"beforeDraw",n)},afterDraw(t,e,n){ca(t,"afterDraw",n)},stop:function(t){b2(t),Fr&&ug(t),HT(t)},panFunctions:Vc,zoomFunctions:Hc,zoomRectFunctions:Uc};/*!
|
|
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 hg=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}(),zr={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):yt(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*hg)/hg}};function Cc(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 C2(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 k2=0,Bm=1,Fm=2,Wm=4,zm=8;function fa(t,e,n){var i=k2;return t<n.left?i|=Bm:t>n.right&&(i|=Fm),e<n.top?i|=zm:e>n.bottom&&(i|=Wm),i}function E2(t,e){for(var n=t.x0,i=t.y0,s=t.x1,o=t.y1,l=fa(n,i,e),c=fa(s,o,e),u,h,d;!(!(l|c)||l&c);)u=l||c,u&zm?(h=n+(s-n)*(e.top-i)/(o-i),d=e.top):u&Wm?(h=n+(s-n)*(e.bottom-i)/(o-i),d=e.bottom):u&Fm?(d=i+(o-i)*(e.right-n)/(s-n),h=e.right):u&Bm&&(d=i+(o-i)*(e.left-n)/(s-n),h=e.left),u===l?(n=h,i=d,l=fa(n,i,e)):(s=h,o=d,c=fa(s,o,e));return{x0:n,x1:s,y0:i,y1:o}}function ua(t,e){var n=e.anchor,i=t,s,o;return e.clamp&&(i=E2(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),C2(s,o,t.vx,t.vy,e.align)}var ha={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 ua({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=Cc(t,e.origin),i=n.x*t.options.radius,s=n.y*t.options.radius;return ua({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=Cc(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)),ua({x0:i,y0:s+l,x1:i+o,y1:s,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=Cc(t,e.origin);return ua({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)}},ni=zr.rasterize;function I2(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 A2(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 O2(t){return t instanceof Or?ha.arc:t instanceof wa?ha.point:t instanceof Ma?ha.bar:ha.fallback}function D2(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,m=n+s-c;t.moveTo(e,h),u<d&&h<m?(t.arc(u,h,c,-Math.PI,-l),t.arc(d,h,c,-l,0),t.arc(d,m,c,0,l),t.arc(u,m,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<m?(t.arc(u,h,c,-Math.PI,0),t.arc(u,m,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 R2(t,e,n){var i=n.backgroundColor,s=n.borderColor,o=n.borderWidth;!i&&(!s||!o)||(t.beginPath(),D2(t,ni(e.x)+o/2,ni(e.y)+o/2,ni(e.w)-o,ni(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 L2(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 N2(t,e,n){var i=t.shadowBlur,s=n.stroked,o=ni(n.x),l=ni(n.y),c=ni(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 B2(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,m=h&&d,_;if(!(!u||!l&&!m))for(n=L2(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),m&&(t.lineJoin="round",t.lineWidth=d,t.strokeStyle=h),_=0,u=e.length;_<u;++_)N2(t,e[_],{stroked:m,filled:l,w:n.w,x:n.x,y:n.y+n.h*_})}var Hm=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};En(Hm.prototype,{_modelize:function(t,e,n,i){var s=this,o=s._index,l=ue(Nt([n.font,{}],i,o)),c=Nt([n.color,At.color],i,o);return{align:Nt([n.align,"center"],i,o),anchor:Nt([n.anchor,"center"],i,o),area:i.chart.chartArea,backgroundColor:Nt([n.backgroundColor,null],i,o),borderColor:Nt([n.borderColor,null],i,o),borderRadius:Nt([n.borderRadius,0],i,o),borderWidth:Nt([n.borderWidth,0],i,o),clamp:Nt([n.clamp,!1],i,o),clip:Nt([n.clip,!1],i,o),color:c,display:t,font:l,lines:e,offset:Nt([n.offset,4],i,o),opacity:Nt([n.opacity,1],i,o),origin:A2(s._el,i),padding:Ye(Nt([n.padding,4],i,o)),positioner:O2(s._el),rotation:Nt([n.rotation,0],i,o)*(Math.PI/180),size:zr.textSize(s._ctx,e,l),textAlign:Nt([n.textAlign,"start"],i,o),textShadowBlur:Nt([n.textShadowBlur,0],i,o),textShadowColor:Nt([n.textShadowColor,c],i,o),textStrokeColor:Nt([n.textStrokeColor,c],i,o),textStrokeWidth:Nt([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=Nt([o.display,!0],t,s);h&&(l=t.dataset.data[s],c=ft(ot(o.formatter,[l,t]),l),u=yt(c)?[]:zr.toTextLines(c),u.length&&(n=e._modelize(h,u,o,t),i=I2(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=zr.bound(0,s.opacity,1),i.translate(ni(e.x),ni(e.y)),i.rotate(s.rotation),R2(i,o.frame,s),B2(i,s.lines,o.text,s),i.restore())}});var F2=Number.MIN_SAFE_INTEGER||-9007199254740991,W2=Number.MAX_SAFE_INTEGER||9007199254740991;function kr(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 dg(t,e){var n=W2,i=F2,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 da(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 Um=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};En(Um.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=kr(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=[da(e[0],e[1]),da(e[0],e[3])],s,o,l;for(this._rotation!==t._rotation&&i.push(da(n[0],n[1]),da(n[0],n[3])),s=0;s<i.length;++s)if(o=dg(e,i[s]),l=dg(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[kr({x:e.x,y:e.y},i,n),kr({x:e.x+e.w,y:e.y},i,n),kr({x:e.x+e.w,y:e.y+e.h},i,n),kr({x:e.x,y:e.y+e.h},i,n)]}});function Vm(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)),m=1/Math.max(Math.abs(s),Math.abs(o));return h*=s*m,d*=o*m,h+=e.offset*s,d+=e.offset*o,{x:i.x+h,y:i.y+d}}function z2(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 H2(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=Vm(c,i.model(),o),s._box.update(l,o,i.rotation()));return z2(t,function(u,h){var d=u._hidable,m=h._hidable;d&&m||m?h._visible=!1:d&&(u._visible=!1)})}var Hr={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 Um,_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&&H2(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=Vm(s._el,s.model(),l),o._box.update(c,l,s.rotation()),s.draw(t,c))}},U2=function(t){if(yt(t))return null;var e=t,n,i,s;if(bt(t))if(!yt(t.label))e=t.label;else if(!yt(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},V2={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:U2,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",$m="$default";function $2(t,e){var n=t.datalabels,i={},s=[],o,l;return n===!1?null:(n===!0&&(n={}),e=En({},[e,n]),o=e.labels||{},l=Object.keys(o),delete e.labels,l.length?l.forEach(function(c){o[c]&&s.push(En({},[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||$m]=h}),delete u.listeners,c},{}),{labels:s,listeners:i})}function Yc(t,e,n,i){if(e){var s=n.$context,o=n.$groups,l;e[o._set]&&(l=e[o._set][o._key],l&&ot(l,[s,i])===!0&&(t[Ie]._dirty=!0,n.update(s)))}}function G2(t,e,n,i,s){var o,l;!n&&!i||(n?i?n!==i&&(l=o=!0):l=!0:o=!0,l&&Yc(t,e.leave,n,s),o&&Yc(t,e.enter,i,s))}function Y2(t,e){var n=t[Ie],i=n._listeners,s,o;if(!(!i.enter&&!i.leave)){if(e.type==="mousemove")o=Hr.lookup(n._labels,e);else if(e.type!=="mouseout")return;s=n._hovered,n._hovered=o,G2(t,i,s,o,e)}}function X2(t,e){var n=t[Ie],i=n._listeners.click,s=i&&Hr.lookup(n._labels,e);s&&Yc(t,i,s,e)}var HC={id:"datalabels",defaults:V2,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=$2(c,n),h=e.meta.data||[],d=t.ctx,m,_,v,M,T,k,A,R;for(d.save(),m=0,v=h.length;m<v;++m)if(A=h[m],A[Ie]=[],l&&A&&t.getDataVisibility(m)&&!A.skip)for(_=0,M=u.labels.length;_<M;++_)T=u.labels[_],k=T._key,R=new Hm(T,d,A,m),R.$groups={_set:i,_key:k||$m},R.$context={active:!1,chart:t,dataIndex:m,dataset:c,datasetIndex:i},R.update(R.$context),A[Ie].push(R),o.push(R);d.restore(),En(s._listeners,u.listeners,{merger:function(W,z,L){z[W]=z[W]||{},z[W][e.index]=L[W],s._listened=!0}})},afterUpdate:function(t){t[Ie]._labels=Hr.prepare(t[Ie]._datasets)},afterDatasetsDraw:function(t){Hr.draw(t,t[Ie]._labels)},beforeEvent:function(t,e){if(t[Ie]._listened){var n=e.event;switch(n.type){case"mousemove":case"mouseout":Y2(t,n);break;case"click":X2(t,n);break}}},afterEvent:function(t){var e=t[Ie],n=e._actives,i=e._actives=t.getActiveElements(),s=zr.arrayDiff(n,i),o,l,c,u,h,d,m;for(o=0,l=s.length;o<l;++o)if(h=s[o],h[1])for(m=h[0].element[Ie]||[],c=0,u=m.length;c<u;++c)d=m[c],d.$context.active=h[1]===1,d.update(d.$context);(e._dirty||s.length)&&(Hr.update(e._labels),t.render()),delete e._dirty}},Rr={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 K2=Rr.exports,gg;function q2(){return gg||(gg=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__",m=1,_=2,v=4,M=1,T=2,k=1,A=2,R=4,W=8,z=16,L=32,Y=64,V=128,G=256,J=512,rt=30,et="...",at=800,zt=16,Vt=1,St=2,Ct=3,Tt=1/0,jt=9007199254740991,$t=17976931348623157e292,Re=NaN,re=4294967295,ye=re-1,An=re>>>1,Le=[["ary",V],["bind",k],["bindKey",A],["curry",W],["curryRight",z],["flip",J],["partial",L],["partialRight",Y],["rearg",G]],ve="[object Arguments]",Se="[object Array]",oe="[object AsyncFunction]",Ne="[object Boolean]",Et="[object Date]",he="[object DOMException]",On="[object Error]",bn="[object Function]",ii="[object GeneratorFunction]",ae="[object Map]",cn="[object Number]",Ke="[object Null]",le="[object Object]",Gs="[object Promise]",to="[object Proxy]",xn="[object RegExp]",Dt="[object Set]",Ii="[object String]",cs="[object Symbol]",$a="[object Undefined]",Ai="[object WeakMap]",Ga="[object WeakSet]",si="[object ArrayBuffer]",Dn="[object DataView]",fs="[object Float32Array]",us="[object Float64Array]",ri="[object Int8Array]",Oi="[object Int16Array]",Ys="[object Int32Array]",Xs="[object Uint8Array]",Ks="[object Uint8ClampedArray]",qs="[object Uint16Array]",js="[object Uint32Array]",hs=/\b__p \+= '';/g,Ya=/\b(__p \+=) '' \+/g,Xa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Zs=/&(?:amp|lt|gt|quot|#39);/g,Js=/[&<>"']/g,Qs=RegExp(Zs.source),Ka=RegExp(Js.source),qa=/<%-([\s\S]+?)%>/g,ja=/<%([\s\S]+?)%>/g,tr=/<%=([\s\S]+?)%>/g,Za=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ja=/^\w*$/,Qa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oi=/[\\^$.*+?()[\]{}|]/g,tl=RegExp(oi.source),er=/^\s+/,eo=/\s/,nr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,el=/\{\n\/\* \[wrapped with (.+)\] \*/,no=/,? & /,nl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,io=/[()=,{}\[\]\/\s]/,so=/\\(\\)?/g,ro=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ir=/\w*$/,sr=/^[-+]0x[0-9a-f]+$/i,Rn=/^0b[01]+$/i,Di=/^\[object .+?Constructor\]$/,Ri=/^0o[0-7]+$/i,ds=/^(?:0|[1-9]\d*)$/,rr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gs=/($^)/,il=/['\n\r\u2028\u2029\\]/g,Ln="\\ud800-\\udfff",we="\\u0300-\\u036f",ai="\\ufe20-\\ufe2f",yn="\\u20d0-\\u20ff",qe=we+ai+yn,li="\\u2700-\\u27bf",Be="a-z\\xdf-\\xf6\\xf8-\\xff",fn="\\xac\\xb1\\xd7\\xf7",oo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ao="\\u2000-\\u206f",ms=" \\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",Li="\\ufe0e\\ufe0f",ps=fn+oo+ao+ms,Ni="['’]",or="["+Ln+"]",_s="["+ps+"]",Nn="["+qe+"]",un="\\d+",sl="["+li+"]",ar="["+Be+"]",bs="[^"+Ln+ps+un+li+Be+Me+"]",xs="\\ud83c[\\udffb-\\udfff]",rl="(?:"+Nn+"|"+xs+")",lo="[^"+Ln+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",P="["+Me+"]",O="\\u200d",$="(?:"+ar+"|"+bs+")",q="(?:"+P+"|"+bs+")",dt="(?:"+Ni+"(?:d|ll|m|re|s|t|ve))?",Gt="(?:"+Ni+"(?:D|LL|M|RE|S|T|VE))?",Zt=rl+"?",ne="["+Li+"]?",je="(?:"+O+"(?:"+[lo,b,S].join("|")+")"+ne+Zt+")*",lp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vf=ne+Zt+je,fp="(?:"+[sl,b,S].join("|")+")"+vf,up="(?:"+[lo+Nn+"?",Nn,b,S,or].join("|")+")",hp=RegExp(Ni,"g"),dp=RegExp(Nn,"g"),ol=RegExp(xs+"(?="+xs+")|"+up+vf,"g"),gp=RegExp([P+"?"+ar+"+"+dt+"(?="+[_s,P,"$"].join("|")+")",q+"+"+Gt+"(?="+[_s,P+$,"$"].join("|")+")",P+"?"+$+"+"+dt,P+"+"+Gt,cp,lp,un,fp].join("|"),"g"),mp=RegExp("["+O+Ln+qe+Li+"]"),pp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_p=["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"],bp=-1,Ot={};Ot[fs]=Ot[us]=Ot[ri]=Ot[Oi]=Ot[Ys]=Ot[Xs]=Ot[Ks]=Ot[qs]=Ot[js]=!0,Ot[ve]=Ot[Se]=Ot[si]=Ot[Ne]=Ot[Dn]=Ot[Et]=Ot[On]=Ot[bn]=Ot[ae]=Ot[cn]=Ot[le]=Ot[xn]=Ot[Dt]=Ot[Ii]=Ot[Ai]=!1;var It={};It[ve]=It[Se]=It[si]=It[Dn]=It[Ne]=It[Et]=It[fs]=It[us]=It[ri]=It[Oi]=It[Ys]=It[ae]=It[cn]=It[le]=It[xn]=It[Dt]=It[Ii]=It[cs]=It[Xs]=It[Ks]=It[qs]=It[js]=!0,It[On]=It[bn]=It[Ai]=!1;var xp={À:"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"},yp={"&":"&","<":"<",">":">",'"':""","'":"'"},vp={"&":"&","<":"<",">":">",""":'"',"'":"'"},Sp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wp=parseFloat,Mp=parseInt,Sf=typeof qo=="object"&&qo&&qo.Object===Object&&qo,Tp=typeof self=="object"&&self&&self.Object===Object&&self,ce=Sf||Tp||Function("return this")(),al=e&&!e.nodeType&&e,Bi=al&&!0&&t&&!t.nodeType&&t,wf=Bi&&Bi.exports===al,ll=wf&&Sf.process,Ze=function(){try{var E=Bi&&Bi.require&&Bi.require("util").types;return E||ll&&ll.binding&&ll.binding("util")}catch{}}(),Mf=Ze&&Ze.isArrayBuffer,Tf=Ze&&Ze.isDate,Pf=Ze&&Ze.isMap,Cf=Ze&&Ze.isRegExp,kf=Ze&&Ze.isSet,Ef=Ze&&Ze.isTypedArray;function Fe(E,N,D){switch(D.length){case 0:return E.call(N);case 1:return E.call(N,D[0]);case 2:return E.call(N,D[0],D[1]);case 3:return E.call(N,D[0],D[1],D[2])}return E.apply(N,D)}function Pp(E,N,D,Z){for(var lt=-1,wt=E==null?0:E.length;++lt<wt;){var Qt=E[lt];N(Z,Qt,D(Qt),E)}return Z}function Je(E,N){for(var D=-1,Z=E==null?0:E.length;++D<Z&&N(E[D],D,E)!==!1;);return E}function Cp(E,N){for(var D=E==null?0:E.length;D--&&N(E[D],D,E)!==!1;);return E}function If(E,N){for(var D=-1,Z=E==null?0:E.length;++D<Z;)if(!N(E[D],D,E))return!1;return!0}function ci(E,N){for(var D=-1,Z=E==null?0:E.length,lt=0,wt=[];++D<Z;){var Qt=E[D];N(Qt,D,E)&&(wt[lt++]=Qt)}return wt}function co(E,N){var D=E==null?0:E.length;return!!D&&ys(E,N,0)>-1}function cl(E,N,D){for(var Z=-1,lt=E==null?0:E.length;++Z<lt;)if(D(N,E[Z]))return!0;return!1}function Rt(E,N){for(var D=-1,Z=E==null?0:E.length,lt=Array(Z);++D<Z;)lt[D]=N(E[D],D,E);return lt}function fi(E,N){for(var D=-1,Z=N.length,lt=E.length;++D<Z;)E[lt+D]=N[D];return E}function fl(E,N,D,Z){var lt=-1,wt=E==null?0:E.length;for(Z&&wt&&(D=E[++lt]);++lt<wt;)D=N(D,E[lt],lt,E);return D}function kp(E,N,D,Z){var lt=E==null?0:E.length;for(Z&<&&(D=E[--lt]);lt--;)D=N(D,E[lt],lt,E);return D}function ul(E,N){for(var D=-1,Z=E==null?0:E.length;++D<Z;)if(N(E[D],D,E))return!0;return!1}var Ep=hl("length");function Ip(E){return E.split("")}function Ap(E){return E.match(nl)||[]}function Af(E,N,D){var Z;return D(E,function(lt,wt,Qt){if(N(lt,wt,Qt))return Z=wt,!1}),Z}function fo(E,N,D,Z){for(var lt=E.length,wt=D+(Z?1:-1);Z?wt--:++wt<lt;)if(N(E[wt],wt,E))return wt;return-1}function ys(E,N,D){return N===N?Vp(E,N,D):fo(E,Of,D)}function Op(E,N,D,Z){for(var lt=D-1,wt=E.length;++lt<wt;)if(Z(E[lt],N))return lt;return-1}function Of(E){return E!==E}function Df(E,N){var D=E==null?0:E.length;return D?gl(E,N)/D:Re}function hl(E){return function(N){return N==null?n:N[E]}}function dl(E){return function(N){return E==null?n:E[N]}}function Rf(E,N,D,Z,lt){return lt(E,function(wt,Qt,kt){D=Z?(Z=!1,wt):N(D,wt,Qt,kt)}),D}function Dp(E,N){var D=E.length;for(E.sort(N);D--;)E[D]=E[D].value;return E}function gl(E,N){for(var D,Z=-1,lt=E.length;++Z<lt;){var wt=N(E[Z]);wt!==n&&(D=D===n?wt:D+wt)}return D}function ml(E,N){for(var D=-1,Z=Array(E);++D<E;)Z[D]=N(D);return Z}function Rp(E,N){return Rt(N,function(D){return[D,E[D]]})}function Lf(E){return E&&E.slice(0,Wf(E)+1).replace(er,"")}function We(E){return function(N){return E(N)}}function pl(E,N){return Rt(N,function(D){return E[D]})}function lr(E,N){return E.has(N)}function Nf(E,N){for(var D=-1,Z=E.length;++D<Z&&ys(N,E[D],0)>-1;);return D}function Bf(E,N){for(var D=E.length;D--&&ys(N,E[D],0)>-1;);return D}function Lp(E,N){for(var D=E.length,Z=0;D--;)E[D]===N&&++Z;return Z}var Np=dl(xp),Bp=dl(yp);function Fp(E){return"\\"+Sp[E]}function Wp(E,N){return E==null?n:E[N]}function vs(E){return mp.test(E)}function zp(E){return pp.test(E)}function Hp(E){for(var N,D=[];!(N=E.next()).done;)D.push(N.value);return D}function _l(E){var N=-1,D=Array(E.size);return E.forEach(function(Z,lt){D[++N]=[lt,Z]}),D}function Ff(E,N){return function(D){return E(N(D))}}function ui(E,N){for(var D=-1,Z=E.length,lt=0,wt=[];++D<Z;){var Qt=E[D];(Qt===N||Qt===d)&&(E[D]=d,wt[lt++]=D)}return wt}function uo(E){var N=-1,D=Array(E.size);return E.forEach(function(Z){D[++N]=Z}),D}function Up(E){var N=-1,D=Array(E.size);return E.forEach(function(Z){D[++N]=[Z,Z]}),D}function Vp(E,N,D){for(var Z=D-1,lt=E.length;++Z<lt;)if(E[Z]===N)return Z;return-1}function $p(E,N,D){for(var Z=D+1;Z--;)if(E[Z]===N)return Z;return Z}function Ss(E){return vs(E)?Yp(E):Ep(E)}function hn(E){return vs(E)?Xp(E):Ip(E)}function Wf(E){for(var N=E.length;N--&&eo.test(E.charAt(N)););return N}var Gp=dl(vp);function Yp(E){for(var N=ol.lastIndex=0;ol.test(E);)++N;return N}function Xp(E){return E.match(ol)||[]}function Kp(E){return E.match(gp)||[]}var qp=function E(N){N=N==null?ce:ws.defaults(ce.Object(),N,ws.pick(ce,_p));var D=N.Array,Z=N.Date,lt=N.Error,wt=N.Function,Qt=N.Math,kt=N.Object,bl=N.RegExp,jp=N.String,Qe=N.TypeError,ho=D.prototype,Zp=wt.prototype,Ms=kt.prototype,go=N["__core-js_shared__"],mo=Zp.toString,Pt=Ms.hasOwnProperty,Jp=0,zf=function(){var r=/[^.]+$/.exec(go&&go.keys&&go.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),po=Ms.toString,Qp=mo.call(kt),t0=ce._,e0=bl("^"+mo.call(Pt).replace(oi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_o=wf?N.Buffer:n,hi=N.Symbol,bo=N.Uint8Array,Hf=_o?_o.allocUnsafe:n,xo=Ff(kt.getPrototypeOf,kt),Uf=kt.create,Vf=Ms.propertyIsEnumerable,yo=ho.splice,$f=hi?hi.isConcatSpreadable:n,cr=hi?hi.iterator:n,Fi=hi?hi.toStringTag:n,vo=function(){try{var r=Vi(kt,"defineProperty");return r({},"",{}),r}catch{}}(),n0=N.clearTimeout!==ce.clearTimeout&&N.clearTimeout,i0=Z&&Z.now!==ce.Date.now&&Z.now,s0=N.setTimeout!==ce.setTimeout&&N.setTimeout,So=Qt.ceil,wo=Qt.floor,xl=kt.getOwnPropertySymbols,r0=_o?_o.isBuffer:n,Gf=N.isFinite,o0=ho.join,a0=Ff(kt.keys,kt),te=Qt.max,de=Qt.min,l0=Z.now,c0=N.parseInt,Yf=Qt.random,f0=ho.reverse,yl=Vi(N,"DataView"),fr=Vi(N,"Map"),vl=Vi(N,"Promise"),Ts=Vi(N,"Set"),ur=Vi(N,"WeakMap"),hr=Vi(kt,"create"),Mo=ur&&new ur,Ps={},u0=$i(yl),h0=$i(fr),d0=$i(vl),g0=$i(Ts),m0=$i(ur),To=hi?hi.prototype:n,dr=To?To.valueOf:n,Xf=To?To.toString:n;function x(r){if(Ht(r)&&!ct(r)&&!(r instanceof xt)){if(r instanceof tn)return r;if(Pt.call(r,"__wrapped__"))return Ku(r)}return new tn(r)}var Cs=function(){function r(){}return function(a){if(!Bt(a))return{};if(Uf)return Uf(a);r.prototype=a;var f=new r;return r.prototype=n,f}}();function Po(){}function tn(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}x.templateSettings={escape:qa,evaluate:ja,interpolate:tr,variable:"",imports:{_:x}},x.prototype=Po.prototype,x.prototype.constructor=x,tn.prototype=Cs(Po.prototype),tn.prototype.constructor=tn;function xt(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function p0(){var r=new xt(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 _0(){if(this.__filtered__){var r=new xt(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function b0(){var r=this.__wrapped__.value(),a=this.__dir__,f=ct(r),g=a<0,p=f?r.length:0,y=I_(0,p,this.__views__),w=y.start,C=y.end,I=C-w,B=g?C:w-1,F=this.__iteratees__,U=F.length,K=0,Q=de(I,this.__takeCount__);if(!f||!g&&p==I&&Q==I)return _u(r,this.__actions__);var it=[];t:for(;I--&&K<Q;){B+=a;for(var gt=-1,st=r[B];++gt<U;){var _t=F[gt],vt=_t.iteratee,Ue=_t.type,xe=vt(st);if(Ue==St)st=xe;else if(!xe){if(Ue==Vt)continue t;break t}}it[K++]=st}return it}xt.prototype=Cs(Po.prototype),xt.prototype.constructor=xt;function Wi(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 x0(){this.__data__=hr?hr(null):{},this.size=0}function y0(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function v0(r){var a=this.__data__;if(hr){var f=a[r];return f===u?n:f}return Pt.call(a,r)?a[r]:n}function S0(r){var a=this.__data__;return hr?a[r]!==n:Pt.call(a,r)}function w0(r,a){var f=this.__data__;return this.size+=this.has(r)?0:1,f[r]=hr&&a===n?u:a,this}Wi.prototype.clear=x0,Wi.prototype.delete=y0,Wi.prototype.get=v0,Wi.prototype.has=S0,Wi.prototype.set=w0;function Bn(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 M0(){this.__data__=[],this.size=0}function T0(r){var a=this.__data__,f=Co(a,r);if(f<0)return!1;var g=a.length-1;return f==g?a.pop():yo.call(a,f,1),--this.size,!0}function P0(r){var a=this.__data__,f=Co(a,r);return f<0?n:a[f][1]}function C0(r){return Co(this.__data__,r)>-1}function k0(r,a){var f=this.__data__,g=Co(f,r);return g<0?(++this.size,f.push([r,a])):f[g][1]=a,this}Bn.prototype.clear=M0,Bn.prototype.delete=T0,Bn.prototype.get=P0,Bn.prototype.has=C0,Bn.prototype.set=k0;function Fn(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 E0(){this.size=0,this.__data__={hash:new Wi,map:new(fr||Bn),string:new Wi}}function I0(r){var a=Wo(this,r).delete(r);return this.size-=a?1:0,a}function A0(r){return Wo(this,r).get(r)}function O0(r){return Wo(this,r).has(r)}function D0(r,a){var f=Wo(this,r),g=f.size;return f.set(r,a),this.size+=f.size==g?0:1,this}Fn.prototype.clear=E0,Fn.prototype.delete=I0,Fn.prototype.get=A0,Fn.prototype.has=O0,Fn.prototype.set=D0;function zi(r){var a=-1,f=r==null?0:r.length;for(this.__data__=new Fn;++a<f;)this.add(r[a])}function R0(r){return this.__data__.set(r,u),this}function L0(r){return this.__data__.has(r)}zi.prototype.add=zi.prototype.push=R0,zi.prototype.has=L0;function dn(r){var a=this.__data__=new Bn(r);this.size=a.size}function N0(){this.__data__=new Bn,this.size=0}function B0(r){var a=this.__data__,f=a.delete(r);return this.size=a.size,f}function F0(r){return this.__data__.get(r)}function W0(r){return this.__data__.has(r)}function z0(r,a){var f=this.__data__;if(f instanceof Bn){var g=f.__data__;if(!fr||g.length<s-1)return g.push([r,a]),this.size=++f.size,this;f=this.__data__=new Fn(g)}return f.set(r,a),this.size=f.size,this}dn.prototype.clear=N0,dn.prototype.delete=B0,dn.prototype.get=F0,dn.prototype.has=W0,dn.prototype.set=z0;function Kf(r,a){var f=ct(r),g=!f&&Gi(r),p=!f&&!g&&_i(r),y=!f&&!g&&!p&&As(r),w=f||g||p||y,C=w?ml(r.length,jp):[],I=C.length;for(var B in r)(a||Pt.call(r,B))&&!(w&&(B=="length"||p&&(B=="offset"||B=="parent")||y&&(B=="buffer"||B=="byteLength"||B=="byteOffset")||Un(B,I)))&&C.push(B);return C}function qf(r){var a=r.length;return a?r[Ol(0,a-1)]:n}function H0(r,a){return zo(Te(r),Hi(a,0,r.length))}function U0(r){return zo(Te(r))}function Sl(r,a,f){(f!==n&&!gn(r[a],f)||f===n&&!(a in r))&&Wn(r,a,f)}function gr(r,a,f){var g=r[a];(!(Pt.call(r,a)&&gn(g,f))||f===n&&!(a in r))&&Wn(r,a,f)}function Co(r,a){for(var f=r.length;f--;)if(gn(r[f][0],a))return f;return-1}function V0(r,a,f,g){return di(r,function(p,y,w){a(g,p,f(p),w)}),g}function jf(r,a){return r&&Sn(a,ie(a),r)}function $0(r,a){return r&&Sn(a,Ce(a),r)}function Wn(r,a,f){a=="__proto__"&&vo?vo(r,a,{configurable:!0,enumerable:!0,value:f,writable:!0}):r[a]=f}function wl(r,a){for(var f=-1,g=a.length,p=D(g),y=r==null;++f<g;)p[f]=y?n:ic(r,a[f]);return p}function Hi(r,a,f){return r===r&&(f!==n&&(r=r<=f?r:f),a!==n&&(r=r>=a?r:a)),r}function en(r,a,f,g,p,y){var w,C=a&m,I=a&_,B=a&v;if(f&&(w=p?f(r,g,p,y):f(r)),w!==n)return w;if(!Bt(r))return r;var F=ct(r);if(F){if(w=O_(r),!C)return Te(r,w)}else{var U=ge(r),K=U==bn||U==ii;if(_i(r))return yu(r,C);if(U==le||U==ve||K&&!p){if(w=I||K?{}:Wu(r),!C)return I?v_(r,$0(w,r)):y_(r,jf(w,r))}else{if(!It[U])return p?r:{};w=D_(r,U,C)}}y||(y=new dn);var Q=y.get(r);if(Q)return Q;y.set(r,w),gh(r)?r.forEach(function(st){w.add(en(st,a,f,st,r,y))}):hh(r)&&r.forEach(function(st,_t){w.set(_t,en(st,a,f,_t,r,y))});var it=B?I?Vl:Ul:I?Ce:ie,gt=F?n:it(r);return Je(gt||r,function(st,_t){gt&&(_t=st,st=r[_t]),gr(w,_t,en(st,a,f,_t,r,y))}),w}function G0(r){var a=ie(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=kt(r);g--;){var p=f[g],y=a[p],w=r[p];if(w===n&&!(p in r)||!y(w))return!1}return!0}function Jf(r,a,f){if(typeof r!="function")throw new Qe(l);return vr(function(){r.apply(n,f)},a)}function mr(r,a,f,g){var p=-1,y=co,w=!0,C=r.length,I=[],B=a.length;if(!C)return I;f&&(a=Rt(a,We(f))),g?(y=cl,w=!1):a.length>=s&&(y=lr,w=!1,a=new zi(a));t:for(;++p<C;){var F=r[p],U=f==null?F:f(F);if(F=g||F!==0?F:0,w&&U===U){for(var K=B;K--;)if(a[K]===U)continue t;I.push(F)}else y(a,U,g)||I.push(F)}return I}var di=Tu(vn),Qf=Tu(Tl,!0);function Y0(r,a){var f=!0;return di(r,function(g,p,y){return f=!!a(g,p,y),f}),f}function ko(r,a,f){for(var g=-1,p=r.length;++g<p;){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 X0(r,a,f,g){var p=r.length;for(f=ht(f),f<0&&(f=-f>p?0:p+f),g=g===n||g>p?p:ht(g),g<0&&(g+=p),g=f>g?0:ph(g);f<g;)r[f++]=a;return r}function tu(r,a){var f=[];return di(r,function(g,p,y){a(g,p,y)&&f.push(g)}),f}function fe(r,a,f,g,p){var y=-1,w=r.length;for(f||(f=L_),p||(p=[]);++y<w;){var C=r[y];a>0&&f(C)?a>1?fe(C,a-1,f,g,p):fi(p,C):g||(p[p.length]=C)}return p}var Ml=Pu(),eu=Pu(!0);function vn(r,a){return r&&Ml(r,a,ie)}function Tl(r,a){return r&&eu(r,a,ie)}function Eo(r,a){return ci(a,function(f){return Vn(r[f])})}function Ui(r,a){a=mi(a,r);for(var f=0,g=a.length;r!=null&&f<g;)r=r[wn(a[f++])];return f&&f==g?r:n}function nu(r,a,f){var g=a(r);return ct(r)?g:fi(g,f(r))}function _e(r){return r==null?r===n?$a:Ke:Fi&&Fi in kt(r)?E_(r):U_(r)}function Pl(r,a){return r>a}function K0(r,a){return r!=null&&Pt.call(r,a)}function q0(r,a){return r!=null&&a in kt(r)}function j0(r,a,f){return r>=de(a,f)&&r<te(a,f)}function Cl(r,a,f){for(var g=f?cl:co,p=r[0].length,y=r.length,w=y,C=D(y),I=1/0,B=[];w--;){var F=r[w];w&&a&&(F=Rt(F,We(a))),I=de(F.length,I),C[w]=!f&&(a||p>=120&&F.length>=120)?new zi(w&&F):n}F=r[0];var U=-1,K=C[0];t:for(;++U<p&&B.length<I;){var Q=F[U],it=a?a(Q):Q;if(Q=f||Q!==0?Q:0,!(K?lr(K,it):g(B,it,f))){for(w=y;--w;){var gt=C[w];if(!(gt?lr(gt,it):g(r[w],it,f)))continue t}K&&K.push(it),B.push(Q)}}return B}function Z0(r,a,f,g){return vn(r,function(p,y,w){a(g,f(p),y,w)}),g}function pr(r,a,f){a=mi(a,r),r=Vu(r,a);var g=r==null?r:r[wn(sn(a))];return g==null?n:Fe(g,r,f)}function iu(r){return Ht(r)&&_e(r)==ve}function J0(r){return Ht(r)&&_e(r)==si}function Q0(r){return Ht(r)&&_e(r)==Et}function _r(r,a,f,g,p){return r===a?!0:r==null||a==null||!Ht(r)&&!Ht(a)?r!==r&&a!==a:t_(r,a,f,g,_r,p)}function t_(r,a,f,g,p,y){var w=ct(r),C=ct(a),I=w?Se:ge(r),B=C?Se:ge(a);I=I==ve?le:I,B=B==ve?le:B;var F=I==le,U=B==le,K=I==B;if(K&&_i(r)){if(!_i(a))return!1;w=!0,F=!1}if(K&&!F)return y||(y=new dn),w||As(r)?Nu(r,a,f,g,p,y):C_(r,a,I,f,g,p,y);if(!(f&M)){var Q=F&&Pt.call(r,"__wrapped__"),it=U&&Pt.call(a,"__wrapped__");if(Q||it){var gt=Q?r.value():r,st=it?a.value():a;return y||(y=new dn),p(gt,st,f,g,y)}}return K?(y||(y=new dn),k_(r,a,f,g,p,y)):!1}function e_(r){return Ht(r)&&ge(r)==ae}function kl(r,a,f,g){var p=f.length,y=p,w=!g;if(r==null)return!y;for(r=kt(r);p--;){var C=f[p];if(w&&C[2]?C[1]!==r[C[0]]:!(C[0]in r))return!1}for(;++p<y;){C=f[p];var I=C[0],B=r[I],F=C[1];if(w&&C[2]){if(B===n&&!(I in r))return!1}else{var U=new dn;if(g)var K=g(B,F,I,r,a,U);if(!(K===n?_r(F,B,M|T,g,U):K))return!1}}return!0}function su(r){if(!Bt(r)||B_(r))return!1;var a=Vn(r)?e0:Di;return a.test($i(r))}function n_(r){return Ht(r)&&_e(r)==xn}function i_(r){return Ht(r)&&ge(r)==Dt}function s_(r){return Ht(r)&&Yo(r.length)&&!!Ot[_e(r)]}function ru(r){return typeof r=="function"?r:r==null?ke:typeof r=="object"?ct(r)?lu(r[0],r[1]):au(r):Ch(r)}function El(r){if(!yr(r))return a0(r);var a=[];for(var f in kt(r))Pt.call(r,f)&&f!="constructor"&&a.push(f);return a}function r_(r){if(!Bt(r))return H_(r);var a=yr(r),f=[];for(var g in r)g=="constructor"&&(a||!Pt.call(r,g))||f.push(g);return f}function Il(r,a){return r<a}function ou(r,a){var f=-1,g=Pe(r)?D(r.length):[];return di(r,function(p,y,w){g[++f]=a(p,y,w)}),g}function au(r){var a=Gl(r);return a.length==1&&a[0][2]?Hu(a[0][0],a[0][1]):function(f){return f===r||kl(f,r,a)}}function lu(r,a){return Xl(r)&&zu(a)?Hu(wn(r),a):function(f){var g=ic(f,r);return g===n&&g===a?sc(f,r):_r(a,g,M|T)}}function Io(r,a,f,g,p){r!==a&&Ml(a,function(y,w){if(p||(p=new dn),Bt(y))o_(r,a,w,f,Io,g,p);else{var C=g?g(ql(r,w),y,w+"",r,a,p):n;C===n&&(C=y),Sl(r,w,C)}},Ce)}function o_(r,a,f,g,p,y,w){var C=ql(r,f),I=ql(a,f),B=w.get(I);if(B){Sl(r,f,B);return}var F=y?y(C,I,f+"",r,a,w):n,U=F===n;if(U){var K=ct(I),Q=!K&&_i(I),it=!K&&!Q&&As(I);F=I,K||Q||it?ct(C)?F=C:Yt(C)?F=Te(C):Q?(U=!1,F=yu(I,!0)):it?(U=!1,F=vu(I,!0)):F=[]:Sr(I)||Gi(I)?(F=C,Gi(C)?F=_h(C):(!Bt(C)||Vn(C))&&(F=Wu(I))):U=!1}U&&(w.set(I,F),p(F,I,g,y,w),w.delete(I)),Sl(r,f,F)}function cu(r,a){var f=r.length;if(f)return a+=a<0?f:0,Un(a,f)?r[a]:n}function fu(r,a,f){a.length?a=Rt(a,function(y){return ct(y)?function(w){return Ui(w,y.length===1?y[0]:y)}:y}):a=[ke];var g=-1;a=Rt(a,We(nt()));var p=ou(r,function(y,w,C){var I=Rt(a,function(B){return B(y)});return{criteria:I,index:++g,value:y}});return Dp(p,function(y,w){return x_(y,w,f)})}function a_(r,a){return uu(r,a,function(f,g){return sc(r,g)})}function uu(r,a,f){for(var g=-1,p=a.length,y={};++g<p;){var w=a[g],C=Ui(r,w);f(C,w)&&br(y,mi(w,r),C)}return y}function l_(r){return function(a){return Ui(a,r)}}function Al(r,a,f,g){var p=g?Op:ys,y=-1,w=a.length,C=r;for(r===a&&(a=Te(a)),f&&(C=Rt(r,We(f)));++y<w;)for(var I=0,B=a[y],F=f?f(B):B;(I=p(C,F,I,g))>-1;)C!==r&&yo.call(C,I,1),yo.call(r,I,1);return r}function hu(r,a){for(var f=r?a.length:0,g=f-1;f--;){var p=a[f];if(f==g||p!==y){var y=p;Un(p)?yo.call(r,p,1):Ll(r,p)}}return r}function Ol(r,a){return r+wo(Yf()*(a-r+1))}function c_(r,a,f,g){for(var p=-1,y=te(So((a-r)/(f||1)),0),w=D(y);y--;)w[g?y:++p]=r,r+=f;return w}function Dl(r,a){var f="";if(!r||a<1||a>jt)return f;do a%2&&(f+=r),a=wo(a/2),a&&(r+=r);while(a);return f}function mt(r,a){return jl(Uu(r,a,ke),r+"")}function f_(r){return qf(Os(r))}function u_(r,a){var f=Os(r);return zo(f,Hi(a,0,f.length))}function br(r,a,f,g){if(!Bt(r))return r;a=mi(a,r);for(var p=-1,y=a.length,w=y-1,C=r;C!=null&&++p<y;){var I=wn(a[p]),B=f;if(I==="__proto__"||I==="constructor"||I==="prototype")return r;if(p!=w){var F=C[I];B=g?g(F,I,C):n,B===n&&(B=Bt(F)?F:Un(a[p+1])?[]:{})}gr(C,I,B),C=C[I]}return r}var du=Mo?function(r,a){return Mo.set(r,a),r}:ke,h_=vo?function(r,a){return vo(r,"toString",{configurable:!0,enumerable:!1,value:oc(a),writable:!0})}:ke;function d_(r){return zo(Os(r))}function nn(r,a,f){var g=-1,p=r.length;a<0&&(a=-a>p?0:p+a),f=f>p?p:f,f<0&&(f+=p),p=a>f?0:f-a>>>0,a>>>=0;for(var y=D(p);++g<p;)y[g]=r[g+a];return y}function g_(r,a){var f;return di(r,function(g,p,y){return f=a(g,p,y),!f}),!!f}function Ao(r,a,f){var g=0,p=r==null?g:r.length;if(typeof a=="number"&&a===a&&p<=An){for(;g<p;){var y=g+p>>>1,w=r[y];w!==null&&!He(w)&&(f?w<=a:w<a)?g=y+1:p=y}return p}return Rl(r,a,ke,f)}function Rl(r,a,f,g){var p=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;p<y;){var F=wo((p+y)/2),U=f(r[F]),K=U!==n,Q=U===null,it=U===U,gt=He(U);if(w)var st=g||it;else B?st=it&&(g||K):C?st=it&&K&&(g||!Q):I?st=it&&K&&!Q&&(g||!gt):Q||gt?st=!1:st=g?U<=a:U<a;st?p=F+1:y=F}return de(y,ye)}function gu(r,a){for(var f=-1,g=r.length,p=0,y=[];++f<g;){var w=r[f],C=a?a(w):w;if(!f||!gn(C,I)){var I=C;y[p++]=w===0?0:w}}return y}function mu(r){return typeof r=="number"?r:He(r)?Re:+r}function ze(r){if(typeof r=="string")return r;if(ct(r))return Rt(r,ze)+"";if(He(r))return Xf?Xf.call(r):"";var a=r+"";return a=="0"&&1/r==-1/0?"-0":a}function gi(r,a,f){var g=-1,p=co,y=r.length,w=!0,C=[],I=C;if(f)w=!1,p=cl;else if(y>=s){var B=a?null:T_(r);if(B)return uo(B);w=!1,p=lr,I=new zi}else I=a?[]:C;t:for(;++g<y;){var F=r[g],U=a?a(F):F;if(F=f||F!==0?F:0,w&&U===U){for(var K=I.length;K--;)if(I[K]===U)continue t;a&&I.push(U),C.push(F)}else p(I,U,f)||(I!==C&&I.push(U),C.push(F))}return C}function Ll(r,a){return a=mi(a,r),r=Vu(r,a),r==null||delete r[wn(sn(a))]}function pu(r,a,f,g){return br(r,a,f(Ui(r,a)),g)}function Oo(r,a,f,g){for(var p=r.length,y=g?p:-1;(g?y--:++y<p)&&a(r[y],y,r););return f?nn(r,g?0:y,g?y+1:p):nn(r,g?y+1:0,g?p:y)}function _u(r,a){var f=r;return f instanceof xt&&(f=f.value()),fl(a,function(g,p){return p.func.apply(p.thisArg,fi([g],p.args))},f)}function Nl(r,a,f){var g=r.length;if(g<2)return g?gi(r[0]):[];for(var p=-1,y=D(g);++p<g;)for(var w=r[p],C=-1;++C<g;)C!=p&&(y[p]=mr(y[p]||w,r[C],a,f));return gi(fe(y,1),a,f)}function bu(r,a,f){for(var g=-1,p=r.length,y=a.length,w={};++g<p;){var C=g<y?a[g]:n;f(w,r[g],C)}return w}function Bl(r){return Yt(r)?r:[]}function Fl(r){return typeof r=="function"?r:ke}function mi(r,a){return ct(r)?r:Xl(r,a)?[r]:Xu(Mt(r))}var m_=mt;function pi(r,a,f){var g=r.length;return f=f===n?g:f,!a&&f>=g?r:nn(r,a,f)}var xu=n0||function(r){return ce.clearTimeout(r)};function yu(r,a){if(a)return r.slice();var f=r.length,g=Hf?Hf(f):new r.constructor(f);return r.copy(g),g}function Wl(r){var a=new r.constructor(r.byteLength);return new bo(a).set(new bo(r)),a}function p_(r,a){var f=a?Wl(r.buffer):r.buffer;return new r.constructor(f,r.byteOffset,r.byteLength)}function __(r){var a=new r.constructor(r.source,ir.exec(r));return a.lastIndex=r.lastIndex,a}function b_(r){return dr?kt(dr.call(r)):{}}function vu(r,a){var f=a?Wl(r.buffer):r.buffer;return new r.constructor(f,r.byteOffset,r.length)}function Su(r,a){if(r!==a){var f=r!==n,g=r===null,p=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||!p)return 1;if(!g&&!y&&!B&&r<a||B&&f&&p&&!g&&!y||C&&f&&p||!w&&p||!I)return-1}return 0}function x_(r,a,f){for(var g=-1,p=r.criteria,y=a.criteria,w=p.length,C=f.length;++g<w;){var I=Su(p[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 wu(r,a,f,g){for(var p=-1,y=r.length,w=f.length,C=-1,I=a.length,B=te(y-w,0),F=D(I+B),U=!g;++C<I;)F[C]=a[C];for(;++p<w;)(U||p<y)&&(F[f[p]]=r[p]);for(;B--;)F[C++]=r[p++];return F}function Mu(r,a,f,g){for(var p=-1,y=r.length,w=-1,C=f.length,I=-1,B=a.length,F=te(y-C,0),U=D(F+B),K=!g;++p<F;)U[p]=r[p];for(var Q=p;++I<B;)U[Q+I]=a[I];for(;++w<C;)(K||p<y)&&(U[Q+f[w]]=r[p++]);return U}function Te(r,a){var f=-1,g=r.length;for(a||(a=D(g));++f<g;)a[f]=r[f];return a}function Sn(r,a,f,g){var p=!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]),p?Wn(f,C,I):gr(f,C,I)}return f}function y_(r,a){return Sn(r,Yl(r),a)}function v_(r,a){return Sn(r,Bu(r),a)}function Do(r,a){return function(f,g){var p=ct(f)?Pp:V0,y=a?a():{};return p(f,r,nt(g,2),y)}}function ks(r){return mt(function(a,f){var g=-1,p=f.length,y=p>1?f[p-1]:n,w=p>2?f[2]:n;for(y=r.length>3&&typeof y=="function"?(p--,y):n,w&&be(f[0],f[1],w)&&(y=p<3?n:y,p=1),a=kt(a);++g<p;){var C=f[g];C&&r(a,C,g,y)}return a})}function Tu(r,a){return function(f,g){if(f==null)return f;if(!Pe(f))return r(f,g);for(var p=f.length,y=a?p:-1,w=kt(f);(a?y--:++y<p)&&g(w[y],y,w)!==!1;);return f}}function Pu(r){return function(a,f,g){for(var p=-1,y=kt(a),w=g(a),C=w.length;C--;){var I=w[r?C:++p];if(f(y[I],I,y)===!1)break}return a}}function S_(r,a,f){var g=a&k,p=xr(r);function y(){var w=this&&this!==ce&&this instanceof y?p:r;return w.apply(g?f:this,arguments)}return y}function Cu(r){return function(a){a=Mt(a);var f=vs(a)?hn(a):n,g=f?f[0]:a.charAt(0),p=f?pi(f,1).join(""):a.slice(1);return g[r]()+p}}function Es(r){return function(a){return fl(Th(Mh(a).replace(hp,"")),r,"")}}function xr(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=Cs(r.prototype),g=r.apply(f,a);return Bt(g)?g:f}}function w_(r,a,f){var g=xr(r);function p(){for(var y=arguments.length,w=D(y),C=y,I=Is(p);C--;)w[C]=arguments[C];var B=y<3&&w[0]!==I&&w[y-1]!==I?[]:ui(w,I);if(y-=B.length,y<f)return Ou(r,a,Ro,p.placeholder,n,w,B,n,n,f-y);var F=this&&this!==ce&&this instanceof p?g:r;return Fe(F,this,w)}return p}function ku(r){return function(a,f,g){var p=kt(a);if(!Pe(a)){var y=nt(f,3);a=ie(a),f=function(C){return y(p[C],C,p)}}var w=r(a,f,g);return w>-1?p[y?a[w]:w]:n}}function Eu(r){return Hn(function(a){var f=a.length,g=f,p=tn.prototype.thru;for(r&&a.reverse();g--;){var y=a[g];if(typeof y!="function")throw new Qe(l);if(p&&!w&&Fo(y)=="wrapper")var w=new tn([],!0)}for(g=w?g:f;++g<f;){y=a[g];var C=Fo(y),I=C=="wrapper"?$l(y):n;I&&Kl(I[0])&&I[1]==(V|W|L|G)&&!I[4].length&&I[9]==1?w=w[Fo(I[0])].apply(w,I[3]):w=y.length==1&&Kl(y)?w[C]():w.thru(y)}return function(){var B=arguments,F=B[0];if(w&&B.length==1&&ct(F))return w.plant(F).value();for(var U=0,K=f?a[U].apply(this,B):F;++U<f;)K=a[U].call(this,K);return K}})}function Ro(r,a,f,g,p,y,w,C,I,B){var F=a&V,U=a&k,K=a&A,Q=a&(W|z),it=a&J,gt=K?n:xr(r);function st(){for(var _t=arguments.length,vt=D(_t),Ue=_t;Ue--;)vt[Ue]=arguments[Ue];if(Q)var xe=Is(st),Ve=Lp(vt,xe);if(g&&(vt=wu(vt,g,p,Q)),y&&(vt=Mu(vt,y,w,Q)),_t-=Ve,Q&&_t<B){var Xt=ui(vt,xe);return Ou(r,a,Ro,st.placeholder,f,vt,Xt,C,I,B-_t)}var mn=U?f:this,Gn=K?mn[r]:r;return _t=vt.length,C?vt=V_(vt,C):it&&_t>1&&vt.reverse(),F&&I<_t&&(vt.length=I),this&&this!==ce&&this instanceof st&&(Gn=gt||xr(Gn)),Gn.apply(mn,vt)}return st}function Iu(r,a){return function(f,g){return Z0(f,r,a(g),{})}}function Lo(r,a){return function(f,g){var p;if(f===n&&g===n)return a;if(f!==n&&(p=f),g!==n){if(p===n)return g;typeof f=="string"||typeof g=="string"?(f=ze(f),g=ze(g)):(f=mu(f),g=mu(g)),p=r(f,g)}return p}}function zl(r){return Hn(function(a){return a=Rt(a,We(nt())),mt(function(f){var g=this;return r(a,function(p){return Fe(p,g,f)})})})}function No(r,a){a=a===n?" ":ze(a);var f=a.length;if(f<2)return f?Dl(a,r):a;var g=Dl(a,So(r/Ss(a)));return vs(a)?pi(hn(g),0,r).join(""):g.slice(0,r)}function M_(r,a,f,g){var p=a&k,y=xr(r);function w(){for(var C=-1,I=arguments.length,B=-1,F=g.length,U=D(F+I),K=this&&this!==ce&&this instanceof w?y:r;++B<F;)U[B]=g[B];for(;I--;)U[B++]=arguments[++C];return Fe(K,p?f:this,U)}return w}function Au(r){return function(a,f,g){return g&&typeof g!="number"&&be(a,f,g)&&(f=g=n),a=$n(a),f===n?(f=a,a=0):f=$n(f),g=g===n?a<f?1:-1:$n(g),c_(a,f,g,r)}}function Bo(r){return function(a,f){return typeof a=="string"&&typeof f=="string"||(a=rn(a),f=rn(f)),r(a,f)}}function Ou(r,a,f,g,p,y,w,C,I,B){var F=a&W,U=F?w:n,K=F?n:w,Q=F?y:n,it=F?n:y;a|=F?L:Y,a&=~(F?Y:L),a&R||(a&=-4);var gt=[r,a,p,Q,U,it,K,C,I,B],st=f.apply(n,gt);return Kl(r)&&$u(st,gt),st.placeholder=g,Gu(st,r,a)}function Hl(r){var a=Qt[r];return function(f,g){if(f=rn(f),g=g==null?0:de(ht(g),292),g&&Gf(f)){var p=(Mt(f)+"e").split("e"),y=a(p[0]+"e"+(+p[1]+g));return p=(Mt(y)+"e").split("e"),+(p[0]+"e"+(+p[1]-g))}return a(f)}}var T_=Ts&&1/uo(new Ts([,-0]))[1]==Tt?function(r){return new Ts(r)}:cc;function Du(r){return function(a){var f=ge(a);return f==ae?_l(a):f==Dt?Up(a):Rp(a,r(a))}}function zn(r,a,f,g,p,y,w,C){var I=a&A;if(!I&&typeof r!="function")throw new Qe(l);var B=g?g.length:0;if(B||(a&=-97,g=p=n),w=w===n?w:te(ht(w),0),C=C===n?C:ht(C),B-=p?p.length:0,a&Y){var F=g,U=p;g=p=n}var K=I?n:$l(r),Q=[r,a,f,g,p,F,U,y,w,C];if(K&&z_(Q,K),r=Q[0],a=Q[1],f=Q[2],g=Q[3],p=Q[4],C=Q[9]=Q[9]===n?I?0:r.length:te(Q[9]-B,0),!C&&a&(W|z)&&(a&=-25),!a||a==k)var it=S_(r,a,f);else a==W||a==z?it=w_(r,a,C):(a==L||a==(k|L))&&!p.length?it=M_(r,a,f,g):it=Ro.apply(n,Q);var gt=K?du:$u;return Gu(gt(it,Q),r,a)}function Ru(r,a,f,g){return r===n||gn(r,Ms[f])&&!Pt.call(g,f)?a:r}function Lu(r,a,f,g,p,y){return Bt(r)&&Bt(a)&&(y.set(a,r),Io(r,a,n,Lu,y),y.delete(a)),r}function P_(r){return Sr(r)?n:r}function Nu(r,a,f,g,p,y){var w=f&M,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 U=-1,K=!0,Q=f&T?new zi:n;for(y.set(r,a),y.set(a,r);++U<C;){var it=r[U],gt=a[U];if(g)var st=w?g(gt,it,U,a,r,y):g(it,gt,U,r,a,y);if(st!==n){if(st)continue;K=!1;break}if(Q){if(!ul(a,function(_t,vt){if(!lr(Q,vt)&&(it===_t||p(it,_t,f,g,y)))return Q.push(vt)})){K=!1;break}}else if(!(it===gt||p(it,gt,f,g,y))){K=!1;break}}return y.delete(r),y.delete(a),K}function C_(r,a,f,g,p,y,w){switch(f){case Dn:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case si:return!(r.byteLength!=a.byteLength||!y(new bo(r),new bo(a)));case Ne:case Et:case cn:return gn(+r,+a);case On:return r.name==a.name&&r.message==a.message;case xn:case Ii:return r==a+"";case ae:var C=_l;case Dt:var I=g&M;if(C||(C=uo),r.size!=a.size&&!I)return!1;var B=w.get(r);if(B)return B==a;g|=T,w.set(r,a);var F=Nu(C(r),C(a),g,p,y,w);return w.delete(r),F;case cs:if(dr)return dr.call(r)==dr.call(a)}return!1}function k_(r,a,f,g,p,y){var w=f&M,C=Ul(r),I=C.length,B=Ul(a),F=B.length;if(I!=F&&!w)return!1;for(var U=I;U--;){var K=C[U];if(!(w?K in a:Pt.call(a,K)))return!1}var Q=y.get(r),it=y.get(a);if(Q&&it)return Q==a&&it==r;var gt=!0;y.set(r,a),y.set(a,r);for(var st=w;++U<I;){K=C[U];var _t=r[K],vt=a[K];if(g)var Ue=w?g(vt,_t,K,a,r,y):g(_t,vt,K,r,a,y);if(!(Ue===n?_t===vt||p(_t,vt,f,g,y):Ue)){gt=!1;break}st||(st=K=="constructor")}if(gt&&!st){var xe=r.constructor,Ve=a.constructor;xe!=Ve&&"constructor"in r&&"constructor"in a&&!(typeof xe=="function"&&xe instanceof xe&&typeof Ve=="function"&&Ve instanceof Ve)&&(gt=!1)}return y.delete(r),y.delete(a),gt}function Hn(r){return jl(Uu(r,n,Zu),r+"")}function Ul(r){return nu(r,ie,Yl)}function Vl(r){return nu(r,Ce,Bu)}var $l=Mo?function(r){return Mo.get(r)}:cc;function Fo(r){for(var a=r.name+"",f=Ps[a],g=Pt.call(Ps,a)?f.length:0;g--;){var p=f[g],y=p.func;if(y==null||y==r)return p.name}return a}function Is(r){var a=Pt.call(x,"placeholder")?x:r;return a.placeholder}function nt(){var r=x.iteratee||ac;return r=r===ac?ru:r,arguments.length?r(arguments[0],arguments[1]):r}function Wo(r,a){var f=r.__data__;return N_(a)?f[typeof a=="string"?"string":"hash"]:f.map}function Gl(r){for(var a=ie(r),f=a.length;f--;){var g=a[f],p=r[g];a[f]=[g,p,zu(p)]}return a}function Vi(r,a){var f=Wp(r,a);return su(f)?f:n}function E_(r){var a=Pt.call(r,Fi),f=r[Fi];try{r[Fi]=n;var g=!0}catch{}var p=po.call(r);return g&&(a?r[Fi]=f:delete r[Fi]),p}var Yl=xl?function(r){return r==null?[]:(r=kt(r),ci(xl(r),function(a){return Vf.call(r,a)}))}:fc,Bu=xl?function(r){for(var a=[];r;)fi(a,Yl(r)),r=xo(r);return a}:fc,ge=_e;(yl&&ge(new yl(new ArrayBuffer(1)))!=Dn||fr&&ge(new fr)!=ae||vl&&ge(vl.resolve())!=Gs||Ts&&ge(new Ts)!=Dt||ur&&ge(new ur)!=Ai)&&(ge=function(r){var a=_e(r),f=a==le?r.constructor:n,g=f?$i(f):"";if(g)switch(g){case u0:return Dn;case h0:return ae;case d0:return Gs;case g0:return Dt;case m0:return Ai}return a});function I_(r,a,f){for(var g=-1,p=f.length;++g<p;){var y=f[g],w=y.size;switch(y.type){case"drop":r+=w;break;case"dropRight":a-=w;break;case"take":a=de(a,r+w);break;case"takeRight":r=te(r,a-w);break}}return{start:r,end:a}}function A_(r){var a=r.match(el);return a?a[1].split(no):[]}function Fu(r,a,f){a=mi(a,r);for(var g=-1,p=a.length,y=!1;++g<p;){var w=wn(a[g]);if(!(y=r!=null&&f(r,w)))break;r=r[w]}return y||++g!=p?y:(p=r==null?0:r.length,!!p&&Yo(p)&&Un(w,p)&&(ct(r)||Gi(r)))}function O_(r){var a=r.length,f=new r.constructor(a);return a&&typeof r[0]=="string"&&Pt.call(r,"index")&&(f.index=r.index,f.input=r.input),f}function Wu(r){return typeof r.constructor=="function"&&!yr(r)?Cs(xo(r)):{}}function D_(r,a,f){var g=r.constructor;switch(a){case si:return Wl(r);case Ne:case Et:return new g(+r);case Dn:return p_(r,f);case fs:case us:case ri:case Oi:case Ys:case Xs:case Ks:case qs:case js:return vu(r,f);case ae:return new g;case cn:case Ii:return new g(r);case xn:return __(r);case Dt:return new g;case cs:return b_(r)}}function R_(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(nr,`{
|
|
43
|
-
/* [wrapped with `+a+`] */
|
|
44
|
-
`)}function L_(r){return ct(r)||Gi(r)||!!($f&&r&&r[$f])}function Un(r,a){var f=typeof r;return a=a??jt,!!a&&(f=="number"||f!="symbol"&&ds.test(r))&&r>-1&&r%1==0&&r<a}function be(r,a,f){if(!Bt(f))return!1;var g=typeof a;return(g=="number"?Pe(f)&&Un(a,f.length):g=="string"&&a in f)?gn(f[a],r):!1}function Xl(r,a){if(ct(r))return!1;var f=typeof r;return f=="number"||f=="symbol"||f=="boolean"||r==null||He(r)?!0:Ja.test(r)||!Za.test(r)||a!=null&&r in kt(a)}function N_(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function Kl(r){var a=Fo(r),f=x[a];if(typeof f!="function"||!(a in xt.prototype))return!1;if(r===f)return!0;var g=$l(f);return!!g&&r===g[0]}function B_(r){return!!zf&&zf in r}var F_=go?Vn:uc;function yr(r){var a=r&&r.constructor,f=typeof a=="function"&&a.prototype||Ms;return r===f}function zu(r){return r===r&&!Bt(r)}function Hu(r,a){return function(f){return f==null?!1:f[r]===a&&(a!==n||r in kt(f))}}function W_(r){var a=$o(r,function(g){return f.size===h&&f.clear(),g}),f=a.cache;return a}function z_(r,a){var f=r[1],g=a[1],p=f|g,y=p<(k|A|V),w=g==V&&f==W||g==V&&f==G&&r[7].length<=a[8]||g==(V|G)&&a[7].length<=a[8]&&f==W;if(!(y||w))return r;g&k&&(r[2]=a[2],p|=f&k?0:R);var C=a[3];if(C){var I=r[3];r[3]=I?wu(I,C,a[4]):C,r[4]=I?ui(r[3],d):a[4]}return C=a[5],C&&(I=r[5],r[5]=I?Mu(I,C,a[6]):C,r[6]=I?ui(r[5],d):a[6]),C=a[7],C&&(r[7]=C),g&V&&(r[8]=r[8]==null?a[8]:de(r[8],a[8])),r[9]==null&&(r[9]=a[9]),r[0]=a[0],r[1]=p,r}function H_(r){var a=[];if(r!=null)for(var f in kt(r))a.push(f);return a}function U_(r){return po.call(r)}function Uu(r,a,f){return a=te(a===n?r.length-1:a,0),function(){for(var g=arguments,p=-1,y=te(g.length-a,0),w=D(y);++p<y;)w[p]=g[a+p];p=-1;for(var C=D(a+1);++p<a;)C[p]=g[p];return C[a]=f(w),Fe(r,this,C)}}function Vu(r,a){return a.length<2?r:Ui(r,nn(a,0,-1))}function V_(r,a){for(var f=r.length,g=de(a.length,f),p=Te(r);g--;){var y=a[g];r[g]=Un(y,f)?p[y]:n}return r}function ql(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var $u=Yu(du),vr=s0||function(r,a){return ce.setTimeout(r,a)},jl=Yu(h_);function Gu(r,a,f){var g=a+"";return jl(r,R_(g,$_(A_(g),f)))}function Yu(r){var a=0,f=0;return function(){var g=l0(),p=zt-(g-f);if(f=g,p>0){if(++a>=at)return arguments[0]}else a=0;return r.apply(n,arguments)}}function zo(r,a){var f=-1,g=r.length,p=g-1;for(a=a===n?g:a;++f<a;){var y=Ol(f,p),w=r[y];r[y]=r[f],r[f]=w}return r.length=a,r}var Xu=W_(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(Qa,function(f,g,p,y){a.push(p?y.replace(so,"$1"):g||f)}),a});function wn(r){if(typeof r=="string"||He(r))return r;var a=r+"";return a=="0"&&1/r==-1/0?"-0":a}function $i(r){if(r!=null){try{return mo.call(r)}catch{}try{return r+""}catch{}}return""}function $_(r,a){return Je(Le,function(f){var g="_."+f[0];a&f[1]&&!co(r,g)&&r.push(g)}),r.sort()}function Ku(r){if(r instanceof xt)return r.clone();var a=new tn(r.__wrapped__,r.__chain__);return a.__actions__=Te(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function G_(r,a,f){(f?be(r,a,f):a===n)?a=1:a=te(ht(a),0);var g=r==null?0:r.length;if(!g||a<1)return[];for(var p=0,y=0,w=D(So(g/a));p<g;)w[y++]=nn(r,p,p+=a);return w}function Y_(r){for(var a=-1,f=r==null?0:r.length,g=0,p=[];++a<f;){var y=r[a];y&&(p[g++]=y)}return p}function X_(){var r=arguments.length;if(!r)return[];for(var a=D(r-1),f=arguments[0],g=r;g--;)a[g-1]=arguments[g];return fi(ct(f)?Te(f):[f],fe(a,1))}var K_=mt(function(r,a){return Yt(r)?mr(r,fe(a,1,Yt,!0)):[]}),q_=mt(function(r,a){var f=sn(a);return Yt(f)&&(f=n),Yt(r)?mr(r,fe(a,1,Yt,!0),nt(f,2)):[]}),j_=mt(function(r,a){var f=sn(a);return Yt(f)&&(f=n),Yt(r)?mr(r,fe(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:ht(a),nn(r,a<0?0:a,g)):[]}function J_(r,a,f){var g=r==null?0:r.length;return g?(a=f||a===n?1:ht(a),a=g-a,nn(r,0,a<0?0:a)):[]}function Q_(r,a){return r&&r.length?Oo(r,nt(a,3),!0,!0):[]}function tb(r,a){return r&&r.length?Oo(r,nt(a,3),!0):[]}function eb(r,a,f,g){var p=r==null?0:r.length;return p?(f&&typeof f!="number"&&be(r,a,f)&&(f=0,g=p),X0(r,a,f,g)):[]}function qu(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var p=f==null?0:ht(f);return p<0&&(p=te(g+p,0)),fo(r,nt(a,3),p)}function ju(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var p=g-1;return f!==n&&(p=ht(f),p=f<0?te(g+p,0):de(p,g-1)),fo(r,nt(a,3),p,!0)}function Zu(r){var a=r==null?0:r.length;return a?fe(r,1):[]}function nb(r){var a=r==null?0:r.length;return a?fe(r,Tt):[]}function ib(r,a){var f=r==null?0:r.length;return f?(a=a===n?1:ht(a),fe(r,a)):[]}function sb(r){for(var a=-1,f=r==null?0:r.length,g={};++a<f;){var p=r[a];g[p[0]]=p[1]}return g}function Ju(r){return r&&r.length?r[0]:n}function rb(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var p=f==null?0:ht(f);return p<0&&(p=te(g+p,0)),ys(r,a,p)}function ob(r){var a=r==null?0:r.length;return a?nn(r,0,-1):[]}var ab=mt(function(r){var a=Rt(r,Bl);return a.length&&a[0]===r[0]?Cl(a):[]}),lb=mt(function(r){var a=sn(r),f=Rt(r,Bl);return a===sn(f)?a=n:f.pop(),f.length&&f[0]===r[0]?Cl(f,nt(a,2)):[]}),cb=mt(function(r){var a=sn(r),f=Rt(r,Bl);return a=typeof a=="function"?a:n,a&&f.pop(),f.length&&f[0]===r[0]?Cl(f,n,a):[]});function fb(r,a){return r==null?"":o0.call(r,a)}function sn(r){var a=r==null?0:r.length;return a?r[a-1]:n}function ub(r,a,f){var g=r==null?0:r.length;if(!g)return-1;var p=g;return f!==n&&(p=ht(f),p=p<0?te(g+p,0):de(p,g-1)),a===a?$p(r,a,p):fo(r,Of,p,!0)}function hb(r,a){return r&&r.length?cu(r,ht(a)):n}var db=mt(Qu);function Qu(r,a){return r&&r.length&&a&&a.length?Al(r,a):r}function gb(r,a,f){return r&&r.length&&a&&a.length?Al(r,a,nt(f,2)):r}function mb(r,a,f){return r&&r.length&&a&&a.length?Al(r,a,n,f):r}var pb=Hn(function(r,a){var f=r==null?0:r.length,g=wl(r,a);return hu(r,Rt(a,function(p){return Un(p,f)?+p:p}).sort(Su)),g});function _b(r,a){var f=[];if(!(r&&r.length))return f;var g=-1,p=[],y=r.length;for(a=nt(a,3);++g<y;){var w=r[g];a(w,g,r)&&(f.push(w),p.push(g))}return hu(r,p),f}function Zl(r){return r==null?r:f0.call(r)}function bb(r,a,f){var g=r==null?0:r.length;return g?(f&&typeof f!="number"&&be(r,a,f)?(a=0,f=g):(a=a==null?0:ht(a),f=f===n?g:ht(f)),nn(r,a,f)):[]}function xb(r,a){return Ao(r,a)}function yb(r,a,f){return Rl(r,a,nt(f,2))}function vb(r,a){var f=r==null?0:r.length;if(f){var g=Ao(r,a);if(g<f&&gn(r[g],a))return g}return-1}function Sb(r,a){return Ao(r,a,!0)}function wb(r,a,f){return Rl(r,a,nt(f,2),!0)}function Mb(r,a){var f=r==null?0:r.length;if(f){var g=Ao(r,a,!0)-1;if(gn(r[g],a))return g}return-1}function Tb(r){return r&&r.length?gu(r):[]}function Pb(r,a){return r&&r.length?gu(r,nt(a,2)):[]}function Cb(r){var a=r==null?0:r.length;return a?nn(r,1,a):[]}function kb(r,a,f){return r&&r.length?(a=f||a===n?1:ht(a),nn(r,0,a<0?0:a)):[]}function Eb(r,a,f){var g=r==null?0:r.length;return g?(a=f||a===n?1:ht(a),a=g-a,nn(r,a<0?0:a,g)):[]}function Ib(r,a){return r&&r.length?Oo(r,nt(a,3),!1,!0):[]}function Ab(r,a){return r&&r.length?Oo(r,nt(a,3)):[]}var Ob=mt(function(r){return gi(fe(r,1,Yt,!0))}),Db=mt(function(r){var a=sn(r);return Yt(a)&&(a=n),gi(fe(r,1,Yt,!0),nt(a,2))}),Rb=mt(function(r){var a=sn(r);return a=typeof a=="function"?a:n,gi(fe(r,1,Yt,!0),n,a)});function Lb(r){return r&&r.length?gi(r):[]}function Nb(r,a){return r&&r.length?gi(r,nt(a,2)):[]}function Bb(r,a){return a=typeof a=="function"?a:n,r&&r.length?gi(r,n,a):[]}function Jl(r){if(!(r&&r.length))return[];var a=0;return r=ci(r,function(f){if(Yt(f))return a=te(f.length,a),!0}),ml(a,function(f){return Rt(r,hl(f))})}function th(r,a){if(!(r&&r.length))return[];var f=Jl(r);return a==null?f:Rt(f,function(g){return Fe(a,n,g)})}var Fb=mt(function(r,a){return Yt(r)?mr(r,a):[]}),Wb=mt(function(r){return Nl(ci(r,Yt))}),zb=mt(function(r){var a=sn(r);return Yt(a)&&(a=n),Nl(ci(r,Yt),nt(a,2))}),Hb=mt(function(r){var a=sn(r);return a=typeof a=="function"?a:n,Nl(ci(r,Yt),n,a)}),Ub=mt(Jl);function Vb(r,a){return bu(r||[],a||[],gr)}function $b(r,a){return bu(r||[],a||[],br)}var Gb=mt(function(r){var a=r.length,f=a>1?r[a-1]:n;return f=typeof f=="function"?(r.pop(),f):n,th(r,f)});function eh(r){var a=x(r);return a.__chain__=!0,a}function Yb(r,a){return a(r),r}function Ho(r,a){return a(r)}var Xb=Hn(function(r){var a=r.length,f=a?r[0]:0,g=this.__wrapped__,p=function(y){return wl(y,r)};return a>1||this.__actions__.length||!(g instanceof xt)||!Un(f)?this.thru(p):(g=g.slice(f,+f+(a?1:0)),g.__actions__.push({func:Ho,args:[p],thisArg:n}),new tn(g,this.__chain__).thru(function(y){return a&&!y.length&&y.push(n),y}))});function Kb(){return eh(this)}function qb(){return new tn(this.value(),this.__chain__)}function jb(){this.__values__===n&&(this.__values__=mh(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 Jb(r){for(var a,f=this;f instanceof Po;){var g=Ku(f);g.__index__=0,g.__values__=n,a?p.__wrapped__=g:a=g;var p=g;f=f.__wrapped__}return p.__wrapped__=r,a}function Qb(){var r=this.__wrapped__;if(r instanceof xt){var a=r;return this.__actions__.length&&(a=new xt(this)),a=a.reverse(),a.__actions__.push({func:Ho,args:[Zl],thisArg:n}),new tn(a,this.__chain__)}return this.thru(Zl)}function t1(){return _u(this.__wrapped__,this.__actions__)}var e1=Do(function(r,a,f){Pt.call(r,f)?++r[f]:Wn(r,f,1)});function n1(r,a,f){var g=ct(r)?If:Y0;return f&&be(r,a,f)&&(a=n),g(r,nt(a,3))}function i1(r,a){var f=ct(r)?ci:tu;return f(r,nt(a,3))}var s1=ku(qu),r1=ku(ju);function o1(r,a){return fe(Uo(r,a),1)}function a1(r,a){return fe(Uo(r,a),Tt)}function l1(r,a,f){return f=f===n?1:ht(f),fe(Uo(r,a),f)}function nh(r,a){var f=ct(r)?Je:di;return f(r,nt(a,3))}function ih(r,a){var f=ct(r)?Cp:Qf;return f(r,nt(a,3))}var c1=Do(function(r,a,f){Pt.call(r,f)?r[f].push(a):Wn(r,f,[a])});function f1(r,a,f,g){r=Pe(r)?r:Os(r),f=f&&!g?ht(f):0;var p=r.length;return f<0&&(f=te(p+f,0)),Xo(r)?f<=p&&r.indexOf(a,f)>-1:!!p&&ys(r,a,f)>-1}var u1=mt(function(r,a,f){var g=-1,p=typeof a=="function",y=Pe(r)?D(r.length):[];return di(r,function(w){y[++g]=p?Fe(a,w,f):pr(w,a,f)}),y}),h1=Do(function(r,a,f){Wn(r,f,a)});function Uo(r,a){var f=ct(r)?Rt:ou;return f(r,nt(a,3))}function d1(r,a,f,g){return r==null?[]:(ct(a)||(a=a==null?[]:[a]),f=g?n:f,ct(f)||(f=f==null?[]:[f]),fu(r,a,f))}var g1=Do(function(r,a,f){r[f?0:1].push(a)},function(){return[[],[]]});function m1(r,a,f){var g=ct(r)?fl:Rf,p=arguments.length<3;return g(r,nt(a,4),f,p,di)}function p1(r,a,f){var g=ct(r)?kp:Rf,p=arguments.length<3;return g(r,nt(a,4),f,p,Qf)}function _1(r,a){var f=ct(r)?ci:tu;return f(r,Go(nt(a,3)))}function b1(r){var a=ct(r)?qf:f_;return a(r)}function x1(r,a,f){(f?be(r,a,f):a===n)?a=1:a=ht(a);var g=ct(r)?H0:u_;return g(r,a)}function y1(r){var a=ct(r)?U0:d_;return a(r)}function v1(r){if(r==null)return 0;if(Pe(r))return Xo(r)?Ss(r):r.length;var a=ge(r);return a==ae||a==Dt?r.size:El(r).length}function S1(r,a,f){var g=ct(r)?ul:g_;return f&&be(r,a,f)&&(a=n),g(r,nt(a,3))}var w1=mt(function(r,a){if(r==null)return[];var f=a.length;return f>1&&be(r,a[0],a[1])?a=[]:f>2&&be(a[0],a[1],a[2])&&(a=[a[0]]),fu(r,fe(a,1),[])}),Vo=i0||function(){return ce.Date.now()};function M1(r,a){if(typeof a!="function")throw new Qe(l);return r=ht(r),function(){if(--r<1)return a.apply(this,arguments)}}function sh(r,a,f){return a=f?n:a,a=r&&a==null?r.length:a,zn(r,V,n,n,n,n,a)}function rh(r,a){var f;if(typeof a!="function")throw new Qe(l);return r=ht(r),function(){return--r>0&&(f=a.apply(this,arguments)),r<=1&&(a=n),f}}var Ql=mt(function(r,a,f){var g=k;if(f.length){var p=ui(f,Is(Ql));g|=L}return zn(r,g,a,f,p)}),oh=mt(function(r,a,f){var g=k|A;if(f.length){var p=ui(f,Is(oh));g|=L}return zn(a,g,r,f,p)});function ah(r,a,f){a=f?n:a;var g=zn(r,W,n,n,n,n,n,a);return g.placeholder=ah.placeholder,g}function lh(r,a,f){a=f?n:a;var g=zn(r,z,n,n,n,n,n,a);return g.placeholder=lh.placeholder,g}function ch(r,a,f){var g,p,y,w,C,I,B=0,F=!1,U=!1,K=!0;if(typeof r!="function")throw new Qe(l);a=rn(a)||0,Bt(f)&&(F=!!f.leading,U="maxWait"in f,y=U?te(rn(f.maxWait)||0,a):y,K="trailing"in f?!!f.trailing:K);function Q(Xt){var mn=g,Gn=p;return g=p=n,B=Xt,w=r.apply(Gn,mn),w}function it(Xt){return B=Xt,C=vr(_t,a),F?Q(Xt):w}function gt(Xt){var mn=Xt-I,Gn=Xt-B,kh=a-mn;return U?de(kh,y-Gn):kh}function st(Xt){var mn=Xt-I,Gn=Xt-B;return I===n||mn>=a||mn<0||U&&Gn>=y}function _t(){var Xt=Vo();if(st(Xt))return vt(Xt);C=vr(_t,gt(Xt))}function vt(Xt){return C=n,K&&g?Q(Xt):(g=p=n,w)}function Ue(){C!==n&&xu(C),B=0,g=I=p=C=n}function xe(){return C===n?w:vt(Vo())}function Ve(){var Xt=Vo(),mn=st(Xt);if(g=arguments,p=this,I=Xt,mn){if(C===n)return it(I);if(U)return xu(C),C=vr(_t,a),Q(I)}return C===n&&(C=vr(_t,a)),w}return Ve.cancel=Ue,Ve.flush=xe,Ve}var T1=mt(function(r,a){return Jf(r,1,a)}),P1=mt(function(r,a,f){return Jf(r,rn(a)||0,f)});function C1(r){return zn(r,J)}function $o(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new Qe(l);var f=function(){var g=arguments,p=a?a.apply(this,g):g[0],y=f.cache;if(y.has(p))return y.get(p);var w=r.apply(this,g);return f.cache=y.set(p,w)||y,w};return f.cache=new($o.Cache||Fn),f}$o.Cache=Fn;function Go(r){if(typeof r!="function")throw new Qe(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 k1(r){return rh(2,r)}var E1=m_(function(r,a){a=a.length==1&&ct(a[0])?Rt(a[0],We(nt())):Rt(fe(a,1),We(nt()));var f=a.length;return mt(function(g){for(var p=-1,y=de(g.length,f);++p<y;)g[p]=a[p].call(this,g[p]);return Fe(r,this,g)})}),tc=mt(function(r,a){var f=ui(a,Is(tc));return zn(r,L,n,a,f)}),fh=mt(function(r,a){var f=ui(a,Is(fh));return zn(r,Y,n,a,f)}),I1=Hn(function(r,a){return zn(r,G,n,n,n,a)});function A1(r,a){if(typeof r!="function")throw new Qe(l);return a=a===n?a:ht(a),mt(r,a)}function O1(r,a){if(typeof r!="function")throw new Qe(l);return a=a==null?0:te(ht(a),0),mt(function(f){var g=f[a],p=pi(f,0,a);return g&&fi(p,g),Fe(r,this,p)})}function D1(r,a,f){var g=!0,p=!0;if(typeof r!="function")throw new Qe(l);return Bt(f)&&(g="leading"in f?!!f.leading:g,p="trailing"in f?!!f.trailing:p),ch(r,a,{leading:g,maxWait:a,trailing:p})}function R1(r){return sh(r,1)}function L1(r,a){return tc(Fl(a),r)}function N1(){if(!arguments.length)return[];var r=arguments[0];return ct(r)?r:[r]}function B1(r){return en(r,v)}function F1(r,a){return a=typeof a=="function"?a:n,en(r,v,a)}function W1(r){return en(r,m|v)}function z1(r,a){return a=typeof a=="function"?a:n,en(r,m|v,a)}function H1(r,a){return a==null||Zf(r,a,ie(a))}function gn(r,a){return r===a||r!==r&&a!==a}var U1=Bo(Pl),V1=Bo(function(r,a){return r>=a}),Gi=iu(function(){return arguments}())?iu:function(r){return Ht(r)&&Pt.call(r,"callee")&&!Vf.call(r,"callee")},ct=D.isArray,$1=Mf?We(Mf):J0;function Pe(r){return r!=null&&Yo(r.length)&&!Vn(r)}function Yt(r){return Ht(r)&&Pe(r)}function G1(r){return r===!0||r===!1||Ht(r)&&_e(r)==Ne}var _i=r0||uc,Y1=Tf?We(Tf):Q0;function X1(r){return Ht(r)&&r.nodeType===1&&!Sr(r)}function K1(r){if(r==null)return!0;if(Pe(r)&&(ct(r)||typeof r=="string"||typeof r.splice=="function"||_i(r)||As(r)||Gi(r)))return!r.length;var a=ge(r);if(a==ae||a==Dt)return!r.size;if(yr(r))return!El(r).length;for(var f in r)if(Pt.call(r,f))return!1;return!0}function q1(r,a){return _r(r,a)}function j1(r,a,f){f=typeof f=="function"?f:n;var g=f?f(r,a):n;return g===n?_r(r,a,n,f):!!g}function ec(r){if(!Ht(r))return!1;var a=_e(r);return a==On||a==he||typeof r.message=="string"&&typeof r.name=="string"&&!Sr(r)}function Z1(r){return typeof r=="number"&&Gf(r)}function Vn(r){if(!Bt(r))return!1;var a=_e(r);return a==bn||a==ii||a==oe||a==to}function uh(r){return typeof r=="number"&&r==ht(r)}function Yo(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=jt}function Bt(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function Ht(r){return r!=null&&typeof r=="object"}var hh=Pf?We(Pf):e_;function J1(r,a){return r===a||kl(r,a,Gl(a))}function Q1(r,a,f){return f=typeof f=="function"?f:n,kl(r,a,Gl(a),f)}function tx(r){return dh(r)&&r!=+r}function ex(r){if(F_(r))throw new lt(o);return su(r)}function nx(r){return r===null}function ix(r){return r==null}function dh(r){return typeof r=="number"||Ht(r)&&_e(r)==cn}function Sr(r){if(!Ht(r)||_e(r)!=le)return!1;var a=xo(r);if(a===null)return!0;var f=Pt.call(a,"constructor")&&a.constructor;return typeof f=="function"&&f instanceof f&&mo.call(f)==Qp}var nc=Cf?We(Cf):n_;function sx(r){return uh(r)&&r>=-9007199254740991&&r<=jt}var gh=kf?We(kf):i_;function Xo(r){return typeof r=="string"||!ct(r)&&Ht(r)&&_e(r)==Ii}function He(r){return typeof r=="symbol"||Ht(r)&&_e(r)==cs}var As=Ef?We(Ef):s_;function rx(r){return r===n}function ox(r){return Ht(r)&&ge(r)==Ai}function ax(r){return Ht(r)&&_e(r)==Ga}var lx=Bo(Il),cx=Bo(function(r,a){return r<=a});function mh(r){if(!r)return[];if(Pe(r))return Xo(r)?hn(r):Te(r);if(cr&&r[cr])return Hp(r[cr]());var a=ge(r),f=a==ae?_l:a==Dt?uo:Os;return f(r)}function $n(r){if(!r)return r===0?r:0;if(r=rn(r),r===Tt||r===-1/0){var a=r<0?-1:1;return a*$t}return r===r?r:0}function ht(r){var a=$n(r),f=a%1;return a===a?f?a-f:a:0}function ph(r){return r?Hi(ht(r),0,re):0}function rn(r){if(typeof r=="number")return r;if(He(r))return Re;if(Bt(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=Bt(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=Lf(r);var f=Rn.test(r);return f||Ri.test(r)?Mp(r.slice(2),f?2:8):sr.test(r)?Re:+r}function _h(r){return Sn(r,Ce(r))}function fx(r){return r?Hi(ht(r),-9007199254740991,jt):r===0?r:0}function Mt(r){return r==null?"":ze(r)}var ux=ks(function(r,a){if(yr(a)||Pe(a)){Sn(a,ie(a),r);return}for(var f in a)Pt.call(a,f)&&gr(r,f,a[f])}),bh=ks(function(r,a){Sn(a,Ce(a),r)}),Ko=ks(function(r,a,f,g){Sn(a,Ce(a),r,g)}),hx=ks(function(r,a,f,g){Sn(a,ie(a),r,g)}),dx=Hn(wl);function gx(r,a){var f=Cs(r);return a==null?f:jf(f,a)}var mx=mt(function(r,a){r=kt(r);var f=-1,g=a.length,p=g>2?a[2]:n;for(p&&be(a[0],a[1],p)&&(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||gn(F,Ms[B])&&!Pt.call(r,B))&&(r[B]=y[B])}return r}),px=mt(function(r){return r.push(n,Lu),Fe(xh,n,r)});function _x(r,a){return Af(r,nt(a,3),vn)}function bx(r,a){return Af(r,nt(a,3),Tl)}function xx(r,a){return r==null?r:Ml(r,nt(a,3),Ce)}function yx(r,a){return r==null?r:eu(r,nt(a,3),Ce)}function vx(r,a){return r&&vn(r,nt(a,3))}function Sx(r,a){return r&&Tl(r,nt(a,3))}function wx(r){return r==null?[]:Eo(r,ie(r))}function Mx(r){return r==null?[]:Eo(r,Ce(r))}function ic(r,a,f){var g=r==null?n:Ui(r,a);return g===n?f:g}function Tx(r,a){return r!=null&&Fu(r,a,K0)}function sc(r,a){return r!=null&&Fu(r,a,q0)}var Px=Iu(function(r,a,f){a!=null&&typeof a.toString!="function"&&(a=po.call(a)),r[a]=f},oc(ke)),Cx=Iu(function(r,a,f){a!=null&&typeof a.toString!="function"&&(a=po.call(a)),Pt.call(r,a)?r[a].push(f):r[a]=[f]},nt),kx=mt(pr);function ie(r){return Pe(r)?Kf(r):El(r)}function Ce(r){return Pe(r)?Kf(r,!0):r_(r)}function Ex(r,a){var f={};return a=nt(a,3),vn(r,function(g,p,y){Wn(f,a(g,p,y),g)}),f}function Ix(r,a){var f={};return a=nt(a,3),vn(r,function(g,p,y){Wn(f,p,a(g,p,y))}),f}var Ax=ks(function(r,a,f){Io(r,a,f)}),xh=ks(function(r,a,f,g){Io(r,a,f,g)}),Ox=Hn(function(r,a){var f={};if(r==null)return f;var g=!1;a=Rt(a,function(y){return y=mi(y,r),g||(g=y.length>1),y}),Sn(r,Vl(r),f),g&&(f=en(f,m|_|v,P_));for(var p=a.length;p--;)Ll(f,a[p]);return f});function Dx(r,a){return yh(r,Go(nt(a)))}var Rx=Hn(function(r,a){return r==null?{}:a_(r,a)});function yh(r,a){if(r==null)return{};var f=Rt(Vl(r),function(g){return[g]});return a=nt(a),uu(r,f,function(g,p){return a(g,p[0])})}function Lx(r,a,f){a=mi(a,r);var g=-1,p=a.length;for(p||(p=1,r=n);++g<p;){var y=r==null?n:r[wn(a[g])];y===n&&(g=p,y=f),r=Vn(y)?y.call(r):y}return r}function Nx(r,a,f){return r==null?r:br(r,a,f)}function Bx(r,a,f,g){return g=typeof g=="function"?g:n,r==null?r:br(r,a,f,g)}var vh=Du(ie),Sh=Du(Ce);function Fx(r,a,f){var g=ct(r),p=g||_i(r)||As(r);if(a=nt(a,4),f==null){var y=r&&r.constructor;p?f=g?new y:[]:Bt(r)?f=Vn(y)?Cs(xo(r)):{}:f={}}return(p?Je:vn)(r,function(w,C,I){return a(f,w,C,I)}),f}function Wx(r,a){return r==null?!0:Ll(r,a)}function zx(r,a,f){return r==null?r:pu(r,a,Fl(f))}function Hx(r,a,f,g){return g=typeof g=="function"?g:n,r==null?r:pu(r,a,Fl(f),g)}function Os(r){return r==null?[]:pl(r,ie(r))}function Ux(r){return r==null?[]:pl(r,Ce(r))}function Vx(r,a,f){return f===n&&(f=a,a=n),f!==n&&(f=rn(f),f=f===f?f:0),a!==n&&(a=rn(a),a=a===a?a:0),Hi(rn(r),a,f)}function $x(r,a,f){return a=$n(a),f===n?(f=a,a=0):f=$n(f),r=rn(r),j0(r,a,f)}function Gx(r,a,f){if(f&&typeof f!="boolean"&&be(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=$n(r),a===n?(a=r,r=0):a=$n(a)),r>a){var g=r;r=a,a=g}if(f||r%1||a%1){var p=Yf();return de(r+p*(a-r+wp("1e-"+((p+"").length-1))),a)}return Ol(r,a)}var Yx=Es(function(r,a,f){return a=a.toLowerCase(),r+(f?wh(a):a)});function wh(r){return rc(Mt(r).toLowerCase())}function Mh(r){return r=Mt(r),r&&r.replace(rr,Np).replace(dp,"")}function Xx(r,a,f){r=Mt(r),a=ze(a);var g=r.length;f=f===n?g:Hi(ht(f),0,g);var p=f;return f-=a.length,f>=0&&r.slice(f,p)==a}function Kx(r){return r=Mt(r),r&&Ka.test(r)?r.replace(Js,Bp):r}function qx(r){return r=Mt(r),r&&tl.test(r)?r.replace(oi,"\\$&"):r}var jx=Es(function(r,a,f){return r+(f?"-":"")+a.toLowerCase()}),Zx=Es(function(r,a,f){return r+(f?" ":"")+a.toLowerCase()}),Jx=Cu("toLowerCase");function Qx(r,a,f){r=Mt(r),a=ht(a);var g=a?Ss(r):0;if(!a||g>=a)return r;var p=(a-g)/2;return No(wo(p),f)+r+No(So(p),f)}function ty(r,a,f){r=Mt(r),a=ht(a);var g=a?Ss(r):0;return a&&g<a?r+No(a-g,f):r}function ey(r,a,f){r=Mt(r),a=ht(a);var g=a?Ss(r):0;return a&&g<a?No(a-g,f)+r:r}function ny(r,a,f){return f||a==null?a=0:a&&(a=+a),c0(Mt(r).replace(er,""),a||0)}function iy(r,a,f){return(f?be(r,a,f):a===n)?a=1:a=ht(a),Dl(Mt(r),a)}function sy(){var r=arguments,a=Mt(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var ry=Es(function(r,a,f){return r+(f?"_":"")+a.toLowerCase()});function oy(r,a,f){return f&&typeof f!="number"&&be(r,a,f)&&(a=f=n),f=f===n?re:f>>>0,f?(r=Mt(r),r&&(typeof a=="string"||a!=null&&!nc(a))&&(a=ze(a),!a&&vs(r))?pi(hn(r),0,f):r.split(a,f)):[]}var ay=Es(function(r,a,f){return r+(f?" ":"")+rc(a)});function ly(r,a,f){return r=Mt(r),f=f==null?0:Hi(ht(f),0,r.length),a=ze(a),r.slice(f,f+a.length)==a}function cy(r,a,f){var g=x.templateSettings;f&&be(r,a,f)&&(a=n),r=Mt(r),a=Ko({},a,g,Ru);var p=Ko({},a.imports,g.imports,Ru),y=ie(p),w=pl(p,y),C,I,B=0,F=a.interpolate||gs,U="__p += '",K=bl((a.escape||gs).source+"|"+F.source+"|"+(F===tr?ro:gs).source+"|"+(a.evaluate||gs).source+"|$","g"),Q="//# sourceURL="+(Pt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++bp+"]")+`
|
|
45
|
-
`;r.replace(K,function(st,_t,vt,Ue,xe,Ve){return vt||(vt=Ue),U+=r.slice(B,Ve).replace(il,Fp),_t&&(C=!0,U+=`' +
|
|
46
|
-
__e(`+_t+`) +
|
|
47
|
-
'`),xe&&(I=!0,U+=`';
|
|
48
|
-
`+xe+`;
|
|
49
|
-
__p += '`),vt&&(U+=`' +
|
|
50
|
-
((__t = (`+vt+`)) == null ? '' : __t) +
|
|
51
|
-
'`),B=Ve+st.length,st}),U+=`';
|
|
52
|
-
`;var it=Pt.call(a,"variable")&&a.variable;if(!it)U=`with (obj) {
|
|
53
|
-
`+U+`
|
|
54
|
-
}
|
|
55
|
-
`;else if(io.test(it))throw new lt(c);U=(I?U.replace(hs,""):U).replace(Ya,"$1").replace(Xa,"$1;"),U="function("+(it||"obj")+`) {
|
|
56
|
-
`+(it?"":`obj || (obj = {});
|
|
57
|
-
`)+"var __t, __p = ''"+(C?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
|
|
58
|
-
function print() { __p += __j.call(arguments, '') }
|
|
59
|
-
`:`;
|
|
60
|
-
`)+U+`return __p
|
|
61
|
-
}`;var gt=Ph(function(){return wt(y,Q+"return "+U).apply(n,w)});if(gt.source=U,ec(gt))throw gt;return gt}function fy(r){return Mt(r).toLowerCase()}function uy(r){return Mt(r).toUpperCase()}function hy(r,a,f){if(r=Mt(r),r&&(f||a===n))return Lf(r);if(!r||!(a=ze(a)))return r;var g=hn(r),p=hn(a),y=Nf(g,p),w=Bf(g,p)+1;return pi(g,y,w).join("")}function dy(r,a,f){if(r=Mt(r),r&&(f||a===n))return r.slice(0,Wf(r)+1);if(!r||!(a=ze(a)))return r;var g=hn(r),p=Bf(g,hn(a))+1;return pi(g,0,p).join("")}function gy(r,a,f){if(r=Mt(r),r&&(f||a===n))return r.replace(er,"");if(!r||!(a=ze(a)))return r;var g=hn(r),p=Nf(g,hn(a));return pi(g,p).join("")}function my(r,a){var f=rt,g=et;if(Bt(a)){var p="separator"in a?a.separator:p;f="length"in a?ht(a.length):f,g="omission"in a?ze(a.omission):g}r=Mt(r);var y=r.length;if(vs(r)){var w=hn(r);y=w.length}if(f>=y)return r;var C=f-Ss(g);if(C<1)return g;var I=w?pi(w,0,C).join(""):r.slice(0,C);if(p===n)return I+g;if(w&&(C+=I.length-C),nc(p)){if(r.slice(C).search(p)){var B,F=I;for(p.global||(p=bl(p.source,Mt(ir.exec(p))+"g")),p.lastIndex=0;B=p.exec(F);)var U=B.index;I=I.slice(0,U===n?C:U)}}else if(r.indexOf(ze(p),C)!=C){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+g}function py(r){return r=Mt(r),r&&Qs.test(r)?r.replace(Zs,Gp):r}var _y=Es(function(r,a,f){return r+(f?" ":"")+a.toUpperCase()}),rc=Cu("toUpperCase");function Th(r,a,f){return r=Mt(r),a=f?n:a,a===n?zp(r)?Kp(r):Ap(r):r.match(a)||[]}var Ph=mt(function(r,a){try{return Fe(r,n,a)}catch(f){return ec(f)?f:new lt(f)}}),by=Hn(function(r,a){return Je(a,function(f){f=wn(f),Wn(r,f,Ql(r[f],r))}),r});function xy(r){var a=r==null?0:r.length,f=nt();return r=a?Rt(r,function(g){if(typeof g[1]!="function")throw new Qe(l);return[f(g[0]),g[1]]}):[],mt(function(g){for(var p=-1;++p<a;){var y=r[p];if(Fe(y[0],this,g))return Fe(y[1],this,g)}})}function yy(r){return G0(en(r,m))}function oc(r){return function(){return r}}function vy(r,a){return r==null||r!==r?a:r}var Sy=Eu(),wy=Eu(!0);function ke(r){return r}function ac(r){return ru(typeof r=="function"?r:en(r,m))}function My(r){return au(en(r,m))}function Ty(r,a){return lu(r,en(a,m))}var Py=mt(function(r,a){return function(f){return pr(f,r,a)}}),Cy=mt(function(r,a){return function(f){return pr(r,f,a)}});function lc(r,a,f){var g=ie(a),p=Eo(a,g);f==null&&!(Bt(a)&&(p.length||!g.length))&&(f=a,a=r,r=this,p=Eo(a,ie(a)));var y=!(Bt(f)&&"chain"in f)||!!f.chain,w=Vn(r);return Je(p,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__),U=F.__actions__=Te(this.__actions__);return U.push({func:I,args:arguments,thisArg:r}),F.__chain__=B,F}return I.apply(r,fi([this.value()],arguments))})}),r}function ky(){return ce._===this&&(ce._=t0),this}function cc(){}function Ey(r){return r=ht(r),mt(function(a){return cu(a,r)})}var Iy=zl(Rt),Ay=zl(If),Oy=zl(ul);function Ch(r){return Xl(r)?hl(wn(r)):l_(r)}function Dy(r){return function(a){return r==null?n:Ui(r,a)}}var Ry=Au(),Ly=Au(!0);function fc(){return[]}function uc(){return!1}function Ny(){return{}}function By(){return""}function Fy(){return!0}function Wy(r,a){if(r=ht(r),r<1||r>jt)return[];var f=re,g=de(r,re);a=nt(a),r-=re;for(var p=ml(g,a);++f<r;)a(f);return p}function zy(r){return ct(r)?Rt(r,wn):He(r)?[r]:Te(Xu(Mt(r)))}function Hy(r){var a=++Jp;return Mt(r)+a}var Uy=Lo(function(r,a){return r+a},0),Vy=Hl("ceil"),$y=Lo(function(r,a){return r/a},1),Gy=Hl("floor");function Yy(r){return r&&r.length?ko(r,ke,Pl):n}function Xy(r,a){return r&&r.length?ko(r,nt(a,2),Pl):n}function Ky(r){return Df(r,ke)}function qy(r,a){return Df(r,nt(a,2))}function jy(r){return r&&r.length?ko(r,ke,Il):n}function Zy(r,a){return r&&r.length?ko(r,nt(a,2),Il):n}var Jy=Lo(function(r,a){return r*a},1),Qy=Hl("round"),tv=Lo(function(r,a){return r-a},0);function ev(r){return r&&r.length?gl(r,ke):0}function nv(r,a){return r&&r.length?gl(r,nt(a,2)):0}return x.after=M1,x.ary=sh,x.assign=ux,x.assignIn=bh,x.assignInWith=Ko,x.assignWith=hx,x.at=dx,x.before=rh,x.bind=Ql,x.bindAll=by,x.bindKey=oh,x.castArray=N1,x.chain=eh,x.chunk=G_,x.compact=Y_,x.concat=X_,x.cond=xy,x.conforms=yy,x.constant=oc,x.countBy=e1,x.create=gx,x.curry=ah,x.curryRight=lh,x.debounce=ch,x.defaults=mx,x.defaultsDeep=px,x.defer=T1,x.delay=P1,x.difference=K_,x.differenceBy=q_,x.differenceWith=j_,x.drop=Z_,x.dropRight=J_,x.dropRightWhile=Q_,x.dropWhile=tb,x.fill=eb,x.filter=i1,x.flatMap=o1,x.flatMapDeep=a1,x.flatMapDepth=l1,x.flatten=Zu,x.flattenDeep=nb,x.flattenDepth=ib,x.flip=C1,x.flow=Sy,x.flowRight=wy,x.fromPairs=sb,x.functions=wx,x.functionsIn=Mx,x.groupBy=c1,x.initial=ob,x.intersection=ab,x.intersectionBy=lb,x.intersectionWith=cb,x.invert=Px,x.invertBy=Cx,x.invokeMap=u1,x.iteratee=ac,x.keyBy=h1,x.keys=ie,x.keysIn=Ce,x.map=Uo,x.mapKeys=Ex,x.mapValues=Ix,x.matches=My,x.matchesProperty=Ty,x.memoize=$o,x.merge=Ax,x.mergeWith=xh,x.method=Py,x.methodOf=Cy,x.mixin=lc,x.negate=Go,x.nthArg=Ey,x.omit=Ox,x.omitBy=Dx,x.once=k1,x.orderBy=d1,x.over=Iy,x.overArgs=E1,x.overEvery=Ay,x.overSome=Oy,x.partial=tc,x.partialRight=fh,x.partition=g1,x.pick=Rx,x.pickBy=yh,x.property=Ch,x.propertyOf=Dy,x.pull=db,x.pullAll=Qu,x.pullAllBy=gb,x.pullAllWith=mb,x.pullAt=pb,x.range=Ry,x.rangeRight=Ly,x.rearg=I1,x.reject=_1,x.remove=_b,x.rest=A1,x.reverse=Zl,x.sampleSize=x1,x.set=Nx,x.setWith=Bx,x.shuffle=y1,x.slice=bb,x.sortBy=w1,x.sortedUniq=Tb,x.sortedUniqBy=Pb,x.split=oy,x.spread=O1,x.tail=Cb,x.take=kb,x.takeRight=Eb,x.takeRightWhile=Ib,x.takeWhile=Ab,x.tap=Yb,x.throttle=D1,x.thru=Ho,x.toArray=mh,x.toPairs=vh,x.toPairsIn=Sh,x.toPath=zy,x.toPlainObject=_h,x.transform=Fx,x.unary=R1,x.union=Ob,x.unionBy=Db,x.unionWith=Rb,x.uniq=Lb,x.uniqBy=Nb,x.uniqWith=Bb,x.unset=Wx,x.unzip=Jl,x.unzipWith=th,x.update=zx,x.updateWith=Hx,x.values=Os,x.valuesIn=Ux,x.without=Fb,x.words=Th,x.wrap=L1,x.xor=Wb,x.xorBy=zb,x.xorWith=Hb,x.zip=Ub,x.zipObject=Vb,x.zipObjectDeep=$b,x.zipWith=Gb,x.entries=vh,x.entriesIn=Sh,x.extend=bh,x.extendWith=Ko,lc(x,x),x.add=Uy,x.attempt=Ph,x.camelCase=Yx,x.capitalize=wh,x.ceil=Vy,x.clamp=Vx,x.clone=B1,x.cloneDeep=W1,x.cloneDeepWith=z1,x.cloneWith=F1,x.conformsTo=H1,x.deburr=Mh,x.defaultTo=vy,x.divide=$y,x.endsWith=Xx,x.eq=gn,x.escape=Kx,x.escapeRegExp=qx,x.every=n1,x.find=s1,x.findIndex=qu,x.findKey=_x,x.findLast=r1,x.findLastIndex=ju,x.findLastKey=bx,x.floor=Gy,x.forEach=nh,x.forEachRight=ih,x.forIn=xx,x.forInRight=yx,x.forOwn=vx,x.forOwnRight=Sx,x.get=ic,x.gt=U1,x.gte=V1,x.has=Tx,x.hasIn=sc,x.head=Ju,x.identity=ke,x.includes=f1,x.indexOf=rb,x.inRange=$x,x.invoke=kx,x.isArguments=Gi,x.isArray=ct,x.isArrayBuffer=$1,x.isArrayLike=Pe,x.isArrayLikeObject=Yt,x.isBoolean=G1,x.isBuffer=_i,x.isDate=Y1,x.isElement=X1,x.isEmpty=K1,x.isEqual=q1,x.isEqualWith=j1,x.isError=ec,x.isFinite=Z1,x.isFunction=Vn,x.isInteger=uh,x.isLength=Yo,x.isMap=hh,x.isMatch=J1,x.isMatchWith=Q1,x.isNaN=tx,x.isNative=ex,x.isNil=ix,x.isNull=nx,x.isNumber=dh,x.isObject=Bt,x.isObjectLike=Ht,x.isPlainObject=Sr,x.isRegExp=nc,x.isSafeInteger=sx,x.isSet=gh,x.isString=Xo,x.isSymbol=He,x.isTypedArray=As,x.isUndefined=rx,x.isWeakMap=ox,x.isWeakSet=ax,x.join=fb,x.kebabCase=jx,x.last=sn,x.lastIndexOf=ub,x.lowerCase=Zx,x.lowerFirst=Jx,x.lt=lx,x.lte=cx,x.max=Yy,x.maxBy=Xy,x.mean=Ky,x.meanBy=qy,x.min=jy,x.minBy=Zy,x.stubArray=fc,x.stubFalse=uc,x.stubObject=Ny,x.stubString=By,x.stubTrue=Fy,x.multiply=Jy,x.nth=hb,x.noConflict=ky,x.noop=cc,x.now=Vo,x.pad=Qx,x.padEnd=ty,x.padStart=ey,x.parseInt=ny,x.random=Gx,x.reduce=m1,x.reduceRight=p1,x.repeat=iy,x.replace=sy,x.result=Lx,x.round=Qy,x.runInContext=E,x.sample=b1,x.size=v1,x.snakeCase=ry,x.some=S1,x.sortedIndex=xb,x.sortedIndexBy=yb,x.sortedIndexOf=vb,x.sortedLastIndex=Sb,x.sortedLastIndexBy=wb,x.sortedLastIndexOf=Mb,x.startCase=ay,x.startsWith=ly,x.subtract=tv,x.sum=ev,x.sumBy=nv,x.template=cy,x.times=Wy,x.toFinite=$n,x.toInteger=ht,x.toLength=ph,x.toLower=fy,x.toNumber=rn,x.toSafeInteger=fx,x.toString=Mt,x.toUpper=uy,x.trim=hy,x.trimEnd=dy,x.trimStart=gy,x.truncate=my,x.unescape=py,x.uniqueId=Hy,x.upperCase=_y,x.upperFirst=rc,x.each=nh,x.eachRight=ih,x.first=Ju,lc(x,function(){var r={};return vn(x,function(a,f){Pt.call(x.prototype,f)||(r[f]=a)}),r}(),{chain:!1}),x.VERSION=i,Je(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){x[r].placeholder=x}),Je(["drop","take"],function(r,a){xt.prototype[r]=function(f){f=f===n?1:te(ht(f),0);var g=this.__filtered__&&!a?new xt(this):this.clone();return g.__filtered__?g.__takeCount__=de(f,g.__takeCount__):g.__views__.push({size:de(f,re),type:r+(g.__dir__<0?"Right":"")}),g},xt.prototype[r+"Right"]=function(f){return this.reverse()[r](f).reverse()}}),Je(["filter","map","takeWhile"],function(r,a){var f=a+1,g=f==Vt||f==Ct;xt.prototype[r]=function(p){var y=this.clone();return y.__iteratees__.push({iteratee:nt(p,3),type:f}),y.__filtered__=y.__filtered__||g,y}}),Je(["head","last"],function(r,a){var f="take"+(a?"Right":"");xt.prototype[r]=function(){return this[f](1).value()[0]}}),Je(["initial","tail"],function(r,a){var f="drop"+(a?"":"Right");xt.prototype[r]=function(){return this.__filtered__?new xt(this):this[f](1)}}),xt.prototype.compact=function(){return this.filter(ke)},xt.prototype.find=function(r){return this.filter(r).head()},xt.prototype.findLast=function(r){return this.reverse().find(r)},xt.prototype.invokeMap=mt(function(r,a){return typeof r=="function"?new xt(this):this.map(function(f){return pr(f,r,a)})}),xt.prototype.reject=function(r){return this.filter(Go(nt(r)))},xt.prototype.slice=function(r,a){r=ht(r);var f=this;return f.__filtered__&&(r>0||a<0)?new xt(f):(r<0?f=f.takeRight(-r):r&&(f=f.drop(r)),a!==n&&(a=ht(a),f=a<0?f.dropRight(-a):f.take(a-r)),f)},xt.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},xt.prototype.toArray=function(){return this.take(re)},vn(xt.prototype,function(r,a){var f=/^(?:filter|find|map|reject)|While$/.test(a),g=/^(?:head|last)$/.test(a),p=x[g?"take"+(a=="last"?"Right":""):a],y=g||/^find/.test(a);p&&(x.prototype[a]=function(){var w=this.__wrapped__,C=g?[1]:arguments,I=w instanceof xt,B=C[0],F=I||ct(w),U=function(_t){var vt=p.apply(x,fi([_t],C));return g&&K?vt[0]:vt};F&&f&&typeof B=="function"&&B.length!=1&&(I=F=!1);var K=this.__chain__,Q=!!this.__actions__.length,it=y&&!K,gt=I&&!Q;if(!y&&F){w=gt?w:new xt(this);var st=r.apply(w,C);return st.__actions__.push({func:Ho,args:[U],thisArg:n}),new tn(st,K)}return it&>?r.apply(this,C):(st=this.thru(U),it?g?st.value()[0]:st.value():st)})}),Je(["pop","push","shift","sort","splice","unshift"],function(r){var a=ho[r],f=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",g=/^(?:pop|shift)$/.test(r);x.prototype[r]=function(){var p=arguments;if(g&&!this.__chain__){var y=this.value();return a.apply(ct(y)?y:[],p)}return this[f](function(w){return a.apply(ct(w)?w:[],p)})}}),vn(xt.prototype,function(r,a){var f=x[a];if(f){var g=f.name+"";Pt.call(Ps,g)||(Ps[g]=[]),Ps[g].push({name:a,func:f})}}),Ps[Ro(n,A).name]=[{name:"wrapper",func:n}],xt.prototype.clone=p0,xt.prototype.reverse=_0,xt.prototype.value=b0,x.prototype.at=Xb,x.prototype.chain=Kb,x.prototype.commit=qb,x.prototype.next=jb,x.prototype.plant=Jb,x.prototype.reverse=Qb,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=t1,x.prototype.first=x.prototype.head,cr&&(x.prototype[cr]=Zb),x},ws=qp();Bi?((Bi.exports=ws)._=ws,al._=ws):ce._=ws}).call(K2)}(Rr,Rr.exports)),Rr.exports}var Zn=q2();typeof BigInt>"u"&&(BigInt=function(t){if(isNaN(t))throw new Error("");return t});const tt=BigInt(0),ut=BigInt(1),qr=BigInt(2),Xc=BigInt(5),Ae=BigInt(10),j2=2e3,X={s:ut,n:tt,d:ut};function Xn(t,e){try{t=BigInt(t)}catch{throw xi()}return t*e}function pn(t){return typeof t=="bigint"?t:Math.floor(t)}function Lt(t,e){if(e===tt)throw _f();const n=Object.create(Jr.prototype);n.s=t<tt?-ut:ut,t=t<tt?-t:t;const i=Zi(t,e);return n.n=t/i,n.d=e/i,n}function Ls(t){const e={};let n=t,i=qr,s=Xc-ut;for(;s<=n;){for(;n%i===tt;)n/=i,e[i]=(e[i]||tt)+ut;s+=ut+qr*i++}return n!==t?n>1&&(e[n]=(e[n]||tt)+ut):e[t]=(e[t]||tt)+ut,e}const se=function(t,e){let n=tt,i=ut,s=ut;if(t!=null)if(e!==void 0){if(typeof t=="bigint")n=t;else{if(isNaN(t))throw xi();if(t%1!==0)throw mg();n=BigInt(t)}if(typeof e=="bigint")i=e;else{if(isNaN(e))throw xi();if(e%1!==0)throw mg();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 xi();s=n*i}else if(typeof t=="number"){if(isNaN(t))throw xi();if(t<0&&(s=-ut,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 m=(l+u)/(c+h);if(t===m){c+h<=d?(n=l+u,i=c+h):h>c?(n=u,i=h):(n=l,i=c);break}else t>m?(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=tt,c=tt,u=tt,h=ut,d=ut,m=t.replace(/_/g,"").match(/\d+|./g);if(m===null)throw xi();if(m[o]==="-"?(s=-ut,o++):m[o]==="+"&&o++,m.length===o+1?c=Xn(m[o++],s):m[o+1]==="."||m[o]==="."?(m[o]!=="."&&(l=Xn(m[o++],s)),o++,(o+1===m.length||m[o+1]==="("&&m[o+3]===")"||m[o+1]==="'"&&m[o+3]==="'")&&(c=Xn(m[o],s),h=Ae**BigInt(m[o].length),o++),(m[o]==="("&&m[o+2]===")"||m[o]==="'"&&m[o+2]==="'")&&(u=Xn(m[o+1],s),d=Ae**BigInt(m[o+1].length)-ut,o+=3)):m[o+1]==="/"||m[o+1]===":"?(c=Xn(m[o],s),h=Xn(m[o+2],ut),o+=3):m[o+3]==="/"&&m[o+1]===" "&&(l=Xn(m[o],s),c=Xn(m[o+2],s),h=Xn(m[o+4],ut),o+=5),m.length<=o)i=h*d,s=n=u+i*l+d*c;else throw xi()}else if(typeof t=="bigint")n=t,s=t,i=ut;else throw xi();if(i===tt)throw _f();X.s=s<tt?-ut:ut,X.n=n<tt?-n:n,X.d=i<tt?-i:i};function Z2(t,e,n){let i=ut;for(;e>tt;t=t*t%n,e>>=ut)e&ut&&(i=i*t%n);return i}function J2(t,e){for(;e%qr===tt;e/=qr);for(;e%Xc===tt;e/=Xc);if(e===ut)return tt;let n=Ae%e,i=1;for(;n!==ut;i++)if(n=n*Ae%e,i>j2)return tt;return BigInt(i)}function Q2(t,e,n){let i=ut,s=Z2(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 Zi(t,e){if(!t)return e;if(!e)return t;for(;;){if(t%=e,!t)return e;if(e%=t,!e)return t}}function Jr(t,e){if(se(t,e),this instanceof Jr)t=Zi(X.d,X.n),this.s=X.s,this.n=X.n/t,this.d=X.d/t;else return Lt(X.s*X.n,X.d)}var _f=function(){return new Error("Division by Zero")},xi=function(){return new Error("Invalid argument")},mg=function(){return new Error("Parameters must be integer")};Jr.prototype={s:ut,n:tt,d:ut,abs:function(){return Lt(this.n,this.d)},neg:function(){return Lt(-this.s*this.n,this.d)},add:function(t,e){return se(t,e),Lt(this.s*this.n*X.d+X.s*this.d*X.n,this.d*X.d)},sub:function(t,e){return se(t,e),Lt(this.s*this.n*X.d-X.s*this.d*X.n,this.d*X.d)},mul:function(t,e){return se(t,e),Lt(this.s*X.s*this.n*X.n,this.d*X.d)},div:function(t,e){return se(t,e),Lt(this.s*X.s*this.n*X.d,this.d*X.n)},clone:function(){return Lt(this.s*this.n,this.d)},mod:function(t,e){if(t===void 0)return Lt(this.s*this.n%this.d,ut);if(se(t,e),tt===X.n*this.d)throw _f();return Lt(this.s*(X.d*this.n)%(X.n*this.d),X.d*this.d)},gcd:function(t,e){return se(t,e),Lt(Zi(X.n,this.n)*Zi(X.d,this.d),X.d*this.d)},lcm:function(t,e){return se(t,e),X.n===tt&&this.n===tt?Lt(tt,ut):Lt(X.n*this.n,Zi(X.n,this.n)*Zi(X.d,this.d))},inverse:function(){return Lt(this.s*this.d,this.n)},pow:function(t,e){if(se(t,e),X.d===ut)return X.s<tt?Lt((this.s*this.d)**X.n,this.n**X.n):Lt((this.s*this.n)**X.n,this.d**X.n);if(this.s<tt)return null;let n=Ls(this.n),i=Ls(this.d),s=ut,o=ut;for(let l in n)if(l!=="1"){if(l==="0"){s=tt;break}if(n[l]*=X.n,n[l]%X.d===tt)n[l]/=X.d;else return null;s*=BigInt(l)**n[l]}for(let l in i)if(l!=="1"){if(i[l]*=X.n,i[l]%X.d===tt)i[l]/=X.d;else return null;o*=BigInt(l)**i[l]}return X.s<tt?Lt(o,s):Lt(s,o)},log:function(t,e){if(se(t,e),this.s<=tt||X.s<=tt)return null;const n={},i=Ls(X.n),s=Ls(X.d),o=Ls(this.n),l=Ls(this.d);for(const h in s)i[h]=(i[h]||tt)-s[h];for(const h in l)o[h]=(o[h]||tt)-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]||tt,m=o[h]||tt;if(d===tt){if(m!==tt)return null;continue}let _=m,v=d;const M=Zi(_,v);if(_/=M,v/=M,c===null&&u===null)c=_,u=v;else if(_*u!==c*v)return null}return c!==null&&u!==null?Lt(c,u):null},equals:function(t,e){return se(t,e),this.s*this.n*X.d===X.s*X.n*this.d},lt:function(t,e){return se(t,e),this.s*this.n*X.d<X.s*X.n*this.d},lte:function(t,e){return se(t,e),this.s*this.n*X.d<=X.s*X.n*this.d},gt:function(t,e){return se(t,e),this.s*this.n*X.d>X.s*X.n*this.d},gte:function(t,e){return se(t,e),this.s*this.n*X.d>=X.s*X.n*this.d},compare:function(t,e){se(t,e);let n=this.s*this.n*X.d-X.s*X.n*this.d;return(tt<n)-(n<tt)},ceil:function(t){return t=Ae**BigInt(t||0),Lt(pn(this.s*t*this.n/this.d)+(t*this.n%this.d>tt&&this.s>=tt?ut:tt),t)},floor:function(t){return t=Ae**BigInt(t||0),Lt(pn(this.s*t*this.n/this.d)-(t*this.n%this.d>tt&&this.s<tt?ut:tt),t)},round:function(t){return t=Ae**BigInt(t||0),Lt(pn(this.s*t*this.n/this.d)+this.s*((this.s>=tt?ut:tt)+qr*(t*this.n%this.d)>this.d?ut:tt),t)},roundTo:function(t,e){se(t,e);const n=this.n*X.d,i=this.d*X.n,s=n%i;let o=pn(n/i);return s+s>=i&&o++,Lt(this.s*o*X.n,X.d)},divisible:function(t,e){return se(t,e),!(!(X.n*this.d)||this.n*X.d%(X.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=Q2(e,n,i),o=this.s<tt?"-":"";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<tt?"-":"";if(n===ut)i+=e;else{let s=pn(e/n);t&&s>tt&&(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<tt?"-":"";if(n===ut)i+=e;else{let s=pn(e/n);t&&s>tt&&(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!==ut);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=Lt(i[s-1],ut);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 pg={maximumFractionDigits:20};function tP(t,e){let n;try{e&&(n=new Intl.NumberFormat(e,pg))}catch{n=new Intl.NumberFormat(void 0,pg)}return n.format(t)}const Gm=t=>typeof t=="string"&&jr(t)?xf(t):t,Qr=t=>{const e=Gm(t);if(yP(e)||Number.isNaN(e)||e===1/0||e===-1/0)return!0;if(!(pP(e)||_P(e)||vP(e)||SP(e)||bP(e)||xP(e))){const n=$s(String(e));if(n.includes(Qn))return!1;const i=bf(n)?jm(n):Xe(n)?parseFloat(n):n;if(i===1/0||i===-1/0)return!0;if(!Xe(i))return!1;if(!Number.isNaN(i))return!0}return!1},Ha=t=>typeof t=="string"?Qr(t)&&t.toLowerCase().includes("e"):!1,In=(t,e,n)=>{const i=t,s=Gm(t);if(Qr(s)){const o=$s(String(s)),l=bf(o)?jm(o):Xe(o)?parseFloat(o):o;return l===1/0||l===-1/0?l:Number.isNaN(l)||!Xe(l)?i:l}else return i},eP=t=>{if(Qr(t)){if(typeof t=="string")return t;if(typeof t=="number")return Number.isNaN(t)||!Number.isFinite(t)?String(t):Km(t,{noThousandsSeparator:!0})}return t},Ym=(t,e=!1)=>{var i,s,o;const n=e?/0+((?=[|eE])|$)/:/(0+|0+\.0+)((?=[|eE])|$)/;return typeof t=="string"&&(!e||t.includes(".")||t.includes(","))?((o=(s=(i=t==null?void 0:t.match(n))==null?void 0:i[0])==null?void 0:s.replaceAll(/[.,]/g,""))==null?void 0:o.length)??0:0},nP=t=>Ym(t)>0,ss=(t,e=!1)=>{const n=typeof t=="string",i=n&&jr(t),s=i?NP(t):null,o=$s(i?xf(t):t);return{number:e&&nP(t)?o:In(o),unit:s,isString:n}},iP=(t,e)=>String(e?t:eP(t)),Ua=({value:t,unit:e,isString:n,isScientific:i})=>{const s=typeof t=="number"&&n?iP(t,i):t;return e?FP(s,e):s},sP=Number.EPSILON,rP=(t,e)=>{const{number:n,unit:i}=ss(t),{number:s,unit:o}=ss(e),c=i&&o&&i!==o?BP(s,i,o):s;return{firstNumber:n,secondNumber:c}},oP=t=>{if(t!=null){if(Xe(t)&&typeof t=="number")return t;if(wP(t)){const e=In(t==null?void 0:t.toString().replace("%",""));if(Xe(e))return e/100}}return null},aP=(t,e,n={relativeDiff:sP})=>{const{relativeDiff:i,absoluteDiff:s}=n,l=oP(i??s);if(t===null||e===null)return!1;const c=jr(t),u=jr(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}=rP(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 m=Math.abs(h-d);return aP(m,l,{relativeDiff:"1%"})||m<l}else return 2*Math.abs((h-d)/(h+d))<l}return!1},Ei=4,Kc=(t,e=Ei)=>{const n=10**e;return Math.round(t*n)/n},Xm=(t,e=Ei)=>{if(typeof t=="number")return Kc(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}=ss(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:Kc(n,e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},qc=(t,e=Ei)=>Number(t.toPrecision(e)),lP=(t,e=Ei)=>{const n=In(t).toPrecision(e),[i,s]=n.split(".");if(s){const o=e-i.length;return`${i}.${s.padEnd(o,"0")}`}else return i},UC=(t,e=Ei)=>{if(typeof t=="number")return qc(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}=ss(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:qc(n,e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},_g=(t,e=Ei,n=!1)=>{const i=10**e,s=i&&t>i?Kc(t,0):n?lP(t,e):qc(t,e);return n?String(s):s},VC=(t,e=Ei)=>{if(typeof t=="number")return _g(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}=ss(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:_g(n,e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},$C=(t,e=Ei)=>{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}=ss(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:n.toFixed(e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},cP=1e-4,fP=1e7,uP={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻"},hP=(t,e)=>{const n="0".repeat(e);return e>0&&t!=="0"?t.includes(".")?`${t}${n}`:`${t}.${n}`:t},dP=(t,e,n=!1)=>{const i=tP(In(t),"en-US").replaceAll(",",e);return n?hP(i,Ym(t,!0)):i},Km=(t,e)=>{const{nonBreakingSpace:n}=e??{};if(t==="")return t;if(t==null)return"";if(!Qr(t))return Da(t.toString());const i=e!=null&&e.noThousandsSeparator?"":n?" ":" ";return dP(t,i,e==null?void 0:e.preserveTrailingZeros)},gP=(t,e)=>{const{roundScientificCoefficient:n,eNotation:i}=e??{};if(Number.isNaN(t))return"Invalid";if(t==null)return"";if(!Qr(t)||t==="")return Da(t.toString());const s=In(t);if(!Number.isFinite(s))return Da(t.toString());const o=i?"e":"·10",[l,c]=s.toExponential().split("e"),u=typeof n=="number"?Xm(l,n):l,h=c==="+0"||c==="-0",d=[...c.replaceAll("+","")].map(m=>i?m:uP[m]).join("");return h?u:`${u}${o}${d}`},mP=(t,e)=>{const n=Math.abs(In(t));return((e==null?void 0:e.scientific)==="auto"&&(e!=null&&e.autoScientificBelow)&&(e!=null&&e.autoScientificAbove)?n<(e==null?void 0:e.autoScientificBelow)||n>(e==null?void 0:e.autoScientificAbove):e==null?void 0:e.scientific)?gP(t,e):Km(t,e)},GC=(t,e)=>{const n={scientific:(e==null?void 0:e.scientific)??"auto",eNotation:(e==null?void 0:e.eNotation)??!1,autoScientificBelow:(e==null?void 0:e.autoScientificBelow)??cP,autoScientificAbove:(e==null?void 0:e.autoScientificAbove)??fP,withUnit:(e==null?void 0:e.withUnit)??!1,nonBreakingSpace:(e==null?void 0:e.nonBreakingSpace)??!1,roundScientificCoefficient:e==null?void 0:e.roundScientificCoefficient},{withUnit:i}=n;if(t==null)return"";const{number:s,unit:o}=ss(t),l=mP(s,n),c=o?kc==null?void 0:kc[o]:"";return i&&o?l===""?c:`${l} ${c}`:l},pP=t=>t===null,_P=t=>t===void 0,bP=t=>t&&t.constructor===Array,xP=t=>t&&t.constructor===Object,yP=t=>t==="",vP=t=>t&&t[t.length-1]===".",SP=t=>t&&t[t.length-1]===",",wP=t=>typeof t=="string"&&/^\d+(\.\d+)?%$/.test(t),qm=t=>t.trim().replace(/\s+/g," "),bf=t=>{if(typeof t!="string"||!t.includes("/"))return!1;try{return new Jr(qm(t)),!0}catch(e){return e.message==="Division by Zero"}};function Xe(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(bf(t))return!0;const e=parseFloat(t);return typeof t=="string"?!isNaN(e)&&(ep.test(t)||isFinite(t)):isFinite(t)}function yi(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 jm(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=qm(t));let e=t;try{const n=new Jr(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 Da=t=>t.trim().replace(/[\t\r\n]/g,"");function $s(t){let e=Da(t+"");const n=yi("/",e),i=yi(" ",e)+yi(" ",e);let s=yi(".",e),o=yi(",",e);return n===0&&i>0&&(e=e.replace(/\s/g,"")),o>1&&(e=e.replace(/,/g,"")),s>1&&(e=e.replace(/\./g,"")),o=yi(",",e),s=yi(".",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 YC=t=>{const e=(t==null?void 0:t[0])==="-",n=/^-/mg,i=/^(?:0+(?=[1-9])|0+(?=0))/mg,s=t.replace(n,"").replace(i,"");return e?`-${s}`:s};function MP(t){return typeof t=="number"?t:parseFloat($s(t))}const TP=t=>!Xe(t),{abs:Zm,exp:Jm,sqrt:jc}=Math;function PP(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=Zm(t(u)-t(o)),c<i)return[u,!0,l];o=u,l++}return[n,!1,l]}function Qm(t){const e=1/(1+.5*Zm(t)),n=1-e*Jm(-(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 CP(t){const e=s=>t-Qm(s/jc(2)),n=s=>-jc(2/Math.PI)*Jm(-.5*s**2),[i]=PP(e,n,1);return i}function kP(t){return Qm(t/jc(2))}const kc=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"}),EP=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"]}),H=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}),IP=Object.freeze({"m|mm":t=>t*1e3,"m|cm":t=>t*100,"m|km":t=>t/1e3,"m|ft":t=>t/H.ft_to_m,"m|in":t=>t/H.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*H.ft_to_m,"in|m":t=>t*H.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/H.bbl_to_m3,"m3|ft3":t=>t/H.ft3_to_m3,"m3|l":t=>t*1e3,"m3|Mm3":t=>t/1e6,"m3|USGal":t=>t/H.USGal_to_m3,"bbl|m3":t=>t*H.bbl_to_m3,"ft3|m3":t=>t*H.ft3_to_m3,"Mm3|m3":t=>t*1e6,"l|m3":t=>t/1e3,"USGal|m3":t=>t*H.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/H.ft3_to_m3,"m3|MSm3":t=>t*1e-6,"m3|SCF":t=>t/H.ft3_to_m3,"MMSCF|m3":t=>t*1e-6*H.ft3_to_m3,"MSm3|m3":t=>t*1e6,"SCF|m3":t=>t*H.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/H.psi_to_pascal,"psi|Pa":t=>t*H.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/H.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*H.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-H.kelvin_to_degrees,"C|K":t=>t+H.kelvin_to_degrees,"C/100m|F/100ft":t=>t*1.8*H.ft_to_m,"F/100ft|C/100m":t=>t*5/9/H.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*H.ft_to_m,"F/ft|C/100m":t=>t*5/9*100/H.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/H.psi_to_pascal,"Pa/C|psi/C":t=>t/H.psi_to_pascal,"Bar/C|Pa/C":t=>t*1e5,"psi/F|Pa/C":t=>t*1.8*H.psi_to_pascal,"psi/C|Pa/C":t=>t*H.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*H.kg_to_lbf,"kg|t":t=>t/1e3,"kg|tonnes":t=>t/1e3,"kg|mt":t=>t/1e3,"kg|kip":t=>t*H.kg_to_lbf*.001,"kgf|kg":t=>t,"lbf|kg":t=>t*H.lbf_to_kg,"t|kg":t=>t*1e3,"tonnes|kg":t=>t*1e3,"mt|kg":t=>t*1e3,"kip|kg":t=>t*1e3*H.lbf_to_kg,"tonnes|lbf":t=>t*1e3*H.kg_to_lbf,"lbf|tonnes":t=>t*H.lbf_to_kg/1e3,"t|lbf":t=>t*1e3*H.kg_to_lbf,"lbf|t":t=>t*H.lbf_to_kg/1e3,"mt|lbf":t=>t*1e3*H.kg_to_lbf,"lbf|mt":t=>t/(1e3*H.kg_to_lbf),"kgf|lbf":t=>t*H.kg_to_lbf,"lbf|kgf":t=>t*H.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*H.g*100,"N|kg":t=>t/(H.g*100),"m/s|km/h":t=>t*3.6,"km/h|m/s":t=>t/3.6,"m/s|ft/s":t=>t/H.ft_to_m,"m/s|ft/min":t=>t*60/H.ft_to_m,"m/s|ft/h":t=>t*3600/H.ft_to_m,"m/s|m/min":t=>t*60,"m/s|m/h":t=>t*3600,"ft/s|m/s":t=>t*H.ft_to_m,"ft/min|m/s":t=>t*H.ft_to_m/60,"ft/h|m/s":t=>t*H.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*H.ft_to_m,"m/h|ft/h":t=>t/H.ft_to_m,"ft/d|m/h":t=>t*H.ft_to_m/24,"m/h|ft/d":t=>t*24/H.ft_to_m,"ft/d|m/d":t=>t*H.ft_to_m,"m/d|ft/d":t=>t/H.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/H.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*H.day_to_second,"m3/s|bbl/d":t=>t*543439.6505653338,"m3/s|ft3/d":t=>t*H.day_to_second/H.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*H.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*H.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/H.day_to_second,"m3/min|m3/s":t=>t/60,"bbl/d|m3/s":t=>t/H.day_to_second*H.bbl_to_m3,"ft3/d|m3/s":t=>t/H.day_to_second*H.ft3_to_m3,"ft3/d|m3/d":t=>t*H.ft3_to_m3,"m3/d|ft3/d":t=>t/H.ft3_to_m3,"m3/d|ft3/s":t=>t/H.ft3_to_m3/H.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/H.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*H.ft_to_m,"lbf/ft|N/m":t=>t/.22480894387096/H.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=>CP(t),"Sigma|CI":t=>kP(t),"g/mol|kg/mol":t=>t/1e3,"kg/mol|g/mol":t=>t*1e3,"lbf/mol|kg/mol":t=>t/H.kg_to_lbf,"kg/mol|lbf/mol":t=>t*H.kg_to_lbf,"m/s2|ft/s2":t=>t/H.ft_to_m,"ft/s2|m/s2":t=>t*H.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*H.psi_to_pascal/H.ft_to_m,"Pa/m|psi/ft":t=>t/H.psi_to_pascal*H.ft_to_m,"psi/100ft|Pa/m":t=>t*68.9475729/H.ft_to_m,"Pa/m|psi/100ft":t=>t/68.9475729*H.ft_to_m,"deg/30m|deg/100ft":t=>t*(100*H.ft_to_m/30),"deg/100ft|deg/30m":t=>t/(100*H.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*H.ft_to_m),"deg/m|deg/100ft":t=>t*(100*H.ft_to_m),"deg/ft|deg/m":t=>t/H.ft_to_m,"deg/m|deg/ft":t=>t*H.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/H.ft_to_m,"deg/m|rad/ft":t=>t*Math.PI/180*H.ft_to_m,"deg/10m|deg/100ft":t=>t*(10*H.ft_to_m),"deg/100ft|deg/10m":t=>t/(10*H.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*H.m3_per_m_to_ft3_per_ft,"m3/m|in3/ft":t=>t*H.m3_per_m_to_ft3_per_ft*H.ft3_to_in3,"cm3/m|m3/m":t=>t*1e-6,"cm3/m|mm3/m":t=>t*1e3,"cm3/m|ft3/ft":t=>t*H.m3_per_m_to_ft3_per_ft*1e-6,"cm3/m|in3/ft":t=>t*H.m3_per_m_to_ft3_per_ft*1e-6*H.ft3_to_in3,"mm3/m|m3/m":t=>t*1e-9,"mm3/m|cm3/m":t=>t*.001,"mm3/m|ft3/ft":t=>t*H.m3_per_m_to_ft3_per_ft*1e-9,"mm3/m|in3/ft":t=>t*H.m3_per_m_to_ft3_per_ft*1e-9*H.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*H.in3_per_ft_to_m3_per_m,"in3/ft|cm3/m":t=>t*H.in3_per_ft_to_m3_per_m*1e6,"in3/ft|mm3/m":t=>t*H.in3_per_ft_to_m3_per_m*1e9,"in3/ft|ft3/ft":t=>t/H.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}),Ns=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)"}),ga=Object.freeze({"lbs/ft":"lb/ft","lbm/ft":"lb/ft",ftUS:"usft"}),bg=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"}),AP=Object.freeze(Array.from(new Set(Object.values(EP).flat()))),OP=[NaN,-1/0,1/0],DP=OP.map(t=>t.toString());var ma={},xg;function RP(){if(xg)return ma;xg=1,Object.defineProperty(ma,"__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 ma.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',ma}const pa=tp;function tp(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 tp.errors=o,l===0}RP().default;const yg=t=>t==null?void 0:t.map(({message:e})=>e),Qn="|",LP=/^(-?[0-9., /]*?(?:e[-+]?[0-9]+)?)([^0-9-., /].*)?$/,ep=/^[-+]?[0-9]*\.?[0-9]+(?:\/[0-9]*\.?[0-9]+)?(?:[eE][-+]?[0-9]+)?$/;function np(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 jn(t,e,n){if(t=np(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 In(t);if(t===1/0||t==="Infinity")return 1/0;if(t===-1/0||t==="-Infinity")return-1/0;if(TP(t)&&t!=="")return NaN;const i=IP[e+"|"+n];if(i)return i(In(t));if(Ns[e])return console.warn(`Unit '${e}' is deprecated - use '${Ns[e]}' instead.`),jn(t,Ns[e],n);if(Ns[n])return console.warn(`Unit '${n}' is deprecated - use '${Ns[n]}' instead.`),jn(t,e,Ns[n]);if(ga[n])return jn(t,e,ga[n]);if(ga[e])return jn(t,ga[e],n);const s=bg[e];if(s){const o=jn(t,e,s);return jn(o,s,n)}else{const o=bg[n];if(n&&o&&o!==n){const l=jn(t,e,o);return jn(l,o,n)}}throw console.error("no conversions found",t,e,"->",n),new Error("No conversions found: "+t+" "+e+" -> "+n)}function Va(t){let e,n=t!=null?String(t):"";return yi(Qn,n)>1&&(e=n.split(Qn),n=e.slice(0,-1).join("")+Qn+e.slice(-1)),n.indexOf(Qn)>=0?e=n.split(Qn):DP.includes(n)?e=[n,""]:(e=$s(n).match(LP),e&&(e=e.slice(1))),e||(e=["0",""]),e[1]==null&&(e[1]=""),[e[0],e[1]]}function xf(t){return Va(t)[0]}function NP(t){return Va(t)[1]}function ip(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=$s(t).replaceAll("+",""),s=Va(i);if(!s){if(e&&n)return ip(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]?In(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"&&ep.test(o))return parseFloat(o);if(!Xe(o)&&o!==1/0&&o!==-1/0)throw new Error("unum: invalid number: "+o+", "+typeof o);return MP(o)}return jn(s[0],n,e)}function jr(t){if(!t)return!1;const e=String(t).split(Qn);return e.length===2&&AP.includes(e[1])}function BP(t,e,n){return ip(t,e,n)}function FP(t,e,n=""){if((t===null||t===""||t===void 0)&&(t=n),e===null)return String(t);let[i,s]=String(t).includes(Qn)?Va(String(t)):[t,e];return s||(s=e),[i,s].join(Qn)}function XC(t){let e=t;return typeof t=="string"&&jr(t)&&(e=xf(t)),e=np(e),Xe(e)?{valid:pa(In(e)),errors:yg(pa.errors)}:{valid:pa(e),errors:yg(pa.errors)}}var Ec={exports:{}};/*!
|
|
62
|
-
Copyright (c) 2018 Jed Watson.
|
|
63
|
-
Licensed under the MIT License (MIT), see
|
|
64
|
-
http://jedwatson.github.io/classnames
|
|
65
|
-
*/var vg;function WP(){return vg||(vg=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})()}(Ec)),Ec.exports}var zP=WP();const HP=Pg(zP),Sg=10,UP=t=>t==null?void 0:t.reduce((e,n,i)=>{if(i===0)return e;const s=Math.abs(n-(t==null?void 0:t[i-1]));return Math.max(s,e)},0),VP=(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,m=t>h,_=t<d,v=e.indexOf(t)!==-1;return m&&_&&!v},$P=(t,e)=>{var c;const n=t==null?void 0:t.sort((u,h)=>u-h),i=UP(t)/10,s=t[0],o=(t.length+1)*Sg;return(c=[...Array(o)].map((u,h)=>{const d=s+(h-Sg+1)*i;return parseFloat(d==null?void 0:d.toFixed(1))}))==null?void 0:c.filter(u=>VP(u,n,e))},GP=t=>{var c,u,h,d,m,_,v,M,T,k,A,R,W,z;const{chart:e,ctx:n}=t??{};if(!n||(n==null?void 0:n.canvas)===null)return;const i=e==null?void 0:e.config;if(!((d=(h=(u=(c=i==null?void 0:i.options)==null?void 0:c.scales)==null?void 0:u[t==null?void 0:t.id])==null?void 0:h.grid)!=null&&d.drawOnChartArea)||((m=i==null?void 0:i.options)==null?void 0:m.indexAxis)===(t==null?void 0:t.axis))return;const s=(t==null?void 0:t.axis)==="x",o=(v=(_=t==null?void 0:t.ticks)==null?void 0:_.map((L,Y)=>t==null?void 0:t.getPixelForTick(Y)))==null?void 0:v.sort((L,Y)=>L-Y),l=$P(o,t);(M=n==null?void 0:n.save)==null||M.call(n),n.strokeStyle=((W=(R=(A=(k=(T=i==null?void 0:i._config)==null?void 0:T.options)==null?void 0:k.scales)==null?void 0:A[t.id])==null?void 0:R.grid)==null?void 0:W.color)||"rgba(0,0,0,0.06)",n.lineWidth=.5,l==null||l.forEach(L=>{var Y,V,G,J,rt;if(n.beginPath(),s){const{top:et,bottom:at}=(e==null?void 0:e.chartArea)??{};(Y=n==null?void 0:n.moveTo)==null||Y.call(n,L,et),(V=n==null?void 0:n.lineTo)==null||V.call(n,L,at)}else{const{left:et,right:at}=(e==null?void 0:e.chartArea)??{};(G=n==null?void 0:n.moveTo)==null||G.call(n,et,L),(J=n==null?void 0:n.lineTo)==null||J.call(n,at,L)}(rt=n==null?void 0:n.stroke)==null||rt.call(n)}),(z=n==null?void 0:n.restore)==null||z.call(n)},YP={id:"minorGridlines",beforeDatasetsDraw:t=>{var n;const{scales:e}=t??{};(n=Object.keys(e))==null||n.forEach(i=>GP(e==null?void 0:e[i]))}},kn={ZERO:0,INITIAL:2,HOVERED:6,POINT_HOVERED:8},XP="rgba(0,0,0,0.1)",KP=[10,2],qP=12,sp='"Roobert", "Noto Sans", sans-serif',rp="hsl(60, 10.34482759%, 12.5%)",wg=12,KC=8,qC=4,_a="transparent",jC=[1,10,100,1e3,1e4],jP=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac"],ZC="99",ZP=16777215,JC="auto",QC={NO:0,FAST:1e3},Mg="new_chart",JP="htmlLegend",QP=9,t3=1/10**QP,e3=[{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 yf=(t=>(t.X="x",t.Y="y",t))(yf||{}),Mi=(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))(Mi||{}),tC=(t=>(t.Line="line",t.Bar="bar",t))(tC||{}),ls=(t=>(t.Pointer="pointer",t.Initial="initial",t.Grab="grab",t.Grabbing="grabbing",t.Crosshair="crosshair",t.Move="move",t))(ls||{}),eC=(t=>(t.Category="category",t.Linear="linear",t.Logarithmic="logarithmic",t))(eC||{}),op=(t=>(t.Vertical="vertical",t))(op||{}),nC=(t=>(t.Y="yLabel",t.X="xLabel",t))(nC||{}),iC=(t=>(t.End="end",t.Start="start",t.Center="center",t.Right="right",t.Left="left",t))(iC||{}),sC=(t=>(t.Box="box",t.Ellipse="ellipse",t.Line="line",t.Text="text",t))(sC||{}),ap=(t=>(t.Circle="circle",t.Square="rect",t.Diamond="rectRot",t.Triangle="triangle",t))(ap||{}),rC=(t=>(t.Nearest="nearest",t))(rC||{}),oC=(t=>(t.X="x",t.Y="y",t.XY="xy",t.Z="z",t))(oC||{}),aC=(t=>(t.Shift="Shift",t))(aC||{}),lC=(t=>(t.Mousemove="mousemove",t.Mouseout="mouseout",t.Click="click",t.Touchstart="touchstart",t.Touchmove="touchmove",t.Dblclick="dblclick",t))(lC||{});const cC={id:"chartAreaBorder",beforeDraw(t,e,n){var h,d,m,_;if(!(t!=null&&t.ctx)||!t.chartArea)return;const{ctx:i,chartArea:s}=t??{},{left:o,top:l,width:c,height:u}=s??{};(h=i==null?void 0:i.save)==null||h.call(i),i.strokeStyle=n==null?void 0:n.borderColor,i.lineWidth=n==null?void 0:n.borderWidth,(d=i==null?void 0:i.setLineDash)==null||d.call(i,(n==null?void 0:n.borderDash)||[]),i.lineDashOffset=(n==null?void 0:n.borderDashOffset)??0,(m=i==null?void 0:i.strokeRect)==null||m.call(i,o,l,c,u),(_=i==null?void 0:i.restore)==null||_.call(i)}},n3=(t,e)=>{var s;let n=[];t!=null&&t.showMinorGridlines&&n.push(YP);const i=e==null?void 0:e.customLegend;return i!=null&&i.customLegendPlugin&&(i!=null&&i.customLegendContainerID)&&n.push({id:JP,...(s=e==null?void 0:e.customLegend)==null?void 0:s.customLegendPlugin}),n.push(cC),n},fC=t=>{const e=`#${Math.floor(Math.random()*ZP).toString(16)}`;return t.includes(e)?fC(t):(t.push(e),t)},i3=t=>t.title!==""?{display:!0,text:(t==null?void 0:t.title)??""}:{},s3=t=>t===op.Vertical,r3=(t,e)=>{const[n,i]=t===yf.Y?[Mi.Left,Mi.Right]:[Mi.Top,Mi.Bottom];return e%2===0?n:i},o3=(t,e)=>{const{width:n,height:i,staticChartHeight:s=!1,squareAspectRatio:o=0}=t,l=o?e==null?void 0:e.squareAspectRatio:"";let c="";return n||i?c="":c=s?e==null?void 0:e.fixedHeight:e==null?void 0:e.stretchHeight,HP(e==null?void 0:e.chart,c,l)},a3=(t,e)=>{const{legend:n}=t||{};return{position:(n==null?void 0:n.position)||Mi.Top,display:n==null?void 0:n.display,align:n==null?void 0:n.align,labels:{boxHeight:wg,boxWidth:n!=null&&n.usePointStyle?wg:void 0,usePointStyle:n==null?void 0:n.usePointStyle},onClick:e}},l3=t=>{var n,i;const{error:e=null}=((i=(n=t==null?void 0:t.dataset)==null?void 0:n.data)==null?void 0:i[t==null?void 0:t.dataIndex])??{};return e?`Error: ${Xm(e,4)}`:""},c3=(t,e)=>{var s,o,l;const n=(l=(o=(s=t==null?void 0:t.dataset)==null?void 0:s.data)==null?void 0:o[t==null?void 0:t.dataIndex])==null?void 0:l.label,i=Array.isArray(n)?n==null?void 0:n.join(" , "):n??"";return e&&(i!=null&&i.length)?` (${i})`:""},uC=t=>t.toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,""),f3=t=>Zn.isEmpty(t)||Zn.isNil(t)?Mg:t.map((e,n)=>uC(e.label??`${n}`)).join("_")||Mg,u3=()=>{At.font.size=qP,At.font.family=sp,At.color=rp,At.borderColor=XP},h3=t=>t==="",hC="TOGGLE_DATA_VISIBILITY",dC="RESET_STATE",gC={datasets:[],annotation:[]},mC=(t,e)=>{var n;switch(e.type){case dC:return e.payload;case hC:{const{chartInstance:i,dsConfig:s,annotationConfig:o}=e.payload,{datasetIndex:l,datasets:c,dataset:u}=s,{annotationIndex:h}=o,d=Zn.cloneDeep(t),m=Zn.defaultTo(i==null?void 0:i.isDatasetVisible(l),!0);if(l>=0&&(i==null||i.setDatasetVisibility(l,!m),Zn.set(d,["datasets",l,"hidden"],m),u!=null&&u.displayGroup)){const _=u.displayGroup;c.forEach((v,M)=>{v.displayGroup===_&&(i==null||i.setDatasetVisibility(Number(M),!m),Zn.set(d,["datasets",M,"hidden"],m))})}if(h>=0){const _=Zn.findIndex(d.annotation,{annotationIndex:h});if(_>=0){const v=Zn.defaultTo((n=d.annotation[_])==null?void 0:n.display,!1);Zn.set(d,["annotation",_,"display"],!v)}}return d}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||{}),_C=(t=>(t.X="x",t.Y="y",t.Both="both",t))(_C||{});const bC=(t,e,n)=>{var i;e.canvas.style.cursor=ls.Pointer,(i=t.options.scaleID)!=null&&i.includes(yf.X)&&t.options.label&&(t.options.label.xAdjust=e.chartArea.left),t.options.borderWidth=kn.HOVERED,t.options.label&&(t.label.options.display=!0,t.options.label.enabled=!0),n!=null&&n.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update("none")),e.draw()},xC=(t,e,n)=>{t.options.borderWidth=kn.INITIAL,e.canvas.style.cursor=ls.Initial,e.hoveredAnnotationId=null,t.options.label&&(t.label.options.display=!1,t.options.label.enabled=!1),n!=null&&n.enableDrag&&(e.hoveredAnnotationId=null,e.update("none")),e.draw()},yC=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update("none"),t.options.borderWidth=kn.HOVERED,e.canvas.style.cursor=ls.Pointer),e.draw()},vC=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=null,t.options.borderWidth=kn.INITIAL,e.canvas.style.cursor=ls.Initial,e.update("none")),e.draw()},SC=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update("none"),t.options.borderWidth=kn.POINT_HOVERED,e.canvas.style.cursor=ls.Pointer),e.draw()},wC=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=null,t.options.borderWidth=kn.INITIAL,e.canvas.style.cursor=ls.Initial,e.update("none")),e.draw()},MC=t=>t==null?void 0:t.map((e,n)=>{var A,R,W,z,L,Y;const i=(e==null?void 0:e.annotationAxis)??void 0,s=(e==null?void 0:e.color)??jP[n],o=(e==null?void 0:e.type)??Kt.LINE,l=e==null?void 0:e.adjustScaleRange,c={[Kt.LINE]:s,[Kt.POINT]:s,[Kt.BOX]:s,[Kt.ELLIPSE]:_a}[o]||_a,u={[Kt.LINE]:kn.INITIAL,[Kt.BOX]:kn.ZERO,[Kt.POINT]:kn.ZERO,[Kt.ELLIPSE]:(e==null?void 0:e.borderWidth)??0}[o]??0,h=o===Kt.LINE?KP:void 0,d={content:e==null?void 0:e.label,display:!0,font:{weight:"normal"}},m={[Kt.LINE]:{backgroundColor:s,content:e==null?void 0:e.label,display:!1,position:Mi.Top},[Kt.POINT]:{backgroundColor:((A=e==null?void 0:e.labelConfig)==null?void 0:A.backgroundColor)??_a,content:e==null?void 0:e.label,display:((R=e==null?void 0:e.labelConfig)==null?void 0:R.display)??!!(e!=null&&e.label),position:((W=e==null?void 0:e.labelConfig)==null?void 0:W.position)??Mi.Bottom,color:((z=e==null?void 0:e.labelConfig)==null?void 0:z.color)??rp,font:((L=e==null?void 0:e.labelConfig)==null?void 0:L.font)??`12px ${sp}`,borderWidth:kn.INITIAL,padding:5,borderRadius:3,borderColor:((Y=e==null?void 0:e.labelConfig)==null?void 0:Y.borderColor)??_a},[Kt.BOX]:d,[Kt.ELLIPSE]:d}[o]||d,_=({element:V},{chart:G})=>{switch(o){case Kt.LINE:bC(V,G,e);break;case Kt.BOX:yC(V,G,e);break;case Kt.POINT:SC(V,G,e);break}},v=({element:V},{chart:G})=>{switch(o){case Kt.LINE:xC(V,G,e);break;case Kt.BOX:vC(V,G,e);break;case Kt.POINT:wC(V,G,e);break}},M=()=>(V,G)=>e!=null&&e.onDragStart?e==null?void 0:e.onDragStart(V,G):void 0,T=()=>(V,G)=>e!=null&&e.onDrag?e==null?void 0:e.onDrag(V,G):void 0,k=()=>(V,G)=>e!=null&&e.onDragEnd?e==null?void 0:e.onDragEnd(V,G):void 0;return{...e,display:e==null?void 0:e.display,annotationIndex:n,id:`${e==null?void 0:e.label}-${e==null?void 0:e.value}-${n}`,scaleID:i,label:m,backgroundColor:s,borderColor:c,borderWidth:u,borderDash:h,type:o,adjustScaleRange:l,enter:_,leave:v,onDragStart:M,onDrag:T,onDragEnd:k,pointStyle:(e==null?void 0:e.pointStyle)??ap.Circle,resizable:(e==null?void 0:e.resizable)??!0,displayDragCoordinates:(e==null?void 0:e.displayDragCoordinates)??!0}}),TC=({showAnnotations:t,annotationsData:e})=>t&&e&&(e==null?void 0:e.length)?MC(e)??[]:[],PC=Ge.createContext(void 0),CC=({children:t,options:e,datasets:n})=>{const{showAnnotations:i=!0,annotationsData:s=[]}=(e==null?void 0:e.annotations)??{},o=(n==null?void 0:n.map((m,_)=>({[_]:{...m,hidden:!1}})))??[],l=TC({showAnnotations:i,annotationsData:s}),c={...gC,annotation:l,datasets:o},[u,h]=Ge.useReducer(mC,c),d=Ge.useMemo(()=>({state:u,dispatch:h}),[u,e,h]);return rv.jsx(PC.Provider,{value:d,children:t})};CC.__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{rp as $,iC as A,yf as B,jP as C,sp as D,qP as E,jC as F,JC as G,Xm as H,l3 as I,rC as J,c3 as K,wg as L,nC as M,XP as N,i3 as O,Mi as P,o3 as Q,BC as R,eC as S,qC as T,n3 as U,wa as V,Qi as W,Ma as X,e3 as Y,WC as Z,f3 as _,KC as a,aC as a0,oC as a1,h3 as a2,kn as a3,KP as a4,aP as a5,t3 as a6,QP as a7,ap as a8,lC as a9,Lh as aA,Ft as aB,zv as aC,Ws as aD,ue as aE,Dg as aF,At as aG,In as aH,$C as aI,eP as aJ,XC as aK,$s as aL,YC as aM,Ha as aN,UC as aO,PC as aP,hC as aQ,a3 as aR,JP as aS,sC as aT,Kt as aa,ls as ab,_C as ac,pC as ad,NC as ae,bt as af,qt as ag,_n as ah,ti as ai,Ac as aj,Vr as ak,Ye as al,Ut as am,La as an,Na as ao,Ci as ap,Nv as aq,ka as ar,Bs as as,Ir as at,tm as au,ft as av,Jt as aw,ot as ax,Yi as ay,ee as az,CC as b,HP as c,GC as d,FC as e,QC as f,fC as g,df as h,Ud as i,zd as j,Gd as k,Or as l,LC as m,RC as n,OC as o,DC as p,zC as q,VC as r,u3 as s,HC as t,ip as u,Zn as v,tC as w,ZC as x,r3 as y,s3 as z};
|