@oliasoft-open-source/charts-library 5.0.0 → 5.0.1

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.
Files changed (155) hide show
  1. package/dist/assets/Color-YHDXOIA2-D6i6tiFz.js +1 -0
  2. package/dist/assets/DocsRenderer-CFRXHY34-D88vu1Xb.js +580 -0
  3. package/dist/assets/{bar-chart.stories-BEwhK613.js → bar-chart.stories-D9mtWCnD.js} +35 -35
  4. package/dist/assets/client-9BU5HM4U.js +1 -0
  5. package/dist/assets/entry-preview-D2XJoWVM.js +10 -0
  6. package/dist/assets/entry-preview-docs-z3mMcuG4.js +46 -0
  7. package/dist/assets/get-draggableData-DO0Px5pc.js +2 -0
  8. package/dist/assets/iframe-DLnw2TiW.js +217 -0
  9. package/dist/assets/index-B-BONL6g.js +1 -0
  10. package/dist/assets/index-BGqSdrBK.js +1 -0
  11. package/dist/assets/index-CVdx34fM.js +1 -0
  12. package/dist/assets/index-D3-0uUTW.js +24 -0
  13. package/dist/assets/index-Dytf1aFS.js +8 -0
  14. package/dist/assets/index-eCxJ45ll.js +9 -0
  15. package/dist/assets/jsx-runtime-Y5Ju2SGo.js +9 -0
  16. package/dist/assets/legend-BI53UIaI.js +1346 -0
  17. package/dist/assets/legend-context-BNCYpFYh.js +68 -0
  18. package/dist/assets/line-chart-BdFuLh7N.js +1 -0
  19. package/dist/assets/line-chart.stories-BVsiy8CQ.js +1130 -0
  20. package/dist/assets/{line-chart.test-case.stories-Cq5J45Io.js → line-chart.test-case.stories-DgfMW1VB.js} +2 -2
  21. package/dist/assets/pie-chart.stories-BVurv17M.js +45 -0
  22. package/dist/assets/preview-CLM2f008.js +2 -0
  23. package/dist/assets/preview-DD_OYowb.js +1 -0
  24. package/dist/assets/preview-XObsormK.js +3 -0
  25. package/dist/assets/react-18-DZY5LW1V.js +1 -0
  26. package/dist/assets/react-CxVRKATl.js +1 -0
  27. package/dist/assets/scatter-chart.stories-DnivHhIH.js +41 -0
  28. package/dist/bar-chart/utils/use-bar-chart-config.d.ts +1 -1
  29. package/dist/bar-chart/utils/use-bar-chart-options.d.ts +1 -1
  30. package/dist/common/controls-portal.d.ts +1 -1
  31. package/dist/common/helpers/container.d.ts +1 -1
  32. package/dist/common/helpers/download-pgn.d.ts +1 -1
  33. package/dist/common/hooks/use-generated-labels.d.ts +1 -1
  34. package/dist/common/hooks/use-legend-state.d.ts +1 -1
  35. package/dist/common/hooks/use-reset.d.ts +1 -1
  36. package/dist/common/legend-component/legend-interface.d.ts +1 -1
  37. package/dist/common/legend-component/legend-panel.d.ts +1 -1
  38. package/dist/common/legend-component/state/legend-context.d.ts +1 -1
  39. package/dist/favicon.svg +1 -7
  40. package/dist/iframe.html +259 -51
  41. package/dist/index.html +80 -30
  42. package/dist/index.js.js +411 -574
  43. package/dist/index.js.js.map +1 -1
  44. package/dist/index.json +1 -1
  45. package/dist/line-chart/controls/controls-interfaces.d.ts +1 -1
  46. package/dist/line-chart/hooks/use-chart-functions.d.ts +1 -1
  47. package/dist/line-chart/hooks/use-chart-options.d.ts +1 -1
  48. package/dist/line-chart/hooks/use-chart-state.d.ts +1 -1
  49. package/dist/line-chart/hooks/use-toggle-handler.d.ts +1 -1
  50. package/dist/line-chart/line-chart.interface.d.ts +1 -1
  51. package/dist/line-chart/utils/axis-scales/axis-scales.d.ts +1 -1
  52. package/dist/line-chart/utils/get-axes-ranges-from-chart.d.ts +1 -1
  53. package/dist/line-chart/utils/get-axis-range-by-type.d.ts +1 -1
  54. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  55. package/dist/nunito-sans-bold.woff2 +0 -0
  56. package/dist/nunito-sans-italic.woff2 +0 -0
  57. package/dist/nunito-sans-regular.woff2 +0 -0
  58. package/dist/project.json +1 -1
  59. package/dist/sb-addons/actions-1/manager-bundle.js +3 -0
  60. package/dist/sb-addons/docs-2/manager-bundle.js +242 -0
  61. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  62. package/dist/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js +5 -0
  63. package/dist/sb-common-assets/favicon.svg +1 -0
  64. package/dist/sb-manager/globals-module-info.js +1051 -1
  65. package/dist/sb-manager/globals-runtime.js +41591 -0
  66. package/dist/sb-manager/globals.js +48 -1
  67. package/dist/sb-manager/runtime.js +12048 -1
  68. package/dist/scatter-chart/hooks/use-scatter-chart-config.d.ts +1 -1
  69. package/dist/src/components/common/helpers/chart-utils.d.ts +1 -0
  70. package/dist/src/components/line-chart/controls/axes-options/axes-options-interfaces.d.ts +7 -5
  71. package/dist/src/components/line-chart/controls/axes-options/axes-validation.d.ts +8 -0
  72. package/dist/src/components/line-chart/controls/controls-interfaces.d.ts +1 -1
  73. package/dist/src/components/line-chart/controls/controls.d.ts +1 -4
  74. package/dist/src/components/line-chart/hooks/use-chart-state.d.ts +2 -3
  75. package/dist/src/components/line-chart/line-chart.interface.d.ts +4 -0
  76. package/dist/src/components/line-chart/state/action-types.d.ts +0 -1
  77. package/dist/src/components/line-chart/state/helpers.d.ts +13 -0
  78. package/dist/src/components/line-chart/state/state.interfaces.d.ts +3 -12
  79. package/package.json +1 -1
  80. package/dist/assets/Color-6VNJS4EI-DLbcRNMp.js +0 -1
  81. package/dist/assets/DocsRenderer-NNNQARDV-BOzykHvd.js +0 -1
  82. package/dist/assets/WithTooltip-V3YHNWJZ-BeePhoIB.js +0 -1
  83. package/dist/assets/_getPrototype-Bgn98YsR.js +0 -3
  84. package/dist/assets/chunk-HLWAVYOI-BJEcfeBO.js +0 -364
  85. package/dist/assets/entry-preview-D8lfu5jc.js +0 -1
  86. package/dist/assets/entry-preview-docs-CRyh30bF.js +0 -54
  87. package/dist/assets/formatter-SWP5E3XI-Bj1a9__W.js +0 -156
  88. package/dist/assets/get-draggableData-DhvAHrT5.js +0 -2
  89. package/dist/assets/iframe-BurE_SJm.js +0 -8
  90. package/dist/assets/index-B7LTuyD5.js +0 -1
  91. package/dist/assets/index-BXzfdmYx.js +0 -24
  92. package/dist/assets/index-CZvFZgOq.js +0 -9
  93. package/dist/assets/index-D3eZ-H7s.js +0 -1
  94. package/dist/assets/index-DrFu-skq.js +0 -6
  95. package/dist/assets/index-uubelm5h.js +0 -9
  96. package/dist/assets/isPlainObject-DdO3KXLu.js +0 -1
  97. package/dist/assets/legend-BWpTckOL.js +0 -278
  98. package/dist/assets/legend-context-BAQplG-D.js +0 -71
  99. package/dist/assets/line-chart-L0zq38Nj.js +0 -1
  100. package/dist/assets/line-chart.stories-CurD8upE.js +0 -1130
  101. package/dist/assets/pie-chart.stories-Duex2I6n.js +0 -45
  102. package/dist/assets/preview-BBDnT5_b.js +0 -30
  103. package/dist/assets/preview-D4u66u8a.js +0 -2
  104. package/dist/assets/preview-FHoZfaOb.js +0 -17
  105. package/dist/assets/react-18-Xi5cNDBV.js +0 -1
  106. package/dist/assets/scatter-chart.stories-D0618GGr.js +0 -41
  107. package/dist/assets/syntaxhighlighter-MJWPISIS-Bmhn3z6A.js +0 -1
  108. package/dist/bar-chart/bar-chart.stories.d.ts +0 -807
  109. package/dist/common/helpers/range/estimate-close-values.test.d.ts +0 -1
  110. package/dist/common/helpers/range/range.test.d.ts +0 -1
  111. package/dist/common/plugins/annotation-dragger-plugin/helpers.test.d.ts +0 -1
  112. package/dist/line-chart/__tests__/test-data/app-test-case-1.json.d.ts +0 -8733
  113. package/dist/line-chart/__tests__/test-data/app-test-case-2.json.d.ts +0 -11614
  114. package/dist/line-chart/__tests__/test-data/app-test-case-3.json.d.ts +0 -34
  115. package/dist/line-chart/__tests__/test-data/app-test-case-4.json.d.ts +0 -411
  116. package/dist/line-chart/__tests__/test-data/app-test-case-5.json.d.ts +0 -2734
  117. package/dist/line-chart/__tests__/test-data/app-test-case-6.json.d.ts +0 -2236
  118. package/dist/line-chart/controls/axes-options/axes-options-form-state.test.d.ts +0 -1
  119. package/dist/line-chart/initialize/initialize-line-chart.test.d.ts +0 -1
  120. package/dist/line-chart/line-chart.stories.d.ts +0 -1729
  121. package/dist/line-chart/line-chart.test-case.stories.d.ts +0 -29
  122. package/dist/line-chart/plugins/line-chart.minor-gridlines-plugin.test.d.ts +0 -1
  123. package/dist/line-chart/utils/__tests__/get-annotations-data.test.d.ts +0 -1
  124. package/dist/line-chart/utils/__tests__/get-axes-data-from-metasets.test.d.ts +0 -1
  125. package/dist/line-chart/utils/__tests__/get-axes-type-from-key.test.d.ts +0 -1
  126. package/dist/line-chart/utils/__tests__/get-axis-range-by-type.test.d.ts +0 -1
  127. package/dist/line-chart/utils/__tests__/get-line-chart-tooltips.test.d.ts +0 -1
  128. package/dist/line-chart/utils/axis-formatting/axis-formatting.test.d.ts +0 -1
  129. package/dist/line-chart/utils/axis-scales/axis-scales.test.d.ts +0 -1
  130. package/dist/line-chart/utils/check-custom-option/check-custom-option.test.d.ts +0 -1
  131. package/dist/line-chart/utils/datalabels-alignment/__tests__/get-alignment-condition.test.d.ts +0 -1
  132. package/dist/line-chart/utils/datalabels-alignment/__tests__/get-alignment-data.test.d.ts +0 -1
  133. package/dist/line-chart/utils/datalabels-alignment/__tests__/get-datalabels-position.test.d.ts +0 -1
  134. package/dist/line-chart/utils/translations/get-translations.test.d.ts +0 -1
  135. package/dist/pie-chart/pie-chart.stories.d.ts +0 -263
  136. package/dist/sb-addons/actions-0/manager-bundle.js +0 -3
  137. package/dist/sb-addons/actions-0/manager-bundle.js.LEGAL.txt +0 -0
  138. package/dist/sb-addons/storybook-dark-mode-esm-preset-1/manager-bundle.js +0 -5
  139. package/dist/sb-addons/storybook-dark-mode-esm-preset-1/manager-bundle.js.LEGAL.txt +0 -0
  140. package/dist/sb-common-assets/fonts.css +0 -31
  141. package/dist/sb-manager/WithTooltip-V3YHNWJZ-MXTFSDU5.js +0 -1
  142. package/dist/sb-manager/chunk-5QAFKPS7.js +0 -7
  143. package/dist/sb-manager/chunk-7PRFHFSS.js +0 -9
  144. package/dist/sb-manager/chunk-XE6LDGTE.js +0 -406
  145. package/dist/sb-manager/chunk-YDUB7CS6.js +0 -348
  146. package/dist/sb-manager/chunk-ZEU7PDD3.js +0 -1
  147. package/dist/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +0 -156
  148. package/dist/sb-manager/index.js +0 -1
  149. package/dist/sb-manager/syntaxhighlighter-MJWPISIS-JOSCT6CQ.js +0 -1
  150. package/dist/sb-preview/globals.js +0 -1
  151. package/dist/sb-preview/runtime.js +0 -112
  152. package/dist/scatter-chart/scatter-chart.stories.d.ts +0 -279
  153. package/dist/src/components/line-chart/controls/axes-options/action-types.d.ts +0 -5
  154. package/dist/src/components/line-chart/controls/axes-options/axes-options-form-state.d.ts +0 -23
  155. package/dist/stories.json +0 -1
@@ -0,0 +1,68 @@
1
+ var Xy=Object.defineProperty;var Ky=(t,e,n)=>e in t?Xy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var j=(t,e,n)=>Ky(t,typeof e!="symbol"?e+"":e,n);import{r as ye,R as bg,g as xg,c as qo}from"./index-eCxJ45ll.js";import{j as qy}from"./jsx-runtime-Y5Ju2SGo.js";import{e as jy}from"./index-B-BONL6g.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 xi=(t,e,n)=>Math.max(Math.min(t,n),e);function kr(t){return xi(Zr(t*2.55),0,255)}function wi(t){return xi(Zr(t*255),0,255)}function jn(t){return xi(Zr(t/2.55)/100,0,1)}function Ch(t){return xi(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"],Zy=t=>Ic[t&15],Jy=t=>Ic[(t&240)>>4]+Ic[t&15],jo=t=>(t&240)>>4===(t&15),Qy=t=>jo(t.r)&&jo(t.g)&&jo(t.b)&&jo(t.a);function tv(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 ev=(t,e)=>t<255?e(t):"";function nv(t){var e=Qy(t)?Zy:Jy;return t?"#"+e(t.r)+e(t.g)+e(t.b)+ev(t.a,e):void 0}const iv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function yg(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 sv(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 rv(t,e,n){const i=yg(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 ov(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 jc(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=ov(n,i,s,d,o),u=u*60+.5),[u|0,h||0,c]}function Zc(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(wi)}function Jc(t,e,n){return Zc(yg,t,e,n)}function av(t,e,n){return Zc(rv,t,e,n)}function lv(t,e,n){return Zc(sv,t,e,n)}function vg(t){return(t%360+360)%360}function cv(t){const e=iv.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?kr(+e[5]):wi(+e[5]));const s=vg(+e[2]),o=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?i=av(s,o,l):e[1]==="hsv"?i=lv(s,o,l):i=Jc(s,o,l),{r:i[0],g:i[1],b:i[2],a:n}}function fv(t,e){var n=jc(t);n[0]=vg(n[0]+e),n=Jc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function uv(t){if(!t)return;const e=jc(t),n=e[0],i=Ch(e[1]),s=Ch(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${jn(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const Eh={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"},Ih={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 hv(){const t={},e=Object.keys(Ih),n=Object.keys(Eh);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,Eh[o]);o=parseInt(Ih[l],16),t[c]=[o>>16&255,o>>8&255,o&255]}return t}let Zo;function dv(t){Zo||(Zo=hv(),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 gv=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function mv(t){const e=gv.exec(t);let n=255,i,s,o;if(e){if(e[7]!==i){const l=+e[7];n=e[8]?kr(l):xi(l*255,0,255)}return i=+e[1],s=+e[3],o=+e[5],i=255&(e[2]?kr(i):xi(i,0,255)),s=255&(e[4]?kr(s):xi(s,0,255)),o=255&(e[6]?kr(o):xi(o,0,255)),{r:i,g:s,b:o,a:n}}}function pv(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,Is=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function _v(t,e,n){const i=Is(jn(t.r)),s=Is(jn(t.g)),o=Is(jn(t.b));return{r:wi(hc(i+n*(Is(jn(e.r))-i))),g:wi(hc(s+n*(Is(jn(e.g))-s))),b:wi(hc(o+n*(Is(jn(e.b))-o))),a:t.a+n*(e.a-t.a)}}function Jo(t,e,n){if(t){let i=jc(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=Jc(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Sg(t,e){return t&&Object.assign(e||{},t)}function Ah(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=wi(t[3]))):(e=Sg(t,{r:0,g:0,b:0,a:1}),e.a=wi(e.a)),e}function bv(t){return t.charAt(0)==="r"?mv(t):cv(t)}class Hr{constructor(e){if(e instanceof Hr)return e;const n=typeof e;let i;n==="object"?i=Ah(e):n==="string"&&(i=tv(e)||dv(e)||bv(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Sg(this._rgb);return e&&(e.a=jn(e.a)),e}set rgb(e){this._rgb=Ah(e)}rgbString(){return this._valid?pv(this._rgb):void 0}hexString(){return this._valid?nv(this._rgb):void 0}hslString(){return this._valid?uv(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=_v(this._rgb,e._rgb,n)),this}clone(){return new Hr(this.rgb)}alpha(e){return this._rgb.a=wi(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=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 fv(this._rgb,e),this}}/*!
7
+ * Chart.js v4.4.8
8
+ * https://www.chartjs.org
9
+ * (c) 2025 Chart.js Contributors
10
+ * Released under the MIT License
11
+ */function Gn(){}const xv=(()=>{let t=0;return()=>t++})();function yt(t){return t==null}function Xt(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 Zt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ge(t,e){return Zt(t)?t:e}function ct(t,e){return typeof t>"u"?e:t}const yv=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,wg=(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(Xt(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(Xt(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 Mg(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function vv(t,e,n,i){if(!Mg(t))return;const s=e[t],o=n[t];bt(s)&&bt(o)?Cn(s,o,i):e[t]=Pa(o)}function Cn(t,e,n){const i=Xt(e)?e:[e],s=i.length;if(!bt(t))return t;n=n||{};const o=n.merger||vv;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 Dr(t,e){return Cn(t,e,{merger:Sv})}function Sv(t,e,n){if(!Mg(t))return;const i=e[t],s=n[t];bt(i)&&bt(s)?Dr(i,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Pa(s))}const Oh={"":t=>t,x:t=>t.x,y:t=>t.y};function wv(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 Mv(t){const e=wv(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function ts(t,e){return(Oh[e]||(Oh[e]=Mv(e)))(t)}function Qc(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Ur=t=>typeof t<"u",Ti=t=>typeof t=="function",Dh=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Tv(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ht=Math.PI,Ft=2*Ht,Pv=Ft+Ht,ka=Number.POSITIVE_INFINITY,kv=Ht/180,te=Ht/2,Gi=Ht/4,Rh=Ht*2/3,yi=Math.log10,ln=Math.sign;function Rr(t,e,n){return Math.abs(t-e)<n}function Lh(t){const e=Math.round(t);t=Rr(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(yi(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Cv(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 Ev(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Ns(t){return!Ev(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Iv(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Tg(t,e,n){let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Jn(t){return t*(Ht/180)}function Av(t){return t*(180/Ht)}function Nh(t){if(!Zt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Pg(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*Ht&&(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 Ov(t,e){return(t-e+Pv)%Ft-Ht}function Pn(t){return(t%Ft+Ft)%Ft}function Vr(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 Dv(t){return pe(t,-32768,32767)}function Qn(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function tf(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 Zi=(t,e,n,i)=>tf(t,n,i?s=>{const o=t[s][e];return o<n||o===n&&t[s+1][e]===n}:s=>t[s][e]<n),Rv=(t,e,n)=>tf(t,n,i=>t[i][e]>=n);function Lv(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 kg=["push","pop","shift","splice","unshift"];function Nv(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),kg.forEach(n=>{const i="_onData"+Qc(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 Bh(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)&&(kg.forEach(o=>{delete t[o]}),delete t._chartjs)}function Cg(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Eg=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Ig(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,Eg.call(window,()=>{i=!1,t.apply(e,n)}))}}function Bv(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const ef=t=>t==="start"?"left":t==="end"?"right":"center",me=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Fv=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function Ag(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(Zi(u,d,m).lo,n?i:Zi(e,d,l.getPixelForValue(m)).lo),h){const T=u.slice(0,s+1).reverse().findIndex(C=>!yt(C[c.axis]));s-=Math.max(0,T)}s=pe(s,0,i-1)}if(M){let T=Math.max(Zi(u,l.axis,_,!0).hi+1,n?0:Zi(e,d,l.getPixelForValue(_),!0).hi+1);if(h){const C=u.slice(T-1).findIndex(A=>!yt(A[c.axis]));T+=Math.max(0,C)}o=pe(T,s,i)-s}else o=i-s}return{start:s,count:o}}function Og(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,Fh=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ft/n)),Wh=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ft/n)+1,Lr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*te)+1,easeOutSine:t=>Math.sin(t*te),easeInOutSine:t=>-.5*(Math.cos(Ht*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:Fh(t,.075,.3),easeOutElastic:t=>Qo(t)?t:Wh(t,.075,.3),easeInOutElastic(t){return Qo(t)?t:t<.5?.5*Fh(t*2,.1125,.45):.5+.5*Wh(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-Lr.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?Lr.easeInBounce(t*2)*.5:Lr.easeOutBounce(t*2-1)*.5+.5};function nf(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function zh(t){return nf(t)?t:new Hr(t)}function dc(t){return nf(t)?t:new Hr(t).saturate(.5).darken(.1).hexString()}const Wv=["x","y","borderWidth","radius","tension"],zv=["color","borderColor","backgroundColor"];function Hv(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:zv},numbers:{type:"number",properties:Wv}}),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 Uv(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Hh=new Map;function Vv(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Hh.get(n);return i||(i=new Intl.NumberFormat(t,e),Hh.set(n,i)),i}function Ra(t,e,n){return Vv(e,n).format(t)}const Dg={values(t){return Xt(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=$v(t,n)}const l=yi(Math.abs(o)),c=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),u={notation:s,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),Ra(t,i,u)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(yi(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Dg.numeric.call(this,t,e,n):""}};function $v(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 sf={formatters:Dg};function Gv(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:sf.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 es=Object.create(null),Oc=Object.create(null);function Nr(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"?Cn(Nr(t,e),n):Cn(Nr(t,""),e)}class Yv{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 Nr(this,e)}describe(e,n){return gc(Oc,e,n)}override(e,n){return gc(es,e,n)}route(e,n,i,s){const o=Nr(this,e),l=Nr(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):ct(u,h)},set(u){this[c]=u}}})}apply(e){e.forEach(n=>n(this))}}var At=new Yv({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Hv,Uv,Gv]);function Xv(t){return!t||yt(t.size)||yt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Uh(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 Yi(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 Vh(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){Rg(t,e,n,i,null)}function Rg(t,e,n,i,s){let o,l,c,u,h,d,m,_;const v=e.pointStyle,M=e.rotation,T=e.radius;let C=(M||0)*kv;if(v&&typeof v=="object"&&(o=v.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(n,i),t.rotate(C),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(C)*d,i-Math.cos(C)*T),C+=Rh,t.lineTo(n+Math.sin(C)*d,i-Math.cos(C)*T),C+=Rh,t.lineTo(n+Math.sin(C)*d,i-Math.cos(C)*T),t.closePath();break;case"rectRounded":h=T*.516,u=T-h,l=Math.cos(C+Gi)*u,m=Math.cos(C+Gi)*(s?s/2-h:u),c=Math.sin(C+Gi)*u,_=Math.sin(C+Gi)*(s?s/2-h:u),t.arc(n-m,i-c,h,C-Ht,C-te),t.arc(n+_,i-l,h,C-te,C),t.arc(n+m,i+c,h,C,C+te),t.arc(n-_,i+l,h,C+te,C+Ht),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}C+=Gi;case"rectRot":m=Math.cos(C)*(s?s/2:T),l=Math.cos(C)*T,c=Math.sin(C)*T,_=Math.sin(C)*(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":C+=Gi;case"cross":m=Math.cos(C)*(s?s/2:T),l=Math.cos(C)*T,c=Math.sin(C)*T,_=Math.sin(C)*(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(C)*(s?s/2:T),l=Math.cos(C)*T,c=Math.sin(C)*T,_=Math.sin(C)*(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),C+=Gi,m=Math.cos(C)*(s?s/2:T),l=Math.cos(C)*T,c=Math.sin(C)*T,_=Math.sin(C)*(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(C)*T,c=Math.sin(C)*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(C)*(s?s/2:T),i+Math.sin(C)*T);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function $r(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 Kv(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 qv(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 jv(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 Zv(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 Jv(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=Xt(e)?e:[e],c=o.strokeWidth>0&&o.strokeColor!=="";let u,h;for(t.save(),t.font=s.string,jv(t,o),u=0;u<l.length;++u)h=l[u],o.backdrop&&Jv(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),Zv(t,n,i,h,o),i+=Number(s.lineHeight);t.restore()}function Ca(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*Ht,Ht,!0),t.lineTo(n,i+o-l.bottomLeft),t.arc(n+l.bottomLeft,i+o-l.bottomLeft,l.bottomLeft,Ht,te,!0),t.lineTo(n+s-l.bottomRight,i+o),t.arc(n+s-l.bottomRight,i+o-l.bottomRight,l.bottomRight,te,0,!0),t.lineTo(n+s,i+l.topRight),t.arc(n+s-l.topRight,i+l.topRight,l.topRight,0,-te,!0),t.lineTo(n+l.topLeft,i)}const Qv=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,tS=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function eS(t,e){const n=(""+t).match(Qv);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const nS=t=>+t||0;function rf(t,e){const n={},i=bt(e),s=i?Object.keys(e):e,o=bt(t)?i?l=>ct(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of s)n[l]=nS(o(l));return n}function Lg(t){return rf(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Rs(t){return rf(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ye(t){const e=Lg(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=ct(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=ct(t.style,e.style);i&&!(""+i).match(tS)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:ct(t.family,e.family),lineHeight:eS(ct(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:ct(t.weight,e.weight),string:""};return s.string=Xv(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&&Xt(l)&&(l=l[n%l.length]),l!==void 0))return l}function iS(t,e,n){const{min:i,max:s}=t,o=wg(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 is(t,e){return Object.assign(Object.create(t),e)}function of(t,e=[""],n,i,s=()=>t[0]){const o=n||t;typeof i>"u"&&(i=Wg("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:s,override:c=>of([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 Bg(c,u,()=>uS(u,e,t,c))},getOwnPropertyDescriptor(c,u){return Reflect.getOwnPropertyDescriptor(c._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(c,u){return Gh(c).includes(u)},ownKeys(c){return Gh(c)},set(c,u,h){const d=c._storage||(c._storage=s());return c[u]=d[u]=h,delete c._keys,!0}})}function Bs(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ng(t,i),setContext:o=>Bs(t,o,n,i),override:o=>Bs(t.override(o),e,n,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete t[l],!0},get(o,l,c){return Bg(o,l,()=>rS(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 Ng(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:Ti(n)?n:()=>n,isIndexable:Ti(i)?i:()=>i}}const sS=(t,e)=>t?t+Qc(e):e,af=(t,e)=>bt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Bg(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function rS(t,e,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:l}=t;let c=i[e];return Ti(c)&&l.isScriptable(e)&&(c=oS(e,c,t,n)),Xt(c)&&c.length&&(c=aS(e,c,t,l.isIndexable)),af(e,c)&&(c=Bs(c,s,o&&o[e],l)),c}function oS(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),af(t,u)&&(u=lf(s._scopes,s,t,u)),u}function aS(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=lf(h,s,t,d);e.push(Bs(m,o,l&&l[t],c))}}return e}function Fg(t,e,n){return Ti(t)?t(e,n):t}const lS=(t,e)=>t===!0?e:typeof t=="string"?ts(e,t):void 0;function cS(t,e,n,i,s){for(const o of e){const l=lS(n,o);if(l){t.add(l);const c=Fg(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 lf(t,e,n,i){const s=e._rootScopes,o=Fg(e._fallback,n,i),l=[...t,...s],c=new Set;c.add(i);let u=$h(c,l,n,o||n,i);return u===null||typeof o<"u"&&o!==n&&(u=$h(c,l,o,u,i),u===null)?!1:of(Array.from(c),[""],s,o,()=>fS(e,n,i))}function $h(t,e,n,i,s){for(;n;)n=cS(t,e,n,i,s);return n}function fS(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return Xt(s)&&bt(n)?n:s||{}}function uS(t,e,n,i){let s;for(const o of e)if(s=Wg(sS(o,t),n),typeof s<"u")return af(t,s)?lf(n,i,t,s):s}function Wg(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function Gh(t){let e=t._keys;return e||(e=t._keys=hS(t._scopes)),e}function hS(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 dS=Number.EPSILON||1e-14,Fs=(t,e)=>e<t.length&&!t[e].skip&&t[e],zg=t=>t==="x"?"y":"x";function gS(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=Fs(t,0);for(let d=0;d<i-1;++d)if(u=h,h=Fs(t,d+1),!(!u||!h)){if(Rr(e[d],0,dS)){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 pS(t,e,n="x"){const i=zg(n),s=t.length;let o,l,c,u=Fs(t,0);for(let h=0;h<s;++h){if(l=c,c=u,u=Fs(t,h+1),!c)continue;const d=c[n],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 _S(t,e="x"){const n=zg(e),i=t.length,s=Array(i).fill(0),o=Array(i);let l,c,u,h=Fs(t,0);for(l=0;l<i;++l)if(c=u,u=h,h=Fs(t,l+1),!!u){if(h){const d=h[e]-u[e];s[l]=d!==0?(h[n]-u[n])/d:0}o[l]=c?h?ln(s[l-1])!==ln(s[l])?0:(s[l-1]+s[l])/2:s[l-1]:s[l]}mS(t,s,o),pS(t,o,e)}function ta(t,e,n){return Math.max(Math.min(t,n),e)}function bS(t,e){let n,i,s,o,l,c=$r(t[0],e);for(n=0,i=t.length;n<i;++n)l=o,o=c,c=n<i-1&&$r(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 xS(t,e,n,i,s){let o,l,c,u;if(e.spanGaps&&(t=t.filter(h=>!h.skip)),e.cubicInterpolationMode==="monotone")_S(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=gS(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&&bS(t,n)}function cf(){return typeof window<"u"&&typeof document<"u"}function ff(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 yS(t,e){return Ba(t).getPropertyValue(e)}const vS=["top","right","bottom","left"];function Qi(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=vS[s];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const SS=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function wS(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:o}=i;let l=!1,c,u;if(SS(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 kn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Ba(n),o=s.boxSizing==="border-box",l=Qi(s,"padding"),c=Qi(s,"border","width"),{x:u,y:h,box:d}=wS(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 MS(t,e,n){let i,s;if(e===void 0||n===void 0){const o=t&&ff(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const l=o.getBoundingClientRect(),c=Ba(o),u=Qi(c,"border","width"),h=Qi(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||ka,maxHeight:s||ka}}const ea=t=>Math.round(t*10)/10;function TS(t,e,n,i){const s=Ba(t),o=Qi(s,"margin"),l=Ea(s.maxWidth,t,"clientWidth")||ka,c=Ea(s.maxHeight,t,"clientHeight")||ka,u=MS(t,e,n);let{width:h,height:d}=u;if(s.boxSizing==="content-box"){const _=Qi(s,"border","width"),v=Qi(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 Yh(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 PS=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};cf()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Xh(t,e){const n=yS(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function qi(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function kS(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 CS(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},l=qi(t,s,n),c=qi(s,o,n),u=qi(o,e,n),h=qi(l,c,n),d=qi(c,u,n);return qi(h,d,n)}const ES=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}}},IS=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Ls(t,e,n){return t?ES(e,n):IS()}function Hg(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 Ug(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Vg(t){return t==="angle"?{between:Vr,compare:Ov,normalize:Pn}:{between:Qn,compare:(e,n)=>e-n,normalize:e=>e}}function Kh({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 AS(t,e,n){const{property:i,start:s,end:o}=n,{between:l,normalize:c}=Vg(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 $g(t,e,n){if(!n)return[t];const{property:i,start:s,end:o}=n,l=e.length,{compare:c,between:u,normalize:h}=Vg(i),{start:d,end:m,loop:_,style:v}=AS(t,e,n),M=[];let T=!1,C=null,A,D,W;const z=()=>u(s,W,A)&&c(s,W)!==0,N=()=>c(o,A)===0||u(o,W,A),Y=()=>T||z(),$=()=>!T||N();for(let G=d,J=d;G<=m;++G)D=e[G%l],!D.skip&&(A=h(D[i]),A!==W&&(T=u(A,s,o),C===null&&Y()&&(C=c(A,s)===0?G:J),C!==null&&$()&&(M.push(Kh({start:C,end:G,loop:_,count:l,style:v})),C=null),J=G,W=A));return C!==null&&M.push(Kh({start:C,end:m,loop:_,count:l,style:v})),M}function Gg(t,e){const n=[],i=t.segments;for(let s=0;s<i.length;s++){const o=$g(i[s],t.points,e);o.length&&n.push(...o)}return n}function OS(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 DS(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 RS(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const o=!!t._loop,{start:l,end:c}=OS(n,s,o,i);if(i===!0)return qh(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 qh(t,DS(n,l,u,h),n,e)}function qh(t,e,n,i){return!i||!i.setContext||!n?e:LS(t,e,n,i)}function LS(t,e,n,i){const s=t._chart.getContext(),o=jh(t.options),{_datasetIndex:l,options:{spanGaps:c}}=t,u=n.length,h=[];let d=o,m=e[0].start,_=m;function v(M,T,C,A){const D=c?-1:1;if(M!==T){for(M+=u;n[M%u].skip;)M-=D;for(;n[T%u].skip;)T+=D;M%u!==T%u&&(h.push({start:M%u,end:T%u,loop:C,style:A}),d=A,m=T%u)}}for(const M of e){m=c?m:M.start;let T=n[m%u],C;for(_=m+1;_<=M.end;_++){const A=n[_%u];C=jh(i.setContext(is(s,{type:"segment",p0:T,p1:A,p0DataIndex:(_-1)%u,p1DataIndex:_%u,datasetIndex:l}))),NS(C,d)&&v(m,_-1,M.loop,d),T=A,d=C}m<_-1&&v(m,_-1,M.loop,d)}return h}function jh(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function NS(t,e){if(!e)return!1;const n=[],i=function(s,o){return nf(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(t,i)!==JSON.stringify(e,i)}/*!
12
+ * Chart.js v4.4.8
13
+ * https://www.chartjs.org
14
+ * (c) 2025 Chart.js Contributors
15
+ * Released under the MIT License
16
+ */class BS{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=Eg.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 Xn=new BS;const Zh="transparent",FS={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=zh(t||Zh),s=i.valid&&zh(e||Zh);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class WS{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||FS[e.type||typeof l],this._easing=Lr[e.easing]||Lr.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 Yg{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];(Xt(o.properties)&&o.properties||[s]).forEach(c=>{(c===s||!i.has(c))&&i.set(c,l)})})}_animateOptions(e,n){const i=n.options,s=HS(e,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&zS(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 WS(_,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 Xn.add(this._chart,i),!0}}function zS(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 HS(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 Jh(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 US(t,e,n){if(n===!1)return!1;const i=Jh(t,n),s=Jh(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function VS(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 Xg(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 Qh(t,e,n,i={}){const s=t.keys,o=i.mode==="single";let l,c,u,h;if(e===null)return;let d=!1;for(l=0,c=s.length;l<c;++l){if(u=+s[l],u===n){if(d=!0,i.all)continue;break}h=t.values[u],Zt(h)&&(o||e===0||ln(e)===ln(h))&&(e+=h)}return!d&&!i.all?0:e}function $S(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 GS(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function YS(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 XS(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function td(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 ed(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=GS(o,l,i),m=e.length;let _;for(let v=0;v<m;++v){const M=e[v],{[u]:T,[h]:C}=M,A=M._stacks||(M._stacks={});_=A[h]=XS(s,d,T),_[c]=C,_._top=td(_,l,!0,i.type),_._bottom=td(_,l,!1,i.type);const D=_._visualValues||(_._visualValues={});D[c]=C}}function pc(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function KS(t,e){return is(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function qS(t,e,n){return is(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function yr(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",nd=(t,e)=>e?t:Object.assign({},t),jS=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Xg(n,!0),values:null};class Mi{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&&yr(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=ct(i.xAxisID,pc(e,"x")),l=n.yAxisID=ct(i.yAxisID,pc(e,"y")),c=n.rAxisID=ct(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&&Bh(this._data,this),e._stacked&&yr(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(bt(n)){const s=this._cachedMeta;this._data=$S(n,s)}else if(i!==n){if(i){Bh(i,this);const s=this._cachedMeta;yr(s),s._parsed=[]}n&&Object.isExtensible(n)&&Nv(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,yr(n),n.stack=i.stack),this._resyncElements(e),(s||o!==n._stacked)&&(ed(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{Xt(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&&ed(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(ts(v,c),_),y:l.parse(ts(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:Xg(s,!0),values:n._stacks[e.axis]._visualValues};return Qh(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=Qh(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=jS(n,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:m}=YS(c);let _,v;function M(){v=s[_];const T=v[c.axis];return!Zt(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],Zt(l)&&i.push(l);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,i=n.iScale,s=n.vScale,o=this.getParsed(e);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=VS(ct(this.options.clip,US(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=qS(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=KS(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&&Ur(i);if(c)return nd(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(nd(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 Yg(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&&yr(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(Mi,"defaults",{}),j(Mi,"datasetElementType",null),j(Mi,"dataElementType",null);function ZS(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=Cg(i.sort((s,o)=>s-o))}return t._cache.$bar}function JS(t){const e=t.iScale,n=ZS(e,t.type);let i=e._length,s,o,l,c;const u=()=>{l===32767||l===-32768||(Ur(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 QS(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 tw(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 ew(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 Kg(t,e,n,i){return Xt(t)?ew(t,e,n,i):e[n.axis]=n.parse(t,i),e}function id(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(Kg(_,m,o,h));return u}function bc(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function nw(t,e,n){return t!==0?ln(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function iw(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 sw(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}=iw(t);s==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=h:(n._bottom||0)===i?s=d:(o[sd(d,l,c,u)]=!0,s=h)),o[sd(s,l,c,u)]=!0,t.borderSkipped=o}function sd(t,e,n,i){return i?(t=rw(t,e,n),t=rd(t,n,e)):t=rd(t,e,n),t}function rw(t,e,n){return t===e?n:t===n?e:t}function rd(t,e,n){return t==="start"?e:t==="end"?n:t}function ow(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class ba extends Mi{parsePrimitiveData(e,n,i,s){return id(e,n,i,s)}parseArrayData(e,n,i,s){return id(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(ts(T,h),_),m.push(Kg(ts(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),C=this._calculateBarIndexPixels(v,d),A=(M._stacks||{})[c.axis],D={horizontal:h,base:T.base,enableBorderRadius:!A||bc(M._custom)||l===A._top||l===A._bottom,x:h?T.head:C.center,y:h?C.center:T.head,height:h?C.size:Math.abs(T.size),width:h?Math.abs(T.size):C.size};_&&(D.options=m||this.resolveDataElementOptions(v,e[v].active?"active":s));const W=D.options||e[v].options;sw(D,W,A,l),ow(D,W,d.ratio),this.updateElement(e[v],v,D,s)}}_getStacks(e,n){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),o=i.options.stacked,l=[],c=this._cachedMeta.controller.getParsed(n),u=c&&c[i.axis],h=d=>{const 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||JS(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 C=!yt(o)&&!d?o:_;let A=n.getPixelForValue(C);if(this.chart.getDataVisibility(e)?M=n.getPixelForValue(_+v):M=A,T=M-A,Math.abs(T)<l){T=nw(T,n,c)*l,m===c&&(A-=T/2);const D=n.getPixelForDecimal(0),W=n.getPixelForDecimal(1),z=Math.min(D,W),N=Math.max(D,W);A=Math.max(Math.min(A,N),z),M=A+T,i&&!d&&(u._stacks[n.axis]._visualValues[s]=n.getValueForPixel(M)-n.getValueForPixel(A))}if(A===n.getPixelForValue(c)){const D=ln(T)*n.getLineWidthForValue(c)/2;A+=D,T-=D}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=ct(s.maxBarThickness,1/0);let c,u;if(n.grouped){const h=o?this._getStackCount(e):n.stackCount,d=s.barThickness==="flex"?tw(e,n,s,h):QS(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 aw(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,N)=>Vr(W,c,u,!0)?1:Math.max(z,z*n,N,N*n),M=(W,z,N)=>Vr(W,c,u,!0)?-1:Math.min(z,z*n,N,N*n),T=v(0,h,m),C=v(te,d,_),A=M(Ht,h,m),D=M(Ht+te,d,_);i=(T-A)/2,s=(C-D)/2,o=-(T+A)/2,l=-(C+D)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:l}}class Cr extends Mi{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=>+ts(i[h],u)}let l,c;for(l=e,c=e+n;l<c;++l)s._parsed[l]=o(l)}}_getRotation(){return Jn(this.options.rotation-90)}_getCircumference(){return Jn(this.options.circumference)}_getRotationExtents(){let e=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(yv(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:d,rotation:m}=this._getRotationExtents(),{ratioX:_,ratioY:v,offsetX:M,offsetY:T}=aw(m,d,u),C=(i.width-l)/_,A=(i.height-l)/v,D=Math.max(Math.min(C,A)/2,0),W=wg(this.options.radius,D),z=Math.max(W*u,0),N=(W-z)/this._getVisibleDatasetWeightTotal();this.offsetX=M*W,this.offsetY=T*W,s.total=this.calculateTotal(),this.outerRadius=W-N*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-N*h,0),this.updateElements(o,0,o.length,e)}_circumference(e,n){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*o/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:C}=this._getSharedOptions(n,s);let A=this._getRotation(),D;for(D=0;D<n;++D)A+=this._circumference(D,o);for(D=n;D<n+i;++D){const W=this._circumference(D,o),z=e[D],N={x:d+this.offsetX,y:m+this.offsetY,startAngle:A,endAngle:A+W,circumference:W,outerRadius:M,innerRadius:v};C&&(N.options=T||this.resolveDataElementOptions(D,z.active?"active":s)),A+=W,this.updateElement(z,D,N,s)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let i=0,s;for(s=0;s<n.length;s++){const o=e._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?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(ct(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}j(Cr,"id","doughnut"),j(Cr,"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(Cr,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),j(Cr,"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 Mi{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}=Ag(n,s,l);this._drawStart=c,this._drawCount=u,Og(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,C=Ns(M)?M:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||o||s==="none",D=n+i,W=e.length;let z=n>0&&this.getParsed(n-1);for(let N=0;N<W;++N){const Y=e[N],$=A?Y:{};if(N<n||N>=D){$.skip=!0;continue}const G=this.getParsed(N),J=yt(G[v]),rt=$[_]=l.getPixelForValue(G[_],N),st=$[v]=o||J?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,G,u):G[v],N);$.skip=isNaN(rt)||isNaN(st)||J,$.stop=N>0&&Math.abs(G[_]-z[_])>C,T&&($.parsed=G,$.raw=h.data[N]),m&&($.options=d||this.resolveDataElementOptions(N,Y.active?"active":s)),A||this.updateElement(Y,N,$,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 Cr{}j(Rc,"id","pie"),j(Rc,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ya extends Mi{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}=Ag(n,i,s);if(this._drawStart=o,this._drawCount=l,Og(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:C}=this.options,A=Ns(T)?T:Number.POSITIVE_INFINITY,D=this.chart._animationsDisabled||o||s==="none";let W=n>0&&this.getParsed(n-1);for(let z=n;z<n+i;++z){const N=e[z],Y=this.getParsed(z),$=D?N:{},G=yt(Y[M]),J=$[v]=l.getPixelForValue(Y[v],z),rt=$[M]=o||G?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,Y,u):Y[M],z);$.skip=isNaN(J)||isNaN(rt)||G,$.stop=z>0&&Math.abs(Y[v]-W[v])>A,C&&($.parsed=Y,$.raw=h.data[z]),_&&($.options=m||this.resolveDataElementOptions(z,N.active?"active":s)),D||this.updateElement(N,z,$,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 Xi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class uf{constructor(e){j(this,"options");this.options=e||{}}static override(e){Object.assign(uf.prototype,e)}init(){}formats(){return Xi()}parse(){return Xi()}format(){return Xi()}add(){return Xi()}diff(){return Xi()}startOf(){return Xi()}endOf(){return Xi()}}var lw={_date:uf};function cw(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?Rv:Zi;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:_}=cw(o[c],e,l,s);for(let v=m;v<=_;++v){const M=d[v];M.skip||i(M,h,v)}}}function fw(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&&!$r(c,t.chartArea,0)||c.inRange(e.x,e.y,i)&&o.push({element:c,datasetIndex:u,index:h})},!0),o}function uw(t,e,n,i){let s=[];function o(l,c,u){const{startAngle:h,endAngle:d}=l.getProps(["startAngle","endAngle"],i),{angle:m}=Pg(l,{x:e.x,y:e.y});Vr(m,h,d)&&s.push({element:l,datasetIndex:c,index:u})}return Fa(t,n,e,o),s}function hw(t,e,n,i,s,o){let l=[];const c=fw(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 C=c(e,M);C<u?(l=[{element:d,datasetIndex:m,index:_}],u=C):C===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?uw(t,e,n,s):hw(t,e,n,i,s,o)}function od(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 dw={modes:{index(t,e,n,i){const s=kn(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=kn(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=kn(e,t),o=n.axis||"xy",l=n.includeInvisible||!1;return xc(t,s,o,i,l)},nearest(t,e,n,i){const s=kn(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=kn(e,t);return od(t,s,"x",n.intersect,i)},y(t,e,n,i){const s=kn(e,t);return od(t,s,"y",n.intersect,i)}}};const qg=["left","top","right","bottom"];function vr(t,e){return t.filter(n=>n.pos===e)}function ad(t,e){return t.filter(n=>qg.indexOf(n.pos)===-1&&n.box.axis===e)}function Sr(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 gw(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 mw(t){const e={};for(const n of t){const{stack:i,pos:s,stackWeight:o}=n;if(!i||!qg.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=mw(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 _w(t){const e=gw(t),n=Sr(e.filter(h=>h.box.fullSize),!0),i=Sr(vr(e,"left"),!0),s=Sr(vr(e,"right")),o=Sr(vr(e,"top"),!0),l=Sr(vr(e,"bottom")),c=ad(e,"x"),u=ad(e,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:s.concat(u).concat(l).concat(c),chartArea:vr(e,"chartArea"),vertical:i.concat(s).concat(u),horizontal:o.concat(l).concat(c)}}function ld(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function jg(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 bw(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&&jg(l,o.getPadding());const c=Math.max(0,e.outerWidth-ld(l,t,"left","right")),u=Math.max(0,e.outerHeight-ld(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 xw(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 yw(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 Er(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,yw(c.horizontal,e));const{same:m,other:_}=bw(e,n,c,i);h|=m&&s.length,d=d||_,u.fullSize||s.push(c)}return h&&Er(s,e,n,i)||d}function na(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 cd(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;Ur(h.start)&&(l=h.start),u.fullSize?na(u,s.left,l,n.outerWidth-s.right-s.left,_):na(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;Ur(h.start)&&(o=h.start),u.fullSize?na(u,o,s.top,_,n.outerHeight-s.bottom-s.top):na(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=_w(t.boxes),u=c.vertical,h=c.horizontal;pt(t.boxes,T=>{typeof T.beforeLayout=="function"&&T.beforeLayout()});const d=u.reduce((T,C)=>C.box.options&&C.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);jg(_,Ye(i));const v=Object.assign({maxPadding:_,w:o,h:l,x:s.left,y:s.top},s),M=pw(u.concat(h),m);Er(c.fullSize,v,m,M),Er(u,v,m,M),Er(h,v,m,M)&&Er(u,v,m,M),xw(v),cd(c.leftAndTop,v,m,M),v.x+=v.w,v.y+=v.h,cd(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 C=T.box;Object.assign(C,t.chartArea),C.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class Zg{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 vw extends Zg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const va="$chartjs",Sw={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fd=t=>t===null||t==="";function ww(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",fd(s)){const o=Xh(t,"width");o!==void 0&&(t.width=o)}if(fd(i))if(t.style.height==="")t.height=t.width/(e||2);else{const o=Xh(t,"height");o!==void 0&&(t.height=o)}return t}const Jg=PS?{passive:!0}:!1;function Mw(t,e,n){t&&t.addEventListener(e,n,Jg)}function Tw(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Jg)}function Pw(t,e){const n=Sw[t.type]||t.type,{x:i,y:s}=kn(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 kw(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 Cw(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 ud=0;function Qg(){const t=window.devicePixelRatio;t!==ud&&(ud=t,Yr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Ew(t,e){Yr.size||window.addEventListener("resize",Qg),Yr.set(t,e)}function Iw(t){Yr.delete(t),Yr.size||window.removeEventListener("resize",Qg)}function Aw(t,e,n){const i=t.canvas,s=i&&ff(i);if(!s)return;const o=Ig((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),Ew(t,o),l}function vc(t,e,n){n&&n.disconnect(),e==="resize"&&Iw(t)}function Ow(t,e,n){const i=t.canvas,s=Ig(o=>{t.ctx!==null&&n(Pw(o,t))},t);return Mw(i,e,s),s}class Dw extends Zg{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(ww(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:kw,detach:Cw,resize:Aw}[n]||Ow;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]||Tw)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return TS(e,n,i,s)}isAttached(e){const n=e&&ff(e);return!!(n&&n.isConnected)}}function Rw(t){return!cf()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?vw:Dw}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 Ns(this.x)&&Ns(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 Lw(t,e){const n=t.options.ticks,i=Nw(t),s=Math.min(n.maxTicksLimit||i,i),o=n.major.enabled?Fw(e):[],l=o.length,c=o[0],u=o[l-1],h=[];if(l>s)return Ww(e,h,o,l/s),h;const d=Bw(o,e,s);if(l>0){let m,_;const v=l>1?Math.round((u-c)/(l-1)):null;for(ia(e,h,d,yt(v)?0:c-v,c),m=0,_=l-1;m<_;m++)ia(e,h,d,o[m],o[m+1]);return ia(e,h,d,u,yt(v)?e.length:u+v),h}return ia(e,h,d),h}function Nw(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 Bw(t,e,n){const i=zw(t),s=e.length/n;if(!i)return Math.max(s,1);const o=Cv(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 Fw(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function Ww(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 ia(t,e,n,i,s){const o=ct(i,0),l=Math.min(ct(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 zw(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 Hw=t=>t==="left"?"right":t==="right"?"left":t,hd=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,dd=(t,e)=>Math.min(e||t,t);function gd(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 Uw(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 Vw(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 wr(t){return t.drawTicks?t.tickLength:0}function md(t,e){if(!t.display)return 0;const n=ue(t.font,e),i=Ye(t.padding);return(Xt(t.text)?t.text.length:1)*n.lineHeight+i.height}function $w(t,e){return is(t,{scale:e,type:"scale"})}function Gw(t,e,n){return is(t,{tick:n,index:e,type:"tick"})}function Yw(t,e,n){let i=ef(t);return(n&&e!=="right"||!n&&e==="right")&&(i=Hw(i)),i}function Xw(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,C=c-o;if(t.isHorizontal()){if(v=me(i,o,c),bt(n)){const A=Object.keys(n)[0],D=n[A];M=d[A].getPixelForValue(D)+T-e}else n==="center"?M=(h.bottom+h.top)/2+T-e:M=hd(t,n,e);_=c-o}else{if(bt(n)){const A=Object.keys(n)[0],D=n[A];v=d[A].getPixelForValue(D)-C+e}else n==="center"?v=(h.left+h.right)/2-C+e:v=hd(t,n,e);M=me(i,l,s),m=n==="left"?-te:te}return{titleX:v,titleY:M,maxWidth:_,rotation:m}}class ss 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=Ge(e,Number.POSITIVE_INFINITY),n=Ge(n,Number.NEGATIVE_INFINITY),i=Ge(i,Number.POSITIVE_INFINITY),s=Ge(s,Number.NEGATIVE_INFINITY),{min:Ge(e,i),max:Ge(n,s),minDefined:Zt(e),maxDefined:Zt(n)}}getMinMax(e){let{min:n,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),l;if(s&&o)return{min:n,max:i};const c=this.getMatchingVisibleMetas();for(let u=0,h=c.length;u<h;++u)l=c[u].controller.getMinMax(this,e),s||(n=Math.min(n,l.min)),o||(i=Math.max(i,l.max));return n=o&&n>i?i:n,i=s&&n>i?n:i,{min:Ge(n,Ge(i,n)),max:Ge(i,Ge(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=iS(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=c<this.ticks.length;this._convertTicksToLabels(u?gd(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Lw(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=dd(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-wr(e.grid)-n.padding-md(e.title,this.chart.options.font),h=Math.sqrt(m*m+_*_),l=Av(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=md(s,n.options.font);if(c?(e.width=this.maxWidth,e.height=wr(o)+u):(e.height=this.maxHeight,e.width=wr(o)+u),i.display&&this.ticks.length){const{first:h,last:d,widest:m,highest:_}=this._getLabelSizes(),v=i.padding*2,M=Jn(this.labelRotation),T=Math.cos(M),C=Math.sin(M);if(c){const A=i.mirror?0:C*m.width+T*_.height;e.height=Math.min(this.maxHeight,e.height+A+v)}else{const A=i.mirror?0:T*m.width+C*_.height;e.width=Math.min(this.maxWidth,e.width+A+v)}this._calculatePadding(h,d,C,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=gd(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/dd(n,i));let h=0,d=0,m,_,v,M,T,C,A,D,W,z,N;for(m=0;m<n;m+=u){if(M=e[m].label,T=this._resolveTickFontOptions(m),s.font=C=T.string,A=o[C]=o[C]||{data:{},gc:[]},D=T.lineHeight,W=z=0,!yt(M)&&!Xt(M))W=Uh(s,A.data,A.gc,W,M),z=D;else if(Xt(M))for(_=0,v=M.length;_<v;++_)N=M[_],!yt(N)&&!Xt(N)&&(W=Uh(s,A.data,A.gc,W,N),z+=D);l.push(W),c.push(z),h=Math.max(W,h),d=Math.max(z,d)}Vw(o,n);const Y=l.indexOf(h),$=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($),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 Dv(this._alignToPixels?Yi(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=Gw(this.getContext(),e,i))}return this.$context||(this.$context=$w(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Jn(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),o=this._getLabelSizes(),l=e.autoSkipPadding||0,c=o?o.widest.width+l:0,u=o?o.highest.height+l:0;return this.isHorizontal()?u*i>c*s?c/i:u/s:u*s<c*i?u/i:c/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,i=this.chart,s=this.options,{grid:o,position:l,border:c}=s,u=o.offset,h=this.isHorizontal(),m=this.ticks.length+(u?1:0),_=wr(o),v=[],M=c.setContext(this.getContext()),T=M.display?M.width:0,C=T/2,A=function(kt){return Yi(i,kt,T)};let D,W,z,N,Y,$,G,J,rt,st,ut,Wt;if(l==="top")D=A(this.bottom),$=this.bottom-_,J=D-C,st=A(e.top)+C,Wt=e.bottom;else if(l==="bottom")D=A(this.top),st=e.top,Wt=A(e.bottom)-C,$=D+C,J=this.top+_;else if(l==="left")D=A(this.right),Y=this.right-_,G=D-C,rt=A(e.left)+C,ut=e.right;else if(l==="right")D=A(this.left),rt=e.left,ut=A(e.right)-C,Y=D+C,G=this.left+_;else if(n==="x"){if(l==="center")D=A((e.top+e.bottom)/2+.5);else if(bt(l)){const kt=Object.keys(l)[0],Tt=l[kt];D=A(this.chart.scales[kt].getPixelForValue(Tt))}st=e.top,Wt=e.bottom,$=D+C,J=$+_}else if(n==="y"){if(l==="center")D=A((e.left+e.right)/2);else if(bt(l)){const kt=Object.keys(l)[0],Tt=l[kt];D=A(this.chart.scales[kt].getPixelForValue(Tt))}Y=D-C,G=Y-_,rt=e.left,ut=e.right}const Ut=ct(s.ticks.maxTicksLimit,m),St=Math.max(1,Math.ceil(m/Ut));for(W=0;W<m;W+=St){const kt=this.getContext(W),Tt=o.setContext(kt),qt=c.setContext(kt),Vt=Tt.lineWidth,Le=Tt.color,re=qt.dash||[],ve=qt.dashOffset,In=Tt.tickWidth,Ne=Tt.tickColor,Se=Tt.tickBorderDash||[],we=Tt.tickBorderDashOffset;z=Uw(this,W,u),z!==void 0&&(N=Yi(i,z,Vt),h?Y=G=rt=ut=N:$=J=st=Wt=N,v.push({tx1:Y,ty1:$,tx2:G,ty2:J,x1:rt,y1:st,x2:ut,y2:Wt,width:Vt,color:Le,borderDash:re,borderDashOffset:ve,tickWidth:In,tickColor:Ne,tickBorderDash:Se,tickBorderDashOffset:we}))}return this._ticksLength=m,this._borderValue=D,v}_computeLabelItems(e){const n=this.axis,i=this.options,{position:s,ticks:o}=i,l=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:h,padding:d,mirror:m}=o,_=wr(i.grid),v=_+d,M=m?-d:v,T=-Jn(this.labelRotation),C=[];let A,D,W,z,N,Y,$,G,J,rt,st,ut,Wt="middle";if(s==="top")Y=this.bottom-M,$=this._getXAxisLabelAlignment();else if(s==="bottom")Y=this.top+M,$=this._getXAxisLabelAlignment();else if(s==="left"){const St=this._getYAxisLabelAlignment(_);$=St.textAlign,N=St.x}else if(s==="right"){const St=this._getYAxisLabelAlignment(_);$=St.textAlign,N=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],kt=s[St];Y=this.chart.scales[St].getPixelForValue(kt)+v}$=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")N=(e.left+e.right)/2-v;else if(bt(s)){const St=Object.keys(s)[0],kt=s[St];N=this.chart.scales[St].getPixelForValue(kt)}$=this._getYAxisLabelAlignment(_).textAlign}n==="y"&&(u==="start"?Wt="top":u==="end"&&(Wt="bottom"));const Ut=this._getLabelSizes();for(A=0,D=c.length;A<D;++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,st=Xt(z)?z.length:1;const kt=st/2,Tt=St.color,qt=St.textStrokeColor,Vt=St.textStrokeWidth;let Le=$;l?(N=G,$==="inner"&&(A===D-1?Le=this.options.reverse?"left":"right":A===0?Le=this.options.reverse?"right":"left":Le="center"),s==="top"?h==="near"||T!==0?ut=-st*rt+rt/2:h==="center"?ut=-Ut.highest.height/2-kt*rt+rt:ut=-Ut.highest.height+rt/2:h==="near"||T!==0?ut=rt/2:h==="center"?ut=Ut.highest.height/2-kt*rt:ut=Ut.highest.height-st*rt,m&&(ut*=-1),T!==0&&!St.showLabelBackdrop&&(N+=rt/2*Math.sin(T))):(Y=G,ut=(1-st)*rt/2);let re;if(St.showLabelBackdrop){const ve=Ye(St.backdropPadding),In=Ut.heights[A],Ne=Ut.widths[A];let Se=ut-ve.top,we=0-ve.left;switch(Wt){case"middle":Se-=In/2;break;case"bottom":Se-=In;break}switch($){case"center":we-=Ne/2;break;case"right":we-=Ne;break;case"inner":A===D-1?we-=Ne:A>0&&(we-=Ne/2);break}re={left:we,top:Se,width:Ne+ve.width,height:In+ve.height,color:St.backdropColor}}C.push({label:z,font:J,textOffset:ut,options:{rotation:T,color:Tt,strokeColor:qt,strokeWidth:Vt,textAlign:Le,textBaseline:Wt,translation:[N,Y],backdrop:re}})}return C}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Jn(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,l=this._getLabelSizes(),c=e+o,u=l.widest.width;let h,d;return n==="left"?s?(d=this.right+o,i==="near"?h="left":i==="center"?(h="center",d+=u/2):(h="right",d+=u)):(d=this.right-c,i==="near"?h="right":i==="center"?(h="center",d-=u/2):(h="left",d=this.left)):n==="right"?s?(d=this.left+o,i==="near"?h="right":i==="center"?(h="center",d-=u/2):(h="left",d-=u)):(d=this.left+c,i==="near"?h="left":i==="center"?(h="center",d+=u/2):(h="right",d=this.right)):h="right",{textAlign:h,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:s,width:o,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,s,o,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(o=>o.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,l;const c=(u,h,d)=>{!d.width||!d.color||(i.save(),i.lineWidth=d.width,i.strokeStyle=d.color,i.setLineDash(d.borderDash||[]),i.lineDashOffset=d.borderDashOffset,i.beginPath(),i.moveTo(u.x,u.y),i.lineTo(h.x,h.y),i.stroke(),i.restore())};if(n.display)for(o=0,l=s.length;o<l;++o){const u=s[o];n.drawOnChartArea&&c({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&c({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),l=i.display?o.width:0;if(!l)return;const c=s.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let h,d,m,_;this.isHorizontal()?(h=Yi(e,this.left,l)-l/2,d=Yi(e,this.right,c)+c/2,m=_=u):(m=Yi(e,this.top,l)-l/2,_=Yi(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,Xt(i.text)&&(u+=o.lineHeight*(i.text.length-1))):u+=l.top;const{titleX:h,titleY:d,maxWidth:m,rotation:_}=Xw(this,u,n,c);Gr(e,i.text,0,0,o,{color:i.color,maxWidth:m,rotation:_,textAlign:Yw(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=ct(e.grid&&e.grid.z,-1),s=ct(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==ss.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 sa{constructor(e,n,i){this.type=e,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let i;jw(n)&&(i=this.register(n));const s=this.items,o=e.id,l=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,Kw(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 es[i])}}function Kw(t,e,n){const i=Cn(Object.create(null),[n?At.get(n):{},At.get(e),t.defaults]);At.set(e,i),t.defaultRoutes&&qw(e,t.defaultRoutes),t.descriptors&&At.describe(e,t.descriptors)}function qw(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 jw(t){return"id"in t&&"defaults"in t}class Zw{constructor(){this.controllers=new sa(Mi,"datasets",!0),this.elements=new sa(_n,"elements"),this.plugins=new sa(Object,"plugins"),this.scales=new sa(ss,"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=Qc(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 Zw;class Jw{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=ct(i.options&&i.options.plugins,{}),o=Qw(i);return s===!1&&!n?[]:eM(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 Qw(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 tM(t,e){return!e&&t===!1?null:t===!0?{}:t}function eM(t,{plugins:e,localIds:n},i,s){const o=[],l=t.getContext();for(const c of e){const u=c.id,h=tM(i[u],s);h!==null&&o.push({plugin:c,options:nM(t.config,{plugin:c,local:n[u]},h,l)})}return o}function nM(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 iM(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function sM(t,e){return t===e?"_index_":"_value_"}function pd(t){if(t==="x"||t==="y"||t==="r")return t}function rM(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Nc(t,...e){if(pd(t))return t;for(const n of e){const i=n.axis||rM(n.position)||t.length>1&&pd(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function _d(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function oM(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 _d(t,"x",n[0])||_d(t,"y",n[0])}return{}}function aM(t,e){const n=es[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,oM(l,t),At.scales[c.type]),h=sM(u,s),d=n.scales||{};o[l]=Dr(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=(es[c]||{}).scales||{};Object.keys(d).forEach(m=>{const _=iM(m,u),v=l[_+"AxisID"]||_;o[v]=o[v]||Object.create(null),Dr(o[v],[{axis:_},i[v],d[m]])})}),Object.keys(o).forEach(l=>{const c=o[l];Dr(c,[At.scales[c.type],At.scale])}),o}function tm(t){const e=t.options||(t.options={});e.plugins=ct(e.plugins,{}),e.scales=aM(t,e)}function em(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function lM(t){return t=t||{},t.data=em(t.data),tm(t),t}const bd=new Map,nm=new Set;function ra(t,e){let n=bd.get(t);return n||(n=e(),bd.set(t,n),nm.add(n)),n}const Mr=(t,e,n)=>{const i=ts(e,n);i!==void 0&&t.add(i)};class cM{constructor(e){this._config=lM(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=em(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(),tm(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return ra(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return ra(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return ra(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return ra(`${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=>Mr(u,e,m))),d.forEach(m=>Mr(u,s,m)),d.forEach(m=>Mr(u,es[o]||{},m)),d.forEach(m=>Mr(u,At,m)),d.forEach(m=>Mr(u,Oc,m))});const h=Array.from(u);return h.length===0&&h.push(Object.create(null)),nm.has(n)&&l.set(n,h),h}chartOptionScopes(){const{options:e,type:n}=this;return[e,es[n]||{},At.datasets[n]||{},{type:n},At,Oc]}resolveNamedOptions(e,n,i,s=[""]){const o={$shared:!0},{resolver:l,subPrefixes:c}=xd(this._resolverCache,e,s);let u=l;if(uM(l,n)){o.$shared=!1,i=Ti(i)?i():i;const h=this.createResolver(e,i,c);u=Bs(l,i,h)}for(const h of n)o[h]=u[h];return o}createResolver(e,n,i=[""],s){const{resolver:o}=xd(this._resolverCache,e,i);return bt(n)?Bs(o,n,void 0,s):o}}function xd(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:of(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},i.set(s,o)),o}const fM=t=>bt(t)&&Object.getOwnPropertyNames(t).some(e=>Ti(t[e]));function uM(t,e){const{isScriptable:n,isIndexable:i}=Ng(t);for(const s of e){const o=n(s),l=i(s),c=(l||o)&&t[s];if(o&&(Ti(c)||fM(c))||l&&Xt(c))return!0}return!1}var hM="4.4.8";const dM=["top","bottom","left","right","chartArea"];function yd(t,e){return t==="top"||t==="bottom"||dM.indexOf(t)===-1&&e==="x"}function vd(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Sd(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ot(n&&n.onComplete,[t],e)}function gM(t){const e=t.chart,n=e.options.animation;ot(n&&n.onProgress,[t],e)}function im(t){return cf()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Sa={},wd=t=>{const e=im(t);return Object.values(Sa).filter(n=>n.canvas===e).pop()};function mM(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}function oa(t,e,n){return t.options.clip?t[n]:e[n]}function _M(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:oa(n,e,"left"),right:oa(n,e,"right"),top:oa(i,e,"top"),bottom:oa(i,e,"bottom")}:e}var pi;let hf=(pi=class{static register(...e){Tn.add(...e),Md()}static unregister(...e){Tn.remove(...e),Md()}constructor(e,n){const i=this.config=new cM(n),s=im(e),o=wd(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||Rw(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=xv(),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 Jw,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Bv(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}Xn.listen(this,"complete",Sd),Xn.listen(this,"progress",gM),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():Yh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Vh(this.canvas,this.ctx),this}stop(){return Xn.stop(this),this}resize(e,n){Xn.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,Yh(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=ct(c.type,l.dtype);(c.position===void 0||yd(c.position,h)!==yd(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(vd("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(vd("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);(!Dh(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;mM(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(!Dh(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,Ti(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&&(Xn.has(this)?this.attached&&!Xn.running(this)&&Xn.start(this):(this.draw(),Sd({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=e._clip,s=!i.disabled,o=_M(e,this.chartArea),l={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(s&&La(n,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),e.controller.draw(),s&&Na(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(e){return $r(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const o=dw.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=is(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);Ur(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(),Xn.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(),Vh(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=Tv(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(pi,"defaults",At),j(pi,"instances",Sa),j(pi,"overrides",es),j(pi,"registry",Tn),j(pi,"version",hM),j(pi,"getChart",wd),pi);function Md(){return pt(hf.instances,t=>t._plugins.invalidate())}function bM(t,e,n){const{startAngle:i,pixelMargin:s,x:o,y:l,outerRadius:c,innerRadius:u}=e;let h=s/c;t.beginPath(),t.arc(o,l,c,i-h,n+h),u>s?(h=s/u,t.arc(o,l,u,n+h,i-h,!0)):t.arc(o,l,s,n+te,i-te),t.closePath(),t.clip()}function xM(t){return rf(t,["outerStart","outerEnd","innerStart","innerEnd"])}function yM(t,e,n,i){const s=xM(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 As(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,kt=m>0?m-i:0,Tt=(St+kt)/2,qt=Tt!==0?M*Tt/(Tt+i):M;v=(M-qt)/2}const T=Math.max(.001,M*m-n/Ht)/m,C=(M-T)/2,A=u+C+v,D=s-C-v,{outerStart:W,outerEnd:z,innerStart:N,innerEnd:Y}=yM(e,_,m,D-A),$=m-W,G=m-z,J=A+W/$,rt=D-z/G,st=_+N,ut=_+Y,Wt=A+N/st,Ut=D-Y/ut;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 Vt=As(G,rt,l,c);t.arc(Vt.x,Vt.y,z,rt,D+te)}const kt=As(ut,D,l,c);if(t.lineTo(kt.x,kt.y),Y>0){const Vt=As(ut,Ut,l,c);t.arc(Vt.x,Vt.y,Y,D+te,Ut+Math.PI)}const Tt=(D-Y/_+(A+N/_))/2;if(t.arc(l,c,_,D-Y/_,Tt,!0),t.arc(l,c,_,Tt,A+N/_,!0),N>0){const Vt=As(st,Wt,l,c);t.arc(Vt.x,Vt.y,N,Wt+Math.PI,A-te)}const qt=As($,A,l,c);if(t.lineTo(qt.x,qt.y),W>0){const Vt=As($,J,l,c);t.arc(Vt.x,Vt.y,W,A-te,J)}}else{t.moveTo(l,c);const St=Math.cos(J)*m+l,kt=Math.sin(J)*m+c;t.lineTo(St,kt);const Tt=Math.cos(rt)*m+l,qt=Math.sin(rt)*m+c;t.lineTo(Tt,qt)}t.closePath()}function vM(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 SM(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&&bM(t,e,M),o||(Aa(t,e,n,i,M,s),t.stroke())}class Ir 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}=Pg(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=ct(_,h-u),T=Vr(l,u,h)&&u!==h,C=M>=Ft||T,A=Qn(c,d+v,m+v);return C&&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(Ht,s||0)),d=o*h;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,vM(n,this,d,l,c),SM(n,this,d,l,c),n.restore()}}j(Ir,"id","arc"),j(Ir,"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(Ir,"defaultRoutes",{backgroundColor:"backgroundColor"}),j(Ir,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function sm(t,e,n=e){t.lineCap=ct(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ct(n.borderDash,e.borderDash)),t.lineDashOffset=ct(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ct(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ct(n.borderWidth,e.borderWidth),t.strokeStyle=ct(n.borderColor,e.borderColor)}function wM(t,e,n){t.lineTo(n.x,n.y)}function MM(t){return t.stepped?Kv:t.tension||t.cubicInterpolationMode==="monotone"?qv:wM}function rm(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 TM(t,e,n,i){const{points:s,options:o}=e,{count:l,start:c,loop:u,ilen:h}=rm(s,n,i),d=MM(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 PM(t,e,n,i){const s=e.points,{count:o,start:l,ilen:c}=rm(s,n,i),{move:u=!0,reverse:h}=i||{};let d=0,m=0,_,v,M,T,C,A;const D=z=>(l+(h?c-z:z))%o,W=()=>{T!==C&&(t.lineTo(d,C),t.lineTo(d,T),t.lineTo(d,A))};for(u&&(v=s[D(0)],t.moveTo(v.x,v.y)),_=0;_<=c;++_){if(v=s[D(_)],v.skip)continue;const z=v.x,N=v.y,Y=z|0;Y===M?(N<T?T=N:N>C&&(C=N),d=(m*d+z)/++m):(W(),t.lineTo(z,N),M=Y,m=0,T=C=N),A=N}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?PM:TM}function kM(t){return t.stepped?kS:t.tension||t.cubicInterpolationMode==="monotone"?CS:qi}function CM(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),sm(t,e.options),t.stroke(s)}function EM(t,e,n,i){const{segments:s,options:o}=e,l=Bc(e);for(const c of s)sm(t,o,c.style),t.beginPath(),l(t,e,c,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const IM=typeof Path2D=="function";function AM(t,e,n,i){IM&&!e.options.segment?CM(t,e,n,i):EM(t,e,n,i)}class Ji 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;xS(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=RS(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=Gg(this,{property:n,start:s,end:s});if(!l.length)return;const c=[],u=kM(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])),C=u(v,M,T,i.stepped);C[n]=e[n],c.push(C)}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(),AM(e,this,i,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}j(Ji,"id","line"),j(Ji,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),j(Ji,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),j(Ji,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Td(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 Td(this,n,"x",i)}inYRange(n,i){return Td(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||!$r(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 om(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 vi(t,e,n,i){return t?0:pe(e,n,i)}function OM(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,o=Lg(i);return{t:vi(s.top,o.top,0,n),r:vi(s.right,o.right,0,e),b:vi(s.bottom,o.bottom,0,n),l:vi(s.left,o.left,0,e)}}function DM(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=Rs(s),l=Math.min(e,n),c=t.borderSkipped,u=i||bt(s);return{topLeft:vi(!u||c.top||c.left,o.topLeft,0,l),topRight:vi(!u||c.top||c.right,o.topRight,0,l),bottomLeft:vi(!u||c.bottom||c.left,o.bottomLeft,0,l),bottomRight:vi(!u||c.bottom||c.right,o.bottomRight,0,l)}}function RM(t){const e=om(t),n=e.right-e.left,i=e.bottom-e.top,s=OM(t,n/2,i/2),o=DM(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)&&om(t,i);return c&&(s||Qn(e,c.left,c.right))&&(o||Qn(n,c.top,c.bottom))}function LM(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function NM(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}=RM(this),c=LM(l.radius)?Ca:NM;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 BM(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=df(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=Gg(e,d);for(const _ of m){const v=Fc(n,o[_.start],o[_.end],_.loop),M=$g(c,s,v);for(const T of M)l.push({source:T,target:_,start:{[n]:Pd(d,v,"start",Math.max)},end:{[n]:Pd(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 FM(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,o=[];return e.segments.forEach(({start:l,end:c})=>{c=df(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 df(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Pd(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function am(t,e){let n=[],i=!1;return Xt(t)?(i=!0,n=t):n=FM(t,e),n.length?new Ji({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function kd(t){return t&&t.fill!==!1}function WM(t,e,n){let s=t[e].fill;const o=[e];let l;if(!n)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!Zt(s))return s;if(l=t[s],!l)return!1;if(l.visible)return s;o.push(s),s=l.fill}return!1}function zM(t,e,n){const i=$M(t);if(bt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Zt(s)&&Math.floor(s)===s?HM(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function HM(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function UM(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 VM(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 $M(t){const e=t.options,n=e.fill;let i=ct(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function GM(t){const{scale:e,index:n,line:i}=t,s=[],o=i.segments,l=i.points,c=YM(e,n);c.push(am({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++)XM(s,l[d],c)}return new Ji({points:s,options:{}})}function YM(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 XM(t,e,n){const i=[];for(let s=0;s<n.length;s++){const o=n[s],{first:l,last:c,point:u}=KM(o,e,"x");if(!(!u||l&&c)){if(l)i.unshift(u);else if(t.push(u),!c)break}}t.push(...i)}function KM(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(Qn(s,m,_)){c=s===m,u=s===_;break}}return{first:c,last:u,point:i}}class lm{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 qM(t){const{chart:e,fill:n,line:i}=t;if(Zt(n))return jM(e,n);if(n==="stack")return GM(t);if(n==="shape")return!0;const s=ZM(t);return s instanceof lm?s:am(s,i)}function jM(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function ZM(t){return(t.scale||{}).getPointPositionForValue?QM(t):JM(t)}function JM(t){const{scale:e={},fill:n}=t,i=UM(n,e);if(Zt(i)){const s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function QM(t){const{scale:e,fill:n}=t,i=e.options,s=e.getLabels().length,o=i.reverse?e.max:e.min,l=VM(n,e,o),c=[];if(i.grid.circular){const u=e.getPointPositionForValue(0,o);return new lm({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=qM(e),{line:s,scale:o,axis:l}=e,c=s.options,u=c.fill,h=c.backgroundColor,{above:d=h,below:m=h}=u||{};i&&s.points.length&&(La(t,n),tT(t,{line:s,target:i,above:d,below:m,area:n,scale:o,axis:l}),Na(t))}function tT(t,e){const{line:n,target:i,above:s,below:o,area:l,scale:c}=e,u=n._loop?"angle":e.axis;t.save(),u==="x"&&o!==s&&(Cd(t,i,l.top),Ed(t,{line:n,target:i,color:s,scale:c,property:u}),t.restore(),t.save(),Cd(t,i,l.bottom)),Ed(t,{line:n,target:i,color:o,scale:c,property:u}),t.restore()}function Cd(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[df(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 Ed(t,e){const{line:n,target:i,property:s,color:o,scale:l}=e,c=BM(n,i,s);for(const{source:u,target:h,start:d,end:m}of c){const{style:{backgroundColor:_=o}={}}=u,v=i!==!0;t.save(),t.fillStyle=_,eT(t,l,v&&Fc(s,d,m)),t.beginPath();const M=!!n.pathSegment(t,u);let T;if(v){M?t.closePath():Id(t,i,m,s);const C=!!i.pathSegment(t,h,{move:M,reverse:!0});T=M&&C,T||Id(t,i,d,s)}t.closePath(),t.fill(T?"evenodd":"nonzero"),t.restore()}}function eT(t,e,n){const{top:i,bottom:s}=e.chart.chartArea,{property:o,start:l,end:c}=n||{};o==="x"&&(t.beginPath(),t.rect(l,i,c-l,s-i),t.clip())}function Id(t,e,n,i){const s=e.interpolate(n,i);s&&t.lineTo(s.x,s.y)}var xk={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 Ji&&(u={visible:t.isDatasetVisible(l),index:l,fill:zM(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=WM(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 Ad=(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)}},nT=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Od 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}=Ad(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 C=i+n/2+o.measureText(M.text).width;(T===0||h[h.length-1]+C+2*c>l)&&(m+=d,h[h.length-(T>0?0:1)]=0,v+=d,_++),u[T]={left:0,top:v,row:_,width:C,height:s},h[h.length-1]+=C+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((C,A)=>{const{itemWidth:D,itemHeight:W}=iT(i,n,o,C,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:D,height:W},_=Math.max(_,D),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=Ls(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=Ls(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:C}=Ad(l,m),A=function(Y,$,G){if(isNaN(M)||M<=0||isNaN(T)||T<0)return;s.save();const J=ct(G.lineWidth,1);if(s.fillStyle=ct(G.fillStyle,c),s.lineCap=ct(G.lineCap,"butt"),s.lineDashOffset=ct(G.lineDashOffset,0),s.lineJoin=ct(G.lineJoin,"miter"),s.lineWidth=J,s.strokeStyle=ct(G.strokeStyle,c),s.setLineDash(ct(G.lineDash,[])),l.usePointStyle){const rt={radius:T*Math.SQRT2/2,pointStyle:G.pointStyle,rotation:G.rotation,borderWidth:J},st=u.xPlus(Y,M/2),ut=$+_;Rg(s,rt,st,ut,l.pointStyleWidth&&M)}else{const rt=$+Math.max((m-T)/2,0),st=u.leftForLtr(Y,M),ut=Rs(G.borderRadius);s.beginPath(),Object.values(ut).some(Wt=>Wt!==0)?Ca(s,{x:st,y:rt,w:M,h:T,radius:ut}):s.rect(st,rt,M,T),s.fill(),J!==0&&s.stroke()}s.restore()},D=function(Y,$,G){Gr(s,G.text,Y,$+C/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},Hg(this.ctx,e.textDirection);const N=C+d;this.legendItems.forEach((Y,$)=>{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 st=v.x,ut=v.y;u.setWidth(this.width),W?$>0&&st+rt+d>this.right&&(ut=v.y+=N,v.line++,st=v.x=me(o,this.left+d,this.right-i[v.line])):$>0&&ut+N>this.bottom&&(st=v.x=st+n[v.line].width+d,v.line++,ut=v.y=me(o,this.top+z+d,this.bottom-n[v.line].height));const Wt=u.x(st);if(A(Wt,ut,Y),st=Fv(J,st+M+_,W?st+rt:this.right,e.rtl),D(u.x(st),ut,Y),W)v.x+=rt+d;else if(typeof Y.text!="string"){const Ut=h.lineHeight;v.y+=cm(Y,Ut)+d}else v.y+=N}),Ug(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=Ls(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,C)=>Math.max(T,C.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(ef(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(Qn(e,this.left,this.right)&&Qn(n,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],Qn(e,s.left,s.left+s.width)&&Qn(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(e){const n=this.options;if(!oT(e.type,n))return;const i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,o=nT(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 iT(t,e,n,i,s){const o=sT(i,t,e,n),l=rT(s,i,e.lineHeight);return{itemWidth:o,itemHeight:l}}function sT(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 rT(t,e,n){let i=t;return typeof e.text!="string"&&(i=cm(e,n)),i}function cm(t,e){const n=t.text?t.text.length:0;return e*n}function oT(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var yk={id:"legend",_element:Od,start(t,e,n){const i=t.legend=new Od({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 fm 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=Xt(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=Ht*-.5):(d=o-e,m=me(c,n,s),u=Ht*.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:ef(n.align),textBaseline:"middle",translation:[l,c]})}}function aT(t,e){const n=new fm({ctx:t.ctx,options:e,chart:t});an.configure(t,n,e),an.addBox(t,n),t.titleBlock=n}var vk={id:"title",_element:fm,start(t,e,n){aT(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 Ar={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&&(Xt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Kn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
17
+ `)>-1?t.split(`
18
+ `):t}function lT(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 Dd(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,C=0,A=i.reduce((z,N)=>z+N.before.length+N.lines.length+N.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 D=0;const W=function(z){C=Math.max(C,n.measureText(z).width+D)};return n.save(),n.font=h.string,pt(t.title,W),n.font=u.string,pt(t.beforeBody.concat(t.afterBody),W),D=e.displayColors?l+2+e.boxPadding:0,pt(i,z=>{pt(z.before,W),pt(z.lines,W),pt(z.after,W)}),D=0,n.font=d.string,pt(t.footer,W),n.restore(),C+=M.width,{width:C,height:T}}function cT(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function fT(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 uT(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"),fT(h,t,e,n)&&(h="center"),h}function Rd(t,e,n){const i=n.yAlign||e.yAlign||cT(t,n);return{xAlign:n.xAlign||e.xAlign||uT(t,e,n,i),yAlign:i}}function hT(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function dT(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function Ld(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}=Rs(l);let M=hT(e,c);const T=dT(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 Nd(t){return Mn([],Kn(t))}function gT(t,e,n){return is(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Bd(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const um={beforeTitle:Gn,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:Gn,beforeBody:Gn,beforeLabel:Gn,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:Gn,afterBody:Gn,beforeFooter:Gn,footer:Gn,afterFooter:Gn};function Ie(t,e,n,i){const s=t[e].call(n,i);return typeof s>"u"?um[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 Yg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=gT(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=Ie(i,"beforeTitle",this,e),o=Ie(i,"title",this,e),l=Ie(i,"afterTitle",this,e);let c=[];return c=Mn(c,Kn(s)),c=Mn(c,Kn(o)),c=Mn(c,Kn(l)),c}getBeforeBody(e,n){return Nd(Ie(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return pt(e,o=>{const l={before:[],lines:[],after:[]},c=Bd(i,o);Mn(l.before,Kn(Ie(c,"beforeLabel",this,o))),Mn(l.lines,Ie(c,"label",this,o)),Mn(l.after,Kn(Ie(c,"afterLabel",this,o))),s.push(l)}),s}getAfterBody(e,n){return Nd(Ie(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=Ie(i,"beforeFooter",this,e),o=Ie(i,"footer",this,e),l=Ie(i,"afterFooter",this,e);let c=[];return c=Mn(c,Kn(s)),c=Mn(c,Kn(o)),c=Mn(c,Kn(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(lT(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=Bd(e.callbacks,d);s.push(Ie(m,"labelColor",this,d)),o.push(Ie(m,"labelPointStyle",this,d)),l.push(Ie(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=Ar[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=Dd(this,i),h=Object.assign({},c,u),d=Rd(this.chart,i,h),m=Ld(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}=Rs(c),{x:_,y:v}=e,{width:M,height:T}=n;let C,A,D,W,z,N;return o==="center"?(z=v+T/2,s==="left"?(C=_,A=C-l,W=z+l,N=z-l):(C=_+M,A=C+l,W=z-l,N=z+l),D=C):(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,C=A-l,D=A+l):(W=v+T,z=W+l,C=A+l,D=A-l),N=W),{x1:C,x2:A,x3:D,y1:W,y2:z,y3:N}}drawTitle(e,n,i){const s=this.title,o=s.length;let l,c,u;if(o){const h=Ls(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},C=s.leftForLtr(_,h)+h/2,A=M+u/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Dc(e,T,C,A),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Dc(e,T,C,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),C=s.leftForLtr(s.xPlus(_,1),h-2),A=Rs(l.borderRadius);Object.values(A).some(D=>D!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,Ca(e,{x:T,y:M,w:h,h:u,radius:A}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),Ca(e,{x:C,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(C,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=Ls(i.rtl,this.x,this.width),T=function(G){n.fillText(G,M.x(e.x+v),e.y+_/2),e.y+=_+o},C=M.textAlign(l);let A,D,W,z,N,Y,$;for(n.textAlign=l,n.textBaseline="middle",n.font=m.string,e.x=aa(this,C,i),n.fillStyle=i.bodyColor,pt(this.beforeBody,T),v=c&&C!=="right"?l==="center"?h/2+d:h+2+d:0,z=0,Y=s.length;z<Y;++z){for(A=s[z],D=this.labelTextColors[z],n.fillStyle=D,pt(A.before,T),W=A.lines,c&&W.length&&(this._drawColorBox(n,e,z,M,i),_=Math.max(m.lineHeight,u)),N=0,$=W.length;N<$;++N)T(W[N]),_=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=Ls(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}=Rs(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=Ar[e.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=Dd(this,e),u=Object.assign({},l,this._size),h=Rd(n,e,u),d=Ld(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),Hg(e,n.textDirection),o.y+=l.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),Ug(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=Ar[o.position].call(this,e,n);return l!==!1&&(i!==l.x||s!==l.y)}}j(Wc,"positioners",Ar);var Sk={id:"tooltip",_element:Wc,positioners:Ar,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:um},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 pT(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 _T=(t,e)=>t===null?null:pe(Math.round(t),0,e);function Fd(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Wd extends ss{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:pT(i,e,ct(n,e),this._addedLabels),_T(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 Fd.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(Wd,"id","category"),j(Wd,"defaults",{ticks:{callback:Fd}});function bT(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:C}=e,A=!yt(l),D=!yt(c),W=!yt(h),z=(C-T)/(m+1);let N=Lh((C-T)/M/v)*v,Y,$,G,J;if(N<1e-14&&!A&&!D)return[{value:T},{value:C}];J=Math.ceil(C/N)-Math.floor(T/N),J>M&&(N=Lh(J*N/M/v)*v),yt(u)||(Y=Math.pow(10,u),N=Math.ceil(N*Y)/Y),s==="ticks"?($=Math.floor(T/N)*N,G=Math.ceil(C/N)*N):($=T,G=C),A&&D&&o&&Iv((c-l)/o,N/1e3)?(J=Math.round(Math.min((c-l)/N,d)),N=(c-l)/J,$=l,G=c):W?($=A?l:$,G=D?c:G,J=h-1,N=(G-$)/J):(J=(G-$)/N,Rr(J,Math.round(J),N/1e3)?J=Math.round(J):J=Math.ceil(J));const rt=Math.max(Nh(N),Nh($));Y=Math.pow(10,yt(u)?rt:u),$=Math.round($*Y)/Y,G=Math.round(G*Y)/Y;let st=0;for(A&&(_&&$!==l?(n.push({value:l}),$<l&&st++,Rr(Math.round(($+st*N)*Y)/Y,l,zd(l,z,t))&&st++):$<l&&st++);st<J;++st){const ut=Math.round(($+st*N)*Y)/Y;if(D&&ut>c)break;n.push({value:ut})}return D&&_&&G!==c?n.length&&Rr(n[n.length-1].value,c,zd(c,z,t))?n[n.length-1].value=c:n.push({value:c}):(!D||G===c)&&n.push({value:G}),n}function zd(t,e,{horizontal:n,minRotation:i}){const s=Jn(i),o=(n?Math.sin(s):Math.cos(s))||.001,l=.75*e*(""+t).length;return Math.min(e/o,l)}class hm extends ss{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=bT(s,o);return e.bounds==="ticks"&&Tg(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 Hd extends hm{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Zt(e)?e:0,this.max=Zt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=Jn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}j(Hd,"id","linear"),j(Hd,"defaults",{ticks:{callback:sf.formatters.numeric}});const Xr=t=>Math.floor(yi(t)),Ki=(t,e)=>Math.pow(10,Xr(t)+e);function Ud(t){return t/Math.pow(10,Xr(t))===1}function Vd(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function xT(t,e){const n=e-t;let i=Xr(n);for(;Vd(t,e,i)>10;)i++;for(;Vd(t,e,i)<10;)i--;return Math.min(i,Xr(t))}function yT(t,{min:e,max:n}){e=Ge(t.min,e);const i=[],s=Xr(e);let o=xT(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)),_=Ge(t.min,Math.round((u+d+m*Math.pow(10,o))*l)/l);for(;_<n;)i.push({value:_,major:Ud(_),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=Ge(t.max,_);return i.push({value:v,major:Ud(v),significand:m}),i}class $d extends ss{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=hm.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Zt(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Zt(e)?Math.max(0,e):null,this.max=Zt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Zt(this._userMin)&&(this.min=e===Ki(this.min,0)?Ki(this.min,-1):Ki(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(Ki(i,-1)),l(Ki(s,1)))),i<=0&&o(Ki(s,-1)),s<=0&&l(Ki(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=yT(n,this);return e.bounds==="ticks"&&Tg(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=yi(e),this._valueRange=yi(this.max)-yi(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yi(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}j($d,"id","logarithmic"),j($d,"defaults",{ticks:{callback:sf.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}},Re=Object.keys(Wa);function Gd(t,e){return t-e}function Yd(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)),Zt(l)||(l=typeof i=="string"?n.parse(l,i):n.parse(l)),l===null?null:(s&&(l=s==="week"&&(Ns(o)||o===!0)?n.startOf(l,"isoWeek",o):n.startOf(l,s)),+l)}function Xd(t,e,n,i){const s=Re.length;for(let o=Re.indexOf(t);o<s-1;++o){const l=Wa[Re[o]],c=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(c*l.size))<=i)return Re[o]}return Re[s-1]}function vT(t,e,n,i,s){for(let o=Re.length-1;o>=Re.indexOf(n);o--){const l=Re[o];if(Wa[l].common&&t._adapter.diff(s,i,l)>=e-1)return l}return Re[n?Re.indexOf(n):0]}function ST(t){for(let e=Re.indexOf(t)+1,n=Re.length;e<n;++e)if(Wa[Re[e]].common)return Re[e]}function Kd(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:s}=tf(n,e),o=n[i]>=e?n[i]:n[s];t[o]=!0}}function wT(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 qd(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:wT(t,i,s,n)}class Oa extends ss{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 lw._date(e.adapters.date);s.init(n),Dr(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:Yd(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:s,max:o,minDefined:l,maxDefined:c}=this.getUserBounds();function u(h){!l&&!isNaN(h.min)&&(s=Math.min(s,h.min)),!c&&!isNaN(h.max)&&(o=Math.max(o,h.max))}(!l||!c)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),s=Zt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),o=Zt(o)&&!isNaN(o)?o:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,l=this.max,c=Lv(s,o,l);return this._unit=n.unit||(i.autoSkip?Xd(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):vT(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:ST(this._unit),this.initOffsets(s),e.reverse&&c.reverse(),qd(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||Xd(o.minUnit,n,i,this._getLabelCapacity(n)),c=ct(s.ticks.stepSize,1),u=l==="week"?o.isoWeekday:!1,h=Ns(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++)Kd(d,_,M);return(_===i||s.bounds==="ticks"||v===1)&&Kd(d,_,M),Object.keys(d).sort(Gd).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=Jn(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(s),l=Math.sin(s),c=this._resolveTickFontOptions(0).size;return{w:i*o+c*l,h:i*l+c*o}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,o=this._tickFormatFunction(e,0,qd(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(Yd(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Cg(e.sort(Gd))}}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}=Zi(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}=Zi(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 jd 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(jd,"id","timeseries"),j(jd,"defaults",Oa.defaults);const dm="label";function Zd(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function MT(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function gm(t,e){t.labels=e}function mm(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:dm;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 TT(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dm;const n={labels:[],datasets:[]};return gm(n,t.labels),mm(n,t.datasets,e),n}function PT(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=ye.useRef(null),M=ye.useRef(null),T=()=>{v.current&&(M.current=new hf(v.current,{type:l,data:TT(c,o),options:u&&{...u},plugins:h}),Zd(e,M.current))},C=()=>{Zd(e,null),M.current&&(M.current.destroy(),M.current=null)};return ye.useEffect(()=>{!s&&M.current&&u&&MT(M.current,u)},[s,u]),ye.useEffect(()=>{!s&&M.current&&gm(M.current.config.data,c.labels)},[s,c.labels]),ye.useEffect(()=>{!s&&M.current&&c.datasets&&mm(M.current.config.data,c.datasets,o)},[s,c.datasets]),ye.useEffect(()=>{M.current&&(s?(C(),setTimeout(T)):M.current.update(m))},[s,u,c.labels,c.datasets,m]),ye.useEffect(()=>{M.current&&(C(),setTimeout(T))},[l]),ye.useEffect(()=>(T(),()=>C()),[]),bg.createElement("canvas",{ref:v,role:"img",height:n,width:i,..._},d)}const kT=ye.forwardRef(PT);function za(t,e){return hf.register(e),ye.forwardRef((n,i)=>bg.createElement(kT,{...n,ref:i,type:t}))}const wk=za("line",xa),Mk=za("bar",ba),Tk=za("pie",Rc),Pk=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 Jd;function CT(){return Jd||(Jd=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 V=new Error("get-stack-trace"),q=V&&V.stack?V.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",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 V=arguments[O];if(V!==s&&V!==null)for(var q in V)V.hasOwnProperty(q)&&(P[q]=V[q])}return P}:T=Object.assign;var C=M(function(S,P,O){for(var V=Object.keys(P),q=0;q<V.length;)(!O||O&&S[V[q]]===s)&&(S[V[q]]=P[V[q]]),q++;return S},"extend","Use `assign`."),A=M(function(S,P){return C(S,P,!0)},"merge","Use `assign`.");function D(b,S,P){var O=S.prototype,V;V=b.prototype=Object.create(O),V.constructor=b,V._super=O,P&&T(V,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 N(b,S){return b===s?S:b}function Y(b,S,P){v(rt(S),function(O){b.addEventListener(O,P,!1)})}function $(b,S,P){v(rt(S),function(O){b.removeEventListener(O,P,!1)})}function 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 st(b,S,P){if(b.indexOf&&!P)return b.indexOf(S);for(var O=0;O<b.length;){if(P&&b[O][P]==S||!P&&b[O]===S)return O;O++}return-1}function ut(b){return Array.prototype.slice.call(b,0)}function Wt(b,S,P){for(var O=[],V=[],q=0;q<b.length;){var dt=b[q][S];st(V,dt)<0&&O.push(b[q]),V[q]=dt,q++}return O=O.sort(function(jt,ee){return jt[S]>ee[S]}),O}function Ut(b,S){for(var P,O,V=S[0].toUpperCase()+S.slice(1),q=0;q<o.length;){if(P=o[q],O=P?P+V:S,O in b)return O;q++}return s}var St=1;function kt(){return St++}function Tt(b){var S=b.ownerDocument||b;return S.defaultView||S.parentWindow||e}var qt=/mobile|tablet|ip(ad|hone|od)|android/i,Vt="ontouchstart"in e,Le=Ut(e,"PointerEvent")!==s,re=Vt&&qt.test(navigator.userAgent),ve="touch",In="pen",Ne="mouse",Se="kinect",we=25,oe=1,Be=2,Et=4,he=8,An=1,bn=2,ei=4,ae=8,cn=16,Ke=bn|ei,le=ae|cn,Us=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&&$(this.element,this.evEl,this.domHandler),this.evTarget&&$(this.target,this.evTarget,this.domHandler),this.evWin&&$(Tt(this.element),this.evWin,this.domHandler)}};function Ei(b){var S,P=b.options.inputClass;return P?S=P:Le?S=js:re?S=si:Vt?S=Qs:S=cs,new S(b,os)}function os(b,S,P){var O=P.pointers.length,V=P.changedPointers.length,q=S&oe&&O-V===0,dt=S&(Et|he)&&O-V===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,V=O.length;P.firstInput||(P.firstInput=ni(S)),V>1&&!P.firstMultiple?P.firstMultiple=ni(S):V===1&&(P.firstMultiple=!1);var q=P.firstInput,dt=P.firstMultiple,$t=dt?dt.center:q.center,jt=S.center=On(O);S.timeStamp=d(),S.deltaTime=S.timeStamp-q.timeStamp,S.angle=Ai($t,jt),S.distance=ii($t,jt),Ii(P,S),S.offsetDirection=ls(S.deltaX,S.deltaY);var ee=as(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=ee.x,S.overallVelocityY=ee.y,S.overallVelocity=h(ee.x)>h(ee.y)?ee.x:ee.y,S.scale=dt?$s(dt.pointers,O):1,S.rotation=dt?Vs(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 Ii(b,S){var P=S.center,O=b.offsetDelta||{},V=b.prevDelta||{},q=b.prevInput||{};(S.eventType===oe||q.eventType===Et)&&(V=b.prevDelta={x:q.deltaX||0,y:q.deltaY||0},O=b.offsetDelta={x:P.x,y:P.y}),S.deltaX=V.x+(P.x-O.x),S.deltaY=V.y+(P.y-O.y)}function Ga(b,S){var P=b.lastInterval||S,O=S.timeStamp-P.timeStamp,V,q,dt,$t;if(S.eventType!=he&&(O>we||P.velocity===s)){var jt=S.deltaX-P.deltaX,ee=S.deltaY-P.deltaY,je=as(O,jt,ee);q=je.x,dt=je.y,V=h(je.x)>h(je.y)?je.x:je.y,$t=ls(jt,ee),b.lastInterval=S}else V=P.velocity,q=P.velocityX,dt=P.velocityY,$t=P.direction;S.velocity=V,S.velocityX=q,S.velocityY=dt,S.direction=$t}function ni(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:On(S),deltaX:b.deltaX,deltaY:b.deltaY}}function On(b){var S=b.length;if(S===1)return{x:u(b[0].clientX),y:u(b[0].clientY)};for(var P=0,O=0,V=0;V<S;)P+=b[V].clientX,O+=b[V].clientY,V++;return{x:u(P/S),y:u(O/S)}}function as(b,S,P){return{x:S/b||0,y:P/b||0}}function ls(b,S){return b===S?An:h(b)>=h(S)?b<0?bn:ei:S<0?ae:cn}function ii(b,S,P){P||(P=to);var O=S[P[0]]-b[P[0]],V=S[P[1]]-b[P[1]];return Math.sqrt(O*O+V*V)}function Ai(b,S,P){P||(P=to);var O=S[P[0]]-b[P[0]],V=S[P[1]]-b[P[1]];return Math.atan2(V,O)*180/Math.PI}function Vs(b,S){return Ai(S[1],S[0],xn)+Ai(b[1],b[0],xn)}function $s(b,S){return ii(S[0],S[1],xn)/ii(b[0],b[1],xn)}var Gs={mousedown:oe,mousemove:Be,mouseup:Et},Ys="mousedown",Xs="mousemove mouseup";function cs(){this.evEl=Ys,this.evWin=Xs,this.pressed=!1,Dt.apply(this,arguments)}D(cs,Dt,{handler:function(S){var P=Gs[S.type];P&oe&&S.button===0&&(this.pressed=!0),P&Be&&S.which!==1&&(P=Et),this.pressed&&(P&Et&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:Ne,srcEvent:S}))}});var Ya={pointerdown:oe,pointermove:Be,pointerup:Et,pointercancel:he,pointerout:he},Xa={2:ve,3:In,4:Ne,5:Se},Ks="pointerdown",qs="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Ks="MSPointerDown",qs="MSPointerMove MSPointerUp MSPointerCancel");function js(){this.evEl=Ks,this.evWin=qs,Dt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}D(js,Dt,{handler:function(S){var P=this.store,O=!1,V=S.type.toLowerCase().replace("ms",""),q=Ya[V],dt=Xa[S.pointerType]||S.pointerType,$t=dt==ve,jt=st(P,S.pointerId,"pointerId");q&oe&&(S.button===0||$t)?jt<0&&(P.push(S),jt=P.length-1):q&(Et|he)&&(O=!0),!(jt<0)&&(P[jt]=S,this.callback(this.manager,q,{pointers:P,changedPointers:[S],pointerType:dt,srcEvent:S}),O&&P.splice(jt,1))}});var Ka={touchstart:oe,touchmove:Be,touchend:Et,touchcancel:he},qa="touchstart",ja="touchstart touchmove touchend touchcancel";function Zs(){this.evTarget=qa,this.evWin=ja,this.started=!1,Dt.apply(this,arguments)}D(Zs,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:ve,srcEvent:S})}}});function Za(b,S){var P=ut(b.touches),O=ut(b.changedTouches);return S&(Et|he)&&(P=Wt(P.concat(O),"identifier")),[P,O]}var Ja={touchstart:oe,touchmove:Be,touchend:Et,touchcancel:he},Qa="touchstart touchmove touchend touchcancel";function si(){this.evTarget=Qa,this.targetIds={},Dt.apply(this,arguments)}D(si,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:ve,srcEvent:S})}});function tl(b,S){var P=ut(b.touches),O=this.targetIds;if(S&(oe|Be)&&P.length===1)return O[P[0].identifier]=!0,[P,P];var V,q,dt=ut(b.changedTouches),$t=[],jt=this.target;if(q=P.filter(function(ee){return G(ee.target,jt)}),S===oe)for(V=0;V<q.length;)O[q[V].identifier]=!0,V++;for(V=0;V<dt.length;)O[dt[V].identifier]&&$t.push(dt[V]),S&(Et|he)&&delete O[dt[V].identifier],V++;if($t.length)return[Wt(q.concat($t),"identifier"),$t]}var Js=2500,eo=25;function Qs(){Dt.apply(this,arguments);var b=W(this.handler,this);this.touch=new si(this.manager,b),this.mouse=new cs(this.manager,b),this.primaryTouch=null,this.lastTouches=[]}D(Qs,Dt,{handler:function(S,P,O){var V=O.pointerType==ve,q=O.pointerType==Ne;if(!(q&&O.sourceCapabilities&&O.sourceCapabilities.firesTouchEvents)){if(V)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,V=function(){var q=O.indexOf(P);q>-1&&O.splice(q,1)};setTimeout(V,Js)}}function nl(b){for(var S=b.srcEvent.clientX,P=b.srcEvent.clientY,O=0;O<this.lastTouches.length;O++){var V=this.lastTouches[O],q=Math.abs(S-V.x),dt=Math.abs(P-V.y);if(q<=eo&&dt<=eo)return!0}return!1}var io=Ut(l.style,"touchAction"),so=io!==s,ro="compute",tr="auto",er="manipulation",Dn="none",Oi="pan-x",Di="pan-y",fs=il();function nr(b,S){this.manager=b,this.set(S)}nr.prototype={set:function(b){b==ro&&(b=this.compute()),so&&this.manager.element.style&&fs[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()))}),us(b.join(" "))},preventDefaults:function(b){var S=b.srcEvent,P=b.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var O=this.actions,V=J(O,Dn)&&!fs[Dn],q=J(O,Di)&&!fs[Di],dt=J(O,Oi)&&!fs[Oi];if(V){var $t=b.pointers.length===1,jt=b.distance<2,ee=b.deltaTime<250;if($t&&jt&&ee)return}if(!(dt&&q)&&(V||q&&P&Ke||dt&&P&le))return this.preventSrc(S)},preventSrc:function(b){this.manager.session.prevented=!0,b.preventDefault()}};function us(b){if(J(b,Dn))return Dn;var S=J(b,Oi),P=J(b,Di);return S&&P?Dn:S||P?S?Oi:Di:J(b,er)?er:tr}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 Rn=1,Me=2,ri=4,yn=8,qe=yn,oi=16,Fe=32;function fn(b){this.options=T({},this.defaults,b||{}),this.id=kt(),this.manager=null,this.options.enable=N(this.options.enable,!0),this.state=Rn,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=hs(b,this),S[b.id]||(S[b.id]=b,b.recognizeWith(this)),this},dropRecognizeWith:function(b){return _(b,"dropRecognizeWith",this)?this:(b=hs(b,this),delete this.simultaneous[b.id],this)},requireFailure:function(b){if(_(b,"requireFailure",this))return this;var S=this.requireFail;return b=hs(b,this),st(S,b)===-1&&(S.push(b),b.requireFailure(this)),this},dropRequireFailure:function(b){if(_(b,"dropRequireFailure",this))return this;b=hs(b,this);var S=st(this.requireFail,b);return S>-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(b){return!!this.simultaneous[b.id]},emit:function(b){var S=this,P=this.state;function O(V){S.manager.emit(V,b)}P<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=Fe},canEmit:function(){for(var b=0;b<this.requireFail.length;){if(!(this.requireFail[b].state&(Fe|Rn)))return!1;b++}return!0},recognize:function(b){var S=T({},b);if(!z(this.options.enable,[this,S])){this.reset(),this.state=Fe;return}this.state&(qe|oi|Fe)&&(this.state=Rn),this.state=this.process(S),this.state&(Me|ri|yn|oi)&&this.tryEmit(S)},process:function(b){},getTouchAction:function(){},reset:function(){}};function oo(b){return b&oi?"cancel":b&yn?"end":b&ri?"move":b&Me?"start":""}function ao(b){return b==cn?"down":b==ae?"up":b==bn?"left":b==ei?"right":""}function hs(b,S){var P=S.manager;return P?P.get(b):b}function Te(){fn.apply(this,arguments)}D(Te,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&(Me|ri),V=this.attrTest(b);return O&&(P&he||!V)?S|oi:O||V?P&Et?S|yn:S&Me?S|ri:Me:Fe}});function Ri(){Te.apply(this,arguments),this.pX=null,this.pY=null}D(Ri,Te,{defaults:{event:"pan",threshold:10,pointers:1,direction:Us},getTouchAction:function(){var b=this.options.direction,S=[];return b&Ke&&S.push(Di),b&le&&S.push(Oi),S},directionTest:function(b){var S=this.options,P=!0,O=b.distance,V=b.direction,q=b.deltaX,dt=b.deltaY;return V&S.direction||(S.direction&Ke?(V=q===0?An:q<0?bn:ei,P=q!=this.pX,O=Math.abs(b.deltaX)):(V=dt===0?An:dt<0?ae:cn,P=dt!=this.pY,O=Math.abs(b.deltaY))),b.direction=V,P&&O>S.threshold&&V&S.direction},attrTest:function(b){return Te.prototype.attrTest.call(this,b)&&(this.state&Me||!(this.state&Me)&&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 ds(){Te.apply(this,arguments)}D(ds,Te,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Dn]},attrTest:function(b){return this._super.attrTest.call(this,b)&&(Math.abs(b.scale-1)>this.options.threshold||this.state&Me)},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 Li(){fn.apply(this,arguments),this._timer=null,this._input=null}D(Li,fn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[tr]},process:function(b){var S=this.options,P=b.pointers.length===S.pointers,O=b.distance<S.threshold,V=b.deltaTime>S.time;if(this._input=b,!O||!P||b.eventType&(Et|he)&&!V)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 Fe},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 ir(){Te.apply(this,arguments)}D(ir,Te,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Dn]},attrTest:function(b){return this._super.attrTest.call(this,b)&&(Math.abs(b.rotation)>this.options.threshold||this.state&Me)}});function gs(){Te.apply(this,arguments)}D(gs,Te,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ke|le,pointers:1},getTouchAction:function(){return Ri.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 Ln(){fn.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}D(Ln,fn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[er]},process:function(b){var S=this.options,P=b.pointers.length===S.pointers,O=b.distance<S.threshold,V=b.deltaTime<S.time;if(this.reset(),b.eventType&oe&&this.count===0)return this.failTimeout();if(O&&V&&P){if(b.eventType!=Et)return this.failTimeout();var q=this.pTime?b.timeStamp-this.pTime<S.interval:!0,dt=!this.pCenter||ii(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 $t=this.count%S.taps;if($t===0)return this.hasRequireFailures()?(this._timer=m(function(){this.state=qe,this.tryEmit()},S.interval,this),Me):qe}return Fe},failTimeout:function(){return this._timer=m(function(){this.state=Fe},this.options.interval,this),Fe},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=N(S.recognizers,un.defaults.preset),new ms(b,S)}un.VERSION="2.0.7",un.defaults={domEvents:!1,touchAction:ro,enable:!0,inputTarget:null,inputClass:null,preset:[[ir,{enable:!1}],[ds,{enable:!1},["rotate"]],[gs,{direction:Ke}],[Ri,{direction:Ke},["swipe"]],[Ln],[Ln,{event:"doubletap",taps:2},["tap"]],[Li]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var sl=1,sr=2;function ms(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=Ei(this),this.touchAction=new nr(this,this.options.touchAction),ps(this,!0),v(this.options.recognizers,function(P){var O=this.add(new P[0](P[1]));P[2]&&O.recognizeWith(P[2]),P[3]&&O.requireFailure(P[3])},this)}ms.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?sr:sl},recognize:function(b){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(b);var P,O=this.recognizers,V=S.curRecognizer;(!V||V&&V.state&qe)&&(V=S.curRecognizer=null);for(var q=0;q<O.length;)P=O[q],S.stopped!==sr&&(!V||P==V||P.canRecognizeWith(V))?P.recognize(b):P.reset(),!V&&P.state&(Me|ri|yn)&&(V=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=st(S,b);P!==-1&&(S.splice(P,1),this.touchAction.update())}return this},on:function(b,S){if(b!==s&&S!==s){var P=this.handlers;return v(rt(b),function(O){P[O]=P[O]||[],P[O].push(S)}),this}},off:function(b,S){if(b!==s){var P=this.handlers;return v(rt(b),function(O){S?P[O]&&P[O].splice(st(P[O],S),1):delete P[O]}),this}},emit:function(b,S){this.options.domEvents&&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&&ps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ps(b,S){var P=b.element;if(P.style){var O;v(b.options.cssProps,function(V,q){O=Ut(P.style,q),S?(b.oldCssProps[O]=P.style[O],P.style[O]=V):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:Be,INPUT_END:Et,INPUT_CANCEL:he,STATE_POSSIBLE:Rn,STATE_BEGAN:Me,STATE_CHANGED:ri,STATE_ENDED:yn,STATE_RECOGNIZED:qe,STATE_CANCELLED:oi,STATE_FAILED:Fe,DIRECTION_NONE:An,DIRECTION_LEFT:bn,DIRECTION_RIGHT:ei,DIRECTION_UP:ae,DIRECTION_DOWN:cn,DIRECTION_HORIZONTAL:Ke,DIRECTION_VERTICAL:le,DIRECTION_ALL:Us,Manager:ms,Input:Dt,TouchAction:nr,TouchInput:si,MouseInput:cs,PointerEventInput:js,TouchMouseInput:Qs,SingleTouchInput:Zs,Recognizer:fn,AttrRecognizer:Te,Tap:Ln,Pan:Ri,Swipe:gs,Pinch:ds,Rotate:ir,Press:Li,on:Y,off:$,each:v,merge:A,extend:C,assign:T,inherit:D,bindFn:W,prefixed:Ut});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 ET=CT();const Br=xg(ET);/*!
25
+ * chartjs-plugin-zoom v2.0.1
26
+ * undefined
27
+ * (c) 2016-2023 chartjs-plugin-zoom Contributors
28
+ * Released under the MIT License
29
+ */const Kr=t=>t&&t.enabled&&t.modifierKey,pm=(t,e)=>t&&e[t+"Key"],gf=(t,e)=>t&&!e[t+"Key"];function Pi(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 IT(t,e){let n;return function(){return clearTimeout(n),n=setTimeout(t,e),e}}function AT({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 _m(t,e,n){const{mode:i="xy",scaleMode:s,overScaleMode:o}=t||{},l=AT(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 Kt(t){let e=zc.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{}},zc.set(t,e)),e}function OT(t){zc.delete(t)}function bm(t,e,n){const i=t.max-t.min,s=i*(e-1),o=t.isHorizontal()?n.x:n.y,l=Math.max(0,Math.min(1,(t.getValueForPixel(o)-t.min)/i||0)),c=1-l;return{min:s*l,max:s*c}}function Qd(t,e,n,i,s){let o=n[i];if(o==="original"){const l=t.originalScaleLimits[e.id][i];o=ct(l.options,l.scale)}return ct(o,s)}function DT(t,e,n){const i=t.getValueForPixel(e),s=t.getValueForPixel(n);return{min:Math.min(i,s),max:Math.max(i,s)}}function Ws(t,{min:e,max:n},i,s=!1){const o=Kt(t.chart),{id:l,axis:c,options:u}=t,h=i&&(i[l]||i[c])||{},{minRange:d=0}=h,m=Qd(o,t,h,"min",-1/0),_=Qd(o,t,h,"max",1/0),v=s?Math.max(n-e,d):t.max-t.min,M=(v-n+e)/2;return e-=M,n+=M,e<m?(e=m,n=Math.min(m+v,_)):n>_&&(n=_,e=Math.max(_-v,m)),u.min=e,u.max=n,o.updatedScaleLimits[t.id]={min:e,max:n},t.parse(e)!==t.min||t.parse(n)!==t.max}function RT(t,e,n,i){const s=bm(t,e,n),o={min:t.min+s.min,max:t.max-s.max};return Ws(t,o,i,!0)}function LT(t,e,n,i){Ws(t,DT(t,e,n),i,!0)}const tg=t=>t===0||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);function NT(t){const n=t.getLabels().length-1;t.min>0&&(t.min-=1),t.max<n&&(t.max+=1)}function BT(t,e,n,i){const s=bm(t,e,n);t.min===t.max&&e<1&&NT(t);const o={min:t.min+tg(s.min),max:t.max-tg(s.max)};return Ws(t,o,i,!0)}function FT(t){return t.isHorizontal()?t.width:t.height}function WT(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(FT(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),Ws(t,{min:o,max:l},n)||d}const zT={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 xm(t,e,n,i=!1){const{min:s,max:o,options:l}=t,c=l.time&&l.time.round,u=zT[c]||0,h=t.getValueForPixel(t.getPixelForValue(s+u)-e),d=t.getValueForPixel(t.getPixelForValue(o+u)-e),{min:m=-1/0,max:_=1/0}=i&&n&&n[t.axis]||{};return isNaN(h)||isNaN(d)||h<m||d>_?!0:Ws(t,{min:h,max:d},n,i)}function eg(t,e,n){return xm(t,e,n,!0)}const Hc={category:BT,default:RT},Uc={default:LT},Vc={category:WT,default:xm,logarithmic:eg,timeseries:eg};function HT(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 ng(t,e){pt(t,(n,i)=>{e[i]||delete t[i]})}function zs(t,e){const{scales:n}=t,{originalScaleLimits:i,updatedScaleLimits:s}=e;return pt(n,function(o){HT(o,i,s)&&(i[o.id]={min:{scale:o.min,options:o.options.min},max:{scale:o.max,options:o.options.max}})}),ng(i,n),ng(s,n),i}function ig(t,e,n,i){const s=Hc[t.type]||Hc.default;ot(s,[t,e,n,i])}function sg(t,e,n,i,s){const o=Uc[t.type]||Uc.default;ot(o,[t,e,n,i,s])}function UT(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function mf(t,e,n="none"){const{x:i=1,y:s=1,focalPoint:o=UT(t)}=typeof e=="number"?{x:e,y:e}:e,l=Kt(t),{options:{limits:c,zoom:u}}=l;zs(t,l);const h=i!==1,d=s!==1,m=_m(u,o,t);pt(m||t.scales,function(_){_.isHorizontal()&&h?ig(_,i,o,c):!_.isHorizontal()&&d&&ig(_,s,o,c)}),t.update(n),ot(u.onZoom,[{chart:t}])}function ym(t,e,n,i="none"){const s=Kt(t),{options:{limits:o,zoom:l}}=s,{mode:c="xy"}=l;zs(t,s);const u=Pi(c,"x",t),h=Pi(c,"y",t);pt(t.scales,function(d){d.isHorizontal()&&u?sg(d,e.x,n.x,o):!d.isHorizontal()&&h&&sg(d,e.y,n.y,o)}),t.update(i),ot(l.onZoom,[{chart:t}])}function VT(t,e,n,i="none"){zs(t,Kt(t));const s=t.scales[e];Ws(s,n,void 0,!0),t.update(i)}function $T(t,e="default"){const n=Kt(t),i=zs(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)}),t.update(e),ot(n.options.zoom.onZoomComplete,[{chart:t}])}function GT(t,e){const n=t.originalScaleLimits[e];if(!n)return;const{min:i,max:s}=n;return ct(s.options,s.scale)-ct(i.options,i.scale)}function YT(t){const e=Kt(t);let n=1,i=1;return pt(t.scales,function(s){const o=GT(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 rg(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 vm(t,e,n,i="none"){const{x:s=0,y:o=0}=typeof e=="number"?{x:e,y:e}:e,l=Kt(t),{options:{pan:c,limits:u}}=l,{onPan:h}=c||{};zs(t,l);const d=s!==0,m=o!==0;pt(n||t.scales,function(_){_.isHorizontal()&&d?rg(_,s,u,l):!_.isHorizontal()&&m&&rg(_,o,u,l)}),t.update(i),ot(h,[{chart:t}])}function Sm(t){const e=Kt(t);zs(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 XT(t){const e=Sm(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 De(t,e){const{handlers:n}=Kt(t),i=n[e];i&&i.target&&(i.target.removeEventListener(e,i),delete n[e])}function Fr(t,e,n,i){const{handlers:s,options:o}=Kt(t),l=s[n];l&&l.target===e||(De(t,n),s[n]=c=>i(t,c,o),s[n].target=e,e.addEventListener(n,s[n]))}function KT(t,e){const n=Kt(t);n.dragStart&&(n.dragging=!0,n.dragEnd=e,t.update("none"))}function qT(t,e){const n=Kt(t);!n.dragStart||e.key!=="Escape"||(De(t,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,t.update("none"))}function wm(t,e,n){const{onZoomStart:i,onZoomRejected:s}=n;if(i){const o=kn(e,t);if(ot(i,[{chart:t,event:e,point:o}])===!1)return ot(s,[{chart:t,event:e}]),!1}}function jT(t,e){const n=Kt(t),{pan:i,zoom:s={}}=n.options;if(e.button!==0||pm(Kr(i),e)||gf(Kr(s.drag),e))return ot(s.onZoomRejected,[{chart:t,event:e}]);wm(t,e,s)!==!1&&(n.dragStart=e,Fr(t,t.canvas,"mousemove",KT),Fr(t,window.document,"keydown",qT))}function Mm(t,e,n,i){const s=Pi(e,"x",t),o=Pi(e,"y",t);let{top:l,left:c,right:u,bottom:h,width:d,height:m}=t.chartArea;const _=kn(n,t),v=kn(i,t);s&&(c=Math.min(_.x,v.x),u=Math.max(_.x,v.x)),o&&(l=Math.min(_.y,v.y),h=Math.max(_.y,v.y));const M=u-c,T=h-l;return{left:c,top:l,right:u,bottom:h,width:M,height:T,zoomX:s&&M?1+(d-M)/d:1,zoomY:o&&T?1+(m-T)/m:1}}function ZT(t,e){const n=Kt(t);if(!n.dragStart)return;De(t,"mousemove");const{mode:i,onZoomComplete:s,drag:{threshold:o=0}}=n.options.zoom,l=Mm(t,i,n.dragStart,e),c=Pi(i,"x",t)?l.width:0,u=Pi(i,"y",t)?l.height:0,h=Math.sqrt(c*c+u*u);if(n.dragStart=n.dragEnd=null,h<=o){n.dragging=!1,t.update("none");return}ym(t,{x:l.left,y:l.top},{x:l.right,y:l.bottom},"zoom"),setTimeout(()=>n.dragging=!1,500),ot(s,[{chart:t}])}function JT(t,e,n){if(gf(Kr(n.wheel),e)){ot(n.onZoomRejected,[{chart:t,event:e}]);return}if(wm(t,e,n)!==!1&&(e.cancelable&&e.preventDefault(),e.deltaY!==void 0))return!0}function QT(t,e){const{handlers:{onZoomComplete:n},options:{zoom:i}}=Kt(t);if(!JT(t,e,i))return;const s=e.target.getBoundingClientRect(),o=1+(e.deltaY>=0?-i.wheel.speed:i.wheel.speed),l={x:o,y:o,focalPoint:{x:e.clientX-s.left,y:e.clientY-s.top}};mf(t,l),n&&n()}function t2(t,e,n,i){n&&(Kt(t).handlers[e]=IT(()=>ot(n,[{chart:t}]),i))}function e2(t,e){const n=t.canvas,{wheel:i,drag:s,onZoomComplete:o}=e.zoom;i.enabled?(Fr(t,n,"wheel",QT),t2(t,"onZoomComplete",o,250)):De(t,"wheel"),s.enabled?(Fr(t,n,"mousedown",jT),Fr(t,n.ownerDocument,"mouseup",ZT)):(De(t,"mousedown"),De(t,"mousemove"),De(t,"mouseup"),De(t,"keydown"))}function n2(t){De(t,"mousedown"),De(t,"mousemove"),De(t,"mouseup"),De(t,"wheel"),De(t,"click"),De(t,"keydown")}function i2(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"&&(gf(Kr(s),l)||pm(Kr(o.drag),l))?(ot(s.onPanRejected,[{chart:t,event:i}]),!1):!0}}function s2(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 Tm(t,e,n){if(e.scale){const{center:i,pointers:s}=n,o=1/e.scale*n.scale,l=n.target.getBoundingClientRect(),c=s2(s[0],s[1]),u=e.options.zoom.mode,h={x:c.x&&Pi(u,"x",t)?o:1,y:c.y&&Pi(u,"y",t)?o:1,focalPoint:{x:i.x-l.left,y:i.y-l.top}};mf(t,h),e.scale=n.scale}}function r2(t,e){e.options.zoom.pinch.enabled&&(e.scale=1)}function o2(t,e,n){e.scale&&(Tm(t,e,n),e.scale=null,ot(e.options.zoom.onZoomComplete,[{chart:t}]))}function Pm(t,e,n){const i=e.delta;i&&(e.panning=!0,vm(t,{x:n.deltaX-i.x,y:n.deltaY-i.y},e.panScales),e.delta={x:n.deltaX,y:n.deltaY})}function a2(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=_m(e.options.pan,c,t),e.delta={x:0,y:0},clearTimeout(e.panEndTimeout),Pm(t,e,n)}function l2(t,e){e.delta=null,e.panning&&(e.panEndTimeout=setTimeout(()=>e.panning=!1,500),ot(e.options.pan.onPanComplete,[{chart:t}]))}const $c=new WeakMap;function c2(t,e){const n=Kt(t),i=t.canvas,{pan:s,zoom:o}=e,l=new Br.Manager(i);o&&o.pinch.enabled&&(l.add(new Br.Pinch),l.on("pinchstart",()=>r2(t,n)),l.on("pinch",c=>Tm(t,n,c)),l.on("pinchend",c=>o2(t,n,c))),s&&s.enabled&&(l.add(new Br.Pan({threshold:s.threshold,enable:i2(t,n)})),l.on("panstart",c=>a2(t,n,c)),l.on("panmove",c=>Pm(t,n,c)),l.on("panend",()=>l2(t,n))),$c.set(t,l)}function f2(t){const e=$c.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),$c.delete(t))}var u2="2.0.1";function ca(t,e,n){const i=n.zoom.drag,{dragStart:s,dragEnd:o}=Kt(t);if(i.drawTime!==e||!o)return;const{left:l,top:c,width:u,height:h}=Mm(t,n.zoom.mode,s,o),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 kk={id:"zoom",version:u2,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=Kt(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)."),Br&&c2(t,n),t.pan=(s,o,l)=>vm(t,s,o,l),t.zoom=(s,o)=>mf(t,s,o),t.zoomRect=(s,o,l)=>ym(t,s,o,l),t.zoomScale=(s,o,l)=>VT(t,s,o,l),t.resetZoom=s=>$T(t,s),t.getZoomLevel=()=>YT(t),t.getInitialScaleBounds=()=>Sm(t),t.isZoomedOrPanned=()=>XT(t)},beforeEvent(t){const e=Kt(t);if(e.panning||e.dragging)return!1},beforeUpdate:function(t,e,n){const i=Kt(t);i.options=n,e2(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){n2(t),Br&&f2(t),OT(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 og=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}(),Wr={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*og)/og}};function kc(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 h2(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 d2=0,km=1,Cm=2,Em=4,Im=8;function fa(t,e,n){var i=d2;return t<n.left?i|=km:t>n.right&&(i|=Cm),e<n.top?i|=Im:e>n.bottom&&(i|=Em),i}function g2(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&Im?(h=n+(s-n)*(e.top-i)/(o-i),d=e.top):u&Em?(h=n+(s-n)*(e.bottom-i)/(o-i),d=e.bottom):u&Cm?(d=i+(o-i)*(e.right-n)/(s-n),h=e.right):u&km&&(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=g2(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),h2(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=kc(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=kc(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=kc(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)}},ti=Wr.rasterize;function m2(t){var e=t.borderWidth||0,n=t.padding,i=t.size.height,s=t.size.width,o=-s/2,l=-i/2;return{frame:{x:o-n.left-e,y:l-n.top-e,w:s+n.width+e*2,h:i+n.height+e*2},text:{x:o,y:l,w:s,h:i}}}function p2(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var i=n.getBasePixel();return t.horizontal?{x:i,y:null}:{x:null,y:i}}function _2(t){return t instanceof Ir?ha.arc:t instanceof wa?ha.point:t instanceof Ma?ha.bar:ha.fallback}function b2(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 x2(t,e,n){var i=n.backgroundColor,s=n.borderColor,o=n.borderWidth;!i&&(!s||!o)||(t.beginPath(),b2(t,ti(e.x)+o/2,ti(e.y)+o/2,ti(e.w)-o,ti(e.h)-o,n.borderRadius),t.closePath(),i&&(t.fillStyle=i,t.fill()),s&&o&&(t.strokeStyle=s,t.lineWidth=o,t.lineJoin="miter",t.stroke()))}function y2(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 v2(t,e,n){var i=t.shadowBlur,s=n.stroked,o=ti(n.x),l=ti(n.y),c=ti(n.w);s&&t.strokeText(e,o,l,c),n.filled&&(i&&s&&(t.shadowBlur=0),t.fillText(e,o,l,c),i&&s&&(t.shadowBlur=i))}function S2(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=y2(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;++_)v2(t,e[_],{stroked:m,filled:l,w:n.w,x:n.x,y:n.y+n.h*_})}var Am=function(t,e,n,i){var s=this;s._config=t,s._index=i,s._model=null,s._rects=null,s._ctx=e,s._el=n};Cn(Am.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:p2(s._el,i),padding:Ye(Nt([n.padding,4],i,o)),positioner:_2(s._el),rotation:Nt([n.rotation,0],i,o)*(Math.PI/180),size:Wr.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=ct(ot(o.formatter,[l,t]),l),u=yt(c)?[]:Wr.toTextLines(c),u.length&&(n=e._modelize(h,u,o,t),i=m2(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=Wr.bound(0,s.opacity,1),i.translate(ti(e.x),ti(e.y)),i.rotate(s.rotation),x2(i,o.frame,s),S2(i,s.lines,o.text,s),i.restore())}});var w2=Number.MIN_SAFE_INTEGER||-9007199254740991,M2=Number.MAX_SAFE_INTEGER||9007199254740991;function Tr(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 ag(t,e){var n=M2,i=w2,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 Om=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Cn(Om.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=Tr(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=ag(e,i[s]),l=ag(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[Tr({x:e.x,y:e.y},i,n),Tr({x:e.x+e.w,y:e.y},i,n),Tr({x:e.x+e.w,y:e.y+e.h},i,n),Tr({x:e.x,y:e.y+e.h},i,n)]}});function Dm(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 T2(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 P2(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=Dm(c,i.model(),o),s._box.update(l,o,i.rotation()));return T2(t,function(u,h){var d=u._hidable,m=h._hidable;d&&m||m?h._visible=!1:d&&(u._visible=!1)})}var zr={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 Om,_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&&P2(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=Dm(s._el,s.model(),l),o._box.update(c,l,s.rotation()),s.draw(t,c))}},k2=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},C2={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:k2,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},Ae="$datalabels",Rm="$default";function E2(t,e){var n=t.datalabels,i={},s=[],o,l;return n===!1?null:(n===!0&&(n={}),e=Cn({},[e,n]),o=e.labels||{},l=Object.keys(o),delete e.labels,l.length?l.forEach(function(c){o[c]&&s.push(Cn({},[e,o[c],{_key:c}]))}):s.push(e),i=s.reduce(function(c,u){return pt(u.listeners||{},function(h,d){c[d]=c[d]||{},c[d][u._key||Rm]=h}),delete u.listeners,c},{}),{labels:s,listeners:i})}function Gc(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[Ae]._dirty=!0,n.update(s)))}}function I2(t,e,n,i,s){var o,l;!n&&!i||(n?i?n!==i&&(l=o=!0):l=!0:o=!0,l&&Gc(t,e.leave,n,s),o&&Gc(t,e.enter,i,s))}function A2(t,e){var n=t[Ae],i=n._listeners,s,o;if(!(!i.enter&&!i.leave)){if(e.type==="mousemove")o=zr.lookup(n._labels,e);else if(e.type!=="mouseout")return;s=n._hovered,n._hovered=o,I2(t,i,s,o,e)}}function O2(t,e){var n=t[Ae],i=n._listeners.click,s=i&&zr.lookup(n._labels,e);s&&Gc(t,i,s,e)}var Ck={id:"datalabels",defaults:C2,beforeInit:function(t){t[Ae]={_actives:[]}},beforeUpdate:function(t){var e=t[Ae];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var i=e.index,s=t[Ae],o=s._datasets[i]=[],l=t.isDatasetVisible(i),c=t.data.datasets[i],u=E2(c,n),h=e.meta.data||[],d=t.ctx,m,_,v,M,T,C,A,D;for(d.save(),m=0,v=h.length;m<v;++m)if(A=h[m],A[Ae]=[],l&&A&&t.getDataVisibility(m)&&!A.skip)for(_=0,M=u.labels.length;_<M;++_)T=u.labels[_],C=T._key,D=new Am(T,d,A,m),D.$groups={_set:i,_key:C||Rm},D.$context={active:!1,chart:t,dataIndex:m,dataset:c,datasetIndex:i},D.update(D.$context),A[Ae].push(D),o.push(D);d.restore(),Cn(s._listeners,u.listeners,{merger:function(W,z,N){z[W]=z[W]||{},z[W][e.index]=N[W],s._listened=!0}})},afterUpdate:function(t){t[Ae]._labels=zr.prepare(t[Ae]._datasets)},afterDatasetsDraw:function(t){zr.draw(t,t[Ae]._labels)},beforeEvent:function(t,e){if(t[Ae]._listened){var n=e.event;switch(n.type){case"mousemove":case"mouseout":A2(t,n);break;case"click":O2(t,n);break}}},afterEvent:function(t){var e=t[Ae],n=e._actives,i=e._actives=t.getActiveElements(),s=Wr.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[Ae]||[],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)&&(zr.update(e._labels),t.render()),delete e._dirty}},Or={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 D2=Or.exports,lg;function R2(){return lg||(lg=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,C=1,A=2,D=4,W=8,z=16,N=32,Y=64,$=128,G=256,J=512,rt=30,st="...",ut=800,Wt=16,Ut=1,St=2,kt=3,Tt=1/0,qt=9007199254740991,Vt=17976931348623157e292,Le=NaN,re=4294967295,ve=re-1,In=re>>>1,Ne=[["ary",$],["bind",C],["bindKey",A],["curry",W],["curryRight",z],["flip",J],["partial",N],["partialRight",Y],["rearg",G]],Se="[object Arguments]",we="[object Array]",oe="[object AsyncFunction]",Be="[object Boolean]",Et="[object Date]",he="[object DOMException]",An="[object Error]",bn="[object Function]",ei="[object GeneratorFunction]",ae="[object Map]",cn="[object Number]",Ke="[object Null]",le="[object Object]",Us="[object Promise]",to="[object Proxy]",xn="[object RegExp]",Dt="[object Set]",Ei="[object String]",os="[object Symbol]",$a="[object Undefined]",Ii="[object WeakMap]",Ga="[object WeakSet]",ni="[object ArrayBuffer]",On="[object DataView]",as="[object Float32Array]",ls="[object Float64Array]",ii="[object Int8Array]",Ai="[object Int16Array]",Vs="[object Int32Array]",$s="[object Uint8Array]",Gs="[object Uint8ClampedArray]",Ys="[object Uint16Array]",Xs="[object Uint32Array]",cs=/\b__p \+= '';/g,Ya=/\b(__p \+=) '' \+/g,Xa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ks=/&(?:amp|lt|gt|quot|#39);/g,qs=/[&<>"']/g,js=RegExp(Ks.source),Ka=RegExp(qs.source),qa=/<%-([\s\S]+?)%>/g,ja=/<%([\s\S]+?)%>/g,Zs=/<%=([\s\S]+?)%>/g,Za=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ja=/^\w*$/,Qa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,si=/[\\^$.*+?()[\]{}|]/g,tl=RegExp(si.source),Js=/^\s+/,eo=/\s/,Qs=/\{(?:\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,tr=/\w*$/,er=/^[-+]0x[0-9a-f]+$/i,Dn=/^0b[01]+$/i,Oi=/^\[object .+?Constructor\]$/,Di=/^0o[0-7]+$/i,fs=/^(?:0|[1-9]\d*)$/,nr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,us=/($^)/,il=/['\n\r\u2028\u2029\\]/g,Rn="\\ud800-\\udfff",Me="\\u0300-\\u036f",ri="\\ufe20-\\ufe2f",yn="\\u20d0-\\u20ff",qe=Me+ri+yn,oi="\\u2700-\\u27bf",Fe="a-z\\xdf-\\xf6\\xf8-\\xff",fn="\\xac\\xb1\\xd7\\xf7",oo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ao="\\u2000-\\u206f",hs=" \\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",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Ri="\\ufe0e\\ufe0f",ds=fn+oo+ao+hs,Li="['’]",ir="["+Rn+"]",gs="["+ds+"]",Ln="["+qe+"]",un="\\d+",sl="["+oi+"]",sr="["+Fe+"]",ms="[^"+Rn+ds+un+oi+Fe+Te+"]",ps="\\ud83c[\\udffb-\\udfff]",rl="(?:"+Ln+"|"+ps+")",lo="[^"+Rn+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",P="["+Te+"]",O="\\u200d",V="(?:"+sr+"|"+ms+")",q="(?:"+P+"|"+ms+")",dt="(?:"+Li+"(?:d|ll|m|re|s|t|ve))?",$t="(?:"+Li+"(?:D|LL|M|RE|S|T|VE))?",jt=rl+"?",ee="["+Ri+"]?",je="(?:"+O+"(?:"+[lo,b,S].join("|")+")"+ee+jt+")*",Jm="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",yf=ee+jt+je,tp="(?:"+[sl,b,S].join("|")+")"+yf,ep="(?:"+[lo+Ln+"?",Ln,b,S,ir].join("|")+")",np=RegExp(Li,"g"),ip=RegExp(Ln,"g"),ol=RegExp(ps+"(?="+ps+")|"+ep+yf,"g"),sp=RegExp([P+"?"+sr+"+"+dt+"(?="+[gs,P,"$"].join("|")+")",q+"+"+$t+"(?="+[gs,P+V,"$"].join("|")+")",P+"?"+V+"+"+dt,P+"+"+$t,Qm,Jm,un,tp].join("|"),"g"),rp=RegExp("["+O+Rn+qe+Ri+"]"),op=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ap=["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"],lp=-1,Ot={};Ot[as]=Ot[ls]=Ot[ii]=Ot[Ai]=Ot[Vs]=Ot[$s]=Ot[Gs]=Ot[Ys]=Ot[Xs]=!0,Ot[Se]=Ot[we]=Ot[ni]=Ot[Be]=Ot[On]=Ot[Et]=Ot[An]=Ot[bn]=Ot[ae]=Ot[cn]=Ot[le]=Ot[xn]=Ot[Dt]=Ot[Ei]=Ot[Ii]=!1;var It={};It[Se]=It[we]=It[ni]=It[On]=It[Be]=It[Et]=It[as]=It[ls]=It[ii]=It[Ai]=It[Vs]=It[ae]=It[cn]=It[le]=It[xn]=It[Dt]=It[Ei]=It[os]=It[$s]=It[Gs]=It[Ys]=It[Xs]=!0,It[An]=It[bn]=It[Ii]=!1;var cp={À:"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"},fp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},up={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},hp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dp=parseFloat,gp=parseInt,vf=typeof qo=="object"&&qo&&qo.Object===Object&&qo,mp=typeof self=="object"&&self&&self.Object===Object&&self,ce=vf||mp||Function("return this")(),al=e&&!e.nodeType&&e,Ni=al&&!0&&t&&!t.nodeType&&t,Sf=Ni&&Ni.exports===al,ll=Sf&&vf.process,Ze=function(){try{var E=Ni&&Ni.require&&Ni.require("util").types;return E||ll&&ll.binding&&ll.binding("util")}catch{}}(),wf=Ze&&Ze.isArrayBuffer,Mf=Ze&&Ze.isDate,Tf=Ze&&Ze.isMap,Pf=Ze&&Ze.isRegExp,kf=Ze&&Ze.isSet,Cf=Ze&&Ze.isTypedArray;function We(E,L,R){switch(R.length){case 0:return E.call(L);case 1:return E.call(L,R[0]);case 2:return E.call(L,R[0],R[1]);case 3:return E.call(L,R[0],R[1],R[2])}return E.apply(L,R)}function pp(E,L,R,Z){for(var at=-1,wt=E==null?0:E.length;++at<wt;){var Jt=E[at];L(Z,Jt,R(Jt),E)}return Z}function Je(E,L){for(var R=-1,Z=E==null?0:E.length;++R<Z&&L(E[R],R,E)!==!1;);return E}function _p(E,L){for(var R=E==null?0:E.length;R--&&L(E[R],R,E)!==!1;);return E}function Ef(E,L){for(var R=-1,Z=E==null?0:E.length;++R<Z;)if(!L(E[R],R,E))return!1;return!0}function ai(E,L){for(var R=-1,Z=E==null?0:E.length,at=0,wt=[];++R<Z;){var Jt=E[R];L(Jt,R,E)&&(wt[at++]=Jt)}return wt}function co(E,L){var R=E==null?0:E.length;return!!R&&_s(E,L,0)>-1}function cl(E,L,R){for(var Z=-1,at=E==null?0:E.length;++Z<at;)if(R(L,E[Z]))return!0;return!1}function Rt(E,L){for(var R=-1,Z=E==null?0:E.length,at=Array(Z);++R<Z;)at[R]=L(E[R],R,E);return at}function li(E,L){for(var R=-1,Z=L.length,at=E.length;++R<Z;)E[at+R]=L[R];return E}function fl(E,L,R,Z){var at=-1,wt=E==null?0:E.length;for(Z&&wt&&(R=E[++at]);++at<wt;)R=L(R,E[at],at,E);return R}function bp(E,L,R,Z){var at=E==null?0:E.length;for(Z&&at&&(R=E[--at]);at--;)R=L(R,E[at],at,E);return R}function ul(E,L){for(var R=-1,Z=E==null?0:E.length;++R<Z;)if(L(E[R],R,E))return!0;return!1}var xp=hl("length");function yp(E){return E.split("")}function vp(E){return E.match(nl)||[]}function If(E,L,R){var Z;return R(E,function(at,wt,Jt){if(L(at,wt,Jt))return Z=wt,!1}),Z}function fo(E,L,R,Z){for(var at=E.length,wt=R+(Z?1:-1);Z?wt--:++wt<at;)if(L(E[wt],wt,E))return wt;return-1}function _s(E,L,R){return L===L?Dp(E,L,R):fo(E,Af,R)}function Sp(E,L,R,Z){for(var at=R-1,wt=E.length;++at<wt;)if(Z(E[at],L))return at;return-1}function Af(E){return E!==E}function Of(E,L){var R=E==null?0:E.length;return R?gl(E,L)/R:Le}function hl(E){return function(L){return L==null?n:L[E]}}function dl(E){return function(L){return E==null?n:E[L]}}function Df(E,L,R,Z,at){return at(E,function(wt,Jt,Ct){R=Z?(Z=!1,wt):L(R,wt,Jt,Ct)}),R}function wp(E,L){var R=E.length;for(E.sort(L);R--;)E[R]=E[R].value;return E}function gl(E,L){for(var R,Z=-1,at=E.length;++Z<at;){var wt=L(E[Z]);wt!==n&&(R=R===n?wt:R+wt)}return R}function ml(E,L){for(var R=-1,Z=Array(E);++R<E;)Z[R]=L(R);return Z}function Mp(E,L){return Rt(L,function(R){return[R,E[R]]})}function Rf(E){return E&&E.slice(0,Ff(E)+1).replace(Js,"")}function ze(E){return function(L){return E(L)}}function pl(E,L){return Rt(L,function(R){return E[R]})}function rr(E,L){return E.has(L)}function Lf(E,L){for(var R=-1,Z=E.length;++R<Z&&_s(L,E[R],0)>-1;);return R}function Nf(E,L){for(var R=E.length;R--&&_s(L,E[R],0)>-1;);return R}function Tp(E,L){for(var R=E.length,Z=0;R--;)E[R]===L&&++Z;return Z}var Pp=dl(cp),kp=dl(fp);function Cp(E){return"\\"+hp[E]}function Ep(E,L){return E==null?n:E[L]}function bs(E){return rp.test(E)}function Ip(E){return op.test(E)}function Ap(E){for(var L,R=[];!(L=E.next()).done;)R.push(L.value);return R}function _l(E){var L=-1,R=Array(E.size);return E.forEach(function(Z,at){R[++L]=[at,Z]}),R}function Bf(E,L){return function(R){return E(L(R))}}function ci(E,L){for(var R=-1,Z=E.length,at=0,wt=[];++R<Z;){var Jt=E[R];(Jt===L||Jt===d)&&(E[R]=d,wt[at++]=R)}return wt}function uo(E){var L=-1,R=Array(E.size);return E.forEach(function(Z){R[++L]=Z}),R}function Op(E){var L=-1,R=Array(E.size);return E.forEach(function(Z){R[++L]=[Z,Z]}),R}function Dp(E,L,R){for(var Z=R-1,at=E.length;++Z<at;)if(E[Z]===L)return Z;return-1}function Rp(E,L,R){for(var Z=R+1;Z--;)if(E[Z]===L)return Z;return Z}function xs(E){return bs(E)?Np(E):xp(E)}function hn(E){return bs(E)?Bp(E):yp(E)}function Ff(E){for(var L=E.length;L--&&eo.test(E.charAt(L)););return L}var Lp=dl(up);function Np(E){for(var L=ol.lastIndex=0;ol.test(E);)++L;return L}function Bp(E){return E.match(ol)||[]}function Fp(E){return E.match(sp)||[]}var Wp=function E(L){L=L==null?ce:ys.defaults(ce.Object(),L,ys.pick(ce,ap));var R=L.Array,Z=L.Date,at=L.Error,wt=L.Function,Jt=L.Math,Ct=L.Object,bl=L.RegExp,zp=L.String,Qe=L.TypeError,ho=R.prototype,Hp=wt.prototype,vs=Ct.prototype,go=L["__core-js_shared__"],mo=Hp.toString,Pt=vs.hasOwnProperty,Up=0,Wf=function(){var r=/[^.]+$/.exec(go&&go.keys&&go.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),po=vs.toString,Vp=mo.call(Ct),$p=ce._,Gp=bl("^"+mo.call(Pt).replace(si,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_o=Sf?L.Buffer:n,fi=L.Symbol,bo=L.Uint8Array,zf=_o?_o.allocUnsafe:n,xo=Bf(Ct.getPrototypeOf,Ct),Hf=Ct.create,Uf=vs.propertyIsEnumerable,yo=ho.splice,Vf=fi?fi.isConcatSpreadable:n,or=fi?fi.iterator:n,Bi=fi?fi.toStringTag:n,vo=function(){try{var r=Ui(Ct,"defineProperty");return r({},"",{}),r}catch{}}(),Yp=L.clearTimeout!==ce.clearTimeout&&L.clearTimeout,Xp=Z&&Z.now!==ce.Date.now&&Z.now,Kp=L.setTimeout!==ce.setTimeout&&L.setTimeout,So=Jt.ceil,wo=Jt.floor,xl=Ct.getOwnPropertySymbols,qp=_o?_o.isBuffer:n,$f=L.isFinite,jp=ho.join,Zp=Bf(Ct.keys,Ct),Qt=Jt.max,de=Jt.min,Jp=Z.now,Qp=L.parseInt,Gf=Jt.random,t0=ho.reverse,yl=Ui(L,"DataView"),ar=Ui(L,"Map"),vl=Ui(L,"Promise"),Ss=Ui(L,"Set"),lr=Ui(L,"WeakMap"),cr=Ui(Ct,"create"),Mo=lr&&new lr,ws={},e0=Vi(yl),n0=Vi(ar),i0=Vi(vl),s0=Vi(Ss),r0=Vi(lr),To=fi?fi.prototype:n,fr=To?To.valueOf:n,Yf=To?To.toString:n;function x(r){if(zt(r)&&!lt(r)&&!(r instanceof xt)){if(r instanceof tn)return r;if(Pt.call(r,"__wrapped__"))return Xu(r)}return new tn(r)}var Ms=function(){function r(){}return function(a){if(!Bt(a))return{};if(Hf)return Hf(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:Zs,variable:"",imports:{_:x}},x.prototype=Po.prototype,x.prototype.constructor=x,tn.prototype=Ms(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 o0(){var r=new xt(this.__wrapped__);return r.__actions__=Pe(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Pe(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Pe(this.__views__),r}function a0(){if(this.__filtered__){var r=new xt(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function l0(){var r=this.__wrapped__.value(),a=this.__dir__,f=lt(r),g=a<0,p=f?r.length:0,y=y_(0,p,this.__views__),w=y.start,k=y.end,I=k-w,B=g?k:w-1,F=this.__iteratees__,U=F.length,K=0,Q=de(I,this.__takeCount__);if(!f||!g&&p==I&&Q==I)return pu(r,this.__actions__);var nt=[];t:for(;I--&&K<Q;){B+=a;for(var gt=-1,it=r[B];++gt<U;){var _t=F[gt],vt=_t.iteratee,Ve=_t.type,xe=vt(it);if(Ve==St)it=xe;else if(!xe){if(Ve==Ut)continue t;break t}}nt[K++]=it}return nt}xt.prototype=Ms(Po.prototype),xt.prototype.constructor=xt;function Fi(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 c0(){this.__data__=cr?cr(null):{},this.size=0}function f0(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function u0(r){var a=this.__data__;if(cr){var f=a[r];return f===u?n:f}return Pt.call(a,r)?a[r]:n}function h0(r){var a=this.__data__;return cr?a[r]!==n:Pt.call(a,r)}function d0(r,a){var f=this.__data__;return this.size+=this.has(r)?0:1,f[r]=cr&&a===n?u:a,this}Fi.prototype.clear=c0,Fi.prototype.delete=f0,Fi.prototype.get=u0,Fi.prototype.has=h0,Fi.prototype.set=d0;function Nn(r){var a=-1,f=r==null?0:r.length;for(this.clear();++a<f;){var g=r[a];this.set(g[0],g[1])}}function g0(){this.__data__=[],this.size=0}function m0(r){var a=this.__data__,f=ko(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=ko(a,r);return f<0?n:a[f][1]}function _0(r){return ko(this.__data__,r)>-1}function b0(r,a){var f=this.__data__,g=ko(f,r);return g<0?(++this.size,f.push([r,a])):f[g][1]=a,this}Nn.prototype.clear=g0,Nn.prototype.delete=m0,Nn.prototype.get=p0,Nn.prototype.has=_0,Nn.prototype.set=b0;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 x0(){this.size=0,this.__data__={hash:new Fi,map:new(ar||Nn),string:new Fi}}function y0(r){var a=Wo(this,r).delete(r);return this.size-=a?1:0,a}function v0(r){return Wo(this,r).get(r)}function S0(r){return Wo(this,r).has(r)}function w0(r,a){var f=Wo(this,r),g=f.size;return f.set(r,a),this.size+=f.size==g?0:1,this}Bn.prototype.clear=x0,Bn.prototype.delete=y0,Bn.prototype.get=v0,Bn.prototype.has=S0,Bn.prototype.set=w0;function Wi(r){var a=-1,f=r==null?0:r.length;for(this.__data__=new Bn;++a<f;)this.add(r[a])}function M0(r){return this.__data__.set(r,u),this}function T0(r){return this.__data__.has(r)}Wi.prototype.add=Wi.prototype.push=M0,Wi.prototype.has=T0;function dn(r){var a=this.__data__=new Nn(r);this.size=a.size}function P0(){this.__data__=new Nn,this.size=0}function k0(r){var a=this.__data__,f=a.delete(r);return this.size=a.size,f}function C0(r){return this.__data__.get(r)}function E0(r){return this.__data__.has(r)}function I0(r,a){var f=this.__data__;if(f instanceof Nn){var g=f.__data__;if(!ar||g.length<s-1)return g.push([r,a]),this.size=++f.size,this;f=this.__data__=new Bn(g)}return f.set(r,a),this.size=f.size,this}dn.prototype.clear=P0,dn.prototype.delete=k0,dn.prototype.get=C0,dn.prototype.has=E0,dn.prototype.set=I0;function Xf(r,a){var f=lt(r),g=!f&&$i(r),p=!f&&!g&&mi(r),y=!f&&!g&&!p&&Cs(r),w=f||g||p||y,k=w?ml(r.length,zp):[],I=k.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")||Hn(B,I)))&&k.push(B);return k}function Kf(r){var a=r.length;return a?r[Ol(0,a-1)]:n}function A0(r,a){return zo(Pe(r),zi(a,0,r.length))}function O0(r){return zo(Pe(r))}function Sl(r,a,f){(f!==n&&!gn(r[a],f)||f===n&&!(a in r))&&Fn(r,a,f)}function ur(r,a,f){var g=r[a];(!(Pt.call(r,a)&&gn(g,f))||f===n&&!(a in r))&&Fn(r,a,f)}function ko(r,a){for(var f=r.length;f--;)if(gn(r[f][0],a))return f;return-1}function D0(r,a,f,g){return ui(r,function(p,y,w){a(g,p,f(p),w)}),g}function qf(r,a){return r&&Sn(a,ne(a),r)}function R0(r,a){return r&&Sn(a,Ce(a),r)}function Fn(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=R(g),y=r==null;++f<g;)p[f]=y?n:ic(r,a[f]);return p}function zi(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,k=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=lt(r);if(F){if(w=S_(r),!k)return Pe(r,w)}else{var U=ge(r),K=U==bn||U==ei;if(mi(r))return xu(r,k);if(U==le||U==Se||K&&!p){if(w=I||K?{}:Fu(r),!k)return I?u_(r,R0(w,r)):f_(r,qf(w,r))}else{if(!It[U])return p?r:{};w=w_(r,U,k)}}y||(y=new dn);var Q=y.get(r);if(Q)return Q;y.set(r,w),dh(r)?r.forEach(function(it){w.add(en(it,a,f,it,r,y))}):uh(r)&&r.forEach(function(it,_t){w.set(_t,en(it,a,f,_t,r,y))});var nt=B?I?Vl:Ul:I?Ce:ne,gt=F?n:nt(r);return Je(gt||r,function(it,_t){gt&&(_t=it,it=r[_t]),ur(w,_t,en(it,a,f,_t,r,y))}),w}function L0(r){var a=ne(r);return function(f){return jf(f,r,a)}}function jf(r,a,f){var g=f.length;if(r==null)return!g;for(r=Ct(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 Zf(r,a,f){if(typeof r!="function")throw new Qe(l);return br(function(){r.apply(n,f)},a)}function hr(r,a,f,g){var p=-1,y=co,w=!0,k=r.length,I=[],B=a.length;if(!k)return I;f&&(a=Rt(a,ze(f))),g?(y=cl,w=!1):a.length>=s&&(y=rr,w=!1,a=new Wi(a));t:for(;++p<k;){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 ui=Mu(vn),Jf=Mu(Tl,!0);function N0(r,a){var f=!0;return ui(r,function(g,p,y){return f=!!a(g,p,y),f}),f}function Co(r,a,f){for(var g=-1,p=r.length;++g<p;){var y=r[g],w=a(y);if(w!=null&&(k===n?w===w&&!Ue(w):f(w,k)))var k=w,I=y}return I}function B0(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:mh(g);f<g;)r[f++]=a;return r}function Qf(r,a){var f=[];return ui(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=T_),p||(p=[]);++y<w;){var k=r[y];a>0&&f(k)?a>1?fe(k,a-1,f,g,p):li(p,k):g||(p[p.length]=k)}return p}var Ml=Tu(),tu=Tu(!0);function vn(r,a){return r&&Ml(r,a,ne)}function Tl(r,a){return r&&tu(r,a,ne)}function Eo(r,a){return ai(a,function(f){return Un(r[f])})}function Hi(r,a){a=di(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 eu(r,a,f){var g=a(r);return lt(r)?g:li(g,f(r))}function _e(r){return r==null?r===n?$a:Ke:Bi&&Bi in Ct(r)?x_(r):O_(r)}function Pl(r,a){return r>a}function F0(r,a){return r!=null&&Pt.call(r,a)}function W0(r,a){return r!=null&&a in Ct(r)}function z0(r,a,f){return r>=de(a,f)&&r<Qt(a,f)}function kl(r,a,f){for(var g=f?cl:co,p=r[0].length,y=r.length,w=y,k=R(y),I=1/0,B=[];w--;){var F=r[w];w&&a&&(F=Rt(F,ze(a))),I=de(F.length,I),k[w]=!f&&(a||p>=120&&F.length>=120)?new Wi(w&&F):n}F=r[0];var U=-1,K=k[0];t:for(;++U<p&&B.length<I;){var Q=F[U],nt=a?a(Q):Q;if(Q=f||Q!==0?Q:0,!(K?rr(K,nt):g(B,nt,f))){for(w=y;--w;){var gt=k[w];if(!(gt?rr(gt,nt):g(r[w],nt,f)))continue t}K&&K.push(nt),B.push(Q)}}return B}function H0(r,a,f,g){return vn(r,function(p,y,w){a(g,f(p),y,w)}),g}function dr(r,a,f){a=di(a,r),r=Uu(r,a);var g=r==null?r:r[wn(sn(a))];return g==null?n:We(g,r,f)}function nu(r){return zt(r)&&_e(r)==Se}function U0(r){return zt(r)&&_e(r)==ni}function V0(r){return zt(r)&&_e(r)==Et}function gr(r,a,f,g,p){return r===a?!0:r==null||a==null||!zt(r)&&!zt(a)?r!==r&&a!==a:$0(r,a,f,g,gr,p)}function $0(r,a,f,g,p,y){var w=lt(r),k=lt(a),I=w?we:ge(r),B=k?we:ge(a);I=I==Se?le:I,B=B==Se?le:B;var F=I==le,U=B==le,K=I==B;if(K&&mi(r)){if(!mi(a))return!1;w=!0,F=!1}if(K&&!F)return y||(y=new dn),w||Cs(r)?Lu(r,a,f,g,p,y):__(r,a,I,f,g,p,y);if(!(f&M)){var Q=F&&Pt.call(r,"__wrapped__"),nt=U&&Pt.call(a,"__wrapped__");if(Q||nt){var gt=Q?r.value():r,it=nt?a.value():a;return y||(y=new dn),p(gt,it,f,g,y)}}return K?(y||(y=new dn),b_(r,a,f,g,p,y)):!1}function G0(r){return zt(r)&&ge(r)==ae}function Cl(r,a,f,g){var p=f.length,y=p,w=!g;if(r==null)return!y;for(r=Ct(r);p--;){var k=f[p];if(w&&k[2]?k[1]!==r[k[0]]:!(k[0]in r))return!1}for(;++p<y;){k=f[p];var I=k[0],B=r[I],F=k[1];if(w&&k[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?gr(F,B,M|T,g,U):K))return!1}}return!0}function iu(r){if(!Bt(r)||k_(r))return!1;var a=Un(r)?Gp:Oi;return a.test(Vi(r))}function Y0(r){return zt(r)&&_e(r)==xn}function X0(r){return zt(r)&&ge(r)==Dt}function K0(r){return zt(r)&&Yo(r.length)&&!!Ot[_e(r)]}function su(r){return typeof r=="function"?r:r==null?Ee:typeof r=="object"?lt(r)?au(r[0],r[1]):ou(r):Ph(r)}function El(r){if(!_r(r))return Zp(r);var a=[];for(var f in Ct(r))Pt.call(r,f)&&f!="constructor"&&a.push(f);return a}function q0(r){if(!Bt(r))return A_(r);var a=_r(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 ru(r,a){var f=-1,g=ke(r)?R(r.length):[];return ui(r,function(p,y,w){g[++f]=a(p,y,w)}),g}function ou(r){var a=Gl(r);return a.length==1&&a[0][2]?zu(a[0][0],a[0][1]):function(f){return f===r||Cl(f,r,a)}}function au(r,a){return Xl(r)&&Wu(a)?zu(wn(r),a):function(f){var g=ic(f,r);return g===n&&g===a?sc(f,r):gr(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))j0(r,a,w,f,Io,g,p);else{var k=g?g(ql(r,w),y,w+"",r,a,p):n;k===n&&(k=y),Sl(r,w,k)}},Ce)}function j0(r,a,f,g,p,y,w){var k=ql(r,f),I=ql(a,f),B=w.get(I);if(B){Sl(r,f,B);return}var F=y?y(k,I,f+"",r,a,w):n,U=F===n;if(U){var K=lt(I),Q=!K&&mi(I),nt=!K&&!Q&&Cs(I);F=I,K||Q||nt?lt(k)?F=k:Gt(k)?F=Pe(k):Q?(U=!1,F=xu(I,!0)):nt?(U=!1,F=yu(I,!0)):F=[]:xr(I)||$i(I)?(F=k,$i(k)?F=ph(k):(!Bt(k)||Un(k))&&(F=Fu(I))):U=!1}U&&(w.set(I,F),p(F,I,g,y,w),w.delete(I)),Sl(r,f,F)}function lu(r,a){var f=r.length;if(f)return a+=a<0?f:0,Hn(a,f)?r[a]:n}function cu(r,a,f){a.length?a=Rt(a,function(y){return lt(y)?function(w){return Hi(w,y.length===1?y[0]:y)}:y}):a=[Ee];var g=-1;a=Rt(a,ze(et()));var p=ru(r,function(y,w,k){var I=Rt(a,function(B){return B(y)});return{criteria:I,index:++g,value:y}});return wp(p,function(y,w){return c_(y,w,f)})}function Z0(r,a){return fu(r,a,function(f,g){return sc(r,g)})}function fu(r,a,f){for(var g=-1,p=a.length,y={};++g<p;){var w=a[g],k=Hi(r,w);f(k,w)&&mr(y,di(w,r),k)}return y}function J0(r){return function(a){return Hi(a,r)}}function Al(r,a,f,g){var p=g?Sp:_s,y=-1,w=a.length,k=r;for(r===a&&(a=Pe(a)),f&&(k=Rt(r,ze(f)));++y<w;)for(var I=0,B=a[y],F=f?f(B):B;(I=p(k,F,I,g))>-1;)k!==r&&yo.call(k,I,1),yo.call(r,I,1);return r}function uu(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;Hn(p)?yo.call(r,p,1):Ll(r,p)}}return r}function Ol(r,a){return r+wo(Gf()*(a-r+1))}function Q0(r,a,f,g){for(var p=-1,y=Qt(So((a-r)/(f||1)),0),w=R(y);y--;)w[g?y:++p]=r,r+=f;return w}function Dl(r,a){var f="";if(!r||a<1||a>qt)return f;do a%2&&(f+=r),a=wo(a/2),a&&(r+=r);while(a);return f}function mt(r,a){return jl(Hu(r,a,Ee),r+"")}function t_(r){return Kf(Es(r))}function e_(r,a){var f=Es(r);return zo(f,zi(a,0,f.length))}function mr(r,a,f,g){if(!Bt(r))return r;a=di(a,r);for(var p=-1,y=a.length,w=y-1,k=r;k!=null&&++p<y;){var I=wn(a[p]),B=f;if(I==="__proto__"||I==="constructor"||I==="prototype")return r;if(p!=w){var F=k[I];B=g?g(F,I,k):n,B===n&&(B=Bt(F)?F:Hn(a[p+1])?[]:{})}ur(k,I,B),k=k[I]}return r}var hu=Mo?function(r,a){return Mo.set(r,a),r}:Ee,n_=vo?function(r,a){return vo(r,"toString",{configurable:!0,enumerable:!1,value:oc(a),writable:!0})}:Ee;function i_(r){return zo(Es(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=R(p);++g<p;)y[g]=r[g+a];return y}function s_(r,a){var f;return ui(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<=In){for(;g<p;){var y=g+p>>>1,w=r[y];w!==null&&!Ue(w)&&(f?w<=a:w<a)?g=y+1:p=y}return p}return Rl(r,a,Ee,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,k=a===null,I=Ue(a),B=a===n;p<y;){var F=wo((p+y)/2),U=f(r[F]),K=U!==n,Q=U===null,nt=U===U,gt=Ue(U);if(w)var it=g||nt;else B?it=nt&&(g||K):k?it=nt&&K&&(g||!Q):I?it=nt&&K&&!Q&&(g||!gt):Q||gt?it=!1:it=g?U<=a:U<a;it?p=F+1:y=F}return de(y,ve)}function du(r,a){for(var f=-1,g=r.length,p=0,y=[];++f<g;){var w=r[f],k=a?a(w):w;if(!f||!gn(k,I)){var I=k;y[p++]=w===0?0:w}}return y}function gu(r){return typeof r=="number"?r:Ue(r)?Le:+r}function He(r){if(typeof r=="string")return r;if(lt(r))return Rt(r,He)+"";if(Ue(r))return Yf?Yf.call(r):"";var a=r+"";return a=="0"&&1/r==-1/0?"-0":a}function hi(r,a,f){var g=-1,p=co,y=r.length,w=!0,k=[],I=k;if(f)w=!1,p=cl;else if(y>=s){var B=a?null:m_(r);if(B)return uo(B);w=!1,p=rr,I=new Wi}else I=a?[]:k;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),k.push(F)}else p(I,U,f)||(I!==k&&I.push(U),k.push(F))}return k}function Ll(r,a){return a=di(a,r),r=Uu(r,a),r==null||delete r[wn(sn(a))]}function mu(r,a,f,g){return mr(r,a,f(Hi(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 pu(r,a){var f=r;return f instanceof xt&&(f=f.value()),fl(a,function(g,p){return p.func.apply(p.thisArg,li([g],p.args))},f)}function Nl(r,a,f){var g=r.length;if(g<2)return g?hi(r[0]):[];for(var p=-1,y=R(g);++p<g;)for(var w=r[p],k=-1;++k<g;)k!=p&&(y[p]=hr(y[p]||w,r[k],a,f));return hi(fe(y,1),a,f)}function _u(r,a,f){for(var g=-1,p=r.length,y=a.length,w={};++g<p;){var k=g<y?a[g]:n;f(w,r[g],k)}return w}function Bl(r){return Gt(r)?r:[]}function Fl(r){return typeof r=="function"?r:Ee}function di(r,a){return lt(r)?r:Xl(r,a)?[r]:Yu(Mt(r))}var r_=mt;function gi(r,a,f){var g=r.length;return f=f===n?g:f,!a&&f>=g?r:nn(r,a,f)}var bu=Yp||function(r){return ce.clearTimeout(r)};function xu(r,a){if(a)return r.slice();var f=r.length,g=zf?zf(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 o_(r,a){var f=a?Wl(r.buffer):r.buffer;return new r.constructor(f,r.byteOffset,r.byteLength)}function a_(r){var a=new r.constructor(r.source,tr.exec(r));return a.lastIndex=r.lastIndex,a}function l_(r){return fr?Ct(fr.call(r)):{}}function yu(r,a){var f=a?Wl(r.buffer):r.buffer;return new r.constructor(f,r.byteOffset,r.length)}function vu(r,a){if(r!==a){var f=r!==n,g=r===null,p=r===r,y=Ue(r),w=a!==n,k=a===null,I=a===a,B=Ue(a);if(!k&&!B&&!y&&r>a||y&&w&&I&&!k&&!B||g&&w&&I||!f&&I||!p)return 1;if(!g&&!y&&!B&&r<a||B&&f&&p&&!g&&!y||k&&f&&p||!w&&p||!I)return-1}return 0}function c_(r,a,f){for(var g=-1,p=r.criteria,y=a.criteria,w=p.length,k=f.length;++g<w;){var I=vu(p[g],y[g]);if(I){if(g>=k)return I;var B=f[g];return I*(B=="desc"?-1:1)}}return r.index-a.index}function Su(r,a,f,g){for(var p=-1,y=r.length,w=f.length,k=-1,I=a.length,B=Qt(y-w,0),F=R(I+B),U=!g;++k<I;)F[k]=a[k];for(;++p<w;)(U||p<y)&&(F[f[p]]=r[p]);for(;B--;)F[k++]=r[p++];return F}function wu(r,a,f,g){for(var p=-1,y=r.length,w=-1,k=f.length,I=-1,B=a.length,F=Qt(y-k,0),U=R(F+B),K=!g;++p<F;)U[p]=r[p];for(var Q=p;++I<B;)U[Q+I]=a[I];for(;++w<k;)(K||p<y)&&(U[Q+f[w]]=r[p++]);return U}function Pe(r,a){var f=-1,g=r.length;for(a||(a=R(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 k=a[y],I=g?g(f[k],r[k],k,f,r):n;I===n&&(I=r[k]),p?Fn(f,k,I):ur(f,k,I)}return f}function f_(r,a){return Sn(r,Yl(r),a)}function u_(r,a){return Sn(r,Nu(r),a)}function Do(r,a){return function(f,g){var p=lt(f)?pp:D0,y=a?a():{};return p(f,r,et(g,2),y)}}function Ts(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=Ct(a);++g<p;){var k=f[g];k&&r(a,k,g,y)}return a})}function Mu(r,a){return function(f,g){if(f==null)return f;if(!ke(f))return r(f,g);for(var p=f.length,y=a?p:-1,w=Ct(f);(a?y--:++y<p)&&g(w[y],y,w)!==!1;);return f}}function Tu(r){return function(a,f,g){for(var p=-1,y=Ct(a),w=g(a),k=w.length;k--;){var I=w[r?k:++p];if(f(y[I],I,y)===!1)break}return a}}function h_(r,a,f){var g=a&C,p=pr(r);function y(){var w=this&&this!==ce&&this instanceof y?p:r;return w.apply(g?f:this,arguments)}return y}function Pu(r){return function(a){a=Mt(a);var f=bs(a)?hn(a):n,g=f?f[0]:a.charAt(0),p=f?gi(f,1).join(""):a.slice(1);return g[r]()+p}}function Ps(r){return function(a){return fl(Mh(wh(a).replace(np,"")),r,"")}}function pr(r){return function(){var a=arguments;switch(a.length){case 0:return new r;case 1:return new r(a[0]);case 2:return new r(a[0],a[1]);case 3:return new r(a[0],a[1],a[2]);case 4:return new r(a[0],a[1],a[2],a[3]);case 5:return new r(a[0],a[1],a[2],a[3],a[4]);case 6:return new r(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new r(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var f=Ms(r.prototype),g=r.apply(f,a);return Bt(g)?g:f}}function d_(r,a,f){var g=pr(r);function p(){for(var y=arguments.length,w=R(y),k=y,I=ks(p);k--;)w[k]=arguments[k];var B=y<3&&w[0]!==I&&w[y-1]!==I?[]:ci(w,I);if(y-=B.length,y<f)return Au(r,a,Ro,p.placeholder,n,w,B,n,n,f-y);var F=this&&this!==ce&&this instanceof p?g:r;return We(F,this,w)}return p}function ku(r){return function(a,f,g){var p=Ct(a);if(!ke(a)){var y=et(f,3);a=ne(a),f=function(k){return y(p[k],k,p)}}var w=r(a,f,g);return w>-1?p[y?a[w]:w]:n}}function Cu(r){return zn(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 k=Fo(y),I=k=="wrapper"?$l(y):n;I&&Kl(I[0])&&I[1]==($|W|N|G)&&!I[4].length&&I[9]==1?w=w[Fo(I[0])].apply(w,I[3]):w=y.length==1&&Kl(y)?w[k]():w.thru(y)}return function(){var B=arguments,F=B[0];if(w&&B.length==1&&lt(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,k,I,B){var F=a&$,U=a&C,K=a&A,Q=a&(W|z),nt=a&J,gt=K?n:pr(r);function it(){for(var _t=arguments.length,vt=R(_t),Ve=_t;Ve--;)vt[Ve]=arguments[Ve];if(Q)var xe=ks(it),$e=Tp(vt,xe);if(g&&(vt=Su(vt,g,p,Q)),y&&(vt=wu(vt,y,w,Q)),_t-=$e,Q&&_t<B){var Yt=ci(vt,xe);return Au(r,a,Ro,it.placeholder,f,vt,Yt,k,I,B-_t)}var mn=U?f:this,$n=K?mn[r]:r;return _t=vt.length,k?vt=D_(vt,k):nt&&_t>1&&vt.reverse(),F&&I<_t&&(vt.length=I),this&&this!==ce&&this instanceof it&&($n=gt||pr($n)),$n.apply(mn,vt)}return it}function Eu(r,a){return function(f,g){return H0(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=He(f),g=He(g)):(f=gu(f),g=gu(g)),p=r(f,g)}return p}}function zl(r){return zn(function(a){return a=Rt(a,ze(et())),mt(function(f){var g=this;return r(a,function(p){return We(p,g,f)})})})}function No(r,a){a=a===n?" ":He(a);var f=a.length;if(f<2)return f?Dl(a,r):a;var g=Dl(a,So(r/xs(a)));return bs(a)?gi(hn(g),0,r).join(""):g.slice(0,r)}function g_(r,a,f,g){var p=a&C,y=pr(r);function w(){for(var k=-1,I=arguments.length,B=-1,F=g.length,U=R(F+I),K=this&&this!==ce&&this instanceof w?y:r;++B<F;)U[B]=g[B];for(;I--;)U[B++]=arguments[++k];return We(K,p?f:this,U)}return w}function Iu(r){return function(a,f,g){return g&&typeof g!="number"&&be(a,f,g)&&(f=g=n),a=Vn(a),f===n?(f=a,a=0):f=Vn(f),g=g===n?a<f?1:-1:Vn(g),Q0(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 Au(r,a,f,g,p,y,w,k,I,B){var F=a&W,U=F?w:n,K=F?n:w,Q=F?y:n,nt=F?n:y;a|=F?N:Y,a&=~(F?Y:N),a&D||(a&=-4);var gt=[r,a,p,Q,U,nt,K,k,I,B],it=f.apply(n,gt);return Kl(r)&&Vu(it,gt),it.placeholder=g,$u(it,r,a)}function Hl(r){var a=Jt[r];return function(f,g){if(f=rn(f),g=g==null?0:de(ht(g),292),g&&$f(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 m_=Ss&&1/uo(new Ss([,-0]))[1]==Tt?function(r){return new Ss(r)}:cc;function Ou(r){return function(a){var f=ge(a);return f==ae?_l(a):f==Dt?Op(a):Mp(a,r(a))}}function Wn(r,a,f,g,p,y,w,k){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:Qt(ht(w),0),k=k===n?k:ht(k),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,k];if(K&&I_(Q,K),r=Q[0],a=Q[1],f=Q[2],g=Q[3],p=Q[4],k=Q[9]=Q[9]===n?I?0:r.length:Qt(Q[9]-B,0),!k&&a&(W|z)&&(a&=-25),!a||a==C)var nt=h_(r,a,f);else a==W||a==z?nt=d_(r,a,k):(a==N||a==(C|N))&&!p.length?nt=g_(r,a,f,g):nt=Ro.apply(n,Q);var gt=K?hu:Vu;return $u(gt(nt,Q),r,a)}function Du(r,a,f,g){return r===n||gn(r,vs[f])&&!Pt.call(g,f)?a:r}function Ru(r,a,f,g,p,y){return Bt(r)&&Bt(a)&&(y.set(a,r),Io(r,a,n,Ru,y),y.delete(a)),r}function p_(r){return xr(r)?n:r}function Lu(r,a,f,g,p,y){var w=f&M,k=r.length,I=a.length;if(k!=I&&!(w&&I>k))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 Wi:n;for(y.set(r,a),y.set(a,r);++U<k;){var nt=r[U],gt=a[U];if(g)var it=w?g(gt,nt,U,a,r,y):g(nt,gt,U,r,a,y);if(it!==n){if(it)continue;K=!1;break}if(Q){if(!ul(a,function(_t,vt){if(!rr(Q,vt)&&(nt===_t||p(nt,_t,f,g,y)))return Q.push(vt)})){K=!1;break}}else if(!(nt===gt||p(nt,gt,f,g,y))){K=!1;break}}return y.delete(r),y.delete(a),K}function __(r,a,f,g,p,y,w){switch(f){case On:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case ni:return!(r.byteLength!=a.byteLength||!y(new bo(r),new bo(a)));case Be:case Et:case cn:return gn(+r,+a);case An:return r.name==a.name&&r.message==a.message;case xn:case Ei:return r==a+"";case ae:var k=_l;case Dt:var I=g&M;if(k||(k=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=Lu(k(r),k(a),g,p,y,w);return w.delete(r),F;case os:if(fr)return fr.call(r)==fr.call(a)}return!1}function b_(r,a,f,g,p,y){var w=f&M,k=Ul(r),I=k.length,B=Ul(a),F=B.length;if(I!=F&&!w)return!1;for(var U=I;U--;){var K=k[U];if(!(w?K in a:Pt.call(a,K)))return!1}var Q=y.get(r),nt=y.get(a);if(Q&&nt)return Q==a&&nt==r;var gt=!0;y.set(r,a),y.set(a,r);for(var it=w;++U<I;){K=k[U];var _t=r[K],vt=a[K];if(g)var Ve=w?g(vt,_t,K,a,r,y):g(_t,vt,K,r,a,y);if(!(Ve===n?_t===vt||p(_t,vt,f,g,y):Ve)){gt=!1;break}it||(it=K=="constructor")}if(gt&&!it){var xe=r.constructor,$e=a.constructor;xe!=$e&&"constructor"in r&&"constructor"in a&&!(typeof xe=="function"&&xe instanceof xe&&typeof $e=="function"&&$e instanceof $e)&&(gt=!1)}return y.delete(r),y.delete(a),gt}function zn(r){return jl(Hu(r,n,ju),r+"")}function Ul(r){return eu(r,ne,Yl)}function Vl(r){return eu(r,Ce,Nu)}var $l=Mo?function(r){return Mo.get(r)}:cc;function Fo(r){for(var a=r.name+"",f=ws[a],g=Pt.call(ws,a)?f.length:0;g--;){var p=f[g],y=p.func;if(y==null||y==r)return p.name}return a}function ks(r){var a=Pt.call(x,"placeholder")?x:r;return a.placeholder}function et(){var r=x.iteratee||ac;return r=r===ac?su:r,arguments.length?r(arguments[0],arguments[1]):r}function Wo(r,a){var f=r.__data__;return P_(a)?f[typeof a=="string"?"string":"hash"]:f.map}function Gl(r){for(var a=ne(r),f=a.length;f--;){var g=a[f],p=r[g];a[f]=[g,p,Wu(p)]}return a}function Ui(r,a){var f=Ep(r,a);return iu(f)?f:n}function x_(r){var a=Pt.call(r,Bi),f=r[Bi];try{r[Bi]=n;var g=!0}catch{}var p=po.call(r);return g&&(a?r[Bi]=f:delete r[Bi]),p}var Yl=xl?function(r){return r==null?[]:(r=Ct(r),ai(xl(r),function(a){return Uf.call(r,a)}))}:fc,Nu=xl?function(r){for(var a=[];r;)li(a,Yl(r)),r=xo(r);return a}:fc,ge=_e;(yl&&ge(new yl(new ArrayBuffer(1)))!=On||ar&&ge(new ar)!=ae||vl&&ge(vl.resolve())!=Us||Ss&&ge(new Ss)!=Dt||lr&&ge(new lr)!=Ii)&&(ge=function(r){var a=_e(r),f=a==le?r.constructor:n,g=f?Vi(f):"";if(g)switch(g){case e0:return On;case n0:return ae;case i0:return Us;case s0:return Dt;case r0:return Ii}return a});function y_(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=Qt(r,a-w);break}}return{start:r,end:a}}function v_(r){var a=r.match(el);return a?a[1].split(no):[]}function Bu(r,a,f){a=di(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)&&Hn(w,p)&&(lt(r)||$i(r)))}function S_(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 Fu(r){return typeof r.constructor=="function"&&!_r(r)?Ms(xo(r)):{}}function w_(r,a,f){var g=r.constructor;switch(a){case ni:return Wl(r);case Be:case Et:return new g(+r);case On:return o_(r,f);case as:case ls:case ii:case Ai:case Vs:case $s:case Gs:case Ys:case Xs:return yu(r,f);case ae:return new g;case cn:case Ei:return new g(r);case xn:return a_(r);case Dt:return new g;case os:return l_(r)}}function M_(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(Qs,`{
43
+ /* [wrapped with `+a+`] */
44
+ `)}function T_(r){return lt(r)||$i(r)||!!(Vf&&r&&r[Vf])}function Hn(r,a){var f=typeof r;return a=a??qt,!!a&&(f=="number"||f!="symbol"&&fs.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"?ke(f)&&Hn(a,f.length):g=="string"&&a in f)?gn(f[a],r):!1}function Xl(r,a){if(lt(r))return!1;var f=typeof r;return f=="number"||f=="symbol"||f=="boolean"||r==null||Ue(r)?!0:Ja.test(r)||!Za.test(r)||a!=null&&r in Ct(a)}function P_(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 k_(r){return!!Wf&&Wf in r}var C_=go?Un:uc;function _r(r){var a=r&&r.constructor,f=typeof a=="function"&&a.prototype||vs;return r===f}function Wu(r){return r===r&&!Bt(r)}function zu(r,a){return function(f){return f==null?!1:f[r]===a&&(a!==n||r in Ct(f))}}function E_(r){var a=$o(r,function(g){return f.size===h&&f.clear(),g}),f=a.cache;return a}function I_(r,a){var f=r[1],g=a[1],p=f|g,y=p<(C|A|$),w=g==$&&f==W||g==$&&f==G&&r[7].length<=a[8]||g==($|G)&&a[7].length<=a[8]&&f==W;if(!(y||w))return r;g&C&&(r[2]=a[2],p|=f&C?0:D);var k=a[3];if(k){var I=r[3];r[3]=I?Su(I,k,a[4]):k,r[4]=I?ci(r[3],d):a[4]}return k=a[5],k&&(I=r[5],r[5]=I?wu(I,k,a[6]):k,r[6]=I?ci(r[5],d):a[6]),k=a[7],k&&(r[7]=k),g&$&&(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 A_(r){var a=[];if(r!=null)for(var f in Ct(r))a.push(f);return a}function O_(r){return po.call(r)}function Hu(r,a,f){return a=Qt(a===n?r.length-1:a,0),function(){for(var g=arguments,p=-1,y=Qt(g.length-a,0),w=R(y);++p<y;)w[p]=g[a+p];p=-1;for(var k=R(a+1);++p<a;)k[p]=g[p];return k[a]=f(w),We(r,this,k)}}function Uu(r,a){return a.length<2?r:Hi(r,nn(a,0,-1))}function D_(r,a){for(var f=r.length,g=de(a.length,f),p=Pe(r);g--;){var y=a[g];r[g]=Hn(y,f)?p[y]:n}return r}function ql(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var Vu=Gu(hu),br=Kp||function(r,a){return ce.setTimeout(r,a)},jl=Gu(n_);function $u(r,a,f){var g=a+"";return jl(r,M_(g,R_(v_(g),f)))}function Gu(r){var a=0,f=0;return function(){var g=Jp(),p=Wt-(g-f);if(f=g,p>0){if(++a>=ut)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 Yu=E_(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"||Ue(r))return r;var a=r+"";return a=="0"&&1/r==-1/0?"-0":a}function Vi(r){if(r!=null){try{return mo.call(r)}catch{}try{return r+""}catch{}}return""}function R_(r,a){return Je(Ne,function(f){var g="_."+f[0];a&f[1]&&!co(r,g)&&r.push(g)}),r.sort()}function Xu(r){if(r instanceof xt)return r.clone();var a=new tn(r.__wrapped__,r.__chain__);return a.__actions__=Pe(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function L_(r,a,f){(f?be(r,a,f):a===n)?a=1:a=Qt(ht(a),0);var g=r==null?0:r.length;if(!g||a<1)return[];for(var p=0,y=0,w=R(So(g/a));p<g;)w[y++]=nn(r,p,p+=a);return w}function N_(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 B_(){var r=arguments.length;if(!r)return[];for(var a=R(r-1),f=arguments[0],g=r;g--;)a[g-1]=arguments[g];return li(lt(f)?Pe(f):[f],fe(a,1))}var F_=mt(function(r,a){return Gt(r)?hr(r,fe(a,1,Gt,!0)):[]}),W_=mt(function(r,a){var f=sn(a);return Gt(f)&&(f=n),Gt(r)?hr(r,fe(a,1,Gt,!0),et(f,2)):[]}),z_=mt(function(r,a){var f=sn(a);return Gt(f)&&(f=n),Gt(r)?hr(r,fe(a,1,Gt,!0),n,f):[]});function H_(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 U_(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 V_(r,a){return r&&r.length?Oo(r,et(a,3),!0,!0):[]}function $_(r,a){return r&&r.length?Oo(r,et(a,3),!0):[]}function G_(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),B0(r,a,f,g)):[]}function Ku(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=Qt(g+p,0)),fo(r,et(a,3),p)}function qu(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?Qt(g+p,0):de(p,g-1)),fo(r,et(a,3),p,!0)}function ju(r){var a=r==null?0:r.length;return a?fe(r,1):[]}function Y_(r){var a=r==null?0:r.length;return a?fe(r,Tt):[]}function X_(r,a){var f=r==null?0:r.length;return f?(a=a===n?1:ht(a),fe(r,a)):[]}function K_(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 Zu(r){return r&&r.length?r[0]:n}function q_(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=Qt(g+p,0)),_s(r,a,p)}function j_(r){var a=r==null?0:r.length;return a?nn(r,0,-1):[]}var Z_=mt(function(r){var a=Rt(r,Bl);return a.length&&a[0]===r[0]?kl(a):[]}),J_=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]?kl(f,et(a,2)):[]}),Q_=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]?kl(f,n,a):[]});function tb(r,a){return r==null?"":jp.call(r,a)}function sn(r){var a=r==null?0:r.length;return a?r[a-1]:n}function eb(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?Qt(g+p,0):de(p,g-1)),a===a?Rp(r,a,p):fo(r,Af,p,!0)}function nb(r,a){return r&&r.length?lu(r,ht(a)):n}var ib=mt(Ju);function Ju(r,a){return r&&r.length&&a&&a.length?Al(r,a):r}function sb(r,a,f){return r&&r.length&&a&&a.length?Al(r,a,et(f,2)):r}function rb(r,a,f){return r&&r.length&&a&&a.length?Al(r,a,n,f):r}var ob=zn(function(r,a){var f=r==null?0:r.length,g=wl(r,a);return uu(r,Rt(a,function(p){return Hn(p,f)?+p:p}).sort(vu)),g});function ab(r,a){var f=[];if(!(r&&r.length))return f;var g=-1,p=[],y=r.length;for(a=et(a,3);++g<y;){var w=r[g];a(w,g,r)&&(f.push(w),p.push(g))}return uu(r,p),f}function Zl(r){return r==null?r:t0.call(r)}function lb(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 cb(r,a){return Ao(r,a)}function fb(r,a,f){return Rl(r,a,et(f,2))}function ub(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 hb(r,a){return Ao(r,a,!0)}function db(r,a,f){return Rl(r,a,et(f,2),!0)}function gb(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 mb(r){return r&&r.length?du(r):[]}function pb(r,a){return r&&r.length?du(r,et(a,2)):[]}function _b(r){var a=r==null?0:r.length;return a?nn(r,1,a):[]}function bb(r,a,f){return r&&r.length?(a=f||a===n?1:ht(a),nn(r,0,a<0?0:a)):[]}function xb(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 yb(r,a){return r&&r.length?Oo(r,et(a,3),!1,!0):[]}function vb(r,a){return r&&r.length?Oo(r,et(a,3)):[]}var Sb=mt(function(r){return hi(fe(r,1,Gt,!0))}),wb=mt(function(r){var a=sn(r);return Gt(a)&&(a=n),hi(fe(r,1,Gt,!0),et(a,2))}),Mb=mt(function(r){var a=sn(r);return a=typeof a=="function"?a:n,hi(fe(r,1,Gt,!0),n,a)});function Tb(r){return r&&r.length?hi(r):[]}function Pb(r,a){return r&&r.length?hi(r,et(a,2)):[]}function kb(r,a){return a=typeof a=="function"?a:n,r&&r.length?hi(r,n,a):[]}function Jl(r){if(!(r&&r.length))return[];var a=0;return r=ai(r,function(f){if(Gt(f))return a=Qt(f.length,a),!0}),ml(a,function(f){return Rt(r,hl(f))})}function Qu(r,a){if(!(r&&r.length))return[];var f=Jl(r);return a==null?f:Rt(f,function(g){return We(a,n,g)})}var Cb=mt(function(r,a){return Gt(r)?hr(r,a):[]}),Eb=mt(function(r){return Nl(ai(r,Gt))}),Ib=mt(function(r){var a=sn(r);return Gt(a)&&(a=n),Nl(ai(r,Gt),et(a,2))}),Ab=mt(function(r){var a=sn(r);return a=typeof a=="function"?a:n,Nl(ai(r,Gt),n,a)}),Ob=mt(Jl);function Db(r,a){return _u(r||[],a||[],ur)}function Rb(r,a){return _u(r||[],a||[],mr)}var Lb=mt(function(r){var a=r.length,f=a>1?r[a-1]:n;return f=typeof f=="function"?(r.pop(),f):n,Qu(r,f)});function th(r){var a=x(r);return a.__chain__=!0,a}function Nb(r,a){return a(r),r}function Ho(r,a){return a(r)}var Bb=zn(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)||!Hn(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 Fb(){return th(this)}function Wb(){return new tn(this.value(),this.__chain__)}function zb(){this.__values__===n&&(this.__values__=gh(this.value()));var r=this.__index__>=this.__values__.length,a=r?n:this.__values__[this.__index__++];return{done:r,value:a}}function Hb(){return this}function Ub(r){for(var a,f=this;f instanceof Po;){var g=Xu(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 Vb(){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 $b(){return pu(this.__wrapped__,this.__actions__)}var Gb=Do(function(r,a,f){Pt.call(r,f)?++r[f]:Fn(r,f,1)});function Yb(r,a,f){var g=lt(r)?Ef:N0;return f&&be(r,a,f)&&(a=n),g(r,et(a,3))}function Xb(r,a){var f=lt(r)?ai:Qf;return f(r,et(a,3))}var Kb=ku(Ku),qb=ku(qu);function jb(r,a){return fe(Uo(r,a),1)}function Zb(r,a){return fe(Uo(r,a),Tt)}function Jb(r,a,f){return f=f===n?1:ht(f),fe(Uo(r,a),f)}function eh(r,a){var f=lt(r)?Je:ui;return f(r,et(a,3))}function nh(r,a){var f=lt(r)?_p:Jf;return f(r,et(a,3))}var Qb=Do(function(r,a,f){Pt.call(r,f)?r[f].push(a):Fn(r,f,[a])});function tx(r,a,f,g){r=ke(r)?r:Es(r),f=f&&!g?ht(f):0;var p=r.length;return f<0&&(f=Qt(p+f,0)),Xo(r)?f<=p&&r.indexOf(a,f)>-1:!!p&&_s(r,a,f)>-1}var ex=mt(function(r,a,f){var g=-1,p=typeof a=="function",y=ke(r)?R(r.length):[];return ui(r,function(w){y[++g]=p?We(a,w,f):dr(w,a,f)}),y}),nx=Do(function(r,a,f){Fn(r,f,a)});function Uo(r,a){var f=lt(r)?Rt:ru;return f(r,et(a,3))}function ix(r,a,f,g){return r==null?[]:(lt(a)||(a=a==null?[]:[a]),f=g?n:f,lt(f)||(f=f==null?[]:[f]),cu(r,a,f))}var sx=Do(function(r,a,f){r[f?0:1].push(a)},function(){return[[],[]]});function rx(r,a,f){var g=lt(r)?fl:Df,p=arguments.length<3;return g(r,et(a,4),f,p,ui)}function ox(r,a,f){var g=lt(r)?bp:Df,p=arguments.length<3;return g(r,et(a,4),f,p,Jf)}function ax(r,a){var f=lt(r)?ai:Qf;return f(r,Go(et(a,3)))}function lx(r){var a=lt(r)?Kf:t_;return a(r)}function cx(r,a,f){(f?be(r,a,f):a===n)?a=1:a=ht(a);var g=lt(r)?A0:e_;return g(r,a)}function fx(r){var a=lt(r)?O0:i_;return a(r)}function ux(r){if(r==null)return 0;if(ke(r))return Xo(r)?xs(r):r.length;var a=ge(r);return a==ae||a==Dt?r.size:El(r).length}function hx(r,a,f){var g=lt(r)?ul:s_;return f&&be(r,a,f)&&(a=n),g(r,et(a,3))}var dx=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]]),cu(r,fe(a,1),[])}),Vo=Xp||function(){return ce.Date.now()};function gx(r,a){if(typeof a!="function")throw new Qe(l);return r=ht(r),function(){if(--r<1)return a.apply(this,arguments)}}function ih(r,a,f){return a=f?n:a,a=r&&a==null?r.length:a,Wn(r,$,n,n,n,n,a)}function sh(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=C;if(f.length){var p=ci(f,ks(Ql));g|=N}return Wn(r,g,a,f,p)}),rh=mt(function(r,a,f){var g=C|A;if(f.length){var p=ci(f,ks(rh));g|=N}return Wn(a,g,r,f,p)});function oh(r,a,f){a=f?n:a;var g=Wn(r,W,n,n,n,n,n,a);return g.placeholder=oh.placeholder,g}function ah(r,a,f){a=f?n:a;var g=Wn(r,z,n,n,n,n,n,a);return g.placeholder=ah.placeholder,g}function lh(r,a,f){var g,p,y,w,k,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?Qt(rn(f.maxWait)||0,a):y,K="trailing"in f?!!f.trailing:K);function Q(Yt){var mn=g,$n=p;return g=p=n,B=Yt,w=r.apply($n,mn),w}function nt(Yt){return B=Yt,k=br(_t,a),F?Q(Yt):w}function gt(Yt){var mn=Yt-I,$n=Yt-B,kh=a-mn;return U?de(kh,y-$n):kh}function it(Yt){var mn=Yt-I,$n=Yt-B;return I===n||mn>=a||mn<0||U&&$n>=y}function _t(){var Yt=Vo();if(it(Yt))return vt(Yt);k=br(_t,gt(Yt))}function vt(Yt){return k=n,K&&g?Q(Yt):(g=p=n,w)}function Ve(){k!==n&&bu(k),B=0,g=I=p=k=n}function xe(){return k===n?w:vt(Vo())}function $e(){var Yt=Vo(),mn=it(Yt);if(g=arguments,p=this,I=Yt,mn){if(k===n)return nt(I);if(U)return bu(k),k=br(_t,a),Q(I)}return k===n&&(k=br(_t,a)),w}return $e.cancel=Ve,$e.flush=xe,$e}var mx=mt(function(r,a){return Zf(r,1,a)}),px=mt(function(r,a,f){return Zf(r,rn(a)||0,f)});function _x(r){return Wn(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||Bn),f}$o.Cache=Bn;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 bx(r){return sh(2,r)}var xx=r_(function(r,a){a=a.length==1&&lt(a[0])?Rt(a[0],ze(et())):Rt(fe(a,1),ze(et()));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 We(r,this,g)})}),tc=mt(function(r,a){var f=ci(a,ks(tc));return Wn(r,N,n,a,f)}),ch=mt(function(r,a){var f=ci(a,ks(ch));return Wn(r,Y,n,a,f)}),yx=zn(function(r,a){return Wn(r,G,n,n,n,a)});function vx(r,a){if(typeof r!="function")throw new Qe(l);return a=a===n?a:ht(a),mt(r,a)}function Sx(r,a){if(typeof r!="function")throw new Qe(l);return a=a==null?0:Qt(ht(a),0),mt(function(f){var g=f[a],p=gi(f,0,a);return g&&li(p,g),We(r,this,p)})}function wx(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),lh(r,a,{leading:g,maxWait:a,trailing:p})}function Mx(r){return ih(r,1)}function Tx(r,a){return tc(Fl(a),r)}function Px(){if(!arguments.length)return[];var r=arguments[0];return lt(r)?r:[r]}function kx(r){return en(r,v)}function Cx(r,a){return a=typeof a=="function"?a:n,en(r,v,a)}function Ex(r){return en(r,m|v)}function Ix(r,a){return a=typeof a=="function"?a:n,en(r,m|v,a)}function Ax(r,a){return a==null||jf(r,a,ne(a))}function gn(r,a){return r===a||r!==r&&a!==a}var Ox=Bo(Pl),Dx=Bo(function(r,a){return r>=a}),$i=nu(function(){return arguments}())?nu:function(r){return zt(r)&&Pt.call(r,"callee")&&!Uf.call(r,"callee")},lt=R.isArray,Rx=wf?ze(wf):U0;function ke(r){return r!=null&&Yo(r.length)&&!Un(r)}function Gt(r){return zt(r)&&ke(r)}function Lx(r){return r===!0||r===!1||zt(r)&&_e(r)==Be}var mi=qp||uc,Nx=Mf?ze(Mf):V0;function Bx(r){return zt(r)&&r.nodeType===1&&!xr(r)}function Fx(r){if(r==null)return!0;if(ke(r)&&(lt(r)||typeof r=="string"||typeof r.splice=="function"||mi(r)||Cs(r)||$i(r)))return!r.length;var a=ge(r);if(a==ae||a==Dt)return!r.size;if(_r(r))return!El(r).length;for(var f in r)if(Pt.call(r,f))return!1;return!0}function Wx(r,a){return gr(r,a)}function zx(r,a,f){f=typeof f=="function"?f:n;var g=f?f(r,a):n;return g===n?gr(r,a,n,f):!!g}function ec(r){if(!zt(r))return!1;var a=_e(r);return a==An||a==he||typeof r.message=="string"&&typeof r.name=="string"&&!xr(r)}function Hx(r){return typeof r=="number"&&$f(r)}function Un(r){if(!Bt(r))return!1;var a=_e(r);return a==bn||a==ei||a==oe||a==to}function fh(r){return typeof r=="number"&&r==ht(r)}function Yo(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=qt}function Bt(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function zt(r){return r!=null&&typeof r=="object"}var uh=Tf?ze(Tf):G0;function Ux(r,a){return r===a||Cl(r,a,Gl(a))}function Vx(r,a,f){return f=typeof f=="function"?f:n,Cl(r,a,Gl(a),f)}function $x(r){return hh(r)&&r!=+r}function Gx(r){if(C_(r))throw new at(o);return iu(r)}function Yx(r){return r===null}function Xx(r){return r==null}function hh(r){return typeof r=="number"||zt(r)&&_e(r)==cn}function xr(r){if(!zt(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)==Vp}var nc=Pf?ze(Pf):Y0;function Kx(r){return fh(r)&&r>=-9007199254740991&&r<=qt}var dh=kf?ze(kf):X0;function Xo(r){return typeof r=="string"||!lt(r)&&zt(r)&&_e(r)==Ei}function Ue(r){return typeof r=="symbol"||zt(r)&&_e(r)==os}var Cs=Cf?ze(Cf):K0;function qx(r){return r===n}function jx(r){return zt(r)&&ge(r)==Ii}function Zx(r){return zt(r)&&_e(r)==Ga}var Jx=Bo(Il),Qx=Bo(function(r,a){return r<=a});function gh(r){if(!r)return[];if(ke(r))return Xo(r)?hn(r):Pe(r);if(or&&r[or])return Ap(r[or]());var a=ge(r),f=a==ae?_l:a==Dt?uo:Es;return f(r)}function Vn(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*Vt}return r===r?r:0}function ht(r){var a=Vn(r),f=a%1;return a===a?f?a-f:a:0}function mh(r){return r?zi(ht(r),0,re):0}function rn(r){if(typeof r=="number")return r;if(Ue(r))return Le;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=Rf(r);var f=Dn.test(r);return f||Di.test(r)?gp(r.slice(2),f?2:8):er.test(r)?Le:+r}function ph(r){return Sn(r,Ce(r))}function t1(r){return r?zi(ht(r),-9007199254740991,qt):r===0?r:0}function Mt(r){return r==null?"":He(r)}var e1=Ts(function(r,a){if(_r(a)||ke(a)){Sn(a,ne(a),r);return}for(var f in a)Pt.call(a,f)&&ur(r,f,a[f])}),_h=Ts(function(r,a){Sn(a,Ce(a),r)}),Ko=Ts(function(r,a,f,g){Sn(a,Ce(a),r,g)}),n1=Ts(function(r,a,f,g){Sn(a,ne(a),r,g)}),i1=zn(wl);function s1(r,a){var f=Ms(r);return a==null?f:qf(f,a)}var r1=mt(function(r,a){r=Ct(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),k=-1,I=w.length;++k<I;){var B=w[k],F=r[B];(F===n||gn(F,vs[B])&&!Pt.call(r,B))&&(r[B]=y[B])}return r}),o1=mt(function(r){return r.push(n,Ru),We(bh,n,r)});function a1(r,a){return If(r,et(a,3),vn)}function l1(r,a){return If(r,et(a,3),Tl)}function c1(r,a){return r==null?r:Ml(r,et(a,3),Ce)}function f1(r,a){return r==null?r:tu(r,et(a,3),Ce)}function u1(r,a){return r&&vn(r,et(a,3))}function h1(r,a){return r&&Tl(r,et(a,3))}function d1(r){return r==null?[]:Eo(r,ne(r))}function g1(r){return r==null?[]:Eo(r,Ce(r))}function ic(r,a,f){var g=r==null?n:Hi(r,a);return g===n?f:g}function m1(r,a){return r!=null&&Bu(r,a,F0)}function sc(r,a){return r!=null&&Bu(r,a,W0)}var p1=Eu(function(r,a,f){a!=null&&typeof a.toString!="function"&&(a=po.call(a)),r[a]=f},oc(Ee)),_1=Eu(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]},et),b1=mt(dr);function ne(r){return ke(r)?Xf(r):El(r)}function Ce(r){return ke(r)?Xf(r,!0):q0(r)}function x1(r,a){var f={};return a=et(a,3),vn(r,function(g,p,y){Fn(f,a(g,p,y),g)}),f}function y1(r,a){var f={};return a=et(a,3),vn(r,function(g,p,y){Fn(f,p,a(g,p,y))}),f}var v1=Ts(function(r,a,f){Io(r,a,f)}),bh=Ts(function(r,a,f,g){Io(r,a,f,g)}),S1=zn(function(r,a){var f={};if(r==null)return f;var g=!1;a=Rt(a,function(y){return y=di(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 w1(r,a){return xh(r,Go(et(a)))}var M1=zn(function(r,a){return r==null?{}:Z0(r,a)});function xh(r,a){if(r==null)return{};var f=Rt(Vl(r),function(g){return[g]});return a=et(a),fu(r,f,function(g,p){return a(g,p[0])})}function T1(r,a,f){a=di(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=Un(y)?y.call(r):y}return r}function P1(r,a,f){return r==null?r:mr(r,a,f)}function k1(r,a,f,g){return g=typeof g=="function"?g:n,r==null?r:mr(r,a,f,g)}var yh=Ou(ne),vh=Ou(Ce);function C1(r,a,f){var g=lt(r),p=g||mi(r)||Cs(r);if(a=et(a,4),f==null){var y=r&&r.constructor;p?f=g?new y:[]:Bt(r)?f=Un(y)?Ms(xo(r)):{}:f={}}return(p?Je:vn)(r,function(w,k,I){return a(f,w,k,I)}),f}function E1(r,a){return r==null?!0:Ll(r,a)}function I1(r,a,f){return r==null?r:mu(r,a,Fl(f))}function A1(r,a,f,g){return g=typeof g=="function"?g:n,r==null?r:mu(r,a,Fl(f),g)}function Es(r){return r==null?[]:pl(r,ne(r))}function O1(r){return r==null?[]:pl(r,Ce(r))}function D1(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),zi(rn(r),a,f)}function R1(r,a,f){return a=Vn(a),f===n?(f=a,a=0):f=Vn(f),r=rn(r),z0(r,a,f)}function L1(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=Vn(r),a===n?(a=r,r=0):a=Vn(a)),r>a){var g=r;r=a,a=g}if(f||r%1||a%1){var p=Gf();return de(r+p*(a-r+dp("1e-"+((p+"").length-1))),a)}return Ol(r,a)}var N1=Ps(function(r,a,f){return a=a.toLowerCase(),r+(f?Sh(a):a)});function Sh(r){return rc(Mt(r).toLowerCase())}function wh(r){return r=Mt(r),r&&r.replace(nr,Pp).replace(ip,"")}function B1(r,a,f){r=Mt(r),a=He(a);var g=r.length;f=f===n?g:zi(ht(f),0,g);var p=f;return f-=a.length,f>=0&&r.slice(f,p)==a}function F1(r){return r=Mt(r),r&&Ka.test(r)?r.replace(qs,kp):r}function W1(r){return r=Mt(r),r&&tl.test(r)?r.replace(si,"\\$&"):r}var z1=Ps(function(r,a,f){return r+(f?"-":"")+a.toLowerCase()}),H1=Ps(function(r,a,f){return r+(f?" ":"")+a.toLowerCase()}),U1=Pu("toLowerCase");function V1(r,a,f){r=Mt(r),a=ht(a);var g=a?xs(r):0;if(!a||g>=a)return r;var p=(a-g)/2;return No(wo(p),f)+r+No(So(p),f)}function $1(r,a,f){r=Mt(r),a=ht(a);var g=a?xs(r):0;return a&&g<a?r+No(a-g,f):r}function G1(r,a,f){r=Mt(r),a=ht(a);var g=a?xs(r):0;return a&&g<a?No(a-g,f)+r:r}function Y1(r,a,f){return f||a==null?a=0:a&&(a=+a),Qp(Mt(r).replace(Js,""),a||0)}function X1(r,a,f){return(f?be(r,a,f):a===n)?a=1:a=ht(a),Dl(Mt(r),a)}function K1(){var r=arguments,a=Mt(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var q1=Ps(function(r,a,f){return r+(f?"_":"")+a.toLowerCase()});function j1(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=He(a),!a&&bs(r))?gi(hn(r),0,f):r.split(a,f)):[]}var Z1=Ps(function(r,a,f){return r+(f?" ":"")+rc(a)});function J1(r,a,f){return r=Mt(r),f=f==null?0:zi(ht(f),0,r.length),a=He(a),r.slice(f,f+a.length)==a}function Q1(r,a,f){var g=x.templateSettings;f&&be(r,a,f)&&(a=n),r=Mt(r),a=Ko({},a,g,Du);var p=Ko({},a.imports,g.imports,Du),y=ne(p),w=pl(p,y),k,I,B=0,F=a.interpolate||us,U="__p += '",K=bl((a.escape||us).source+"|"+F.source+"|"+(F===Zs?ro:us).source+"|"+(a.evaluate||us).source+"|$","g"),Q="//# sourceURL="+(Pt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lp+"]")+`
45
+ `;r.replace(K,function(it,_t,vt,Ve,xe,$e){return vt||(vt=Ve),U+=r.slice(B,$e).replace(il,Cp),_t&&(k=!0,U+=`' +
46
+ __e(`+_t+`) +
47
+ '`),xe&&(I=!0,U+=`';
48
+ `+xe+`;
49
+ __p += '`),vt&&(U+=`' +
50
+ ((__t = (`+vt+`)) == null ? '' : __t) +
51
+ '`),B=$e+it.length,it}),U+=`';
52
+ `;var nt=Pt.call(a,"variable")&&a.variable;if(!nt)U=`with (obj) {
53
+ `+U+`
54
+ }
55
+ `;else if(io.test(nt))throw new at(c);U=(I?U.replace(cs,""):U).replace(Ya,"$1").replace(Xa,"$1;"),U="function("+(nt||"obj")+`) {
56
+ `+(nt?"":`obj || (obj = {});
57
+ `)+"var __t, __p = ''"+(k?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
58
+ function print() { __p += __j.call(arguments, '') }
59
+ `:`;
60
+ `)+U+`return __p
61
+ }`;var gt=Th(function(){return wt(y,Q+"return "+U).apply(n,w)});if(gt.source=U,ec(gt))throw gt;return gt}function ty(r){return Mt(r).toLowerCase()}function ey(r){return Mt(r).toUpperCase()}function ny(r,a,f){if(r=Mt(r),r&&(f||a===n))return Rf(r);if(!r||!(a=He(a)))return r;var g=hn(r),p=hn(a),y=Lf(g,p),w=Nf(g,p)+1;return gi(g,y,w).join("")}function iy(r,a,f){if(r=Mt(r),r&&(f||a===n))return r.slice(0,Ff(r)+1);if(!r||!(a=He(a)))return r;var g=hn(r),p=Nf(g,hn(a))+1;return gi(g,0,p).join("")}function sy(r,a,f){if(r=Mt(r),r&&(f||a===n))return r.replace(Js,"");if(!r||!(a=He(a)))return r;var g=hn(r),p=Lf(g,hn(a));return gi(g,p).join("")}function ry(r,a){var f=rt,g=st;if(Bt(a)){var p="separator"in a?a.separator:p;f="length"in a?ht(a.length):f,g="omission"in a?He(a.omission):g}r=Mt(r);var y=r.length;if(bs(r)){var w=hn(r);y=w.length}if(f>=y)return r;var k=f-xs(g);if(k<1)return g;var I=w?gi(w,0,k).join(""):r.slice(0,k);if(p===n)return I+g;if(w&&(k+=I.length-k),nc(p)){if(r.slice(k).search(p)){var B,F=I;for(p.global||(p=bl(p.source,Mt(tr.exec(p))+"g")),p.lastIndex=0;B=p.exec(F);)var U=B.index;I=I.slice(0,U===n?k:U)}}else if(r.indexOf(He(p),k)!=k){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+g}function oy(r){return r=Mt(r),r&&js.test(r)?r.replace(Ks,Lp):r}var ay=Ps(function(r,a,f){return r+(f?" ":"")+a.toUpperCase()}),rc=Pu("toUpperCase");function Mh(r,a,f){return r=Mt(r),a=f?n:a,a===n?Ip(r)?Fp(r):vp(r):r.match(a)||[]}var Th=mt(function(r,a){try{return We(r,n,a)}catch(f){return ec(f)?f:new at(f)}}),ly=zn(function(r,a){return Je(a,function(f){f=wn(f),Fn(r,f,Ql(r[f],r))}),r});function cy(r){var a=r==null?0:r.length,f=et();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(We(y[0],this,g))return We(y[1],this,g)}})}function fy(r){return L0(en(r,m))}function oc(r){return function(){return r}}function uy(r,a){return r==null||r!==r?a:r}var hy=Cu(),dy=Cu(!0);function Ee(r){return r}function ac(r){return su(typeof r=="function"?r:en(r,m))}function gy(r){return ou(en(r,m))}function my(r,a){return au(r,en(a,m))}var py=mt(function(r,a){return function(f){return dr(f,r,a)}}),_y=mt(function(r,a){return function(f){return dr(r,f,a)}});function lc(r,a,f){var g=ne(a),p=Eo(a,g);f==null&&!(Bt(a)&&(p.length||!g.length))&&(f=a,a=r,r=this,p=Eo(a,ne(a)));var y=!(Bt(f)&&"chain"in f)||!!f.chain,w=Un(r);return Je(p,function(k){var I=a[k];r[k]=I,w&&(r.prototype[k]=function(){var B=this.__chain__;if(y||B){var F=r(this.__wrapped__),U=F.__actions__=Pe(this.__actions__);return U.push({func:I,args:arguments,thisArg:r}),F.__chain__=B,F}return I.apply(r,li([this.value()],arguments))})}),r}function by(){return ce._===this&&(ce._=$p),this}function cc(){}function xy(r){return r=ht(r),mt(function(a){return lu(a,r)})}var yy=zl(Rt),vy=zl(Ef),Sy=zl(ul);function Ph(r){return Xl(r)?hl(wn(r)):J0(r)}function wy(r){return function(a){return r==null?n:Hi(r,a)}}var My=Iu(),Ty=Iu(!0);function fc(){return[]}function uc(){return!1}function Py(){return{}}function ky(){return""}function Cy(){return!0}function Ey(r,a){if(r=ht(r),r<1||r>qt)return[];var f=re,g=de(r,re);a=et(a),r-=re;for(var p=ml(g,a);++f<r;)a(f);return p}function Iy(r){return lt(r)?Rt(r,wn):Ue(r)?[r]:Pe(Yu(Mt(r)))}function Ay(r){var a=++Up;return Mt(r)+a}var Oy=Lo(function(r,a){return r+a},0),Dy=Hl("ceil"),Ry=Lo(function(r,a){return r/a},1),Ly=Hl("floor");function Ny(r){return r&&r.length?Co(r,Ee,Pl):n}function By(r,a){return r&&r.length?Co(r,et(a,2),Pl):n}function Fy(r){return Of(r,Ee)}function Wy(r,a){return Of(r,et(a,2))}function zy(r){return r&&r.length?Co(r,Ee,Il):n}function Hy(r,a){return r&&r.length?Co(r,et(a,2),Il):n}var Uy=Lo(function(r,a){return r*a},1),Vy=Hl("round"),$y=Lo(function(r,a){return r-a},0);function Gy(r){return r&&r.length?gl(r,Ee):0}function Yy(r,a){return r&&r.length?gl(r,et(a,2)):0}return x.after=gx,x.ary=ih,x.assign=e1,x.assignIn=_h,x.assignInWith=Ko,x.assignWith=n1,x.at=i1,x.before=sh,x.bind=Ql,x.bindAll=ly,x.bindKey=rh,x.castArray=Px,x.chain=th,x.chunk=L_,x.compact=N_,x.concat=B_,x.cond=cy,x.conforms=fy,x.constant=oc,x.countBy=Gb,x.create=s1,x.curry=oh,x.curryRight=ah,x.debounce=lh,x.defaults=r1,x.defaultsDeep=o1,x.defer=mx,x.delay=px,x.difference=F_,x.differenceBy=W_,x.differenceWith=z_,x.drop=H_,x.dropRight=U_,x.dropRightWhile=V_,x.dropWhile=$_,x.fill=G_,x.filter=Xb,x.flatMap=jb,x.flatMapDeep=Zb,x.flatMapDepth=Jb,x.flatten=ju,x.flattenDeep=Y_,x.flattenDepth=X_,x.flip=_x,x.flow=hy,x.flowRight=dy,x.fromPairs=K_,x.functions=d1,x.functionsIn=g1,x.groupBy=Qb,x.initial=j_,x.intersection=Z_,x.intersectionBy=J_,x.intersectionWith=Q_,x.invert=p1,x.invertBy=_1,x.invokeMap=ex,x.iteratee=ac,x.keyBy=nx,x.keys=ne,x.keysIn=Ce,x.map=Uo,x.mapKeys=x1,x.mapValues=y1,x.matches=gy,x.matchesProperty=my,x.memoize=$o,x.merge=v1,x.mergeWith=bh,x.method=py,x.methodOf=_y,x.mixin=lc,x.negate=Go,x.nthArg=xy,x.omit=S1,x.omitBy=w1,x.once=bx,x.orderBy=ix,x.over=yy,x.overArgs=xx,x.overEvery=vy,x.overSome=Sy,x.partial=tc,x.partialRight=ch,x.partition=sx,x.pick=M1,x.pickBy=xh,x.property=Ph,x.propertyOf=wy,x.pull=ib,x.pullAll=Ju,x.pullAllBy=sb,x.pullAllWith=rb,x.pullAt=ob,x.range=My,x.rangeRight=Ty,x.rearg=yx,x.reject=ax,x.remove=ab,x.rest=vx,x.reverse=Zl,x.sampleSize=cx,x.set=P1,x.setWith=k1,x.shuffle=fx,x.slice=lb,x.sortBy=dx,x.sortedUniq=mb,x.sortedUniqBy=pb,x.split=j1,x.spread=Sx,x.tail=_b,x.take=bb,x.takeRight=xb,x.takeRightWhile=yb,x.takeWhile=vb,x.tap=Nb,x.throttle=wx,x.thru=Ho,x.toArray=gh,x.toPairs=yh,x.toPairsIn=vh,x.toPath=Iy,x.toPlainObject=ph,x.transform=C1,x.unary=Mx,x.union=Sb,x.unionBy=wb,x.unionWith=Mb,x.uniq=Tb,x.uniqBy=Pb,x.uniqWith=kb,x.unset=E1,x.unzip=Jl,x.unzipWith=Qu,x.update=I1,x.updateWith=A1,x.values=Es,x.valuesIn=O1,x.without=Cb,x.words=Mh,x.wrap=Tx,x.xor=Eb,x.xorBy=Ib,x.xorWith=Ab,x.zip=Ob,x.zipObject=Db,x.zipObjectDeep=Rb,x.zipWith=Lb,x.entries=yh,x.entriesIn=vh,x.extend=_h,x.extendWith=Ko,lc(x,x),x.add=Oy,x.attempt=Th,x.camelCase=N1,x.capitalize=Sh,x.ceil=Dy,x.clamp=D1,x.clone=kx,x.cloneDeep=Ex,x.cloneDeepWith=Ix,x.cloneWith=Cx,x.conformsTo=Ax,x.deburr=wh,x.defaultTo=uy,x.divide=Ry,x.endsWith=B1,x.eq=gn,x.escape=F1,x.escapeRegExp=W1,x.every=Yb,x.find=Kb,x.findIndex=Ku,x.findKey=a1,x.findLast=qb,x.findLastIndex=qu,x.findLastKey=l1,x.floor=Ly,x.forEach=eh,x.forEachRight=nh,x.forIn=c1,x.forInRight=f1,x.forOwn=u1,x.forOwnRight=h1,x.get=ic,x.gt=Ox,x.gte=Dx,x.has=m1,x.hasIn=sc,x.head=Zu,x.identity=Ee,x.includes=tx,x.indexOf=q_,x.inRange=R1,x.invoke=b1,x.isArguments=$i,x.isArray=lt,x.isArrayBuffer=Rx,x.isArrayLike=ke,x.isArrayLikeObject=Gt,x.isBoolean=Lx,x.isBuffer=mi,x.isDate=Nx,x.isElement=Bx,x.isEmpty=Fx,x.isEqual=Wx,x.isEqualWith=zx,x.isError=ec,x.isFinite=Hx,x.isFunction=Un,x.isInteger=fh,x.isLength=Yo,x.isMap=uh,x.isMatch=Ux,x.isMatchWith=Vx,x.isNaN=$x,x.isNative=Gx,x.isNil=Xx,x.isNull=Yx,x.isNumber=hh,x.isObject=Bt,x.isObjectLike=zt,x.isPlainObject=xr,x.isRegExp=nc,x.isSafeInteger=Kx,x.isSet=dh,x.isString=Xo,x.isSymbol=Ue,x.isTypedArray=Cs,x.isUndefined=qx,x.isWeakMap=jx,x.isWeakSet=Zx,x.join=tb,x.kebabCase=z1,x.last=sn,x.lastIndexOf=eb,x.lowerCase=H1,x.lowerFirst=U1,x.lt=Jx,x.lte=Qx,x.max=Ny,x.maxBy=By,x.mean=Fy,x.meanBy=Wy,x.min=zy,x.minBy=Hy,x.stubArray=fc,x.stubFalse=uc,x.stubObject=Py,x.stubString=ky,x.stubTrue=Cy,x.multiply=Uy,x.nth=nb,x.noConflict=by,x.noop=cc,x.now=Vo,x.pad=V1,x.padEnd=$1,x.padStart=G1,x.parseInt=Y1,x.random=L1,x.reduce=rx,x.reduceRight=ox,x.repeat=X1,x.replace=K1,x.result=T1,x.round=Vy,x.runInContext=E,x.sample=lx,x.size=ux,x.snakeCase=q1,x.some=hx,x.sortedIndex=cb,x.sortedIndexBy=fb,x.sortedIndexOf=ub,x.sortedLastIndex=hb,x.sortedLastIndexBy=db,x.sortedLastIndexOf=gb,x.startCase=Z1,x.startsWith=J1,x.subtract=$y,x.sum=Gy,x.sumBy=Yy,x.template=Q1,x.times=Ey,x.toFinite=Vn,x.toInteger=ht,x.toLength=mh,x.toLower=ty,x.toNumber=rn,x.toSafeInteger=t1,x.toString=Mt,x.toUpper=ey,x.trim=ny,x.trimEnd=iy,x.trimStart=sy,x.truncate=ry,x.unescape=oy,x.uniqueId=Ay,x.upperCase=ay,x.upperFirst=rc,x.each=eh,x.eachRight=nh,x.first=Zu,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:Qt(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==Ut||f==kt;xt.prototype[r]=function(p){var y=this.clone();return y.__iteratees__.push({iteratee:et(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(Ee)},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 dr(f,r,a)})}),xt.prototype.reject=function(r){return this.filter(Go(et(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__,k=g?[1]:arguments,I=w instanceof xt,B=k[0],F=I||lt(w),U=function(_t){var vt=p.apply(x,li([_t],k));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,nt=y&&!K,gt=I&&!Q;if(!y&&F){w=gt?w:new xt(this);var it=r.apply(w,k);return it.__actions__.push({func:Ho,args:[U],thisArg:n}),new tn(it,K)}return nt&&gt?r.apply(this,k):(it=this.thru(U),nt?g?it.value()[0]:it.value():it)})}),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(lt(y)?y:[],p)}return this[f](function(w){return a.apply(lt(w)?w:[],p)})}}),vn(xt.prototype,function(r,a){var f=x[a];if(f){var g=f.name+"";Pt.call(ws,g)||(ws[g]=[]),ws[g].push({name:a,func:f})}}),ws[Ro(n,A).name]=[{name:"wrapper",func:n}],xt.prototype.clone=o0,xt.prototype.reverse=a0,xt.prototype.value=l0,x.prototype.at=Bb,x.prototype.chain=Fb,x.prototype.commit=Wb,x.prototype.next=zb,x.prototype.plant=Ub,x.prototype.reverse=Vb,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=$b,x.prototype.first=x.prototype.head,or&&(x.prototype[or]=Hb),x},ys=Wp();Ni?((Ni.exports=ys)._=ys,al._=ys):ce._=ys}).call(D2)}(Or,Or.exports)),Or.exports}var Pr=R2();typeof BigInt>"u"&&(BigInt=function(t){if(isNaN(t))throw new Error("");return t});const tt=BigInt(0),ft=BigInt(1),qr=BigInt(2),Yc=BigInt(5),Oe=BigInt(10),L2=2e3,X={s:ft,n:tt,d:ft};function Yn(t,e){try{t=BigInt(t)}catch{throw _i()}return t*e}function pn(t){return typeof t=="bigint"?t:Math.floor(t)}function Lt(t,e){if(e===tt)throw pf();const n=Object.create(Jr.prototype);n.s=t<tt?-ft:ft,t=t<tt?-t:t;const i=ji(t,e);return n.n=t/i,n.d=e/i,n}function Os(t){const e={};let n=t,i=qr,s=Yc-ft;for(;s<=n;){for(;n%i===tt;)n/=i,e[i]=(e[i]||tt)+ft;s+=ft+qr*i++}return n!==t?n>1&&(e[n]=(e[n]||tt)+ft):e[t]=(e[t]||tt)+ft,e}const ie=function(t,e){let n=tt,i=ft,s=ft;if(t!=null)if(e!==void 0){if(typeof t=="bigint")n=t;else{if(isNaN(t))throw _i();if(t%1!==0)throw cg();n=BigInt(t)}if(typeof e=="bigint")i=e;else{if(isNaN(e))throw _i();if(e%1!==0)throw cg();i=BigInt(e)}s=n*i}else if(typeof t=="object"){if("d"in t&&"n"in t)n=BigInt(t.n),i=BigInt(t.d),"s"in t&&(n*=BigInt(t.s));else if(0 in t)n=BigInt(t[0]),1 in t&&(i=BigInt(t[1]));else if(typeof t=="bigint")n=t;else throw _i();s=n*i}else if(typeof t=="number"){if(isNaN(t))throw _i();if(t<0&&(s=-ft,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=ft,d=ft,m=t.replace(/_/g,"").match(/\d+|./g);if(m===null)throw _i();if(m[o]==="-"?(s=-ft,o++):m[o]==="+"&&o++,m.length===o+1?c=Yn(m[o++],s):m[o+1]==="."||m[o]==="."?(m[o]!=="."&&(l=Yn(m[o++],s)),o++,(o+1===m.length||m[o+1]==="("&&m[o+3]===")"||m[o+1]==="'"&&m[o+3]==="'")&&(c=Yn(m[o],s),h=Oe**BigInt(m[o].length),o++),(m[o]==="("&&m[o+2]===")"||m[o]==="'"&&m[o+2]==="'")&&(u=Yn(m[o+1],s),d=Oe**BigInt(m[o+1].length)-ft,o+=3)):m[o+1]==="/"||m[o+1]===":"?(c=Yn(m[o],s),h=Yn(m[o+2],ft),o+=3):m[o+3]==="/"&&m[o+1]===" "&&(l=Yn(m[o],s),c=Yn(m[o+2],s),h=Yn(m[o+4],ft),o+=5),m.length<=o)i=h*d,s=n=u+i*l+d*c;else throw _i()}else if(typeof t=="bigint")n=t,s=t,i=ft;else throw _i();if(i===tt)throw pf();X.s=s<tt?-ft:ft,X.n=n<tt?-n:n,X.d=i<tt?-i:i};function N2(t,e,n){let i=ft;for(;e>tt;t=t*t%n,e>>=ft)e&ft&&(i=i*t%n);return i}function B2(t,e){for(;e%qr===tt;e/=qr);for(;e%Yc===tt;e/=Yc);if(e===ft)return tt;let n=Oe%e,i=1;for(;n!==ft;i++)if(n=n*Oe%e,i>L2)return tt;return BigInt(i)}function F2(t,e,n){let i=ft,s=N2(Oe,n,e);for(let o=0;o<300;o++){if(i===s)return BigInt(o);i=i*Oe%e,s=s*Oe%e}return 0}function ji(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(ie(t,e),this instanceof Jr)t=ji(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 pf=function(){return new Error("Division by Zero")},_i=function(){return new Error("Invalid argument")},cg=function(){return new Error("Parameters must be integer")};Jr.prototype={s:ft,n:tt,d:ft,abs:function(){return Lt(this.n,this.d)},neg:function(){return Lt(-this.s*this.n,this.d)},add:function(t,e){return ie(t,e),Lt(this.s*this.n*X.d+X.s*this.d*X.n,this.d*X.d)},sub:function(t,e){return ie(t,e),Lt(this.s*this.n*X.d-X.s*this.d*X.n,this.d*X.d)},mul:function(t,e){return ie(t,e),Lt(this.s*X.s*this.n*X.n,this.d*X.d)},div:function(t,e){return ie(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,ft);if(ie(t,e),tt===X.n*this.d)throw pf();return Lt(this.s*(X.d*this.n)%(X.n*this.d),X.d*this.d)},gcd:function(t,e){return ie(t,e),Lt(ji(X.n,this.n)*ji(X.d,this.d),X.d*this.d)},lcm:function(t,e){return ie(t,e),X.n===tt&&this.n===tt?Lt(tt,ft):Lt(X.n*this.n,ji(X.n,this.n)*ji(X.d,this.d))},inverse:function(){return Lt(this.s*this.d,this.n)},pow:function(t,e){if(ie(t,e),X.d===ft)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=Os(this.n),i=Os(this.d),s=ft,o=ft;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(ie(t,e),this.s<=tt||X.s<=tt)return null;const n={},i=Os(X.n),s=Os(X.d),o=Os(this.n),l=Os(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=ji(_,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 ie(t,e),this.s*this.n*X.d===X.s*X.n*this.d},lt:function(t,e){return ie(t,e),this.s*this.n*X.d<X.s*X.n*this.d},lte:function(t,e){return ie(t,e),this.s*this.n*X.d<=X.s*X.n*this.d},gt:function(t,e){return ie(t,e),this.s*this.n*X.d>X.s*X.n*this.d},gte:function(t,e){return ie(t,e),this.s*this.n*X.d>=X.s*X.n*this.d},compare:function(t,e){ie(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=Oe**BigInt(t||0),Lt(pn(this.s*t*this.n/this.d)+(t*this.n%this.d>tt&&this.s>=tt?ft:tt),t)},floor:function(t){return t=Oe**BigInt(t||0),Lt(pn(this.s*t*this.n/this.d)-(t*this.n%this.d>tt&&this.s<tt?ft:tt),t)},round:function(t){return t=Oe**BigInt(t||0),Lt(pn(this.s*t*this.n/this.d)+this.s*((this.s>=tt?ft:tt)+qr*(t*this.n%this.d)>this.d?ft:tt),t)},roundTo:function(t,e){ie(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 ie(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=B2(e,n),s=F2(e,n,i),o=this.s<tt?"-":"";if(o+=pn(e/n),e%=n,e*=Oe,e&&(o+="."),i){for(let l=s;l--;)o+=pn(e/n),e%=n,e*=Oe;o+="(";for(let l=i;l--;)o+=pn(e/n),e%=n,e*=Oe;o+=")"}else for(let l=t;e&&l--;)o+=pn(e/n),e%=n,e*=Oe;return o},toFraction:function(t){let e=this.n,n=this.d,i=this.s<tt?"-":"";if(n===ft)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===ft)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!==ft);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],ft);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 fg={maximumFractionDigits:20};function W2(t,e){let n;try{e&&(n=new Intl.NumberFormat(e,fg))}catch{n=new Intl.NumberFormat(void 0,fg)}return n.format(t)}const Lm=t=>typeof t=="string"&&jr(t)?bf(t):t,Qr=t=>{const e=Lm(t);if(rP(e)||Number.isNaN(e)||e===1/0||e===-1/0)return!0;if(!(eP(e)||nP(e)||oP(e)||aP(e)||iP(e)||sP(e))){const n=Hs(String(e));if(n.includes(Zn))return!1;const i=_f(n)?zm(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,En=(t,e,n)=>{const i=t,s=Lm(t);if(Qr(s)){const o=Hs(String(s)),l=_f(o)?zm(o):Xe(o)?parseFloat(o):o;return l===1/0||l===-1/0?l:Number.isNaN(l)||!Xe(l)?i:l}else return i},z2=t=>{if(Qr(t)){if(typeof t=="string")return t;if(typeof t=="number")return Number.isNaN(t)||!Number.isFinite(t)?String(t):Fm(t,{noThousandsSeparator:!0})}return t},Nm=(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},H2=t=>Nm(t)>0,ns=(t,e=!1)=>{const n=typeof t=="string",i=n&&jr(t),s=i?vP(t):null,o=Hs(i?bf(t):t);return{number:e&&H2(t)?o:En(o),unit:s,isString:n}},U2=(t,e)=>String(e?t:z2(t)),Ua=({value:t,unit:e,isString:n,isScientific:i})=>{const s=typeof t=="number"&&n?U2(t,i):t;return e?wP(s,e):s},V2=Number.EPSILON,$2=(t,e)=>{const{number:n,unit:i}=ns(t),{number:s,unit:o}=ns(e),c=i&&o&&i!==o?SP(s,i,o):s;return{firstNumber:n,secondNumber:c}},G2=t=>{if(t!=null){if(Xe(t)&&typeof t=="number")return t;if(lP(t)){const e=En(t==null?void 0:t.toString().replace("%",""));if(Xe(e))return e/100}}return null},Y2=(t,e,n={relativeDiff:V2})=>{const{relativeDiff:i,absoluteDiff:s}=n,l=G2(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}=$2(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 Y2(m,l,{relativeDiff:"1%"})||m<l}else return 2*Math.abs((h-d)/(h+d))<l}return!1},Ci=4,Xc=(t,e=Ci)=>{const n=10**e;return Math.round(t*n)/n},Bm=(t,e=Ci)=>{if(typeof t=="number")return Xc(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}=ns(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:Xc(n,e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},Kc=(t,e=Ci)=>Number(t.toPrecision(e)),X2=(t,e=Ci)=>{const n=En(t).toPrecision(e),[i,s]=n.split(".");if(s){const o=e-i.length;return`${i}.${s.padEnd(o,"0")}`}else return i},Ek=(t,e=Ci)=>{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}=ns(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:Kc(n,e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},ug=(t,e=Ci,n=!1)=>{const i=10**e,s=i&&t>i?Xc(t,0):n?X2(t,e):Kc(t,e);return n?String(s):s},Ik=(t,e=Ci)=>{if(typeof t=="number")return ug(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}=ns(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:ug(n,e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},Ak=(t,e=Ci)=>{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}=ns(t),o=!Xe(n)||typeof n=="string"&&n.endsWith(".")?t:n.toFixed(e);return Ua({value:o,unit:i,isString:s,isScientific:Ha(t)})},K2=1e-4,q2=1e7,j2={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻"},Z2=(t,e)=>{const n="0".repeat(e);return e>0&&t!=="0"?t.includes(".")?`${t}${n}`:`${t}.${n}`:t},J2=(t,e,n=!1)=>{const i=W2(En(t),"en-US").replaceAll(",",e);return n?Z2(i,Nm(t,!0)):i},Fm=(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 J2(t,i,e==null?void 0:e.preserveTrailingZeros)},Q2=(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=En(t);if(!Number.isFinite(s))return Da(t.toString());const o=i?"e":"·10",[l,c]=s.toExponential().split("e"),u=typeof n=="number"?Bm(l,n):l,h=c==="+0"||c==="-0",d=[...c.replaceAll("+","")].map(m=>i?m:j2[m]).join("");return h?u:`${u}${o}${d}`},tP=(t,e)=>{const n=Math.abs(En(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)?Q2(t,e):Fm(t,e)},Ok=(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)??K2,autoScientificAbove:(e==null?void 0:e.autoScientificAbove)??q2,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}=ns(t),l=tP(s,n),c=o?Cc==null?void 0:Cc[o]:"";return i&&o?l===""?c:`${l} ${c}`:l},eP=t=>t===null,nP=t=>t===void 0,iP=t=>t&&t.constructor===Array,sP=t=>t&&t.constructor===Object,rP=t=>t==="",oP=t=>t&&t[t.length-1]===".",aP=t=>t&&t[t.length-1]===",",lP=t=>typeof t=="string"&&/^\d+(\.\d+)?%$/.test(t),Wm=t=>t.trim().replace(/\s+/g," "),_f=t=>{if(typeof t!="string"||!t.includes("/"))return!1;try{return new Jr(Wm(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(_f(t))return!0;const e=parseFloat(t);return typeof t=="string"?!isNaN(e)&&(Gm.test(t)||isFinite(t)):isFinite(t)}function bi(t,e){const n=(t+"")[0];let i=0,s=e.indexOf(n,0)+1;for(;s>0;)s=e.indexOf(n,s)+1,i+=1;return i}function zm(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=Wm(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 Hs(t){let e=Da(t+"");const n=bi("/",e),i=bi(" ",e)+bi(" ",e);let s=bi(".",e),o=bi(",",e);return n===0&&i>0&&(e=e.replace(/\s/g,"")),o>1&&(e=e.replace(/,/g,"")),s>1&&(e=e.replace(/\./g,"")),o=bi(",",e),s=bi(".",e),s===1&&o===1?(e.indexOf(",")>e.indexOf(".")?(e=e.replace(".",""),e=e.replace(",",".")):e=e.replace(",",""),e.indexOf(".")===0&&(e=0+e),e):(!s&&o&&(e=e.replace(",",".")),e.indexOf(".")===0&&(e=0+e),e)}const Dk=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 cP(t){return typeof t=="number"?t:parseFloat(Hs(t))}const fP=t=>!Xe(t),{abs:Hm,exp:Um,sqrt:qc}=Math;function uP(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=Hm(t(u)-t(o)),c<i)return[u,!0,l];o=u,l++}return[n,!1,l]}function Vm(t){const e=1/(1+.5*Hm(t)),n=1-e*Um(-(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 hP(t){const e=s=>t-Vm(s/qc(2)),n=s=>-qc(2/Math.PI)*Um(-.5*s**2),[i]=uP(e,n,1);return i}function dP(t){return Vm(t/qc(2))}const Cc=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"}),gP=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}),mP=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=>hP(t),"Sigma|CI":t=>dP(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}),Ds=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"}),hg=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"}),pP=Object.freeze(Array.from(new Set(Object.values(gP).flat()))),_P=[NaN,-1/0,1/0],bP=_P.map(t=>t.toString());var ma={},dg;function xP(){if(dg)return ma;dg=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=$m;function $m(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 $m.errors=o,l===0}xP().default;const gg=t=>t==null?void 0:t.map(({message:e})=>e),Zn="|",yP=/^(-?[0-9., /]*?(?:e[-+]?[0-9]+)?)([^0-9-., /].*)?$/,Gm=/^[-+]?[0-9]*\.?[0-9]+(?:\/[0-9]*\.?[0-9]+)?(?:[eE][-+]?[0-9]+)?$/;function Ym(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 qn(t,e,n){if(t=Ym(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 En(t);if(t===1/0||t==="Infinity")return 1/0;if(t===-1/0||t==="-Infinity")return-1/0;if(fP(t)&&t!=="")return NaN;const i=mP[e+"|"+n];if(i)return i(En(t));if(Ds[e])return console.warn(`Unit '${e}' is deprecated - use '${Ds[e]}' instead.`),qn(t,Ds[e],n);if(Ds[n])return console.warn(`Unit '${n}' is deprecated - use '${Ds[n]}' instead.`),qn(t,e,Ds[n]);if(ga[n])return qn(t,e,ga[n]);if(ga[e])return qn(t,ga[e],n);const s=hg[e];if(s){const o=qn(t,e,s);return qn(o,s,n)}else{const o=hg[n];if(n&&o&&o!==n){const l=qn(t,e,o);return qn(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 bi(Zn,n)>1&&(e=n.split(Zn),n=e.slice(0,-1).join("")+Zn+e.slice(-1)),n.indexOf(Zn)>=0?e=n.split(Zn):bP.includes(n)?e=[n,""]:(e=Hs(n).match(yP),e&&(e=e.slice(1))),e||(e=["0",""]),e[1]==null&&(e[1]=""),[e[0],e[1]]}function bf(t){return Va(t)[0]}function vP(t){return Va(t)[1]}function Xm(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=Hs(t).replaceAll("+",""),s=Va(i);if(!s){if(e&&n)return Xm(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]?En(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"&&Gm.test(o))return parseFloat(o);if(!Xe(o)&&o!==1/0&&o!==-1/0)throw new Error("unum: invalid number: "+o+", "+typeof o);return cP(o)}return qn(s[0],n,e)}function jr(t){if(!t)return!1;const e=String(t).split(Zn);return e.length===2&&pP.includes(e[1])}function SP(t,e,n){return Xm(t,e,n)}function wP(t,e,n=""){if((t===null||t===""||t===void 0)&&(t=n),e===null)return String(t);let[i,s]=String(t).includes(Zn)?Va(String(t)):[t,e];return s||(s=e),[i,s].join(Zn)}function Rk(t){let e=t;return typeof t=="string"&&jr(t)&&(e=bf(t)),e=Ym(e),Xe(e)?{valid:pa(En(e)),errors:gg(pa.errors)}:{valid:pa(e),errors:gg(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 mg;function MP(){return mg||(mg=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 TP=MP();const PP=xg(TP),pg=10,kP=t=>t.reduce((e,n,i)=>{if(i===0)return e;const s=Math.abs(n-t[i-1]);return Math.max(s,e)},0),CP=(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},EP=(t,e)=>{const n=t.sort((c,u)=>c-u),i=kP(t)/10,s=t[0],o=(t.length+1)*pg;return[...Array(o)].map((c,u)=>{const h=s+(u-pg+1)*i;return parseFloat(h.toFixed(1))}).filter(c=>CP(c,n,e))},IP=t=>{var c,u,h,d,m,_,v,M,T;const{chart:e,ctx:n}=t,i=e.config;if(!((d=(h=(u=(c=i==null?void 0:i.options)==null?void 0:c.scales)==null?void 0:u[t.id])==null?void 0:h.grid)!=null&&d.drawOnChartArea)||i.options.indexAxis===t.axis)return;const s=t.axis==="x",o=t.ticks.map((C,A)=>t.getPixelForTick(A)).sort((C,A)=>C-A),l=EP(o,t);n.save(),n.strokeStyle=((T=(M=(v=(_=(m=i==null?void 0:i._config)==null?void 0:m.options)==null?void 0:_.scales)==null?void 0:v[t.id])==null?void 0:M.grid)==null?void 0:T.color)||"rgba(0,0,0,0.06)",n.lineWidth=.5,l.forEach(C=>{if(n.beginPath(),s){const{top:A,bottom:D}=e.chartArea;n.moveTo(C,A),n.lineTo(C,D)}else{const{left:A,right:D}=e.chartArea;n.moveTo(A,C),n.lineTo(D,C)}n.stroke()}),n.restore()},AP={id:"minorGridlines",beforeDatasetsDraw:t=>{const{scales:e}=t;Object.keys(e).forEach(n=>IP(e[n]))}},ki={ZERO:0,INITIAL:2,HOVERED:6,POINT_HOVERED:8},OP="rgba(0,0,0,0.1)",DP=[10,2],RP=12,Km='"Roobert", "Noto Sans", sans-serif',qm="hsl(60, 10.34482759%, 12.5%)",_g=12,Lk=8,Nk=4,_a="transparent",Bk=[1,10,100,1e3,1e4],LP=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac"],Fk="99",NP=16777215,Wk="auto",zk={NO:0,FAST:1e3},BP="new_chart",FP="htmlLegend",WP=9,Hk=1/10**WP,Uk=[{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 xf=(t=>(t.X="x",t.Y="y",t))(xf||{}),Si=(t=>(t.Bottom="bottom",t.Top="top",t.Left="left",t.Right="right",t.TopRight="top-right",t.TopLeft="top-left",t.BottomLeft="bottom-left",t.BottomRight="bottom-right",t))(Si||{}),zP=(t=>(t.Line="line",t.Bar="bar",t))(zP||{}),rs=(t=>(t.Pointer="pointer",t.Initial="initial",t.Grab="grab",t.Grabbing="grabbing",t.Crosshair="crosshair",t.Move="move",t))(rs||{}),HP=(t=>(t.Category="category",t.Linear="linear",t.Logarithmic="logarithmic",t))(HP||{}),jm=(t=>(t.Vertical="vertical",t))(jm||{}),UP=(t=>(t.Y="yLabel",t.X="xLabel",t))(UP||{}),VP=(t=>(t.End="end",t.Start="start",t.Center="center",t.Right="right",t.Left="left",t))(VP||{}),$P=(t=>(t.Box="box",t.Ellipse="ellipse",t.Line="line",t.Text="text",t))($P||{}),Zm=(t=>(t.Circle="circle",t.Square="rect",t.Diamond="rectRot",t.Triangle="triangle",t))(Zm||{}),GP=(t=>(t.Nearest="nearest",t))(GP||{}),YP=(t=>(t.X="x",t.Y="y",t.XY="xy",t.Z="z",t))(YP||{}),XP=(t=>(t.Shift="Shift",t))(XP||{}),KP=(t=>(t.Mousemove="mousemove",t.Mouseout="mouseout",t.Click="click",t.Touchstart="touchstart",t.Touchmove="touchmove",t.Dblclick="dblclick",t))(KP||{});const qP={id:"chartAreaBorder",beforeDraw(t,e,n){const{ctx:i,chartArea:{left:s,top:o,width:l,height:c}}=t;i.save(),i.strokeStyle=n.borderColor,i.lineWidth=n.borderWidth,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset??0,i.strokeRect(s,o,l,c),i.restore()}},Vk=(t,e)=>{var s;let n=[];t.showMinorGridlines&&n.push(AP);const i=e==null?void 0:e.customLegend;return i!=null&&i.customLegendPlugin&&(i!=null&&i.customLegendContainerID)&&n.push({id:FP,...(s=e==null?void 0:e.customLegend)==null?void 0:s.customLegendPlugin}),n.push(qP),n},jP=t=>{const e=`#${Math.floor(Math.random()*NP).toString(16)}`;return t.includes(e)?jP(t):(t.push(e),t)},$k=t=>t.title!==""?{display:!0,text:t.title}:{},Gk=t=>t===jm.Vertical,Yk=(t,e)=>{const[n,i]=t===xf.Y?[Si.Left,Si.Right]:[Si.Top,Si.Bottom];return e%2===0?n:i},Xk=(t,e)=>{const{width:n,height:i,staticChartHeight:s=!1,squareAspectRatio:o=0}=t,l=o?e.squareAspectRatio:"";let c="";return n||i?c="":c=s?e==null?void 0:e.fixedHeight:e==null?void 0:e.stretchHeight,PP(e.chart,c,l)},Kk=(t,e)=>{const{legend:n}=t||{};return{position:(n==null?void 0:n.position)||Si.Top,display:n==null?void 0:n.display,align:n==null?void 0:n.align,labels:{boxHeight:_g,boxWidth:n!=null&&n.usePointStyle?_g:void 0,usePointStyle:n==null?void 0:n.usePointStyle},onClick:e}},qk=t=>{const{error:e}=t.dataset.data[t==null?void 0:t.dataIndex];return e?`Error: ${Bm(e,4)}`:""},jk=(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.join(" , "):n;return e&&(i!=null&&i.length)?` (${i})`:""},Zk=t=>t?t.reduce((n,i,s)=>{var l;const o=((l=i.label)==null?void 0:l.replace(/\s/g,"_"))||String(s);return[...n,o]},[]).join("_"):BP,Jk=()=>{At.font.size=RP,At.font.family=Km,At.color=qm,At.borderColor=OP},Qk=t=>!!(t==null||t===""||Array.isArray(t)&&t.length===0||typeof t=="object"&&Object.keys(t).length===0),ZP="TOGGLE_DATA_VISIBILITY",JP="RESET_STATE",QP={annotation:[]},tk=(t,e)=>{var n;switch(e.type){case JP:return e.payload;case ZP:{const{chartInstance:i,dsConfig:s,annotationConfig:o}=e.payload,{datasetIndex:l,datasets:c,dataset:u}=s,{annotationIndex:h}=o,d=Pr.cloneDeep(t),m=Pr.defaultTo(i==null?void 0:i.isDatasetVisible(l),!0);if(l>=0&&(i==null||i.setDatasetVisibility(l,!m),u!=null&&u.displayGroup)){const _=u.displayGroup;c.forEach((v,M)=>{v.displayGroup===_&&(i==null||i.setDatasetVisibility(Number(M),!m))})}if(h>=0){const _=Pr.findIndex(d.annotation,{annotationIndex:h});if(_>=0){const v=Pr.defaultTo((n=d.annotation[_])==null?void 0:n.display,!1);Pr.set(d,["annotation",_,"display"],!v)}}return d}default:return t}};var ek=(t=>(t.MOUSEDOWN="mousedown",t.MOUSEMOVE="mousemove",t.MOUSEUP="mouseup",t))(ek||{}),se=(t=>(t.POINT="point",t.BOX="box",t.LINE="line",t.ELLIPSE="ellipse",t))(se||{}),nk=(t=>(t.X="x",t.Y="y",t.Both="both",t))(nk||{});const ik=(t,e,n)=>{var i;e.canvas.style.cursor=rs.Pointer,(i=t.options.scaleID)!=null&&i.includes(xf.X)&&t.options.label&&(t.options.label.xAdjust=e.chartArea.left),t.options.borderWidth=ki.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()),e.draw()},sk=(t,e,n)=>{t.options.borderWidth=ki.INITIAL,e.canvas.style.cursor=rs.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()),e.draw()},rk=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update(),t.options.borderWidth=ki.HOVERED,e.canvas.style.cursor=rs.Pointer),e.draw()},ok=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=null,t.options.borderWidth=ki.INITIAL,e.canvas.style.cursor=rs.Initial,e.update()),e.draw()},ak=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=t.options.id||null,e.update(),t.options.borderWidth=ki.POINT_HOVERED,e.canvas.style.cursor=rs.Pointer),e.draw()},lk=(t,e,n)=>{n!=null&&n.enableDrag&&(e.hoveredAnnotationId=null,t.options.borderWidth=ki.INITIAL,e.canvas.style.cursor=rs.Initial,e.update()),e.draw()},ck=t=>t==null?void 0:t.map((e,n)=>{var A,D,W,z,N,Y;const i=(e==null?void 0:e.annotationAxis)??void 0,s=(e==null?void 0:e.color)??LP[n],o=(e==null?void 0:e.type)??se.LINE,l=e==null?void 0:e.adjustScaleRange,c={[se.LINE]:s,[se.POINT]:s,[se.BOX]:s,[se.ELLIPSE]:_a}[o]||_a,u=o===se.LINE?ki.INITIAL:0,h=o===se.LINE?DP:void 0,d={content:e==null?void 0:e.label,display:!0,font:{weight:"normal"}},m={[se.LINE]:{backgroundColor:s,content:e==null?void 0:e.label,display:!1,position:Si.Top},[se.POINT]:{backgroundColor:((A=e==null?void 0:e.labelConfig)==null?void 0:A.backgroundColor)??_a,content:e==null?void 0:e.label,display:((D=e==null?void 0:e.labelConfig)==null?void 0:D.display)??!!(e!=null&&e.label),position:((W=e==null?void 0:e.labelConfig)==null?void 0:W.position)??Si.Bottom,color:((z=e==null?void 0:e.labelConfig)==null?void 0:z.color)??qm,font:((N=e==null?void 0:e.labelConfig)==null?void 0:N.font)??`12px ${Km}`,borderWidth:ki.INITIAL,padding:5,borderRadius:3,borderColor:((Y=e==null?void 0:e.labelConfig)==null?void 0:Y.borderColor)??_a},[se.BOX]:d,[se.ELLIPSE]:d}[o]||d,_=({element:$},{chart:G})=>{switch(o){case se.LINE:ik($,G,e);break;case se.BOX:rk($,G,e);break;case se.POINT:ak($,G,e);break}},v=({element:$},{chart:G})=>{switch(o){case se.LINE:sk($,G,e);break;case se.BOX:ok($,G,e);break;case se.POINT:lk($,G,e);break}},M=()=>($,G)=>e!=null&&e.onDragStart?e==null?void 0:e.onDragStart($,G):void 0,T=()=>($,G)=>e!=null&&e.onDrag?e==null?void 0:e.onDrag($,G):void 0,C=()=>($,G)=>e!=null&&e.onDragEnd?e==null?void 0:e.onDragEnd($,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:C,pointStyle:(e==null?void 0:e.pointStyle)??Zm.Circle,resizable:(e==null?void 0:e.resizable)??!0,displayDragCoordinates:(e==null?void 0:e.displayDragCoordinates)??!0}}),fk=({showAnnotations:t,annotationsData:e})=>t&&e&&(e==null?void 0:e.length)?ck(e)??[]:[],uk=(t,e,n)=>{const i=ye.useRef(t);ye.useEffect(()=>{jy(t,i==null?void 0:i.current)||(e({type:"RESET_STATE",payload:t}),i.current=t)},[...n])},hk=ye.createContext(void 0),dk=({children:t,options:e})=>{const{showAnnotations:n=!0,annotationsData:i=[]}=(e==null?void 0:e.annotations)??{},s=fk({showAnnotations:n,annotationsData:i}),o={...QP,annotation:s},[l,c]=ye.useReducer(tk,o),u=ye.useMemo(()=>({state:l,dispatch:c}),[l,e,c]);return uk(o,c,[e]),qy.jsx(hk.Provider,{value:u,children:t})};dk.__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:""}}};export{Qk as $,VP as A,OP as B,LP as C,Km as D,Wk as E,Xk as F,Uk as G,Pk as H,Vk as I,wa as J,zP as K,_g as L,Fk as M,Yk as N,Bk as O,Si as P,Bm as Q,qk as R,HP as S,Nk as T,GP as U,jk as V,UP as W,Mk as X,Ji as Y,Ma as Z,Zk as _,Lk as a,XP as a0,YP as a1,ki as a2,DP as a3,Y2 as a4,Hk as a5,WP as a6,Zm as a7,KP as a8,se as a9,Ft as aA,Av as aB,Ns as aC,ue as aD,Pg as aE,At as aF,En as aG,Ak as aH,z2 as aI,Rk as aJ,Hs as aK,Dk as aL,Ha as aM,Ek as aN,hk as aO,ZP as aP,Kk as aQ,FP as aR,$P as aS,rs as aa,nk as ab,ek as ac,wk as ad,bt as ae,Xt as af,_n as ag,Jn as ah,Ac as ai,Ur as aj,Ye as ak,Ht as al,La as am,Na as an,Ti as ao,kv as ap,Ca as aq,Rs as ar,Cr as as,Yg as at,ct as au,Zt as av,ot as aw,Gi as ax,te as ay,Rh as az,dk as b,PP as c,Ok as d,Tk as e,zk as f,jP as g,hf as h,Hd as i,Wd as j,$d as k,Ir as l,Sk as m,vk as n,xk as o,yk as p,kk as q,Ik as r,Jk as s,Ck as t,Xm as u,Pr as v,Gk as w,xf as x,RP as y,$k as z};