@cubejs-backend/server-core 0.35.81 → 0.36.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 (236) hide show
  1. package/dist/src/core/DevServer.js +5 -3
  2. package/dist/src/core/DevServer.js.map +1 -1
  3. package/dist/src/core/OptsHandler.js +19 -8
  4. package/dist/src/core/OptsHandler.js.map +1 -1
  5. package/dist/src/core/OrchestratorApi.js +6 -1
  6. package/dist/src/core/OrchestratorApi.js.map +1 -1
  7. package/dist/src/core/OrchestratorStorage.js +1 -3
  8. package/dist/src/core/OrchestratorStorage.js.map +1 -1
  9. package/dist/src/core/RefreshScheduler.js +1 -0
  10. package/dist/src/core/RefreshScheduler.js.map +1 -1
  11. package/dist/src/core/agentCollect.js +9 -1
  12. package/dist/src/core/agentCollect.js.map +1 -1
  13. package/dist/src/core/optionsValidate.d.ts.map +1 -1
  14. package/dist/src/core/optionsValidate.js +1 -23
  15. package/dist/src/core/optionsValidate.js.map +1 -1
  16. package/dist/src/core/server.d.ts.map +1 -1
  17. package/dist/src/core/server.js +98 -83
  18. package/dist/src/core/server.js.map +1 -1
  19. package/dist/src/core/types.d.ts +2 -5
  20. package/dist/src/core/types.d.ts.map +1 -1
  21. package/package.json +13 -13
  22. package/playground/assets/index-n9H6oO1O.js +3538 -0
  23. package/playground/index.html +2 -3
  24. package/playground/vizard/assets/abap-Bs-KDgo-.js +6 -0
  25. package/playground/vizard/assets/apex-BB8ijgrA.js +6 -0
  26. package/playground/vizard/assets/azcli-CM0y7Ame.js +6 -0
  27. package/playground/vizard/assets/bat-Bfxf8Mzl.js +6 -0
  28. package/playground/vizard/assets/bicep-DJPqIr_M.js +7 -0
  29. package/playground/vizard/assets/cameligo-PnszTm2c.js +6 -0
  30. package/playground/vizard/assets/clients-CzhsrDwG.js +1 -0
  31. package/playground/vizard/assets/clojure-B3cFVYI-.js +6 -0
  32. package/playground/vizard/assets/codicon-BuT2v_Yt.ttf +0 -0
  33. package/playground/vizard/assets/coffee-D8tSzcLH.js +6 -0
  34. package/playground/vizard/assets/cpp-CP-cATHl.js +6 -0
  35. package/playground/vizard/assets/csharp-Dfj4WFqy.js +6 -0
  36. package/playground/vizard/assets/csp-D9HxVpWn.js +6 -0
  37. package/playground/vizard/assets/css-CkCHETKw.js +8 -0
  38. package/playground/vizard/assets/css.worker-CJ81phlL.js +84 -0
  39. package/playground/vizard/assets/cssMode-PbVgDCx5.js +9 -0
  40. package/playground/vizard/assets/cypher-B50w5pq9.js +6 -0
  41. package/playground/vizard/assets/dart-DvROnYA_.js +6 -0
  42. package/playground/vizard/assets/dockerfile-C4f37Dvd.js +6 -0
  43. package/playground/vizard/assets/ecl-DW46Dzft.js +6 -0
  44. package/playground/vizard/assets/editor.worker-DnhKYsI_.js +11 -0
  45. package/playground/vizard/assets/elixir-BIa5JtGe.js +6 -0
  46. package/playground/vizard/assets/flow9-ByI4Scwv.js +6 -0
  47. package/playground/vizard/assets/freemarker2-CJRN0A1r.js +8 -0
  48. package/playground/vizard/assets/fsharp-Cgf6u04w.js +6 -0
  49. package/playground/vizard/assets/go-CJfxPkej.js +6 -0
  50. package/playground/vizard/assets/graphql-CGlhcY2-.js +6 -0
  51. package/playground/vizard/assets/handlebars-iTWM3ahM.js +6 -0
  52. package/playground/vizard/assets/hcl-CTI7WNlW.js +6 -0
  53. package/playground/vizard/assets/html-CpaHgWrY.js +6 -0
  54. package/playground/vizard/assets/htmlMode-xt8whNAd.js +9 -0
  55. package/playground/vizard/assets/icons-DuVB-IiR.js +61 -0
  56. package/playground/vizard/assets/index-B0u8YO_h.css +1 -0
  57. package/playground/vizard/assets/index-C388WnHl.js +4841 -0
  58. package/playground/vizard/assets/ini-qJXHXiTY.js +6 -0
  59. package/playground/vizard/assets/java-Dnrl9822.js +6 -0
  60. package/playground/vizard/assets/javascript-zOLCCWF1.js +6 -0
  61. package/playground/vizard/assets/json.worker-DY5adJme.js +42 -0
  62. package/playground/vizard/assets/jsonMode-mWIcOV2K.js +11 -0
  63. package/playground/vizard/assets/julia-pqMLycLG.js +6 -0
  64. package/playground/vizard/assets/kotlin-DLX697jv.js +6 -0
  65. package/playground/vizard/assets/less-2ExdFhZM.js +7 -0
  66. package/playground/vizard/assets/lexon-ABKfEwhw.js +6 -0
  67. package/playground/vizard/assets/liquid-Bu0TeitP.js +6 -0
  68. package/playground/vizard/assets/lua-CI0blgFs.js +6 -0
  69. package/playground/vizard/assets/m3-yVPEHiu4.js +6 -0
  70. package/playground/vizard/assets/markdown-CjOKAnMy.js +6 -0
  71. package/playground/vizard/assets/mdx-uhxhQOIT.js +6 -0
  72. package/playground/vizard/assets/mips-B7KWClFm.js +6 -0
  73. package/playground/vizard/assets/monaco-B_IR9uhL.js +730 -0
  74. package/playground/vizard/assets/monaco-ZJDocGaF.css +1 -0
  75. package/playground/vizard/assets/msdax-N_40gjXO.js +6 -0
  76. package/playground/vizard/assets/mysql-CzgTwwi2.js +6 -0
  77. package/playground/vizard/assets/objective-c-CwAIQX-6.js +6 -0
  78. package/playground/vizard/assets/other-HgnFgCOO.js +2 -0
  79. package/playground/vizard/assets/pascal-3SrKWnFX.js +6 -0
  80. package/playground/vizard/assets/pascaligo-Cv9Y0fbC.js +6 -0
  81. package/playground/vizard/assets/perl-DHxnJL0_.js +6 -0
  82. package/playground/vizard/assets/pgsql-DGJFw0qd.js +6 -0
  83. package/playground/vizard/assets/php-BA3Rqjpx.js +6 -0
  84. package/playground/vizard/assets/pla-DKf5_u7N.js +6 -0
  85. package/playground/vizard/assets/postiats-Bup1kUyj.js +6 -0
  86. package/playground/vizard/assets/powerquery-BfbPeLER.js +6 -0
  87. package/playground/vizard/assets/powershell-DAsS7BG8.js +6 -0
  88. package/playground/vizard/assets/protobuf-Dzs34GPr.js +7 -0
  89. package/playground/vizard/assets/pug-CVuUMJ1K.js +6 -0
  90. package/playground/vizard/assets/python-4inBdLoB.js +6 -0
  91. package/playground/vizard/assets/qsharp-BgY1GbL_.js +6 -0
  92. package/playground/vizard/assets/r-C2Iz-cGs.js +6 -0
  93. package/playground/vizard/assets/razor-BGbFglDZ.js +6 -0
  94. package/playground/vizard/assets/react-CJahmRYQ.js +32 -0
  95. package/playground/vizard/assets/redis-F7UxdB6U.js +6 -0
  96. package/playground/vizard/assets/redshift-CDF44XVS.js +6 -0
  97. package/playground/vizard/assets/restructuredtext-C_dzeD_4.js +6 -0
  98. package/playground/vizard/assets/ruby-BdxlVRg3.js +6 -0
  99. package/playground/vizard/assets/rust-gU8692nP.js +6 -0
  100. package/playground/vizard/assets/sb-CsAkPjmq.js +6 -0
  101. package/playground/vizard/assets/scala-D_TH4Qyk.js +6 -0
  102. package/playground/vizard/assets/scheme-CTXRt_ZJ.js +6 -0
  103. package/playground/vizard/assets/scss-Rf_ppwBg.js +8 -0
  104. package/playground/vizard/assets/shell-osqRiq1b.js +6 -0
  105. package/playground/vizard/assets/solidity-BTHmi1CB.js +6 -0
  106. package/playground/vizard/assets/sophia-BRe4RArb.js +6 -0
  107. package/playground/vizard/assets/sparql-CaSv-uNl.js +6 -0
  108. package/playground/vizard/assets/sql-CHiRcria.js +6 -0
  109. package/playground/vizard/assets/st-CCGZ7KTi.js +6 -0
  110. package/playground/vizard/assets/swift-DeyDsJzf.js +8 -0
  111. package/playground/vizard/assets/systemverilog-RSGMMa-l.js +6 -0
  112. package/playground/vizard/assets/tcl-B28K5YOH.js +6 -0
  113. package/playground/vizard/assets/ts.worker-VACfgpbU.js +37021 -0
  114. package/playground/vizard/assets/tsMode-DWjmFJDZ.js +16 -0
  115. package/playground/vizard/assets/twig-ChoE7Tfw.js +6 -0
  116. package/playground/vizard/assets/typescript-3uQjFVUM.js +6 -0
  117. package/playground/vizard/assets/uikit-M_i__YCU.js +1352 -0
  118. package/playground/vizard/assets/vb-BCnlgLOU.js +6 -0
  119. package/playground/vizard/assets/wgsl-DlxrJ_uh.js +303 -0
  120. package/playground/vizard/assets/xml-DnmeLHVb.js +6 -0
  121. package/playground/vizard/assets/yaml-ByRsSZUB.js +6 -0
  122. package/playground/vizard/download/react-typescript-antd-table.zip +0 -0
  123. package/playground/vizard/download/react-typescript-chartjs-area+bar+doughnut+line+pie.zip +0 -0
  124. package/playground/vizard/favicon.ico +0 -0
  125. package/playground/vizard/fonts/Inter-Bold.woff +0 -0
  126. package/playground/vizard/fonts/Inter-Bold.woff2 +0 -0
  127. package/playground/vizard/fonts/Inter-Medium.woff +0 -0
  128. package/playground/vizard/fonts/Inter-Medium.woff2 +0 -0
  129. package/playground/vizard/fonts/Inter-Regular.woff +0 -0
  130. package/playground/vizard/fonts/Inter-Regular.woff2 +0 -0
  131. package/playground/vizard/fonts/Inter-SemiBold.woff +0 -0
  132. package/playground/vizard/fonts/Inter-SemiBold.woff2 +0 -0
  133. package/playground/vizard/fonts/JetBrainsMono-Bold.woff +0 -0
  134. package/playground/vizard/fonts/JetBrainsMono-Bold.woff2 +0 -0
  135. package/playground/vizard/fonts/JetBrainsMono-Medium.woff +0 -0
  136. package/playground/vizard/fonts/JetBrainsMono-Medium.woff2 +0 -0
  137. package/playground/vizard/fonts/JetBrainsMono-Regular.woff +0 -0
  138. package/playground/vizard/fonts/JetBrainsMono-Regular.woff2 +0 -0
  139. package/playground/vizard/fonts/SourceCodePro-Regular.woff +0 -0
  140. package/playground/vizard/fonts/SourceCodePro-Regular.woff2 +0 -0
  141. package/playground/vizard/fonts/text-security-disc.woff +0 -0
  142. package/playground/vizard/fonts/text-security-disc.woff2 +0 -0
  143. package/playground/vizard/index.html +20 -0
  144. package/playground/vizard/logos/angular.svg +1 -0
  145. package/playground/vizard/logos/js.svg +1 -0
  146. package/playground/vizard/logos/react.svg +1 -0
  147. package/playground/vizard/logos/svelte.svg +1 -0
  148. package/playground/vizard/logos/ts.svg +1 -0
  149. package/playground/vizard/logos/vue.svg +1 -0
  150. package/playground/vizard/preview/react-typescript-antd-table/assets/index-C6xomtdV.js +355 -0
  151. package/playground/vizard/preview/react-typescript-antd-table/assets/index-D47x4Gho.css +1 -0
  152. package/playground/vizard/preview/react-typescript-antd-table/index.html +14 -0
  153. package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-D47x4Gho.css +1 -0
  154. package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-DlSl_JqR.js +57 -0
  155. package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/index.html +14 -0
  156. package/playground/assets/CachePane-9673c7ae.js +0 -1
  157. package/playground/assets/GraphiQLSandbox-53d3feeb.js +0 -268
  158. package/playground/assets/GraphiQLSandbox-8134e867.css +0 -1
  159. package/playground/assets/SchemaReference-ef4fa07a.js +0 -1
  160. package/playground/assets/SqlQueryTab-3e2bdfa2.js +0 -1
  161. package/playground/assets/bigquery-da521185.svg +0 -7
  162. package/playground/assets/brace-fold-6a775a2a.js +0 -1
  163. package/playground/assets/clickhouse-c923cfe7.svg +0 -15
  164. package/playground/assets/closebrackets-8dae6aa3.js +0 -2
  165. package/playground/assets/codemirror-3e55eb16.js +0 -24
  166. package/playground/assets/comment-3e14e4d5.js +0 -2
  167. package/playground/assets/crate-b646e4b5.svg +0 -9
  168. package/playground/assets/deepnote-6b5057ec.svg +0 -1
  169. package/playground/assets/dialog-a3340072.js +0 -1
  170. package/playground/assets/dialog-b108f254.js +0 -1
  171. package/playground/assets/druid-749d725a.svg +0 -6
  172. package/playground/assets/excel-d8d00a7e.svg +0 -1
  173. package/playground/assets/firebolt-f9ba6fb1.svg +0 -11
  174. package/playground/assets/foldgutter-04638de0.js +0 -1
  175. package/playground/assets/forEachState-6d514dbd.js +0 -1
  176. package/playground/assets/google-data-studio-8fefa10d.svg +0 -1
  177. package/playground/assets/google-sheets-c7f3e3ba.svg +0 -1
  178. package/playground/assets/hex-d653256d.svg +0 -1
  179. package/playground/assets/hightouch-263b24e1.svg +0 -1
  180. package/playground/assets/hint-2f6f4aaa.js +0 -1
  181. package/playground/assets/hint-35bc0266.js +0 -1
  182. package/playground/assets/index-21441f59.js +0 -15
  183. package/playground/assets/index-5b7876a6.js +0 -24
  184. package/playground/assets/index-f32c771c.js +0 -2935
  185. package/playground/assets/info-2f09b005.js +0 -1
  186. package/playground/assets/info-addon-ccdc82e5.js +0 -1
  187. package/playground/assets/javascript-1746d201.js +0 -1
  188. package/playground/assets/jump-1975be72.js +0 -1
  189. package/playground/assets/jump-to-line-00f030bc.js +0 -1
  190. package/playground/assets/jupyter-cc6ef4a6.svg +0 -1
  191. package/playground/assets/lint-087d334a.js +0 -1
  192. package/playground/assets/lint-0dc04469.js +0 -1
  193. package/playground/assets/lint-d3c9ba5b.js +0 -1
  194. package/playground/assets/matchbrackets-08ac6e5b.js +0 -1
  195. package/playground/assets/matchbrackets-8cf1c673.js +0 -1
  196. package/playground/assets/materialize-1c275282.svg +0 -7
  197. package/playground/assets/metabase-94537ada.svg +0 -1
  198. package/playground/assets/mode-0a6ca237.js +0 -1
  199. package/playground/assets/mode-55dee06f.js +0 -1
  200. package/playground/assets/mode-6f83539b.js +0 -1
  201. package/playground/assets/mongodb-ff875234.svg +0 -5
  202. package/playground/assets/observable-1fb9435c.svg +0 -1
  203. package/playground/assets/oracle-ac621595.svg +0 -10
  204. package/playground/assets/power-bi-f8d15f9c.svg +0 -1
  205. package/playground/assets/questdb-e8a2159a.svg +0 -53
  206. package/playground/assets/redshift-e3635b1b.svg +0 -9
  207. package/playground/assets/search-3880dafb.js +0 -2
  208. package/playground/assets/searchcursor-c88732e4.js +0 -7
  209. package/playground/assets/searchcursor-f596c4b5.js +0 -1
  210. package/playground/assets/show-hint-61147df4.js +0 -1
  211. package/playground/assets/sqlFormatter-f7d64f52.js +0 -7
  212. package/playground/assets/streamlit-77ef93a9.svg +0 -1
  213. package/playground/assets/sublime-4489239f.js +0 -6
  214. package/playground/assets/superset-9a4f216d.svg +0 -1
  215. package/playground/assets/tableau-841bb88e.svg +0 -1
  216. package/playground/assets/thoughtspot-3774b7ec.svg +0 -1
  217. package/playground/chart-renderers/angular/index.html +0 -13
  218. package/playground/chart-renderers/angular/main.c9ec6970e8db9607c52c.js +0 -1
  219. package/playground/chart-renderers/angular/polyfills.5e0ce2c1a99c8658e3f9.js +0 -1
  220. package/playground/chart-renderers/angular/runtime.acf0dec4155e77772545.js +0 -1
  221. package/playground/chart-renderers/angular/styles.c241fdf862898bf70e5f.css +0 -1
  222. package/playground/chart-renderers/react/index.html +0 -1
  223. package/playground/chart-renderers/react/static/css/main.1607577d.css +0 -9
  224. package/playground/chart-renderers/react/static/js/main.71cb3173.js +0 -2
  225. package/playground/chart-renderers/vue/index.html +0 -1
  226. package/playground/chart-renderers/vue/js/app.f3bd331b.js +0 -2
  227. package/playground/chart-renderers/vue/js/chunk-vendors.8740c156.js +0 -308
  228. /package/playground/assets/{athena-6bb5702d.svg → athena-ojPCDZsu.svg} +0 -0
  229. /package/playground/assets/{hive-f1d55e07.svg → hive-CnKOdnG1.svg} +0 -0
  230. /package/playground/assets/{index-af3b87a2.css → index-xEIXRErq.css} +0 -0
  231. /package/playground/assets/{mssql-ee163b5c.svg → mssql-D2BHkfVq.svg} +0 -0
  232. /package/playground/assets/{mysql-505410e7.svg → mysql-BeONLFsC.svg} +0 -0
  233. /package/playground/assets/{postgres-f2e5378f.svg → postgres-CRAWabOt.svg} +0 -0
  234. /package/playground/assets/{presto-23044820.svg → presto-CuvrYmB5.svg} +0 -0
  235. /package/playground/assets/{semantic-layer-ab287c7b.svg → semantic-layer-B8UQ_kwI.svg} +0 -0
  236. /package/playground/assets/{snowflake-6ddc094d.svg → snowflake-BQpm6tUS.svg} +0 -0
@@ -0,0 +1,57 @@
1
+ var gb=Object.defineProperty;var mb=(t,e,n)=>e in t?gb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var F=(t,e,n)=>(mb(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var iv={exports:{}},ml={},sv={exports:{}},Q={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Zs=Symbol.for("react.element"),yb=Symbol.for("react.portal"),vb=Symbol.for("react.fragment"),_b=Symbol.for("react.strict_mode"),xb=Symbol.for("react.profiler"),bb=Symbol.for("react.provider"),wb=Symbol.for("react.context"),Sb=Symbol.for("react.forward_ref"),kb=Symbol.for("react.suspense"),Eb=Symbol.for("react.memo"),Mb=Symbol.for("react.lazy"),jd=Symbol.iterator;function Pb(t){return t===null||typeof t!="object"?null:(t=jd&&t[jd]||t["@@iterator"],typeof t=="function"?t:null)}var ov={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},av=Object.assign,lv={};function Pi(t,e,n){this.props=t,this.context=e,this.refs=lv,this.updater=n||ov}Pi.prototype.isReactComponent={};Pi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Pi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function uv(){}uv.prototype=Pi.prototype;function Kf(t,e,n){this.props=t,this.context=e,this.refs=lv,this.updater=n||ov}var Xf=Kf.prototype=new uv;Xf.constructor=Kf;av(Xf,Pi.prototype);Xf.isPureReactComponent=!0;var Bd=Array.isArray,cv=Object.prototype.hasOwnProperty,Jf={current:null},fv={key:!0,ref:!0,__self:!0,__source:!0};function hv(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)cv.call(e,r)&&!fv.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Zs,type:t,key:s,ref:o,props:i,_owner:Jf.current}}function Ob(t,e){return{$$typeof:Zs,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Zf(t){return typeof t=="object"&&t!==null&&t.$$typeof===Zs}function Cb(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Vd=/\/+/g;function Xl(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Cb(""+t.key):e.toString(36)}function sa(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Zs:case yb:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+Xl(o,0):r,Bd(i)?(n="",t!=null&&(n=t.replace(Vd,"$&/")+"/"),sa(i,e,n,"",function(u){return u})):i!=null&&(Zf(i)&&(i=Ob(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Vd,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",Bd(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+Xl(s,a);o+=sa(s,e,n,l,i)}else if(l=Pb(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+Xl(s,a++),o+=sa(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function po(t,e,n){if(t==null)return t;var r=[],i=0;return sa(t,r,"","",function(s){return e.call(n,s,i++)}),r}function Tb(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var He={current:null},oa={transition:null},Db={ReactCurrentDispatcher:He,ReactCurrentBatchConfig:oa,ReactCurrentOwner:Jf};Q.Children={map:po,forEach:function(t,e,n){po(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return po(t,function(){e++}),e},toArray:function(t){return po(t,function(e){return e})||[]},only:function(t){if(!Zf(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Q.Component=Pi;Q.Fragment=vb;Q.Profiler=xb;Q.PureComponent=Kf;Q.StrictMode=_b;Q.Suspense=kb;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Db;Q.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=av({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Jf.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)cv.call(e,l)&&!fv.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Zs,type:t.type,key:i,ref:s,props:r,_owner:o}};Q.createContext=function(t){return t={$$typeof:wb,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:bb,_context:t},t.Consumer=t};Q.createElement=hv;Q.createFactory=function(t){var e=hv.bind(null,t);return e.type=t,e};Q.createRef=function(){return{current:null}};Q.forwardRef=function(t){return{$$typeof:Sb,render:t}};Q.isValidElement=Zf;Q.lazy=function(t){return{$$typeof:Mb,_payload:{_status:-1,_result:t},_init:Tb}};Q.memo=function(t,e){return{$$typeof:Eb,type:t,compare:e===void 0?null:e}};Q.startTransition=function(t){var e=oa.transition;oa.transition={};try{t()}finally{oa.transition=e}};Q.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Q.useCallback=function(t,e){return He.current.useCallback(t,e)};Q.useContext=function(t){return He.current.useContext(t)};Q.useDebugValue=function(){};Q.useDeferredValue=function(t){return He.current.useDeferredValue(t)};Q.useEffect=function(t,e){return He.current.useEffect(t,e)};Q.useId=function(){return He.current.useId()};Q.useImperativeHandle=function(t,e,n){return He.current.useImperativeHandle(t,e,n)};Q.useInsertionEffect=function(t,e){return He.current.useInsertionEffect(t,e)};Q.useLayoutEffect=function(t,e){return He.current.useLayoutEffect(t,e)};Q.useMemo=function(t,e){return He.current.useMemo(t,e)};Q.useReducer=function(t,e,n){return He.current.useReducer(t,e,n)};Q.useRef=function(t){return He.current.useRef(t)};Q.useState=function(t){return He.current.useState(t)};Q.useSyncExternalStore=function(t,e,n){return He.current.useSyncExternalStore(t,e,n)};Q.useTransition=function(){return He.current.useTransition()};Q.version="18.2.0";sv.exports=Q;var se=sv.exports;const xr=Mi(se);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Rb=se,Ib=Symbol.for("react.element"),Ab=Symbol.for("react.fragment"),Lb=Object.prototype.hasOwnProperty,$b=Rb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Nb={key:!0,ref:!0,__self:!0,__source:!0};function dv(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)Lb.call(e,r)&&!Nb.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Ib,type:t,key:s,ref:o,props:i,_owner:$b.current}}ml.Fragment=Ab;ml.jsx=dv;ml.jsxs=dv;iv.exports=ml;var Ge=iv.exports,mc={},pv={exports:{}},ht={},gv={exports:{}},mv={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(t){function e(E,w){var S=E.length;E.push(w);e:for(;0<S;){var R=S-1>>>1,A=E[R];if(0<i(A,w))E[R]=w,E[S]=A,S=R;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var w=E[0],S=E.pop();if(S!==w){E[0]=S;e:for(var R=0,A=E.length,j=A>>>1;R<j;){var z=2*(R+1)-1,U=E[z],H=z+1,ee=E[H];if(0>i(U,S))H<A&&0>i(ee,U)?(E[R]=ee,E[H]=S,R=H):(E[R]=U,E[z]=S,R=z);else if(H<A&&0>i(ee,S))E[R]=ee,E[H]=S,R=H;else break e}}return w}function i(E,w){var S=E.sortIndex-w.sortIndex;return S!==0?S:E.id-w.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,h=3,d=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(E){for(var w=n(u);w!==null;){if(w.callback===null)r(u);else if(w.startTime<=E)r(u),w.sortIndex=w.expirationTime,e(l,w);else break;w=n(u)}}function x(E){if(y=!1,v(E),!g)if(n(l)!==null)g=!0,D(b);else{var w=n(u);w!==null&&O(x,w.startTime-E)}}function b(E,w){g=!1,y&&(y=!1,m(T),T=-1),d=!0;var S=h;try{for(v(w),f=n(l);f!==null&&(!(f.expirationTime>w)||E&&!L());){var R=f.callback;if(typeof R=="function"){f.callback=null,h=f.priorityLevel;var A=R(f.expirationTime<=w);w=t.unstable_now(),typeof A=="function"?f.callback=A:f===n(l)&&r(l),v(w)}else r(l);f=n(l)}if(f!==null)var j=!0;else{var z=n(u);z!==null&&O(x,z.startTime-w),j=!1}return j}finally{f=null,h=S,d=!1}}var M=!1,C=null,T=-1,$=5,I=-1;function L(){return!(t.unstable_now()-I<$)}function V(){if(C!==null){var E=t.unstable_now();I=E;var w=!0;try{w=C(!0,E)}finally{w?Y():(M=!1,C=null)}}else M=!1}var Y;if(typeof p=="function")Y=function(){p(V)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,P=k.port2;k.port1.onmessage=V,Y=function(){P.postMessage(null)}}else Y=function(){_(V,0)};function D(E){C=E,M||(M=!0,Y())}function O(E,w){T=_(function(){E(t.unstable_now())},w)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(E){E.callback=null},t.unstable_continueExecution=function(){g||d||(g=!0,D(b))},t.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<E?Math.floor(1e3/E):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(E){switch(h){case 1:case 2:case 3:var w=3;break;default:w=h}var S=h;h=w;try{return E()}finally{h=S}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(E,w){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var S=h;h=E;try{return w()}finally{h=S}},t.unstable_scheduleCallback=function(E,w,S){var R=t.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?R+S:R):S=R,E){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=S+A,E={id:c++,callback:w,priorityLevel:E,startTime:S,expirationTime:A,sortIndex:-1},S>R?(E.sortIndex=S,e(u,E),n(l)===null&&E===n(u)&&(y?(m(T),T=-1):y=!0,O(x,S-R))):(E.sortIndex=A,e(l,E),g||d||(g=!0,D(b))),E},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(E){var w=h;return function(){var S=h;h=w;try{return E.apply(this,arguments)}finally{h=S}}}})(mv);gv.exports=mv;var Fb=gv.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var yv=se,ft=Fb;function N(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var vv=new Set,Es={};function Or(t,e){hi(t,e),hi(t+"Capture",e)}function hi(t,e){for(Es[t]=e,t=0;t<e.length;t++)vv.add(e[t])}var fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yc=Object.prototype.hasOwnProperty,zb=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ud={},Wd={};function jb(t){return yc.call(Wd,t)?!0:yc.call(Ud,t)?!1:zb.test(t)?Wd[t]=!0:(Ud[t]=!0,!1)}function Bb(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Vb(t,e,n,r){if(e===null||typeof e>"u"||Bb(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ye(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ie[t]=new Ye(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ie[e]=new Ye(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ie[t]=new Ye(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ie[t]=new Ye(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ie[t]=new Ye(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ie[t]=new Ye(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ie[t]=new Ye(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ie[t]=new Ye(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ie[t]=new Ye(t,5,!1,t.toLowerCase(),null,!1,!1)});var eh=/[\-:]([a-z])/g;function th(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(eh,th);Ie[e]=new Ye(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(eh,th);Ie[e]=new Ye(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(eh,th);Ie[e]=new Ye(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ie[t]=new Ye(t,1,!1,t.toLowerCase(),null,!1,!1)});Ie.xlinkHref=new Ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ie[t]=new Ye(t,1,!1,t.toLowerCase(),null,!0,!0)});function nh(t,e,n,r){var i=Ie.hasOwnProperty(e)?Ie[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(Vb(e,n,i,r)&&(n=null),r||i===null?jb(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var gn=yv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,go=Symbol.for("react.element"),Br=Symbol.for("react.portal"),Vr=Symbol.for("react.fragment"),rh=Symbol.for("react.strict_mode"),vc=Symbol.for("react.profiler"),_v=Symbol.for("react.provider"),xv=Symbol.for("react.context"),ih=Symbol.for("react.forward_ref"),_c=Symbol.for("react.suspense"),xc=Symbol.for("react.suspense_list"),sh=Symbol.for("react.memo"),Sn=Symbol.for("react.lazy"),bv=Symbol.for("react.offscreen"),Hd=Symbol.iterator;function Ai(t){return t===null||typeof t!="object"?null:(t=Hd&&t[Hd]||t["@@iterator"],typeof t=="function"?t:null)}var de=Object.assign,Jl;function Xi(t){if(Jl===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Jl=e&&e[1]||""}return`
34
+ `+Jl+t}var Zl=!1;function eu(t,e){if(!t||Zl)return"";Zl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
+ `+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Zl=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Xi(t):""}function Ub(t){switch(t.tag){case 5:return Xi(t.type);case 16:return Xi("Lazy");case 13:return Xi("Suspense");case 19:return Xi("SuspenseList");case 0:case 2:case 15:return t=eu(t.type,!1),t;case 11:return t=eu(t.type.render,!1),t;case 1:return t=eu(t.type,!0),t;default:return""}}function bc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Vr:return"Fragment";case Br:return"Portal";case vc:return"Profiler";case rh:return"StrictMode";case _c:return"Suspense";case xc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case xv:return(t.displayName||"Context")+".Consumer";case _v:return(t._context.displayName||"Context")+".Provider";case ih:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case sh:return e=t.displayName||null,e!==null?e:bc(t.type)||"Memo";case Sn:e=t._payload,t=t._init;try{return bc(t(e))}catch{}}return null}function Wb(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bc(e);case 8:return e===rh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Wn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wv(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Hb(t){var e=wv(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function mo(t){t._valueTracker||(t._valueTracker=Hb(t))}function Sv(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=wv(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Da(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function wc(t,e){var n=e.checked;return de({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Yd(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Wn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function kv(t,e){e=e.checked,e!=null&&nh(t,"checked",e,!1)}function Sc(t,e){kv(t,e);var n=Wn(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?kc(t,e.type,n):e.hasOwnProperty("defaultValue")&&kc(t,e.type,Wn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function qd(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function kc(t,e,n){(e!=="number"||Da(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ji=Array.isArray;function ri(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Wn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Ec(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(N(91));return de({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Qd(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(N(92));if(Ji(n)){if(1<n.length)throw Error(N(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Wn(n)}}function Ev(t,e){var n=Wn(e.value),r=Wn(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Gd(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Mv(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Mc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Mv(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var yo,Pv=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(yo=yo||document.createElement("div"),yo.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=yo.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ms(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var as={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yb=["Webkit","ms","Moz","O"];Object.keys(as).forEach(function(t){Yb.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),as[e]=as[t]})});function Ov(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||as.hasOwnProperty(t)&&as[t]?(""+e).trim():e+"px"}function Cv(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ov(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var qb=de({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pc(t,e){if(e){if(qb[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(N(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(N(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(N(61))}if(e.style!=null&&typeof e.style!="object")throw Error(N(62))}}function Oc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cc=null;function oh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Tc=null,ii=null,si=null;function Kd(t){if(t=no(t)){if(typeof Tc!="function")throw Error(N(280));var e=t.stateNode;e&&(e=bl(e),Tc(t.stateNode,t.type,e))}}function Tv(t){ii?si?si.push(t):si=[t]:ii=t}function Dv(){if(ii){var t=ii,e=si;if(si=ii=null,Kd(t),e)for(t=0;t<e.length;t++)Kd(e[t])}}function Rv(t,e){return t(e)}function Iv(){}var tu=!1;function Av(t,e,n){if(tu)return t(e,n);tu=!0;try{return Rv(t,e,n)}finally{tu=!1,(ii!==null||si!==null)&&(Iv(),Dv())}}function Ps(t,e){var n=t.stateNode;if(n===null)return null;var r=bl(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(N(231,e,typeof n));return n}var Dc=!1;if(fn)try{var Li={};Object.defineProperty(Li,"passive",{get:function(){Dc=!0}}),window.addEventListener("test",Li,Li),window.removeEventListener("test",Li,Li)}catch{Dc=!1}function Qb(t,e,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var ls=!1,Ra=null,Ia=!1,Rc=null,Gb={onError:function(t){ls=!0,Ra=t}};function Kb(t,e,n,r,i,s,o,a,l){ls=!1,Ra=null,Qb.apply(Gb,arguments)}function Xb(t,e,n,r,i,s,o,a,l){if(Kb.apply(this,arguments),ls){if(ls){var u=Ra;ls=!1,Ra=null}else throw Error(N(198));Ia||(Ia=!0,Rc=u)}}function Cr(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Lv(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Xd(t){if(Cr(t)!==t)throw Error(N(188))}function Jb(t){var e=t.alternate;if(!e){if(e=Cr(t),e===null)throw Error(N(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Xd(i),t;if(s===r)return Xd(i),e;s=s.sibling}throw Error(N(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?t:e}function $v(t){return t=Jb(t),t!==null?Nv(t):null}function Nv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Nv(t);if(e!==null)return e;t=t.sibling}return null}var Fv=ft.unstable_scheduleCallback,Jd=ft.unstable_cancelCallback,Zb=ft.unstable_shouldYield,ew=ft.unstable_requestPaint,ve=ft.unstable_now,tw=ft.unstable_getCurrentPriorityLevel,ah=ft.unstable_ImmediatePriority,zv=ft.unstable_UserBlockingPriority,Aa=ft.unstable_NormalPriority,nw=ft.unstable_LowPriority,jv=ft.unstable_IdlePriority,yl=null,Ht=null;function rw(t){if(Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(yl,t,void 0,(t.current.flags&128)===128)}catch{}}var At=Math.clz32?Math.clz32:ow,iw=Math.log,sw=Math.LN2;function ow(t){return t>>>=0,t===0?32:31-(iw(t)/sw|0)|0}var vo=64,_o=4194304;function Zi(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function La(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Zi(a):(s&=o,s!==0&&(r=Zi(s)))}else o=n&~i,o!==0?r=Zi(o):s!==0&&(r=Zi(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-At(e),i=1<<n,r|=t[n],e&=~i;return r}function aw(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lw(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-At(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=aw(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Ic(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Bv(){var t=vo;return vo<<=1,!(vo&4194240)&&(vo=64),t}function nu(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function eo(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-At(e),t[e]=n}function uw(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-At(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function lh(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-At(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var J=0;function Vv(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Uv,uh,Wv,Hv,Yv,Ac=!1,xo=[],Ln=null,$n=null,Nn=null,Os=new Map,Cs=new Map,Mn=[],cw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Zd(t,e){switch(t){case"focusin":case"focusout":Ln=null;break;case"dragenter":case"dragleave":$n=null;break;case"mouseover":case"mouseout":Nn=null;break;case"pointerover":case"pointerout":Os.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cs.delete(e.pointerId)}}function $i(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=no(e),e!==null&&uh(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function fw(t,e,n,r,i){switch(e){case"focusin":return Ln=$i(Ln,t,e,n,r,i),!0;case"dragenter":return $n=$i($n,t,e,n,r,i),!0;case"mouseover":return Nn=$i(Nn,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Os.set(s,$i(Os.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Cs.set(s,$i(Cs.get(s)||null,t,e,n,r,i)),!0}return!1}function qv(t){var e=dr(t.target);if(e!==null){var n=Cr(e);if(n!==null){if(e=n.tag,e===13){if(e=Lv(n),e!==null){t.blockedOn=e,Yv(t.priority,function(){Wv(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function aa(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Lc(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Cc=r,n.target.dispatchEvent(r),Cc=null}else return e=no(n),e!==null&&uh(e),t.blockedOn=n,!1;e.shift()}return!0}function ep(t,e,n){aa(t)&&n.delete(e)}function hw(){Ac=!1,Ln!==null&&aa(Ln)&&(Ln=null),$n!==null&&aa($n)&&($n=null),Nn!==null&&aa(Nn)&&(Nn=null),Os.forEach(ep),Cs.forEach(ep)}function Ni(t,e){t.blockedOn===e&&(t.blockedOn=null,Ac||(Ac=!0,ft.unstable_scheduleCallback(ft.unstable_NormalPriority,hw)))}function Ts(t){function e(i){return Ni(i,t)}if(0<xo.length){Ni(xo[0],t);for(var n=1;n<xo.length;n++){var r=xo[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Ln!==null&&Ni(Ln,t),$n!==null&&Ni($n,t),Nn!==null&&Ni(Nn,t),Os.forEach(e),Cs.forEach(e),n=0;n<Mn.length;n++)r=Mn[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Mn.length&&(n=Mn[0],n.blockedOn===null);)qv(n),n.blockedOn===null&&Mn.shift()}var oi=gn.ReactCurrentBatchConfig,$a=!0;function dw(t,e,n,r){var i=J,s=oi.transition;oi.transition=null;try{J=1,ch(t,e,n,r)}finally{J=i,oi.transition=s}}function pw(t,e,n,r){var i=J,s=oi.transition;oi.transition=null;try{J=4,ch(t,e,n,r)}finally{J=i,oi.transition=s}}function ch(t,e,n,r){if($a){var i=Lc(t,e,n,r);if(i===null)hu(t,e,r,Na,n),Zd(t,r);else if(fw(i,t,e,n,r))r.stopPropagation();else if(Zd(t,r),e&4&&-1<cw.indexOf(t)){for(;i!==null;){var s=no(i);if(s!==null&&Uv(s),s=Lc(t,e,n,r),s===null&&hu(t,e,r,Na,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else hu(t,e,r,null,n)}}var Na=null;function Lc(t,e,n,r){if(Na=null,t=oh(r),t=dr(t),t!==null)if(e=Cr(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Lv(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Na=t,null}function Qv(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(tw()){case ah:return 1;case zv:return 4;case Aa:case nw:return 16;case jv:return 536870912;default:return 16}default:return 16}}var On=null,fh=null,la=null;function Gv(){if(la)return la;var t,e=fh,n=e.length,r,i="value"in On?On.value:On.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return la=i.slice(t,1<r?1-r:void 0)}function ua(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function bo(){return!0}function tp(){return!1}function dt(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?bo:tp,this.isPropagationStopped=tp,this}return de(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),e}var Oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hh=dt(Oi),to=de({},Oi,{view:0,detail:0}),gw=dt(to),ru,iu,Fi,vl=de({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dh,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Fi&&(Fi&&t.type==="mousemove"?(ru=t.screenX-Fi.screenX,iu=t.screenY-Fi.screenY):iu=ru=0,Fi=t),ru)},movementY:function(t){return"movementY"in t?t.movementY:iu}}),np=dt(vl),mw=de({},vl,{dataTransfer:0}),yw=dt(mw),vw=de({},to,{relatedTarget:0}),su=dt(vw),_w=de({},Oi,{animationName:0,elapsedTime:0,pseudoElement:0}),xw=dt(_w),bw=de({},Oi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ww=dt(bw),Sw=de({},Oi,{data:0}),rp=dt(Sw),kw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ew={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Mw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pw(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Mw[t])?!!e[t]:!1}function dh(){return Pw}var Ow=de({},to,{key:function(t){if(t.key){var e=kw[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ua(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Ew[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dh,charCode:function(t){return t.type==="keypress"?ua(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ua(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Cw=dt(Ow),Tw=de({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ip=dt(Tw),Dw=de({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dh}),Rw=dt(Dw),Iw=de({},Oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Aw=dt(Iw),Lw=de({},vl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),$w=dt(Lw),Nw=[9,13,27,32],ph=fn&&"CompositionEvent"in window,us=null;fn&&"documentMode"in document&&(us=document.documentMode);var Fw=fn&&"TextEvent"in window&&!us,Kv=fn&&(!ph||us&&8<us&&11>=us),sp=" ",op=!1;function Xv(t,e){switch(t){case"keyup":return Nw.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jv(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ur=!1;function zw(t,e){switch(t){case"compositionend":return Jv(e);case"keypress":return e.which!==32?null:(op=!0,sp);case"textInput":return t=e.data,t===sp&&op?null:t;default:return null}}function jw(t,e){if(Ur)return t==="compositionend"||!ph&&Xv(t,e)?(t=Gv(),la=fh=On=null,Ur=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Kv&&e.locale!=="ko"?null:e.data;default:return null}}var Bw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ap(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Bw[t.type]:e==="textarea"}function Zv(t,e,n,r){Tv(r),e=Fa(e,"onChange"),0<e.length&&(n=new hh("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var cs=null,Ds=null;function Vw(t){c0(t,0)}function _l(t){var e=Yr(t);if(Sv(e))return t}function Uw(t,e){if(t==="change")return e}var e0=!1;if(fn){var ou;if(fn){var au="oninput"in document;if(!au){var lp=document.createElement("div");lp.setAttribute("oninput","return;"),au=typeof lp.oninput=="function"}ou=au}else ou=!1;e0=ou&&(!document.documentMode||9<document.documentMode)}function up(){cs&&(cs.detachEvent("onpropertychange",t0),Ds=cs=null)}function t0(t){if(t.propertyName==="value"&&_l(Ds)){var e=[];Zv(e,Ds,t,oh(t)),Av(Vw,e)}}function Ww(t,e,n){t==="focusin"?(up(),cs=e,Ds=n,cs.attachEvent("onpropertychange",t0)):t==="focusout"&&up()}function Hw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return _l(Ds)}function Yw(t,e){if(t==="click")return _l(e)}function qw(t,e){if(t==="input"||t==="change")return _l(e)}function Qw(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Nt=typeof Object.is=="function"?Object.is:Qw;function Rs(t,e){if(Nt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!yc.call(e,i)||!Nt(t[i],e[i]))return!1}return!0}function cp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function fp(t,e){var n=cp(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cp(n)}}function n0(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?n0(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function r0(){for(var t=window,e=Da();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Da(t.document)}return e}function gh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Gw(t){var e=r0(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&n0(n.ownerDocument.documentElement,n)){if(r!==null&&gh(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=fp(n,s);var o=fp(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Kw=fn&&"documentMode"in document&&11>=document.documentMode,Wr=null,$c=null,fs=null,Nc=!1;function hp(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nc||Wr==null||Wr!==Da(r)||(r=Wr,"selectionStart"in r&&gh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),fs&&Rs(fs,r)||(fs=r,r=Fa($c,"onSelect"),0<r.length&&(e=new hh("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Wr)))}function wo(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Hr={animationend:wo("Animation","AnimationEnd"),animationiteration:wo("Animation","AnimationIteration"),animationstart:wo("Animation","AnimationStart"),transitionend:wo("Transition","TransitionEnd")},lu={},i0={};fn&&(i0=document.createElement("div").style,"AnimationEvent"in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),"TransitionEvent"in window||delete Hr.transitionend.transition);function xl(t){if(lu[t])return lu[t];if(!Hr[t])return t;var e=Hr[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in i0)return lu[t]=e[n];return t}var s0=xl("animationend"),o0=xl("animationiteration"),a0=xl("animationstart"),l0=xl("transitionend"),u0=new Map,dp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Gn(t,e){u0.set(t,e),Or(e,[t])}for(var uu=0;uu<dp.length;uu++){var cu=dp[uu],Xw=cu.toLowerCase(),Jw=cu[0].toUpperCase()+cu.slice(1);Gn(Xw,"on"+Jw)}Gn(s0,"onAnimationEnd");Gn(o0,"onAnimationIteration");Gn(a0,"onAnimationStart");Gn("dblclick","onDoubleClick");Gn("focusin","onFocus");Gn("focusout","onBlur");Gn(l0,"onTransitionEnd");hi("onMouseEnter",["mouseout","mouseover"]);hi("onMouseLeave",["mouseout","mouseover"]);hi("onPointerEnter",["pointerout","pointerover"]);hi("onPointerLeave",["pointerout","pointerover"]);Or("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Or("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Or("onBeforeInput",["compositionend","keypress","textInput","paste"]);Or("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Or("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Or("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Zw=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function pp(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Xb(r,e,void 0,t),t.currentTarget=null}function c0(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;pp(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;pp(i,a,u),s=l}}}if(Ia)throw t=Rc,Ia=!1,Rc=null,t}function re(t,e){var n=e[Vc];n===void 0&&(n=e[Vc]=new Set);var r=t+"__bubble";n.has(r)||(f0(e,t,2,!1),n.add(r))}function fu(t,e,n){var r=0;e&&(r|=4),f0(n,t,r,e)}var So="_reactListening"+Math.random().toString(36).slice(2);function Is(t){if(!t[So]){t[So]=!0,vv.forEach(function(n){n!=="selectionchange"&&(Zw.has(n)||fu(n,!1,t),fu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[So]||(e[So]=!0,fu("selectionchange",!1,e))}}function f0(t,e,n,r){switch(Qv(e)){case 1:var i=dw;break;case 4:i=pw;break;default:i=ch}n=i.bind(null,e,n,t),i=void 0,!Dc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function hu(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=dr(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}Av(function(){var u=s,c=oh(n),f=[];e:{var h=u0.get(t);if(h!==void 0){var d=hh,g=t;switch(t){case"keypress":if(ua(n)===0)break e;case"keydown":case"keyup":d=Cw;break;case"focusin":g="focus",d=su;break;case"focusout":g="blur",d=su;break;case"beforeblur":case"afterblur":d=su;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=yw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Rw;break;case s0:case o0:case a0:d=xw;break;case l0:d=Aw;break;case"scroll":d=gw;break;case"wheel":d=$w;break;case"copy":case"cut":case"paste":d=ww;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=ip}var y=(e&4)!==0,_=!y&&t==="scroll",m=y?h!==null?h+"Capture":null:h;y=[];for(var p=u,v;p!==null;){v=p;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,m!==null&&(x=Ps(p,m),x!=null&&y.push(As(p,x,v)))),_)break;p=p.return}0<y.length&&(h=new d(h,g,null,n,c),f.push({event:h,listeners:y}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",h&&n!==Cc&&(g=n.relatedTarget||n.fromElement)&&(dr(g)||g[hn]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(g=n.relatedTarget||n.toElement,d=u,g=g?dr(g):null,g!==null&&(_=Cr(g),g!==_||g.tag!==5&&g.tag!==6)&&(g=null)):(d=null,g=u),d!==g)){if(y=np,x="onMouseLeave",m="onMouseEnter",p="mouse",(t==="pointerout"||t==="pointerover")&&(y=ip,x="onPointerLeave",m="onPointerEnter",p="pointer"),_=d==null?h:Yr(d),v=g==null?h:Yr(g),h=new y(x,p+"leave",d,n,c),h.target=_,h.relatedTarget=v,x=null,dr(c)===u&&(y=new y(m,p+"enter",g,n,c),y.target=v,y.relatedTarget=_,x=y),_=x,d&&g)t:{for(y=d,m=g,p=0,v=y;v;v=Ir(v))p++;for(v=0,x=m;x;x=Ir(x))v++;for(;0<p-v;)y=Ir(y),p--;for(;0<v-p;)m=Ir(m),v--;for(;p--;){if(y===m||m!==null&&y===m.alternate)break t;y=Ir(y),m=Ir(m)}y=null}else y=null;d!==null&&gp(f,h,d,y,!1),g!==null&&_!==null&&gp(f,_,g,y,!0)}}e:{if(h=u?Yr(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var b=Uw;else if(ap(h))if(e0)b=qw;else{b=Hw;var M=Ww}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(b=Yw);if(b&&(b=b(t,u))){Zv(f,b,n,c);break e}M&&M(t,h,u),t==="focusout"&&(M=h._wrapperState)&&M.controlled&&h.type==="number"&&kc(h,"number",h.value)}switch(M=u?Yr(u):window,t){case"focusin":(ap(M)||M.contentEditable==="true")&&(Wr=M,$c=u,fs=null);break;case"focusout":fs=$c=Wr=null;break;case"mousedown":Nc=!0;break;case"contextmenu":case"mouseup":case"dragend":Nc=!1,hp(f,n,c);break;case"selectionchange":if(Kw)break;case"keydown":case"keyup":hp(f,n,c)}var C;if(ph)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Ur?Xv(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Kv&&n.locale!=="ko"&&(Ur||T!=="onCompositionStart"?T==="onCompositionEnd"&&Ur&&(C=Gv()):(On=c,fh="value"in On?On.value:On.textContent,Ur=!0)),M=Fa(u,T),0<M.length&&(T=new rp(T,t,null,n,c),f.push({event:T,listeners:M}),C?T.data=C:(C=Jv(n),C!==null&&(T.data=C)))),(C=Fw?zw(t,n):jw(t,n))&&(u=Fa(u,"onBeforeInput"),0<u.length&&(c=new rp("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=C))}c0(f,e)})}function As(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Fa(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ps(t,n),s!=null&&r.unshift(As(t,s,i)),s=Ps(t,e),s!=null&&r.push(As(t,s,i))),t=t.return}return r}function Ir(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function gp(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Ps(n,s),l!=null&&o.unshift(As(n,l,a))):i||(l=Ps(n,s),l!=null&&o.push(As(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var eS=/\r\n?/g,tS=/\u0000|\uFFFD/g;function mp(t){return(typeof t=="string"?t:""+t).replace(eS,`
38
+ `).replace(tS,"")}function ko(t,e,n){if(e=mp(e),mp(t)!==e&&n)throw Error(N(425))}function za(){}var Fc=null,zc=null;function jc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Bc=typeof setTimeout=="function"?setTimeout:void 0,nS=typeof clearTimeout=="function"?clearTimeout:void 0,yp=typeof Promise=="function"?Promise:void 0,rS=typeof queueMicrotask=="function"?queueMicrotask:typeof yp<"u"?function(t){return yp.resolve(null).then(t).catch(iS)}:Bc;function iS(t){setTimeout(function(){throw t})}function du(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Ts(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ts(e)}function Fn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function vp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Ci=Math.random().toString(36).slice(2),Wt="__reactFiber$"+Ci,Ls="__reactProps$"+Ci,hn="__reactContainer$"+Ci,Vc="__reactEvents$"+Ci,sS="__reactListeners$"+Ci,oS="__reactHandles$"+Ci;function dr(t){var e=t[Wt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[hn]||n[Wt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=vp(t);t!==null;){if(n=t[Wt])return n;t=vp(t)}return e}t=n,n=t.parentNode}return null}function no(t){return t=t[Wt]||t[hn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Yr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(N(33))}function bl(t){return t[Ls]||null}var Uc=[],qr=-1;function Kn(t){return{current:t}}function ae(t){0>qr||(t.current=Uc[qr],Uc[qr]=null,qr--)}function ne(t,e){qr++,Uc[qr]=t.current,t.current=e}var Hn={},Be=Kn(Hn),et=Kn(!1),br=Hn;function di(t,e){var n=t.type.contextTypes;if(!n)return Hn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function tt(t){return t=t.childContextTypes,t!=null}function ja(){ae(et),ae(Be)}function _p(t,e,n){if(Be.current!==Hn)throw Error(N(168));ne(Be,e),ne(et,n)}function h0(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(N(108,Wb(t)||"Unknown",i));return de({},n,r)}function Ba(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Hn,br=Be.current,ne(Be,t),ne(et,et.current),!0}function xp(t,e,n){var r=t.stateNode;if(!r)throw Error(N(169));n?(t=h0(t,e,br),r.__reactInternalMemoizedMergedChildContext=t,ae(et),ae(Be),ne(Be,t)):ae(et),ne(et,n)}var nn=null,wl=!1,pu=!1;function d0(t){nn===null?nn=[t]:nn.push(t)}function aS(t){wl=!0,d0(t)}function Xn(){if(!pu&&nn!==null){pu=!0;var t=0,e=J;try{var n=nn;for(J=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}nn=null,wl=!1}catch(i){throw nn!==null&&(nn=nn.slice(t+1)),Fv(ah,Xn),i}finally{J=e,pu=!1}}return null}var Qr=[],Gr=0,Va=null,Ua=0,_t=[],xt=0,wr=null,sn=1,on="";function ar(t,e){Qr[Gr++]=Ua,Qr[Gr++]=Va,Va=t,Ua=e}function p0(t,e,n){_t[xt++]=sn,_t[xt++]=on,_t[xt++]=wr,wr=t;var r=sn;t=on;var i=32-At(r)-1;r&=~(1<<i),n+=1;var s=32-At(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,sn=1<<32-At(e)+i|n<<i|r,on=s+t}else sn=1<<s|n<<i|r,on=t}function mh(t){t.return!==null&&(ar(t,1),p0(t,1,0))}function yh(t){for(;t===Va;)Va=Qr[--Gr],Qr[Gr]=null,Ua=Qr[--Gr],Qr[Gr]=null;for(;t===wr;)wr=_t[--xt],_t[xt]=null,on=_t[--xt],_t[xt]=null,sn=_t[--xt],_t[xt]=null}var ct=null,lt=null,ce=!1,Dt=null;function g0(t,e){var n=bt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function bp(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,ct=t,lt=Fn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,ct=t,lt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=wr!==null?{id:sn,overflow:on}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=bt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,ct=t,lt=null,!0):!1;default:return!1}}function Wc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Hc(t){if(ce){var e=lt;if(e){var n=e;if(!bp(t,e)){if(Wc(t))throw Error(N(418));e=Fn(n.nextSibling);var r=ct;e&&bp(t,e)?g0(r,n):(t.flags=t.flags&-4097|2,ce=!1,ct=t)}}else{if(Wc(t))throw Error(N(418));t.flags=t.flags&-4097|2,ce=!1,ct=t}}}function wp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;ct=t}function Eo(t){if(t!==ct)return!1;if(!ce)return wp(t),ce=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!jc(t.type,t.memoizedProps)),e&&(e=lt)){if(Wc(t))throw m0(),Error(N(418));for(;e;)g0(t,e),e=Fn(e.nextSibling)}if(wp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(N(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){lt=Fn(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}lt=null}}else lt=ct?Fn(t.stateNode.nextSibling):null;return!0}function m0(){for(var t=lt;t;)t=Fn(t.nextSibling)}function pi(){lt=ct=null,ce=!1}function vh(t){Dt===null?Dt=[t]:Dt.push(t)}var lS=gn.ReactCurrentBatchConfig;function Ct(t,e){if(t&&t.defaultProps){e=de({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var Wa=Kn(null),Ha=null,Kr=null,_h=null;function xh(){_h=Kr=Ha=null}function bh(t){var e=Wa.current;ae(Wa),t._currentValue=e}function Yc(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ai(t,e){Ha=t,_h=Kr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Ze=!0),t.firstContext=null)}function kt(t){var e=t._currentValue;if(_h!==t)if(t={context:t,memoizedValue:e,next:null},Kr===null){if(Ha===null)throw Error(N(308));Kr=t,Ha.dependencies={lanes:0,firstContext:t}}else Kr=Kr.next=t;return e}var pr=null;function wh(t){pr===null?pr=[t]:pr.push(t)}function y0(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,wh(e)):(n.next=i.next,i.next=n),e.interleaved=n,dn(t,r)}function dn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var kn=!1;function Sh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function v0(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function cn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function zn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,dn(t,n)}return i=r.interleaved,i===null?(e.next=e,wh(r)):(e.next=i.next,i.next=e),r.interleaved=e,dn(t,n)}function ca(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lh(t,n)}}function Sp(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ya(t,e,n,r){var i=t.updateQueue;kn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,c=u=l=null,a=s;do{var h=a.lane,d=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,y=a;switch(h=e,d=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){f=g.call(d,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,h=typeof g=="function"?g.call(d,f,h):g,h==null)break e;f=de({},f,h);break e;case 2:kn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else d={eventTime:d,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);kr|=o,t.lanes=o,t.memoizedState=f}}function kp(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(N(191,i));i.call(r)}}}var _0=new yv.Component().refs;function qc(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:de({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Sl={isMounted:function(t){return(t=t._reactInternals)?Cr(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=We(),i=Bn(t),s=cn(r,i);s.payload=e,n!=null&&(s.callback=n),e=zn(t,s,i),e!==null&&(Lt(e,t,i,r),ca(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=We(),i=Bn(t),s=cn(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=zn(t,s,i),e!==null&&(Lt(e,t,i,r),ca(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=We(),r=Bn(t),i=cn(n,r);i.tag=2,e!=null&&(i.callback=e),e=zn(t,i,r),e!==null&&(Lt(e,t,r,n),ca(e,t,r))}};function Ep(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Rs(n,r)||!Rs(i,s):!0}function x0(t,e,n){var r=!1,i=Hn,s=e.contextType;return typeof s=="object"&&s!==null?s=kt(s):(i=tt(e)?br:Be.current,r=e.contextTypes,s=(r=r!=null)?di(t,i):Hn),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Sl,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function Mp(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Sl.enqueueReplaceState(e,e.state,null)}function Qc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=_0,Sh(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=kt(s):(s=tt(e)?br:Be.current,i.context=di(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(qc(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Sl.enqueueReplaceState(i,i.state,null),Ya(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function zi(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(N(309));var r=n.stateNode}if(!r)throw Error(N(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;a===_0&&(a=i.refs={}),o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,t))}return t}function Mo(t,e){throw t=Object.prototype.toString.call(e),Error(N(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Pp(t){var e=t._init;return e(t._payload)}function b0(t){function e(m,p){if(t){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function n(m,p){if(!t)return null;for(;p!==null;)e(m,p),p=p.sibling;return null}function r(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function i(m,p){return m=Vn(m,p),m.index=0,m.sibling=null,m}function s(m,p,v){return m.index=v,t?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function o(m){return t&&m.alternate===null&&(m.flags|=2),m}function a(m,p,v,x){return p===null||p.tag!==6?(p=bu(v,m.mode,x),p.return=m,p):(p=i(p,v),p.return=m,p)}function l(m,p,v,x){var b=v.type;return b===Vr?c(m,p,v.props.children,x,v.key):p!==null&&(p.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Sn&&Pp(b)===p.type)?(x=i(p,v.props),x.ref=zi(m,p,v),x.return=m,x):(x=ma(v.type,v.key,v.props,null,m.mode,x),x.ref=zi(m,p,v),x.return=m,x)}function u(m,p,v,x){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=wu(v,m.mode,x),p.return=m,p):(p=i(p,v.children||[]),p.return=m,p)}function c(m,p,v,x,b){return p===null||p.tag!==7?(p=yr(v,m.mode,x,b),p.return=m,p):(p=i(p,v),p.return=m,p)}function f(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=bu(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case go:return v=ma(p.type,p.key,p.props,null,m.mode,v),v.ref=zi(m,null,p),v.return=m,v;case Br:return p=wu(p,m.mode,v),p.return=m,p;case Sn:var x=p._init;return f(m,x(p._payload),v)}if(Ji(p)||Ai(p))return p=yr(p,m.mode,v,null),p.return=m,p;Mo(m,p)}return null}function h(m,p,v,x){var b=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return b!==null?null:a(m,p,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case go:return v.key===b?l(m,p,v,x):null;case Br:return v.key===b?u(m,p,v,x):null;case Sn:return b=v._init,h(m,p,b(v._payload),x)}if(Ji(v)||Ai(v))return b!==null?null:c(m,p,v,x,null);Mo(m,v)}return null}function d(m,p,v,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return m=m.get(v)||null,a(p,m,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case go:return m=m.get(x.key===null?v:x.key)||null,l(p,m,x,b);case Br:return m=m.get(x.key===null?v:x.key)||null,u(p,m,x,b);case Sn:var M=x._init;return d(m,p,v,M(x._payload),b)}if(Ji(x)||Ai(x))return m=m.get(v)||null,c(p,m,x,b,null);Mo(p,x)}return null}function g(m,p,v,x){for(var b=null,M=null,C=p,T=p=0,$=null;C!==null&&T<v.length;T++){C.index>T?($=C,C=null):$=C.sibling;var I=h(m,C,v[T],x);if(I===null){C===null&&(C=$);break}t&&C&&I.alternate===null&&e(m,C),p=s(I,p,T),M===null?b=I:M.sibling=I,M=I,C=$}if(T===v.length)return n(m,C),ce&&ar(m,T),b;if(C===null){for(;T<v.length;T++)C=f(m,v[T],x),C!==null&&(p=s(C,p,T),M===null?b=C:M.sibling=C,M=C);return ce&&ar(m,T),b}for(C=r(m,C);T<v.length;T++)$=d(C,m,T,v[T],x),$!==null&&(t&&$.alternate!==null&&C.delete($.key===null?T:$.key),p=s($,p,T),M===null?b=$:M.sibling=$,M=$);return t&&C.forEach(function(L){return e(m,L)}),ce&&ar(m,T),b}function y(m,p,v,x){var b=Ai(v);if(typeof b!="function")throw Error(N(150));if(v=b.call(v),v==null)throw Error(N(151));for(var M=b=null,C=p,T=p=0,$=null,I=v.next();C!==null&&!I.done;T++,I=v.next()){C.index>T?($=C,C=null):$=C.sibling;var L=h(m,C,I.value,x);if(L===null){C===null&&(C=$);break}t&&C&&L.alternate===null&&e(m,C),p=s(L,p,T),M===null?b=L:M.sibling=L,M=L,C=$}if(I.done)return n(m,C),ce&&ar(m,T),b;if(C===null){for(;!I.done;T++,I=v.next())I=f(m,I.value,x),I!==null&&(p=s(I,p,T),M===null?b=I:M.sibling=I,M=I);return ce&&ar(m,T),b}for(C=r(m,C);!I.done;T++,I=v.next())I=d(C,m,T,I.value,x),I!==null&&(t&&I.alternate!==null&&C.delete(I.key===null?T:I.key),p=s(I,p,T),M===null?b=I:M.sibling=I,M=I);return t&&C.forEach(function(V){return e(m,V)}),ce&&ar(m,T),b}function _(m,p,v,x){if(typeof v=="object"&&v!==null&&v.type===Vr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case go:e:{for(var b=v.key,M=p;M!==null;){if(M.key===b){if(b=v.type,b===Vr){if(M.tag===7){n(m,M.sibling),p=i(M,v.props.children),p.return=m,m=p;break e}}else if(M.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Sn&&Pp(b)===M.type){n(m,M.sibling),p=i(M,v.props),p.ref=zi(m,M,v),p.return=m,m=p;break e}n(m,M);break}else e(m,M);M=M.sibling}v.type===Vr?(p=yr(v.props.children,m.mode,x,v.key),p.return=m,m=p):(x=ma(v.type,v.key,v.props,null,m.mode,x),x.ref=zi(m,p,v),x.return=m,m=x)}return o(m);case Br:e:{for(M=v.key;p!==null;){if(p.key===M)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=i(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else e(m,p);p=p.sibling}p=wu(v,m.mode,x),p.return=m,m=p}return o(m);case Sn:return M=v._init,_(m,p,M(v._payload),x)}if(Ji(v))return g(m,p,v,x);if(Ai(v))return y(m,p,v,x);Mo(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,v),p.return=m,m=p):(n(m,p),p=bu(v,m.mode,x),p.return=m,m=p),o(m)):n(m,p)}return _}var gi=b0(!0),w0=b0(!1),ro={},Yt=Kn(ro),$s=Kn(ro),Ns=Kn(ro);function gr(t){if(t===ro)throw Error(N(174));return t}function kh(t,e){switch(ne(Ns,e),ne($s,t),ne(Yt,ro),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Mc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Mc(e,t)}ae(Yt),ne(Yt,e)}function mi(){ae(Yt),ae($s),ae(Ns)}function S0(t){gr(Ns.current);var e=gr(Yt.current),n=Mc(e,t.type);e!==n&&(ne($s,t),ne(Yt,n))}function Eh(t){$s.current===t&&(ae(Yt),ae($s))}var fe=Kn(0);function qa(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var gu=[];function Mh(){for(var t=0;t<gu.length;t++)gu[t]._workInProgressVersionPrimary=null;gu.length=0}var fa=gn.ReactCurrentDispatcher,mu=gn.ReactCurrentBatchConfig,Sr=0,he=null,we=null,Pe=null,Qa=!1,hs=!1,Fs=0,uS=0;function $e(){throw Error(N(321))}function Ph(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Nt(t[n],e[n]))return!1;return!0}function Oh(t,e,n,r,i,s){if(Sr=s,he=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,fa.current=t===null||t.memoizedState===null?dS:pS,t=n(r,i),hs){s=0;do{if(hs=!1,Fs=0,25<=s)throw Error(N(301));s+=1,Pe=we=null,e.updateQueue=null,fa.current=gS,t=n(r,i)}while(hs)}if(fa.current=Ga,e=we!==null&&we.next!==null,Sr=0,Pe=we=he=null,Qa=!1,e)throw Error(N(300));return t}function Ch(){var t=Fs!==0;return Fs=0,t}function Vt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?he.memoizedState=Pe=t:Pe=Pe.next=t,Pe}function Et(){if(we===null){var t=he.alternate;t=t!==null?t.memoizedState:null}else t=we.next;var e=Pe===null?he.memoizedState:Pe.next;if(e!==null)Pe=e,we=t;else{if(t===null)throw Error(N(310));we=t,t={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},Pe===null?he.memoizedState=Pe=t:Pe=Pe.next=t}return Pe}function zs(t,e){return typeof e=="function"?e(t):e}function yu(t){var e=Et(),n=e.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=t;var r=we,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((Sr&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,he.lanes|=c,kr|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Nt(r,e.memoizedState)||(Ze=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,he.lanes|=s,kr|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function vu(t){var e=Et(),n=e.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Nt(s,e.memoizedState)||(Ze=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function k0(){}function E0(t,e){var n=he,r=Et(),i=e(),s=!Nt(r.memoizedState,i);if(s&&(r.memoizedState=i,Ze=!0),r=r.queue,Th(O0.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Pe!==null&&Pe.memoizedState.tag&1){if(n.flags|=2048,js(9,P0.bind(null,n,r,i,e),void 0,null),Ce===null)throw Error(N(349));Sr&30||M0(n,e,i)}return i}function M0(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=he.updateQueue,e===null?(e={lastEffect:null,stores:null},he.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function P0(t,e,n,r){e.value=n,e.getSnapshot=r,C0(e)&&T0(t)}function O0(t,e,n){return n(function(){C0(e)&&T0(t)})}function C0(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Nt(t,n)}catch{return!0}}function T0(t){var e=dn(t,1);e!==null&&Lt(e,t,1,-1)}function Op(t){var e=Vt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:t},e.queue=t,t=t.dispatch=hS.bind(null,he,t),[e.memoizedState,t]}function js(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=he.updateQueue,e===null?(e={lastEffect:null,stores:null},he.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function D0(){return Et().memoizedState}function ha(t,e,n,r){var i=Vt();he.flags|=t,i.memoizedState=js(1|e,n,void 0,r===void 0?null:r)}function kl(t,e,n,r){var i=Et();r=r===void 0?null:r;var s=void 0;if(we!==null){var o=we.memoizedState;if(s=o.destroy,r!==null&&Ph(r,o.deps)){i.memoizedState=js(e,n,s,r);return}}he.flags|=t,i.memoizedState=js(1|e,n,s,r)}function Cp(t,e){return ha(8390656,8,t,e)}function Th(t,e){return kl(2048,8,t,e)}function R0(t,e){return kl(4,2,t,e)}function I0(t,e){return kl(4,4,t,e)}function A0(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function L0(t,e,n){return n=n!=null?n.concat([t]):null,kl(4,4,A0.bind(null,e,t),n)}function Dh(){}function $0(t,e){var n=Et();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ph(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function N0(t,e){var n=Et();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ph(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function F0(t,e,n){return Sr&21?(Nt(n,e)||(n=Bv(),he.lanes|=n,kr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Ze=!0),t.memoizedState=n)}function cS(t,e){var n=J;J=n!==0&&4>n?n:4,t(!0);var r=mu.transition;mu.transition={};try{t(!1),e()}finally{J=n,mu.transition=r}}function z0(){return Et().memoizedState}function fS(t,e,n){var r=Bn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},j0(t))B0(e,n);else if(n=y0(t,e,n,r),n!==null){var i=We();Lt(n,t,r,i),V0(n,e,r)}}function hS(t,e,n){var r=Bn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(j0(t))B0(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Nt(a,o)){var l=e.interleaved;l===null?(i.next=i,wh(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=y0(t,e,i,r),n!==null&&(i=We(),Lt(n,t,r,i),V0(n,e,r))}}function j0(t){var e=t.alternate;return t===he||e!==null&&e===he}function B0(t,e){hs=Qa=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function V0(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lh(t,n)}}var Ga={readContext:kt,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useInsertionEffect:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useMutableSource:$e,useSyncExternalStore:$e,useId:$e,unstable_isNewReconciler:!1},dS={readContext:kt,useCallback:function(t,e){return Vt().memoizedState=[t,e===void 0?null:e],t},useContext:kt,useEffect:Cp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,ha(4194308,4,A0.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ha(4194308,4,t,e)},useInsertionEffect:function(t,e){return ha(4,2,t,e)},useMemo:function(t,e){var n=Vt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Vt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=fS.bind(null,he,t),[r.memoizedState,t]},useRef:function(t){var e=Vt();return t={current:t},e.memoizedState=t},useState:Op,useDebugValue:Dh,useDeferredValue:function(t){return Vt().memoizedState=t},useTransition:function(){var t=Op(!1),e=t[0];return t=cS.bind(null,t[1]),Vt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=he,i=Vt();if(ce){if(n===void 0)throw Error(N(407));n=n()}else{if(n=e(),Ce===null)throw Error(N(349));Sr&30||M0(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Cp(O0.bind(null,r,s,t),[t]),r.flags|=2048,js(9,P0.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Vt(),e=Ce.identifierPrefix;if(ce){var n=on,r=sn;n=(r&~(1<<32-At(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Fs++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=uS++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},pS={readContext:kt,useCallback:$0,useContext:kt,useEffect:Th,useImperativeHandle:L0,useInsertionEffect:R0,useLayoutEffect:I0,useMemo:N0,useReducer:yu,useRef:D0,useState:function(){return yu(zs)},useDebugValue:Dh,useDeferredValue:function(t){var e=Et();return F0(e,we.memoizedState,t)},useTransition:function(){var t=yu(zs)[0],e=Et().memoizedState;return[t,e]},useMutableSource:k0,useSyncExternalStore:E0,useId:z0,unstable_isNewReconciler:!1},gS={readContext:kt,useCallback:$0,useContext:kt,useEffect:Th,useImperativeHandle:L0,useInsertionEffect:R0,useLayoutEffect:I0,useMemo:N0,useReducer:vu,useRef:D0,useState:function(){return vu(zs)},useDebugValue:Dh,useDeferredValue:function(t){var e=Et();return we===null?e.memoizedState=t:F0(e,we.memoizedState,t)},useTransition:function(){var t=vu(zs)[0],e=Et().memoizedState;return[t,e]},useMutableSource:k0,useSyncExternalStore:E0,useId:z0,unstable_isNewReconciler:!1};function yi(t,e){try{var n="",r=e;do n+=Ub(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:t,source:e,stack:i,digest:null}}function _u(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Gc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var mS=typeof WeakMap=="function"?WeakMap:Map;function U0(t,e,n){n=cn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Xa||(Xa=!0,of=r),Gc(t,e)},n}function W0(t,e,n){n=cn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Gc(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Gc(t,e),typeof r!="function"&&(jn===null?jn=new Set([this]):jn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Tp(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new mS;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=TS.bind(null,t,e,n),e.then(t,t))}function Dp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Rp(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=cn(-1,1),e.tag=2,zn(n,e,1))),n.lanes|=1),t)}var yS=gn.ReactCurrentOwner,Ze=!1;function Ue(t,e,n,r){e.child=t===null?w0(e,null,n,r):gi(e,t.child,n,r)}function Ip(t,e,n,r,i){n=n.render;var s=e.ref;return ai(e,i),r=Oh(t,e,n,r,s,i),n=Ch(),t!==null&&!Ze?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,pn(t,e,i)):(ce&&n&&mh(e),e.flags|=1,Ue(t,e,r,i),e.child)}function Ap(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,H0(t,e,s,r,i)):(t=ma(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Rs,n(o,r)&&t.ref===e.ref)return pn(t,e,i)}return e.flags|=1,t=Vn(s,r),t.ref=e.ref,t.return=e,e.child=t}function H0(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Rs(s,r)&&t.ref===e.ref)if(Ze=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Ze=!0);else return e.lanes=t.lanes,pn(t,e,i)}return Kc(t,e,n,r,i)}function Y0(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ne(Jr,st),st|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ne(Jr,st),st|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ne(Jr,st),st|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,ne(Jr,st),st|=r;return Ue(t,e,i,n),e.child}function q0(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Kc(t,e,n,r,i){var s=tt(n)?br:Be.current;return s=di(e,s),ai(e,i),n=Oh(t,e,n,r,s,i),r=Ch(),t!==null&&!Ze?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,pn(t,e,i)):(ce&&r&&mh(e),e.flags|=1,Ue(t,e,n,i),e.child)}function Lp(t,e,n,r,i){if(tt(n)){var s=!0;Ba(e)}else s=!1;if(ai(e,i),e.stateNode===null)da(t,e),x0(e,n,r),Qc(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=kt(u):(u=tt(n)?br:Be.current,u=di(e,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Mp(e,o,r,u),kn=!1;var h=e.memoizedState;o.state=h,Ya(e,r,o,i),l=e.memoizedState,a!==r||h!==l||et.current||kn?(typeof c=="function"&&(qc(e,n,c,r),l=e.memoizedState),(a=kn||Ep(e,n,a,r,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,v0(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Ct(e.type,a),o.props=u,f=e.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=kt(l):(l=tt(n)?br:Be.current,l=di(e,l));var d=n.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&Mp(e,o,r,l),kn=!1,h=e.memoizedState,o.state=h,Ya(e,r,o,i);var g=e.memoizedState;a!==f||h!==g||et.current||kn?(typeof d=="function"&&(qc(e,n,d,r),g=e.memoizedState),(u=kn||Ep(e,n,u,r,h,g,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return Xc(t,e,n,r,s,i)}function Xc(t,e,n,r,i,s){q0(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&xp(e,n,!1),pn(t,e,s);r=e.stateNode,yS.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=gi(e,t.child,null,s),e.child=gi(e,null,a,s)):Ue(t,e,a,s),e.memoizedState=r.state,i&&xp(e,n,!0),e.child}function Q0(t){var e=t.stateNode;e.pendingContext?_p(t,e.pendingContext,e.pendingContext!==e.context):e.context&&_p(t,e.context,!1),kh(t,e.containerInfo)}function $p(t,e,n,r,i){return pi(),vh(i),e.flags|=256,Ue(t,e,n,r),e.child}var Jc={dehydrated:null,treeContext:null,retryLane:0};function Zc(t){return{baseLanes:t,cachePool:null,transitions:null}}function G0(t,e,n){var r=e.pendingProps,i=fe.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ne(fe,i&1),t===null)return Hc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Pl(o,r,0,null),t=yr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Zc(n),e.memoizedState=Jc,t):Rh(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return vS(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Vn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Vn(a,s):(s=yr(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Zc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Jc,r}return s=t.child,t=s.sibling,r=Vn(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Rh(t,e){return e=Pl({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Po(t,e,n,r){return r!==null&&vh(r),gi(e,t.child,null,n),t=Rh(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function vS(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=_u(Error(N(422))),Po(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Pl({mode:"visible",children:r.children},i,0,null),s=yr(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&gi(e,t.child,null,o),e.child.memoizedState=Zc(o),e.memoizedState=Jc,s);if(!(e.mode&1))return Po(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(N(419)),r=_u(s,r,void 0),Po(t,e,o,r)}if(a=(o&t.childLanes)!==0,Ze||a){if(r=Ce,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,dn(t,i),Lt(r,t,i,-1))}return Fh(),r=_u(Error(N(421))),Po(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=DS.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,lt=Fn(i.nextSibling),ct=e,ce=!0,Dt=null,t!==null&&(_t[xt++]=sn,_t[xt++]=on,_t[xt++]=wr,sn=t.id,on=t.overflow,wr=e),e=Rh(e,r.children),e.flags|=4096,e)}function Np(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Yc(t.return,e,n)}function xu(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function K0(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Ue(t,e,r.children,n),r=fe.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Np(t,n,e);else if(t.tag===19)Np(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ne(fe,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&qa(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),xu(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&qa(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}xu(e,!0,n,null,s);break;case"together":xu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function da(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function pn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),kr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(N(153));if(e.child!==null){for(t=e.child,n=Vn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Vn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function _S(t,e,n){switch(e.tag){case 3:Q0(e),pi();break;case 5:S0(e);break;case 1:tt(e.type)&&Ba(e);break;case 4:kh(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;ne(Wa,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ne(fe,fe.current&1),e.flags|=128,null):n&e.child.childLanes?G0(t,e,n):(ne(fe,fe.current&1),t=pn(t,e,n),t!==null?t.sibling:null);ne(fe,fe.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return K0(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ne(fe,fe.current),r)break;return null;case 22:case 23:return e.lanes=0,Y0(t,e,n)}return pn(t,e,n)}var X0,ef,J0,Z0;X0=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ef=function(){};J0=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,gr(Yt.current);var s=null;switch(n){case"input":i=wc(t,i),r=wc(t,r),s=[];break;case"select":i=de({},i,{value:void 0}),r=de({},r,{value:void 0}),s=[];break;case"textarea":i=Ec(t,i),r=Ec(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=za)}Pc(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Es.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Es.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&re("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};Z0=function(t,e,n,r){n!==r&&(e.flags|=4)};function ji(t,e){if(!ce)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ne(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function xS(t,e,n){var r=e.pendingProps;switch(yh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ne(e),null;case 1:return tt(e.type)&&ja(),Ne(e),null;case 3:return r=e.stateNode,mi(),ae(et),ae(Be),Mh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Eo(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Dt!==null&&(uf(Dt),Dt=null))),ef(t,e),Ne(e),null;case 5:Eh(e);var i=gr(Ns.current);if(n=e.type,t!==null&&e.stateNode!=null)J0(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(N(166));return Ne(e),null}if(t=gr(Yt.current),Eo(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Wt]=e,r[Ls]=s,t=(e.mode&1)!==0,n){case"dialog":re("cancel",r),re("close",r);break;case"iframe":case"object":case"embed":re("load",r);break;case"video":case"audio":for(i=0;i<es.length;i++)re(es[i],r);break;case"source":re("error",r);break;case"img":case"image":case"link":re("error",r),re("load",r);break;case"details":re("toggle",r);break;case"input":Yd(r,s),re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},re("invalid",r);break;case"textarea":Qd(r,s),re("invalid",r)}Pc(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&ko(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ko(r.textContent,a,t),i=["children",""+a]):Es.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&re("scroll",r)}switch(n){case"input":mo(r),qd(r,s,!0);break;case"textarea":mo(r),Gd(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=za)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Mv(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Wt]=e,t[Ls]=r,X0(t,e,!1,!1),e.stateNode=t;e:{switch(o=Oc(n,r),n){case"dialog":re("cancel",t),re("close",t),i=r;break;case"iframe":case"object":case"embed":re("load",t),i=r;break;case"video":case"audio":for(i=0;i<es.length;i++)re(es[i],t);i=r;break;case"source":re("error",t),i=r;break;case"img":case"image":case"link":re("error",t),re("load",t),i=r;break;case"details":re("toggle",t),i=r;break;case"input":Yd(t,r),i=wc(t,r),re("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=de({},r,{value:void 0}),re("invalid",t);break;case"textarea":Qd(t,r),i=Ec(t,r),re("invalid",t);break;default:i=r}Pc(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Cv(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Pv(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ms(t,l):typeof l=="number"&&Ms(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Es.hasOwnProperty(s)?l!=null&&s==="onScroll"&&re("scroll",t):l!=null&&nh(t,s,l,o))}switch(n){case"input":mo(t),qd(t,r,!1);break;case"textarea":mo(t),Gd(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Wn(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?ri(t,!!r.multiple,s,!1):r.defaultValue!=null&&ri(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=za)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ne(e),null;case 6:if(t&&e.stateNode!=null)Z0(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(N(166));if(n=gr(Ns.current),gr(Yt.current),Eo(e)){if(r=e.stateNode,n=e.memoizedProps,r[Wt]=e,(s=r.nodeValue!==n)&&(t=ct,t!==null))switch(t.tag){case 3:ko(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ko(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Wt]=e,e.stateNode=r}return Ne(e),null;case 13:if(ae(fe),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ce&&lt!==null&&e.mode&1&&!(e.flags&128))m0(),pi(),e.flags|=98560,s=!1;else if(s=Eo(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(N(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(N(317));s[Wt]=e}else pi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ne(e),s=!1}else Dt!==null&&(uf(Dt),Dt=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||fe.current&1?Se===0&&(Se=3):Fh())),e.updateQueue!==null&&(e.flags|=4),Ne(e),null);case 4:return mi(),ef(t,e),t===null&&Is(e.stateNode.containerInfo),Ne(e),null;case 10:return bh(e.type._context),Ne(e),null;case 17:return tt(e.type)&&ja(),Ne(e),null;case 19:if(ae(fe),s=e.memoizedState,s===null)return Ne(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)ji(s,!1);else{if(Se!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=qa(t),o!==null){for(e.flags|=128,ji(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ne(fe,fe.current&1|2),e.child}t=t.sibling}s.tail!==null&&ve()>vi&&(e.flags|=128,r=!0,ji(s,!1),e.lanes=4194304)}else{if(!r)if(t=qa(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),ji(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ce)return Ne(e),null}else 2*ve()-s.renderingStartTime>vi&&n!==1073741824&&(e.flags|=128,r=!0,ji(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ve(),e.sibling=null,n=fe.current,ne(fe,r?n&1|2:n&1),e):(Ne(e),null);case 22:case 23:return Nh(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?st&1073741824&&(Ne(e),e.subtreeFlags&6&&(e.flags|=8192)):Ne(e),null;case 24:return null;case 25:return null}throw Error(N(156,e.tag))}function bS(t,e){switch(yh(e),e.tag){case 1:return tt(e.type)&&ja(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return mi(),ae(et),ae(Be),Mh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Eh(e),null;case 13:if(ae(fe),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(N(340));pi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ae(fe),null;case 4:return mi(),null;case 10:return bh(e.type._context),null;case 22:case 23:return Nh(),null;case 24:return null;default:return null}}var Oo=!1,ze=!1,wS=typeof WeakSet=="function"?WeakSet:Set,B=null;function Xr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(t,e,r)}else n.current=null}function tf(t,e,n){try{n()}catch(r){ge(t,e,r)}}var Fp=!1;function SS(t,e){if(Fc=$a,t=r0(),gh(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===n&&++u===i&&(a=o),h===s&&++c===r&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(zc={focusedElem:t,selectionRange:n},$a=!1,B=e;B!==null;)if(e=B,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,B=t;else for(;B!==null;){e=B;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,_=g.memoizedState,m=e.stateNode,p=m.getSnapshotBeforeUpdate(e.elementType===e.type?y:Ct(e.type,y),_);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(x){ge(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,B=t;break}B=e.return}return g=Fp,Fp=!1,g}function ds(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&tf(e,n,s)}i=i.next}while(i!==r)}}function El(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function nf(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function e_(t){var e=t.alternate;e!==null&&(t.alternate=null,e_(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Wt],delete e[Ls],delete e[Vc],delete e[sS],delete e[oS])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function t_(t){return t.tag===5||t.tag===3||t.tag===4}function zp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||t_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=za));else if(r!==4&&(t=t.child,t!==null))for(rf(t,e,n),t=t.sibling;t!==null;)rf(t,e,n),t=t.sibling}function sf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(sf(t,e,n),t=t.sibling;t!==null;)sf(t,e,n),t=t.sibling}var De=null,Tt=!1;function xn(t,e,n){for(n=n.child;n!==null;)n_(t,e,n),n=n.sibling}function n_(t,e,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(yl,n)}catch{}switch(n.tag){case 5:ze||Xr(n,e);case 6:var r=De,i=Tt;De=null,xn(t,e,n),De=r,Tt=i,De!==null&&(Tt?(t=De,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(Tt?(t=De,n=n.stateNode,t.nodeType===8?du(t.parentNode,n):t.nodeType===1&&du(t,n),Ts(t)):du(De,n.stateNode));break;case 4:r=De,i=Tt,De=n.stateNode.containerInfo,Tt=!0,xn(t,e,n),De=r,Tt=i;break;case 0:case 11:case 14:case 15:if(!ze&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&tf(n,e,o),i=i.next}while(i!==r)}xn(t,e,n);break;case 1:if(!ze&&(Xr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,e,a)}xn(t,e,n);break;case 21:xn(t,e,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,xn(t,e,n),ze=r):xn(t,e,n);break;default:xn(t,e,n)}}function jp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new wS),e.forEach(function(r){var i=RS.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:De=a.stateNode,Tt=!1;break e;case 3:De=a.stateNode.containerInfo,Tt=!0;break e;case 4:De=a.stateNode.containerInfo,Tt=!0;break e}a=a.return}if(De===null)throw Error(N(160));n_(s,o,i),De=null,Tt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ge(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)r_(e,t),e=e.sibling}function r_(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Pt(e,t),zt(t),r&4){try{ds(3,t,t.return),El(3,t)}catch(y){ge(t,t.return,y)}try{ds(5,t,t.return)}catch(y){ge(t,t.return,y)}}break;case 1:Pt(e,t),zt(t),r&512&&n!==null&&Xr(n,n.return);break;case 5:if(Pt(e,t),zt(t),r&512&&n!==null&&Xr(n,n.return),t.flags&32){var i=t.stateNode;try{Ms(i,"")}catch(y){ge(t,t.return,y)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&kv(i,s),Oc(a,o);var u=Oc(a,s);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?Cv(i,f):c==="dangerouslySetInnerHTML"?Pv(i,f):c==="children"?Ms(i,f):nh(i,c,f,u)}switch(a){case"input":Sc(i,s);break;case"textarea":Ev(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var d=s.value;d!=null?ri(i,!!s.multiple,d,!1):h!==!!s.multiple&&(s.defaultValue!=null?ri(i,!!s.multiple,s.defaultValue,!0):ri(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ls]=s}catch(y){ge(t,t.return,y)}}break;case 6:if(Pt(e,t),zt(t),r&4){if(t.stateNode===null)throw Error(N(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(y){ge(t,t.return,y)}}break;case 3:if(Pt(e,t),zt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ts(e.containerInfo)}catch(y){ge(t,t.return,y)}break;case 4:Pt(e,t),zt(t);break;case 13:Pt(e,t),zt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Lh=ve())),r&4&&jp(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(ze=(u=ze)||c,Pt(e,t),ze=u):Pt(e,t),zt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(B=t,c=t.child;c!==null;){for(f=B=c;B!==null;){switch(h=B,d=h.child,h.tag){case 0:case 11:case 14:case 15:ds(4,h,h.return);break;case 1:Xr(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(y){ge(r,n,y)}}break;case 5:Xr(h,h.return);break;case 22:if(h.memoizedState!==null){Vp(f);continue}}d!==null?(d.return=h,B=d):Vp(f)}c=c.sibling}e:for(c=null,f=t;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Ov("display",o))}catch(y){ge(t,t.return,y)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){ge(t,t.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Pt(e,t),zt(t),r&4&&jp(t);break;case 21:break;default:Pt(e,t),zt(t)}}function zt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(t_(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ms(i,""),r.flags&=-33);var s=zp(t);sf(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=zp(t);rf(t,a,o);break;default:throw Error(N(161))}}catch(l){ge(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function kS(t,e,n){B=t,i_(t)}function i_(t,e,n){for(var r=(t.mode&1)!==0;B!==null;){var i=B,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Oo;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ze;a=Oo;var u=ze;if(Oo=o,(ze=l)&&!u)for(B=i;B!==null;)o=B,l=o.child,o.tag===22&&o.memoizedState!==null?Up(i):l!==null?(l.return=o,B=l):Up(i);for(;s!==null;)B=s,i_(s),s=s.sibling;B=i,Oo=a,ze=u}Bp(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,B=s):Bp(t)}}function Bp(t){for(;B!==null;){var e=B;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:ze||El(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!ze)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Ct(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&kp(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}kp(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Ts(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}ze||e.flags&512&&nf(e)}catch(h){ge(e,e.return,h)}}if(e===t){B=null;break}if(n=e.sibling,n!==null){n.return=e.return,B=n;break}B=e.return}}function Vp(t){for(;B!==null;){var e=B;if(e===t){B=null;break}var n=e.sibling;if(n!==null){n.return=e.return,B=n;break}B=e.return}}function Up(t){for(;B!==null;){var e=B;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{El(4,e)}catch(l){ge(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){ge(e,i,l)}}var s=e.return;try{nf(e)}catch(l){ge(e,s,l)}break;case 5:var o=e.return;try{nf(e)}catch(l){ge(e,o,l)}}}catch(l){ge(e,e.return,l)}if(e===t){B=null;break}var a=e.sibling;if(a!==null){a.return=e.return,B=a;break}B=e.return}}var ES=Math.ceil,Ka=gn.ReactCurrentDispatcher,Ih=gn.ReactCurrentOwner,St=gn.ReactCurrentBatchConfig,G=0,Ce=null,be=null,Re=0,st=0,Jr=Kn(0),Se=0,Bs=null,kr=0,Ml=0,Ah=0,ps=null,Ke=null,Lh=0,vi=1/0,en=null,Xa=!1,of=null,jn=null,Co=!1,Cn=null,Ja=0,gs=0,af=null,pa=-1,ga=0;function We(){return G&6?ve():pa!==-1?pa:pa=ve()}function Bn(t){return t.mode&1?G&2&&Re!==0?Re&-Re:lS.transition!==null?(ga===0&&(ga=Bv()),ga):(t=J,t!==0||(t=window.event,t=t===void 0?16:Qv(t.type)),t):1}function Lt(t,e,n,r){if(50<gs)throw gs=0,af=null,Error(N(185));eo(t,n,r),(!(G&2)||t!==Ce)&&(t===Ce&&(!(G&2)&&(Ml|=n),Se===4&&Pn(t,Re)),nt(t,r),n===1&&G===0&&!(e.mode&1)&&(vi=ve()+500,wl&&Xn()))}function nt(t,e){var n=t.callbackNode;lw(t,e);var r=La(t,t===Ce?Re:0);if(r===0)n!==null&&Jd(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Jd(n),e===1)t.tag===0?aS(Wp.bind(null,t)):d0(Wp.bind(null,t)),rS(function(){!(G&6)&&Xn()}),n=null;else{switch(Vv(r)){case 1:n=ah;break;case 4:n=zv;break;case 16:n=Aa;break;case 536870912:n=jv;break;default:n=Aa}n=h_(n,s_.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function s_(t,e){if(pa=-1,ga=0,G&6)throw Error(N(327));var n=t.callbackNode;if(li()&&t.callbackNode!==n)return null;var r=La(t,t===Ce?Re:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Za(t,r);else{e=r;var i=G;G|=2;var s=a_();(Ce!==t||Re!==e)&&(en=null,vi=ve()+500,mr(t,e));do try{OS();break}catch(a){o_(t,a)}while(!0);xh(),Ka.current=s,G=i,be!==null?e=0:(Ce=null,Re=0,e=Se)}if(e!==0){if(e===2&&(i=Ic(t),i!==0&&(r=i,e=lf(t,i))),e===1)throw n=Bs,mr(t,0),Pn(t,r),nt(t,ve()),n;if(e===6)Pn(t,r);else{if(i=t.current.alternate,!(r&30)&&!MS(i)&&(e=Za(t,r),e===2&&(s=Ic(t),s!==0&&(r=s,e=lf(t,s))),e===1))throw n=Bs,mr(t,0),Pn(t,r),nt(t,ve()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(N(345));case 2:lr(t,Ke,en);break;case 3:if(Pn(t,r),(r&130023424)===r&&(e=Lh+500-ve(),10<e)){if(La(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){We(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Bc(lr.bind(null,t,Ke,en),e);break}lr(t,Ke,en);break;case 4:if(Pn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-At(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ES(r/1960))-r,10<r){t.timeoutHandle=Bc(lr.bind(null,t,Ke,en),r);break}lr(t,Ke,en);break;case 5:lr(t,Ke,en);break;default:throw Error(N(329))}}}return nt(t,ve()),t.callbackNode===n?s_.bind(null,t):null}function lf(t,e){var n=ps;return t.current.memoizedState.isDehydrated&&(mr(t,e).flags|=256),t=Za(t,e),t!==2&&(e=Ke,Ke=n,e!==null&&uf(e)),t}function uf(t){Ke===null?Ke=t:Ke.push.apply(Ke,t)}function MS(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Nt(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Pn(t,e){for(e&=~Ah,e&=~Ml,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-At(e),r=1<<n;t[n]=-1,e&=~r}}function Wp(t){if(G&6)throw Error(N(327));li();var e=La(t,0);if(!(e&1))return nt(t,ve()),null;var n=Za(t,e);if(t.tag!==0&&n===2){var r=Ic(t);r!==0&&(e=r,n=lf(t,r))}if(n===1)throw n=Bs,mr(t,0),Pn(t,e),nt(t,ve()),n;if(n===6)throw Error(N(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,lr(t,Ke,en),nt(t,ve()),null}function $h(t,e){var n=G;G|=1;try{return t(e)}finally{G=n,G===0&&(vi=ve()+500,wl&&Xn())}}function Er(t){Cn!==null&&Cn.tag===0&&!(G&6)&&li();var e=G;G|=1;var n=St.transition,r=J;try{if(St.transition=null,J=1,t)return t()}finally{J=r,St.transition=n,G=e,!(G&6)&&Xn()}}function Nh(){st=Jr.current,ae(Jr)}function mr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,nS(n)),be!==null)for(n=be.return;n!==null;){var r=n;switch(yh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ja();break;case 3:mi(),ae(et),ae(Be),Mh();break;case 5:Eh(r);break;case 4:mi();break;case 13:ae(fe);break;case 19:ae(fe);break;case 10:bh(r.type._context);break;case 22:case 23:Nh()}n=n.return}if(Ce=t,be=t=Vn(t.current,null),Re=st=e,Se=0,Bs=null,Ah=Ml=kr=0,Ke=ps=null,pr!==null){for(e=0;e<pr.length;e++)if(n=pr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}pr=null}return t}function o_(t,e){do{var n=be;try{if(xh(),fa.current=Ga,Qa){for(var r=he.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Qa=!1}if(Sr=0,Pe=we=he=null,hs=!1,Fs=0,Ih.current=null,n===null||n.return===null){Se=1,Bs=e,be=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=Re,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=Dp(o);if(d!==null){d.flags&=-257,Rp(d,o,a,s,e),d.mode&1&&Tp(s,u,e),e=d,l=u;var g=e.updateQueue;if(g===null){var y=new Set;y.add(l),e.updateQueue=y}else g.add(l);break e}else{if(!(e&1)){Tp(s,u,e),Fh();break e}l=Error(N(426))}}else if(ce&&a.mode&1){var _=Dp(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Rp(_,o,a,s,e),vh(yi(l,a));break e}}s=l=yi(l,a),Se!==4&&(Se=2),ps===null?ps=[s]:ps.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var m=U0(s,l,e);Sp(s,m);break e;case 1:a=l;var p=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(jn===null||!jn.has(v)))){s.flags|=65536,e&=-e,s.lanes|=e;var x=W0(s,a,e);Sp(s,x);break e}}s=s.return}while(s!==null)}u_(n)}catch(b){e=b,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function a_(){var t=Ka.current;return Ka.current=Ga,t===null?Ga:t}function Fh(){(Se===0||Se===3||Se===2)&&(Se=4),Ce===null||!(kr&268435455)&&!(Ml&268435455)||Pn(Ce,Re)}function Za(t,e){var n=G;G|=2;var r=a_();(Ce!==t||Re!==e)&&(en=null,mr(t,e));do try{PS();break}catch(i){o_(t,i)}while(!0);if(xh(),G=n,Ka.current=r,be!==null)throw Error(N(261));return Ce=null,Re=0,Se}function PS(){for(;be!==null;)l_(be)}function OS(){for(;be!==null&&!Zb();)l_(be)}function l_(t){var e=f_(t.alternate,t,st);t.memoizedProps=t.pendingProps,e===null?u_(t):be=e,Ih.current=null}function u_(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=bS(n,e),n!==null){n.flags&=32767,be=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Se=6,be=null;return}}else if(n=xS(n,e,st),n!==null){be=n;return}if(e=e.sibling,e!==null){be=e;return}be=e=t}while(e!==null);Se===0&&(Se=5)}function lr(t,e,n){var r=J,i=St.transition;try{St.transition=null,J=1,CS(t,e,n,r)}finally{St.transition=i,J=r}return null}function CS(t,e,n,r){do li();while(Cn!==null);if(G&6)throw Error(N(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(N(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(uw(t,s),t===Ce&&(be=Ce=null,Re=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Co||(Co=!0,h_(Aa,function(){return li(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=St.transition,St.transition=null;var o=J;J=1;var a=G;G|=4,Ih.current=null,SS(t,n),r_(n,t),Gw(zc),$a=!!Fc,zc=Fc=null,t.current=n,kS(n),ew(),G=a,J=o,St.transition=s}else t.current=n;if(Co&&(Co=!1,Cn=t,Ja=i),s=t.pendingLanes,s===0&&(jn=null),rw(n.stateNode),nt(t,ve()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Xa)throw Xa=!1,t=of,of=null,t;return Ja&1&&t.tag!==0&&li(),s=t.pendingLanes,s&1?t===af?gs++:(gs=0,af=t):gs=0,Xn(),null}function li(){if(Cn!==null){var t=Vv(Ja),e=St.transition,n=J;try{if(St.transition=null,J=16>t?16:t,Cn===null)var r=!1;else{if(t=Cn,Cn=null,Ja=0,G&6)throw Error(N(331));var i=G;for(G|=4,B=t.current;B!==null;){var s=B,o=s.child;if(B.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(B=u;B!==null;){var c=B;switch(c.tag){case 0:case 11:case 15:ds(8,c,s)}var f=c.child;if(f!==null)f.return=c,B=f;else for(;B!==null;){c=B;var h=c.sibling,d=c.return;if(e_(c),c===u){B=null;break}if(h!==null){h.return=d,B=h;break}B=d}}}var g=s.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}B=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,B=o;else e:for(;B!==null;){if(s=B,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ds(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,B=m;break e}B=s.return}}var p=t.current;for(B=p;B!==null;){o=B;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,B=v;else e:for(o=p;B!==null;){if(a=B,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:El(9,a)}}catch(b){ge(a,a.return,b)}if(a===o){B=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,B=x;break e}B=a.return}}if(G=i,Xn(),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(yl,t)}catch{}r=!0}return r}finally{J=n,St.transition=e}}return!1}function Hp(t,e,n){e=yi(n,e),e=U0(t,e,1),t=zn(t,e,1),e=We(),t!==null&&(eo(t,1,e),nt(t,e))}function ge(t,e,n){if(t.tag===3)Hp(t,t,n);else for(;e!==null;){if(e.tag===3){Hp(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(jn===null||!jn.has(r))){t=yi(n,t),t=W0(e,t,1),e=zn(e,t,1),t=We(),e!==null&&(eo(e,1,t),nt(e,t));break}}e=e.return}}function TS(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=We(),t.pingedLanes|=t.suspendedLanes&n,Ce===t&&(Re&n)===n&&(Se===4||Se===3&&(Re&130023424)===Re&&500>ve()-Lh?mr(t,0):Ah|=n),nt(t,e)}function c_(t,e){e===0&&(t.mode&1?(e=_o,_o<<=1,!(_o&130023424)&&(_o=4194304)):e=1);var n=We();t=dn(t,e),t!==null&&(eo(t,e,n),nt(t,n))}function DS(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),c_(t,n)}function RS(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(e),c_(t,n)}var f_;f_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||et.current)Ze=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ze=!1,_S(t,e,n);Ze=!!(t.flags&131072)}else Ze=!1,ce&&e.flags&1048576&&p0(e,Ua,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;da(t,e),t=e.pendingProps;var i=di(e,Be.current);ai(e,n),i=Oh(null,e,r,t,i,n);var s=Ch();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,tt(r)?(s=!0,Ba(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Sh(e),i.updater=Sl,e.stateNode=i,i._reactInternals=e,Qc(e,r,t,n),e=Xc(null,e,r,!0,s,n)):(e.tag=0,ce&&s&&mh(e),Ue(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(da(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=AS(r),t=Ct(r,t),i){case 0:e=Kc(null,e,r,t,n);break e;case 1:e=Lp(null,e,r,t,n);break e;case 11:e=Ip(null,e,r,t,n);break e;case 14:e=Ap(null,e,r,Ct(r.type,t),n);break e}throw Error(N(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ct(r,i),Kc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ct(r,i),Lp(t,e,r,i,n);case 3:e:{if(Q0(e),t===null)throw Error(N(387));r=e.pendingProps,s=e.memoizedState,i=s.element,v0(t,e),Ya(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=yi(Error(N(423)),e),e=$p(t,e,r,n,i);break e}else if(r!==i){i=yi(Error(N(424)),e),e=$p(t,e,r,n,i);break e}else for(lt=Fn(e.stateNode.containerInfo.firstChild),ct=e,ce=!0,Dt=null,n=w0(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(pi(),r===i){e=pn(t,e,n);break e}Ue(t,e,r,n)}e=e.child}return e;case 5:return S0(e),t===null&&Hc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,jc(r,i)?o=null:s!==null&&jc(r,s)&&(e.flags|=32),q0(t,e),Ue(t,e,o,n),e.child;case 6:return t===null&&Hc(e),null;case 13:return G0(t,e,n);case 4:return kh(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=gi(e,null,r,n):Ue(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ct(r,i),Ip(t,e,r,i,n);case 7:return Ue(t,e,e.pendingProps,n),e.child;case 8:return Ue(t,e,e.pendingProps.children,n),e.child;case 12:return Ue(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ne(Wa,r._currentValue),r._currentValue=o,s!==null)if(Nt(s.value,o)){if(s.children===i.children&&!et.current){e=pn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=cn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Yc(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Yc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ue(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ai(e,n),i=kt(i),r=r(i),e.flags|=1,Ue(t,e,r,n),e.child;case 14:return r=e.type,i=Ct(r,e.pendingProps),i=Ct(r.type,i),Ap(t,e,r,i,n);case 15:return H0(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ct(r,i),da(t,e),e.tag=1,tt(r)?(t=!0,Ba(e)):t=!1,ai(e,n),x0(e,r,i),Qc(e,r,i,n),Xc(null,e,r,!0,t,n);case 19:return K0(t,e,n);case 22:return Y0(t,e,n)}throw Error(N(156,e.tag))};function h_(t,e){return Fv(t,e)}function IS(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bt(t,e,n,r){return new IS(t,e,n,r)}function zh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function AS(t){if(typeof t=="function")return zh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ih)return 11;if(t===sh)return 14}return 2}function Vn(t,e){var n=t.alternate;return n===null?(n=bt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ma(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")zh(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Vr:return yr(n.children,i,s,e);case rh:o=8,i|=8;break;case vc:return t=bt(12,n,e,i|2),t.elementType=vc,t.lanes=s,t;case _c:return t=bt(13,n,e,i),t.elementType=_c,t.lanes=s,t;case xc:return t=bt(19,n,e,i),t.elementType=xc,t.lanes=s,t;case bv:return Pl(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case _v:o=10;break e;case xv:o=9;break e;case ih:o=11;break e;case sh:o=14;break e;case Sn:o=16,r=null;break e}throw Error(N(130,t==null?t:typeof t,""))}return e=bt(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function yr(t,e,n,r){return t=bt(7,t,r,e),t.lanes=n,t}function Pl(t,e,n,r){return t=bt(22,t,r,e),t.elementType=bv,t.lanes=n,t.stateNode={isHidden:!1},t}function bu(t,e,n){return t=bt(6,t,null,e),t.lanes=n,t}function wu(t,e,n){return e=bt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function LS(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nu(0),this.expirationTimes=nu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jh(t,e,n,r,i,s,o,a,l){return t=new LS(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=bt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sh(s),t}function $S(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Br,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function d_(t){if(!t)return Hn;t=t._reactInternals;e:{if(Cr(t)!==t||t.tag!==1)throw Error(N(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(tt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(N(171))}if(t.tag===1){var n=t.type;if(tt(n))return h0(t,n,e)}return e}function p_(t,e,n,r,i,s,o,a,l){return t=jh(n,r,!0,t,i,s,o,a,l),t.context=d_(null),n=t.current,r=We(),i=Bn(n),s=cn(r,i),s.callback=e??null,zn(n,s,i),t.current.lanes=i,eo(t,i,r),nt(t,r),t}function Ol(t,e,n,r){var i=e.current,s=We(),o=Bn(i);return n=d_(n),e.context===null?e.context=n:e.pendingContext=n,e=cn(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=zn(i,e,o),t!==null&&(Lt(t,i,o,s),ca(t,i,o)),o}function el(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Yp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Bh(t,e){Yp(t,e),(t=t.alternate)&&Yp(t,e)}function NS(){return null}var g_=typeof reportError=="function"?reportError:function(t){console.error(t)};function Vh(t){this._internalRoot=t}Cl.prototype.render=Vh.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(N(409));Ol(t,e,null,null)};Cl.prototype.unmount=Vh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Er(function(){Ol(null,t,null,null)}),e[hn]=null}};function Cl(t){this._internalRoot=t}Cl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Hv();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Mn.length&&e!==0&&e<Mn[n].priority;n++);Mn.splice(n,0,t),n===0&&qv(t)}};function Uh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Tl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function qp(){}function FS(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=el(o);s.call(u)}}var o=p_(e,r,t,0,null,!1,!1,"",qp);return t._reactRootContainer=o,t[hn]=o.current,Is(t.nodeType===8?t.parentNode:t),Er(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=el(l);a.call(u)}}var l=jh(t,0,!1,null,null,!1,!1,"",qp);return t._reactRootContainer=l,t[hn]=l.current,Is(t.nodeType===8?t.parentNode:t),Er(function(){Ol(e,l,n,r)}),l}function Dl(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=el(o);a.call(l)}}Ol(e,o,t,i)}else o=FS(n,e,t,i,r);return el(o)}Uv=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Zi(e.pendingLanes);n!==0&&(lh(e,n|1),nt(e,ve()),!(G&6)&&(vi=ve()+500,Xn()))}break;case 13:Er(function(){var r=dn(t,1);if(r!==null){var i=We();Lt(r,t,1,i)}}),Bh(t,1)}};uh=function(t){if(t.tag===13){var e=dn(t,134217728);if(e!==null){var n=We();Lt(e,t,134217728,n)}Bh(t,134217728)}};Wv=function(t){if(t.tag===13){var e=Bn(t),n=dn(t,e);if(n!==null){var r=We();Lt(n,t,e,r)}Bh(t,e)}};Hv=function(){return J};Yv=function(t,e){var n=J;try{return J=t,e()}finally{J=n}};Tc=function(t,e,n){switch(e){case"input":if(Sc(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=bl(r);if(!i)throw Error(N(90));Sv(r),Sc(r,i)}}}break;case"textarea":Ev(t,n);break;case"select":e=n.value,e!=null&&ri(t,!!n.multiple,e,!1)}};Rv=$h;Iv=Er;var zS={usingClientEntryPoint:!1,Events:[no,Yr,bl,Tv,Dv,$h]},Bi={findFiberByHostInstance:dr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},jS={bundleType:Bi.bundleType,version:Bi.version,rendererPackageName:Bi.rendererPackageName,rendererConfig:Bi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=$v(t),t===null?null:t.stateNode},findFiberByHostInstance:Bi.findFiberByHostInstance||NS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var To=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!To.isDisabled&&To.supportsFiber)try{yl=To.inject(jS),Ht=To}catch{}}ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zS;ht.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Uh(e))throw Error(N(200));return $S(t,e,null,n)};ht.createRoot=function(t,e){if(!Uh(t))throw Error(N(299));var n=!1,r="",i=g_;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=jh(t,1,!1,null,null,n,!1,r,i),t[hn]=e.current,Is(t.nodeType===8?t.parentNode:t),new Vh(e)};ht.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(N(188)):(t=Object.keys(t).join(","),Error(N(268,t)));return t=$v(e),t=t===null?null:t.stateNode,t};ht.flushSync=function(t){return Er(t)};ht.hydrate=function(t,e,n){if(!Tl(e))throw Error(N(200));return Dl(null,t,e,!0,n)};ht.hydrateRoot=function(t,e,n){if(!Uh(t))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=g_;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=p_(e,null,t,1,n??null,i,!1,s,o),t[hn]=e.current,Is(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Cl(e)};ht.render=function(t,e,n){if(!Tl(e))throw Error(N(200));return Dl(null,t,e,!1,n)};ht.unmountComponentAtNode=function(t){if(!Tl(t))throw Error(N(40));return t._reactRootContainer?(Er(function(){Dl(null,null,t,!1,function(){t._reactRootContainer=null,t[hn]=null})}),!0):!1};ht.unstable_batchedUpdates=$h;ht.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Tl(n))throw Error(N(200));if(t==null||t._reactInternals===void 0)throw Error(N(38));return Dl(t,e,n,!1,r)};ht.version="18.2.0-next-9e3b772b8-20220608";function m_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m_)}catch(t){console.error(t)}}m_(),pv.exports=ht;var BS=pv.exports,Qp=BS;mc.createRoot=Qp.createRoot,mc.hydrateRoot=Qp.hydrateRoot;var Do,VS=new Uint8Array(16);function US(){if(!Do&&(Do=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Do))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Do(VS)}const WS=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function HS(t){return typeof t=="string"&&WS.test(t)}var Te=[];for(var Su=0;Su<256;++Su)Te.push((Su+256).toString(16).substr(1));function YS(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Te[t[e+0]]+Te[t[e+1]]+Te[t[e+2]]+Te[t[e+3]]+"-"+Te[t[e+4]]+Te[t[e+5]]+"-"+Te[t[e+6]]+Te[t[e+7]]+"-"+Te[t[e+8]]+Te[t[e+9]]+"-"+Te[t[e+10]]+Te[t[e+11]]+Te[t[e+12]]+Te[t[e+13]]+Te[t[e+14]]+Te[t[e+15]]).toLowerCase();if(!HS(n))throw TypeError("Stringified UUID is invalid");return n}function qS(t,e,n){t=t||{};var r=t.random||(t.rng||US)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return YS(r)}var y_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Je,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",u="day",c="week",f="month",h="quarter",d="year",g="date",y="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var P=["th","st","nd","rd"],D=k%100;return"["+k+(P[(D-20)%10]||P[D]||P[0])+"]"}},v=function(k,P,D){var O=String(k);return!O||O.length>=P?k:""+Array(P+1-O.length).join(D)+k},x={s:v,z:function(k){var P=-k.utcOffset(),D=Math.abs(P),O=Math.floor(D/60),E=D%60;return(P<=0?"+":"-")+v(O,2,"0")+":"+v(E,2,"0")},m:function k(P,D){if(P.date()<D.date())return-k(D,P);var O=12*(D.year()-P.year())+(D.month()-P.month()),E=P.clone().add(O,f),w=D-E<0,S=P.clone().add(O+(w?-1:1),f);return+(-(O+(D-E)/(w?E-S:S-E))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:f,y:d,w:c,d:u,D:g,h:l,m:a,s:o,ms:s,Q:h}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},b="en",M={};M[b]=p;var C="$isDayjsObject",T=function(k){return k instanceof V||!(!k||!k[C])},$=function k(P,D,O){var E;if(!P)return b;if(typeof P=="string"){var w=P.toLowerCase();M[w]&&(E=w),D&&(M[w]=D,E=w);var S=P.split("-");if(!E&&S.length>1)return k(S[0])}else{var R=P.name;M[R]=P,E=R}return!O&&E&&(b=E),E||!O&&b},I=function(k,P){if(T(k))return k.clone();var D=typeof P=="object"?P:{};return D.date=k,D.args=arguments,new V(D)},L=x;L.l=$,L.i=T,L.w=function(k,P){return I(k,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var V=function(){function k(D){this.$L=$(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[C]=!0}var P=k.prototype;return P.parse=function(D){this.$d=function(O){var E=O.date,w=O.utc;if(E===null)return new Date(NaN);if(L.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var S=E.match(_);if(S){var R=S[2]-1||0,A=(S[7]||"0").substring(0,3);return w?new Date(Date.UTC(S[1],R,S[3]||1,S[4]||0,S[5]||0,S[6]||0,A)):new Date(S[1],R,S[3]||1,S[4]||0,S[5]||0,S[6]||0,A)}}return new Date(E)}(D),this.init()},P.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},P.$utils=function(){return L},P.isValid=function(){return this.$d.toString()!==y},P.isSame=function(D,O){var E=I(D);return this.startOf(O)<=E&&E<=this.endOf(O)},P.isAfter=function(D,O){return I(D)<this.startOf(O)},P.isBefore=function(D,O){return this.endOf(O)<I(D)},P.$g=function(D,O,E){return L.u(D)?this[O]:this.set(E,D)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(D,O){var E=this,w=!!L.u(O)||O,S=L.p(D),R=function(Le,pe){var _n=L.w(E.$u?Date.UTC(E.$y,pe,Le):new Date(E.$y,pe,Le),E);return w?_n:_n.endOf(u)},A=function(Le,pe){return L.w(E.toDate()[Le].apply(E.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(pe)),E)},j=this.$W,z=this.$M,U=this.$D,H="set"+(this.$u?"UTC":"");switch(S){case d:return w?R(1,0):R(31,11);case f:return w?R(1,z):R(0,z+1);case c:var ee=this.$locale().weekStart||0,rt=(j<ee?j+7:j)-ee;return R(w?U-rt:U+(6-rt),z);case u:case g:return A(H+"Hours",0);case l:return A(H+"Minutes",1);case a:return A(H+"Seconds",2);case o:return A(H+"Milliseconds",3);default:return this.clone()}},P.endOf=function(D){return this.startOf(D,!1)},P.$set=function(D,O){var E,w=L.p(D),S="set"+(this.$u?"UTC":""),R=(E={},E[u]=S+"Date",E[g]=S+"Date",E[f]=S+"Month",E[d]=S+"FullYear",E[l]=S+"Hours",E[a]=S+"Minutes",E[o]=S+"Seconds",E[s]=S+"Milliseconds",E)[w],A=w===u?this.$D+(O-this.$W):O;if(w===f||w===d){var j=this.clone().set(g,1);j.$d[R](A),j.init(),this.$d=j.set(g,Math.min(this.$D,j.daysInMonth())).$d}else R&&this.$d[R](A);return this.init(),this},P.set=function(D,O){return this.clone().$set(D,O)},P.get=function(D){return this[L.p(D)]()},P.add=function(D,O){var E,w=this;D=Number(D);var S=L.p(O),R=function(z){var U=I(w);return L.w(U.date(U.date()+Math.round(z*D)),w)};if(S===f)return this.set(f,this.$M+D);if(S===d)return this.set(d,this.$y+D);if(S===u)return R(1);if(S===c)return R(7);var A=(E={},E[a]=r,E[l]=i,E[o]=n,E)[S]||1,j=this.$d.getTime()+D*A;return L.w(j,this)},P.subtract=function(D,O){return this.add(-1*D,O)},P.format=function(D){var O=this,E=this.$locale();if(!this.isValid())return E.invalidDate||y;var w=D||"YYYY-MM-DDTHH:mm:ssZ",S=L.z(this),R=this.$H,A=this.$m,j=this.$M,z=E.weekdays,U=E.months,H=E.meridiem,ee=function(pe,_n,Ii,ho){return pe&&(pe[_n]||pe(O,w))||Ii[_n].slice(0,ho)},rt=function(pe){return L.s(R%12||12,pe,"0")},Le=H||function(pe,_n,Ii){var ho=pe<12?"AM":"PM";return Ii?ho.toLowerCase():ho};return w.replace(m,function(pe,_n){return _n||function(Ii){switch(Ii){case"YY":return String(O.$y).slice(-2);case"YYYY":return L.s(O.$y,4,"0");case"M":return j+1;case"MM":return L.s(j+1,2,"0");case"MMM":return ee(E.monthsShort,j,U,3);case"MMMM":return ee(U,j);case"D":return O.$D;case"DD":return L.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return ee(E.weekdaysMin,O.$W,z,2);case"ddd":return ee(E.weekdaysShort,O.$W,z,3);case"dddd":return z[O.$W];case"H":return String(R);case"HH":return L.s(R,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return Le(R,A,!0);case"A":return Le(R,A,!1);case"m":return String(A);case"mm":return L.s(A,2,"0");case"s":return String(O.$s);case"ss":return L.s(O.$s,2,"0");case"SSS":return L.s(O.$ms,3,"0");case"Z":return S}return null}(pe)||S.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(D,O,E){var w,S=this,R=L.p(O),A=I(D),j=(A.utcOffset()-this.utcOffset())*r,z=this-A,U=function(){return L.m(S,A)};switch(R){case d:w=U()/12;break;case f:w=U();break;case h:w=U()/3;break;case c:w=(z-j)/6048e5;break;case u:w=(z-j)/864e5;break;case l:w=z/i;break;case a:w=z/r;break;case o:w=z/n;break;default:w=z}return E?w:L.a(w)},P.daysInMonth=function(){return this.endOf(f).$D},P.$locale=function(){return M[this.$L]},P.locale=function(D,O){if(!D)return this.$L;var E=this.clone(),w=$(D,O,!0);return w&&(E.$L=w),E},P.clone=function(){return L.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},k}(),Y=V.prototype;return I.prototype=Y,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",u],["$M",f],["$y",d],["$D",g]].forEach(function(k){Y[k[1]]=function(P){return this.$g(P,k[0],k[1])}}),I.extend=function(k,P){return k.$i||(k(P,V,I),k.$i=!0),I},I.locale=$,I.isDayjs=T,I.unix=function(k){return I(1e3*k)},I.en=M[b],I.Ls=M,I.p={},I})})(y_);var QS=y_.exports;const Zr=Mi(QS);var v_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Je,function(){var n="month",r="quarter";return function(i,s){var o=s.prototype;o.quarter=function(u){return this.$utils().u(u)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(u-1))};var a=o.add;o.add=function(u,c){return u=Number(u),this.$utils().p(c)===r?this.add(3*u,n):a.bind(this)(u,c)};var l=o.startOf;o.startOf=function(u,c){var f=this.$utils(),h=!!f.u(c)||c;if(f.p(u)===r){var d=this.quarter()-1;return h?this.month(3*d).startOf(n).startOf("day"):this.month(3*d+2).endOf(n).endOf("day")}return l.bind(this)(u,c)}}})})(v_);var GS=v_.exports;const KS=Mi(GS);var __={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Je,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],i=n%100;return"["+n+(r[(i-20)%10]||r[i]||r[0])+"]"}}})})(__);var XS=__.exports;const JS=Mi(XS);function ie(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function ke(t){return function e(n){return arguments.length===0||ie(n)?e:t.apply(this,arguments)}}function Z(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return ie(n)?e:ke(function(i){return t(n,i)});default:return ie(n)&&ie(r)?e:ie(n)?ke(function(i){return t(i,r)}):ie(r)?ke(function(i){return t(n,i)}):t(n,r)}}}function Rl(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(n){return e.apply(this,arguments)};case 2:return function(n,r){return e.apply(this,arguments)};case 3:return function(n,r,i){return e.apply(this,arguments)};case 4:return function(n,r,i,s){return e.apply(this,arguments)};case 5:return function(n,r,i,s,o){return e.apply(this,arguments)};case 6:return function(n,r,i,s,o,a){return e.apply(this,arguments)};case 7:return function(n,r,i,s,o,a,l){return e.apply(this,arguments)};case 8:return function(n,r,i,s,o,a,l,u){return e.apply(this,arguments)};case 9:return function(n,r,i,s,o,a,l,u,c){return e.apply(this,arguments)};case 10:return function(n,r,i,s,o,a,l,u,c,f){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function Il(t,e,n){return function(){for(var r=[],i=0,s=t,o=0;o<e.length||i<arguments.length;){var a;o<e.length&&(!ie(e[o])||i>=arguments.length)?a=e[o]:(a=arguments[i],i+=1),r[o]=a,ie(a)||(s-=1),o+=1}return s<=0?n.apply(this,r):Rl(s,Il(t,r,n))}}var ZS=Z(function(e,n){return e===1?ke(n):Rl(e,Il(e,[],n))});function Ti(t){return function e(n,r,i){switch(arguments.length){case 0:return e;case 1:return ie(n)?e:Z(function(s,o){return t(n,s,o)});case 2:return ie(n)&&ie(r)?e:ie(n)?Z(function(s,o){return t(s,r,o)}):ie(r)?Z(function(s,o){return t(n,s,o)}):ke(function(s){return t(n,r,s)});default:return ie(n)&&ie(r)&&ie(i)?e:ie(n)&&ie(r)?Z(function(s,o){return t(s,o,i)}):ie(n)&&ie(i)?Z(function(s,o){return t(s,r,o)}):ie(r)&&ie(i)?Z(function(s,o){return t(n,s,o)}):ie(n)?ke(function(s){return t(s,r,i)}):ie(r)?ke(function(s){return t(n,s,i)}):ie(i)?ke(function(s){return t(n,r,s)}):t(n,r,i)}}}const Wh=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function ek(t){return t!=null&&typeof t["@@transducer/step"]=="function"}function Di(t,e,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Wh(i)){for(var s=0;s<t.length;){if(typeof i[t[s]]=="function")return i[t[s]].apply(i,r);s+=1}if(ek(i)){var o=e.apply(null,r);return o(i)}}return n.apply(this,arguments)}}function tk(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}const Qt={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}};function nk(t,e){for(var n=0,r=e.length,i=Array(r);n<r;)i[n]=t(e[n]),n+=1;return i}function x_(t){return Object.prototype.toString.call(t)==="[object String]"}var Hh=ke(function(e){return Wh(e)?!0:!e||typeof e!="object"||x_(e)?!1:e.nodeType===1?!!e.length:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),rk=function(){function t(e){this.f=e}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(e){return e},t.prototype["@@transducer/step"]=function(e,n){return this.f(e,n)},t}();function ik(t){return new rk(t)}var sk=Z(function(e,n){return Rl(e.length,function(){return e.apply(n,arguments)})});function ok(t,e,n){for(var r=0,i=n.length;r<i;){if(e=t["@@transducer/step"](e,n[r]),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}function Gp(t,e,n){for(var r=n.next();!r.done;){if(e=t["@@transducer/step"](e,r.value),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function Kp(t,e,n,r){return t["@@transducer/result"](n[r](sk(t["@@transducer/step"],t),e))}var Xp=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _i(t,e,n){if(typeof t=="function"&&(t=ik(t)),Hh(n))return ok(t,e,n);if(typeof n["fantasy-land/reduce"]=="function")return Kp(t,e,n,"fantasy-land/reduce");if(n[Xp]!=null)return Gp(t,e,n[Xp]());if(typeof n.next=="function")return Gp(t,e,n);if(typeof n.reduce=="function")return Kp(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}var ak=function(){function t(e,n){this.xf=n,this.f=e}return t.prototype["@@transducer/init"]=Qt.init,t.prototype["@@transducer/result"]=Qt.result,t.prototype["@@transducer/step"]=function(e,n){return this.xf["@@transducer/step"](e,this.f(n))},t}(),lk=Z(function(e,n){return new ak(e,n)});const uk=lk;function wt(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var Jp=Object.prototype.toString,ck=function(){return Jp.call(arguments)==="[object Arguments]"?function(e){return Jp.call(e)==="[object Arguments]"}:function(e){return wt("callee",e)}}(),fk=!{toString:null}.propertyIsEnumerable("toString"),Zp=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],eg=function(){return arguments.propertyIsEnumerable("length")}(),hk=function(e,n){for(var r=0;r<e.length;){if(e[r]===n)return!0;r+=1}return!1},tl=ke(typeof Object.keys=="function"&&!eg?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var n,r,i=[],s=eg&&ck(e);for(n in e)wt(n,e)&&(!s||n!=="length")&&(i[i.length]=n);if(fk)for(r=Zp.length-1;r>=0;)n=Zp[r],wt(n,e)&&!hk(i,n)&&(i[i.length]=n),r-=1;return i}),ui=Z(Di(["fantasy-land/map","map"],uk,function(e,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return ZS(n.length,function(){return e.call(this,n.apply(this,arguments))});case"[object Object]":return _i(function(r,i){return r[i]=e(n[i]),r},{},tl(n));default:return nk(e,n)}}));const dk=Number.isInteger||function(e){return e<<0===e};var pk=Z(function(e,n){var r=e<0?n.length+e:e;return x_(n)?n.charAt(r):n[r]}),gk=Z(function(e,n){return e.map(function(r){for(var i=n,s=0,o;s<r.length;){if(i==null)return;o=r[s],i=dk(o)?pk(o,i):i[o],s+=1}return i})}),mk=Z(function(e,n){return gk([e],n)[0]}),Fr=Z(function(e,n){return mk([e],n)}),ku=Z(function(e,n){return ui(Fr(e),n)}),ya=Ti(_i);function b_(t){return function e(n){for(var r,i,s,o=[],a=0,l=n.length;a<l;){if(Hh(n[a]))for(r=t?e(n[a]):n[a],s=0,i=r.length;s<i;)o[o.length]=r[s],s+=1;else o[o.length]=n[a];a+=1}return o}}function yk(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}}var vk=function(t){return{"@@transducer/init":Qt.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,n){var r=t["@@transducer/step"](e,n);return r["@@transducer/reduced"]?yk(r):r}}},_k=function(e){var n=vk(e);return{"@@transducer/init":Qt.init,"@@transducer/result":function(r){return n["@@transducer/result"](r)},"@@transducer/step":function(r,i){return Hh(i)?_i(n,r,i):_i(n,r,[i])}}},xk=Z(function(e,n){return ui(e,_k(n))});const bk=xk;var wk=Z(Di(["fantasy-land/chain","chain"],bk,function(e,n){return typeof n=="function"?function(r){return e(n(r))(r)}:b_(!1)(ui(e,n))}));function Sk(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))}var cf=ke(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Yh(t,e,n,r){var i=function(o){for(var a=e.length,l=0;l<a;){if(t===e[l])return n[l];l+=1}e[l+1]=t,n[l+1]=o;for(var u in t)o[u]=r?Yh(t[u],e,n,!0):t[u];return o};switch(cf(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return Sk(t);default:return t}}var qh=ke(function(e){return e!=null&&typeof e.clone=="function"?e.clone():Yh(e,[],[],!0)});function kk(t,e){return function(){return e.call(this,t.apply(this,arguments))}}function Qh(t,e){return function(){var n=arguments.length;if(n===0)return e();var r=arguments[n-1];return Wh(r)||typeof r[t]!="function"?e.apply(this,arguments):r[t].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var w_=Ti(Qh("slice",function(e,n,r){return Array.prototype.slice.call(r,e,n)})),Ek=ke(Qh("tail",w_(1,1/0)));function Vi(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Rl(arguments[0].length,ya(kk,arguments[0],Ek(arguments)))}function S_(t){return t}var Mk=ke(S_);const Pk=Mk;function tg(t){for(var e=[],n;!(n=t.next()).done;)e.push(n.value);return e}function ng(t,e,n){for(var r=0,i=n.length;r<i;){if(t(e,n[r]))return!0;r+=1}return!1}function Ok(t){var e=String(t).match(/^function (\w*)/);return e==null?"":e[1]}function Ck(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}const Eu=typeof Object.is=="function"?Object.is:Ck;function rg(t,e,n,r){var i=tg(t),s=tg(e);function o(a,l){return Gh(a,l,n.slice(),r.slice())}return!ng(function(a,l){return!ng(o,l,a)},s,i)}function Gh(t,e,n,r){if(Eu(t,e))return!0;var i=cf(t);if(i!==cf(e)||t==null||e==null)return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof e.equals=="function")return typeof t.equals=="function"&&t.equals(e)&&typeof e.equals=="function"&&e.equals(t);switch(i){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&Ok(t.constructor)==="Promise")return t===e;break;case"Boolean":case"Number":case"String":if(!(typeof t==typeof e&&Eu(t.valueOf(),e.valueOf())))return!1;break;case"Date":if(!Eu(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(!(t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.sticky===e.sticky&&t.unicode===e.unicode))return!1;break}for(var s=n.length-1;s>=0;){if(n[s]===t)return r[s]===e;s-=1}switch(i){case"Map":return t.size!==e.size?!1:rg(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size!==e.size?!1:rg(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=tl(t);if(o.length!==tl(e).length)return!1;var a=n.concat([t]),l=r.concat([e]);for(s=o.length-1;s>=0;){var u=o[s];if(!(wt(u,e)&&Gh(e[u],t[u],a,l)))return!1;s-=1}return!0}var at=Z(function(e,n){return Gh(e,n,[],[])});function Tk(t,e,n){var r,i;if(typeof t.indexOf=="function")switch(typeof e){case"number":if(e===0){for(r=1/e;n<t.length;){if(i=t[n],i===0&&1/i===r)return n;n+=1}return-1}else if(e!==e){for(;n<t.length;){if(i=t[n],typeof i=="number"&&i!==i)return n;n+=1}return-1}return t.indexOf(e,n);case"string":case"boolean":case"function":case"undefined":return t.indexOf(e,n);case"object":if(e===null)return t.indexOf(e,n)}for(;n<t.length;){if(at(t[n],e))return n;n+=1}return-1}function ig(t,e){return Tk(e,t,0)>=0}function Dk(t,e){for(var n=0,r=e.length,i=[];n<r;)t(e[n])&&(i[i.length]=e[n]),n+=1;return i}function ff(t){return Object.prototype.toString.call(t)==="[object Object]"}var Rk=function(){function t(e,n){this.xf=n,this.f=e}return t.prototype["@@transducer/init"]=Qt.init,t.prototype["@@transducer/result"]=Qt.result,t.prototype["@@transducer/step"]=function(e,n){return this.f(n)?this.xf["@@transducer/step"](e,n):e},t}(),Ik=Z(function(e,n){return new Rk(e,n)});const Ak=Ik;var Lk=Z(Di(["filter"],Ak,function(t,e){return ff(e)?_i(function(n,r){return t(e[r])&&(n[r]=e[r]),n},{},tl(e)):Dk(t,e)})),$k=function(){function t(e,n,r,i){this.valueFn=e,this.valueAcc=n,this.keyFn=r,this.xf=i,this.inputs={}}return t.prototype["@@transducer/init"]=Qt.init,t.prototype["@@transducer/result"]=function(e){var n;for(n in this.inputs)if(wt(n,this.inputs)&&(e=this.xf["@@transducer/step"](e,this.inputs[n]),e["@@transducer/reduced"])){e=e["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](e)},t.prototype["@@transducer/step"]=function(e,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),e},t}(),Nk=Il(4,[],function(e,n,r,i){return new $k(e,n,r,i)});const Fk=Nk;var k_=Il(4,[],Di([],Fk,function(e,n,r,i){return _i(function(s,o){var a=r(o);return s[a]=e(wt(a,s)?s[a]:Yh(n,[],[],!1),o),s},{},i)})),zk=function(){function t(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return t.prototype.add=function(e){return!sg(e,!0,this)},t.prototype.has=function(e){return sg(e,!1,this)},t}();function sg(t,e,n){var r=typeof t,i,s;switch(r){case"string":case"number":return t===0&&1/t===-1/0?n._items["-0"]?!0:(e&&(n._items["-0"]=!0),!1):n._nativeSet!==null?e?(i=n._nativeSet.size,n._nativeSet.add(t),s=n._nativeSet.size,s===i):n._nativeSet.has(t):r in n._items?t in n._items[r]?!0:(e&&(n._items[r][t]=!0),!1):(e&&(n._items[r]={},n._items[r][t]=!0),!1);case"boolean":if(r in n._items){var o=t?1:0;return n._items[r][o]?!0:(e&&(n._items[r][o]=!0),!1)}else return e&&(n._items[r]=t?[!1,!0]:[!0,!1]),!1;case"function":return n._nativeSet!==null?e?(i=n._nativeSet.size,n._nativeSet.add(t),s=n._nativeSet.size,s===i):n._nativeSet.has(t):r in n._items?ig(t,n._items[r])?!0:(e&&n._items[r].push(t),!1):(e&&(n._items[r]=[t]),!1);case"undefined":return n._items[r]?!0:(e&&(n._items[r]=!0),!1);case"object":if(t===null)return n._items.null?!0:(e&&(n._items.null=!0),!1);default:return r=Object.prototype.toString.call(t),r in n._items?ig(t,n._items[r])?!0:(e&&n._items[r].push(t),!1):(e&&(n._items[r]=[t]),!1)}}var jk=function(){function t(e,n){this.xf=n,this.n=e,this.i=0}return t.prototype["@@transducer/init"]=Qt.init,t.prototype["@@transducer/result"]=Qt.result,t.prototype["@@transducer/step"]=function(e,n){this.i+=1;var r=this.n===0?e:this.xf["@@transducer/step"](e,n);return this.n>=0&&this.i>=this.n?tk(r):r},t}(),Bk=Z(function(e,n){return new jk(e,n)});const Vk=Bk;var Uk=Z(Di(["take"],Vk,function(e,n){return w_(0,e<0?1/0:e,n)}));function Wk(t,e){return Uk(t<e.length?e.length-t:0,e)}var Hk=function(){function t(e,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(e)}return t.prototype["@@transducer/init"]=Qt.init,t.prototype["@@transducer/result"]=function(e){return this.acc=null,this.xf["@@transducer/result"](e)},t.prototype["@@transducer/step"]=function(e,n){return this.full&&(e=this.xf["@@transducer/step"](e,this.acc[this.pos])),this.store(n),e},t.prototype.store=function(e){this.acc[this.pos]=e,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t}(),Yk=Z(function(e,n){return new Hk(e,n)});const qk=Yk;var og=Z(Di([],qk,Wk)),ag=ke(b_(!0)),xi=ke(function(e){for(var n={},r=0;r<e.length;)n[e[r][0]]=e[r][1],r+=1;return n}),Qk=Z(Qh("groupBy",k_(function(t,e){return t==null&&(t=[]),t.push(e),t},null))),lg=k_(function(t,e){return e},null),hf=Z(function(e,n){for(var r=new zk,i=[],s=0,o,a;s<n.length;)a=n[s],o=e(a),r.add(o)&&i.push(a),s+=1;return i}),E_=hf(Pk);function Gk(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1,r=arguments.length;n<r;){var i=arguments[n];if(i!=null)for(var s in i)wt(s,i)&&(e[s]=i[s]);n+=1}return e}const Kk=typeof Object.assign=="function"?Object.assign:Gk;var Xk=Ti(function(e,n,r){return e(r)>e(n)?r:n}),Jk=ke(function(e){return Kk.apply(null,[{}].concat(e))}),Zk=Ti(function(e,n,r){var i={},s;for(s in n)wt(s,n)&&(i[s]=wt(s,r)?e(s,n[s],r[s]):n[s]);for(s in r)wt(s,r)&&!wt(s,i)&&(i[s]=r[s]);return i}),eE=Ti(function t(e,n,r){return Zk(function(i,s,o){return ff(s)&&ff(o)?t(e,s,o):e(i,s,o)},n,r)}),ug=Z(function(e,n){return eE(function(r,i,s){return i},e,n)}),tE=Ti(function(e,n,r){return e(r)<e(n)?r:n}),Ro=Z(function(e,n){for(var r={},i=0;i<e.length;)e[i]in n&&(r[e[i]]=n[e[i]]),i+=1;return r}),M_=ke(function(e){var n=[];for(var r in e)wt(r,e)&&(n[n.length]=[r,e[r]]);return n}),nE=wk(S_),df={exports:{}};(function(t,e){var n=typeof self<"u"?self:Je,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(k){return k&&DataView.prototype.isPrototypeOf(k)}if(a.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(k){return k&&u.indexOf(Object.prototype.toString.call(k))>-1};function f(k){if(typeof k!="string"&&(k=String(k)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(k))throw new TypeError("Invalid character in header field name");return k.toLowerCase()}function h(k){return typeof k!="string"&&(k=String(k)),k}function d(k){var P={next:function(){var D=k.shift();return{done:D===void 0,value:D}}};return a.iterable&&(P[Symbol.iterator]=function(){return P}),P}function g(k){this.map={},k instanceof g?k.forEach(function(P,D){this.append(D,P)},this):Array.isArray(k)?k.forEach(function(P){this.append(P[0],P[1])},this):k&&Object.getOwnPropertyNames(k).forEach(function(P){this.append(P,k[P])},this)}g.prototype.append=function(k,P){k=f(k),P=h(P);var D=this.map[k];this.map[k]=D?D+", "+P:P},g.prototype.delete=function(k){delete this.map[f(k)]},g.prototype.get=function(k){return k=f(k),this.has(k)?this.map[k]:null},g.prototype.has=function(k){return this.map.hasOwnProperty(f(k))},g.prototype.set=function(k,P){this.map[f(k)]=h(P)},g.prototype.forEach=function(k,P){for(var D in this.map)this.map.hasOwnProperty(D)&&k.call(P,this.map[D],D,this)},g.prototype.keys=function(){var k=[];return this.forEach(function(P,D){k.push(D)}),d(k)},g.prototype.values=function(){var k=[];return this.forEach(function(P){k.push(P)}),d(k)},g.prototype.entries=function(){var k=[];return this.forEach(function(P,D){k.push([D,P])}),d(k)},a.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function y(k){if(k.bodyUsed)return Promise.reject(new TypeError("Already read"));k.bodyUsed=!0}function _(k){return new Promise(function(P,D){k.onload=function(){P(k.result)},k.onerror=function(){D(k.error)}})}function m(k){var P=new FileReader,D=_(P);return P.readAsArrayBuffer(k),D}function p(k){var P=new FileReader,D=_(P);return P.readAsText(k),D}function v(k){for(var P=new Uint8Array(k),D=new Array(P.length),O=0;O<P.length;O++)D[O]=String.fromCharCode(P[O]);return D.join("")}function x(k){if(k.slice)return k.slice(0);var P=new Uint8Array(k.byteLength);return P.set(new Uint8Array(k)),P.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(k){this._bodyInit=k,k?typeof k=="string"?this._bodyText=k:a.blob&&Blob.prototype.isPrototypeOf(k)?this._bodyBlob=k:a.formData&&FormData.prototype.isPrototypeOf(k)?this._bodyFormData=k:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)?this._bodyText=k.toString():a.arrayBuffer&&a.blob&&l(k)?(this._bodyArrayBuffer=x(k.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(k)||c(k))?this._bodyArrayBuffer=x(k):this._bodyText=k=Object.prototype.toString.call(k):this._bodyText="",this.headers.get("content-type")||(typeof k=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var k=y(this);if(k)return k;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var k=y(this);if(k)return k;if(this._bodyBlob)return p(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(v(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}var M=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function C(k){var P=k.toUpperCase();return M.indexOf(P)>-1?P:k}function T(k,P){P=P||{};var D=P.body;if(k instanceof T){if(k.bodyUsed)throw new TypeError("Already read");this.url=k.url,this.credentials=k.credentials,P.headers||(this.headers=new g(k.headers)),this.method=k.method,this.mode=k.mode,this.signal=k.signal,!D&&k._bodyInit!=null&&(D=k._bodyInit,k.bodyUsed=!0)}else this.url=String(k);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new g(P.headers)),this.method=C(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&D)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(D)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function $(k){var P=new FormData;return k.trim().split("&").forEach(function(D){if(D){var O=D.split("="),E=O.shift().replace(/\+/g," "),w=O.join("=").replace(/\+/g," ");P.append(decodeURIComponent(E),decodeURIComponent(w))}}),P}function I(k){var P=new g,D=k.replace(/\r?\n[\t ]+/g," ");return D.split(/\r?\n/).forEach(function(O){var E=O.split(":"),w=E.shift().trim();if(w){var S=E.join(":").trim();P.append(w,S)}}),P}b.call(T.prototype);function L(k,P){P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in P?P.statusText:"OK",this.headers=new g(P.headers),this.url=P.url||"",this._initBody(k)}b.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},L.error=function(){var k=new L(null,{status:0,statusText:""});return k.type="error",k};var V=[301,302,303,307,308];L.redirect=function(k,P){if(V.indexOf(P)===-1)throw new RangeError("Invalid status code");return new L(null,{status:P,headers:{location:k}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(P,D){this.message=P,this.name=D;var O=Error(P);this.stack=O.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Y(k,P){return new Promise(function(D,O){var E=new T(k,P);if(E.signal&&E.signal.aborted)return O(new o.DOMException("Aborted","AbortError"));var w=new XMLHttpRequest;function S(){w.abort()}w.onload=function(){var R={status:w.status,statusText:w.statusText,headers:I(w.getAllResponseHeaders()||"")};R.url="responseURL"in w?w.responseURL:R.headers.get("X-Request-URL");var A="response"in w?w.response:w.responseText;D(new L(A,R))},w.onerror=function(){O(new TypeError("Network request failed"))},w.ontimeout=function(){O(new TypeError("Network request failed"))},w.onabort=function(){O(new o.DOMException("Aborted","AbortError"))},w.open(E.method,E.url,!0),E.credentials==="include"?w.withCredentials=!0:E.credentials==="omit"&&(w.withCredentials=!1),"responseType"in w&&a.blob&&(w.responseType="blob"),E.headers.forEach(function(R,A){w.setRequestHeader(A,R)}),E.signal&&(E.signal.addEventListener("abort",S),w.onreadystatechange=function(){w.readyState===4&&E.signal.removeEventListener("abort",S)}),w.send(typeof E._bodyInit>"u"?null:E._bodyInit)})}return Y.polyfill=!0,s.fetch||(s.fetch=Y,s.Headers=g,s.Request=T,s.Response=L),o.Headers=g,o.Request=T,o.Response=L,o.fetch=Y,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(df,df.exports);var rE=df.exports;const iE=Mi(rE);(function(t){var e=t.URLSearchParams&&t.URLSearchParams.prototype.get?t.URLSearchParams:null,n=e&&new e({a:1}).toString()==="a=1",r=e&&new e("s=%2B").get("s")==="+",i="__URLSearchParams__",s=e?function(){var p=new e;return p.append("s"," &"),p.toString()==="s=+%26"}():!0,o=l.prototype,a=!!(t.Symbol&&t.Symbol.iterator);if(e&&n&&r&&s)return;function l(p){p=p||"",(p instanceof URLSearchParams||p instanceof l)&&(p=p.toString()),this[i]=y(p)}o.append=function(p,v){_(this[i],p,v)},o.delete=function(p){delete this[i][p]},o.get=function(p){var v=this[i];return p in v?v[p][0]:null},o.getAll=function(p){var v=this[i];return p in v?v[p].slice(0):[]},o.has=function(p){return p in this[i]},o.set=function(v,x){this[i][v]=[""+x]},o.toString=function(){var p=this[i],v=[],x,b,M,C;for(b in p)for(M=h(b),x=0,C=p[b];x<C.length;x++)v.push(M+"="+h(C[x]));return v.join("&")};var u=!r,c=!u&&e&&!n&&t.Proxy;Object.defineProperty(t,"URLSearchParams",{value:c?new Proxy(e,{construct:function(p,v){return new p(new l(v[0]).toString())}}):l});var f=t.URLSearchParams.prototype;f.polyfill=!0,f.forEach=f.forEach||function(p,v){var x=y(this.toString());Object.getOwnPropertyNames(x).forEach(function(b){x[b].forEach(function(M){p.call(v,M,b,this)},this)},this)},f.sort=f.sort||function(){var p=y(this.toString()),v=[],x,b,M;for(x in p)v.push(x);for(v.sort(),b=0;b<v.length;b++)this.delete(v[b]);for(b=0;b<v.length;b++){var C=v[b],T=p[C];for(M=0;M<T.length;M++)this.append(C,T[M])}},f.keys=f.keys||function(){var p=[];return this.forEach(function(v,x){p.push(x)}),g(p)},f.values=f.values||function(){var p=[];return this.forEach(function(v){p.push(v)}),g(p)},f.entries=f.entries||function(){var p=[];return this.forEach(function(v,x){p.push([x,v])}),g(p)},a&&(f[t.Symbol.iterator]=f[t.Symbol.iterator]||f.entries);function h(p){var v={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(p).replace(/[!'\(\)~]|%20|%00/g,function(x){return v[x]})}function d(p){return p.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(v){return decodeURIComponent(v)})}function g(p){var v={next:function(){var x=p.shift();return{done:x===void 0,value:x}}};return a&&(v[t.Symbol.iterator]=function(){return v}),v}function y(p){var v={};if(typeof p=="object")if(m(p))for(var x=0;x<p.length;x++){var b=p[x];if(m(b)&&b.length===2)_(v,b[0],b[1]);else throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var M in p)p.hasOwnProperty(M)&&_(v,M,p[M]);else{p.indexOf("?")===0&&(p=p.slice(1));for(var C=p.split("&"),T=0;T<C.length;T++){var $=C[T],I=$.indexOf("=");-1<I?_(v,d($.slice(0,I)),d($.slice(I+1))):$&&_(v,d($),"")}}return v}function _(p,v,x){var b=typeof x=="string"?x:x!=null&&typeof x.toString=="function"?x.toString():JSON.stringify(x);v in p?p[v].push(b):p[v]=[b]}function m(p){return!!p&&Object.prototype.toString.call(p)==="[object Array]"}})(typeof Je<"u"?Je:typeof window<"u"?window:Je);const sE="day";function P_(t){return xi(M_(t||{}).map(([n,r])=>{if(["measures","dimensions","segments","timeDimensions","filters"].includes(n)&&Array.isArray(r)&&r.length===0)return null;if(n==="order"&&r){if(Array.isArray(r)&&!r.length)return null;if(!Object.keys(r).length)return null}return[n,r]}).filter(Boolean))}function oE(t){const e=t||{};return P_({...e,filters:(e.filters||[]).filter(n=>n.operator),timeDimensions:(e.timeDimensions||[]).filter(n=>!(!n.dateRange&&!n.granularity))})}function O_(t={},e={}){return at(Object.entries(t&&t.order||{}),Object.entries(e&&e.order||{}))&&at(t,e)}function aE(t){const e=(t.timeDimensions||[]).find(n=>n.granularity);return e?{[e.dimension]:"asc"}:(t.measures||[]).length>0&&(t.dimensions||[]).length>0?{[t.measures[0]]:"desc"}:(t.dimensions||[]).length>0?{[t.dimensions[0]]:"asc"}:{}}function lE(t,e={},n){const{query:r,...i}=qh(t),{meta:s,sessionGranularity:o}=n,a=o||sE;let l={query:r,...i},u=null;if(O_(r,e)||(u=r),Array.isArray(u)||Array.isArray(e))return t;if(u){if((e.timeDimensions||[]).length===1&&(u.timeDimensions||[]).length===1&&u.timeDimensions[0].granularity&&e.timeDimensions[0].granularity!==u.timeDimensions[0].granularity&&(l={...l,sessionGranularity:u.timeDimensions[0].granularity}),(e.measures||[]).length===0&&(u.measures||[]).length>0||(e.measures||[]).length===1&&(u.measures||[]).length===1&&e.measures[0]!==u.measures[0]){const[c]=u.timeDimensions||[],f=s.defaultTimeDimensionNameFor(u.measures[0]);return u={...u,timeDimensions:f?[{dimension:f,granularity:c&&c.granularity||a,dateRange:c&&c.dateRange}]:[]},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,chartType:f?"line":"number"}}return(e.dimensions||[]).length===0&&(u.dimensions||[]).length>0?(u={...u,timeDimensions:(u.timeDimensions||[]).map(c=>({...c,granularity:void 0}))},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,chartType:"table"}):(e.dimensions||[]).length>0&&(u.dimensions||[]).length===0?(u={...u,timeDimensions:(u.timeDimensions||[]).map(c=>({...c,granularity:c.granularity||a}))},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,chartType:(u.timeDimensions||[]).length?"line":"number"}):((e.dimensions||[]).length>0||(e.measures||[]).length>0)&&(u.dimensions||[]).length===0&&(u.measures||[]).length===0?(u={...u,timeDimensions:[],filters:[]},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,sessionGranularity:null}):l}if(l.chartType){const c=l.chartType;if((c==="line"||c==="area")&&(e.timeDimensions||[]).length===1&&!e.timeDimensions[0].granularity){const[f]=e.timeDimensions;return{...l,pivotConfig:null,query:{...e,timeDimensions:[{...f,granularity:a}]}}}if((c==="pie"||c==="table"||c==="number")&&(e.timeDimensions||[]).length===1&&e.timeDimensions[0].granularity){const[f]=e.timeDimensions;return{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:{...e,timeDimensions:[{...f,granularity:void 0}]}}}}return l}function Vs(t){return t?(Array.isArray(t)?t:[t]).every(e=>e.measures&&e.measures.length||e.dimensions&&e.dimensions.length||e.timeDimensions&&e.timeDimensions.length):!1}function uE(t,e,n,r,i){const s={...t,x:[...t.x],y:[...t.y]},o=t[r][e],a=s[i].length-1;return o==="measures"?n=a+1:r===i&&n>=a&&s[i][a]==="measures"?n=a-1:r!==i&&n>a&&s[i][a]==="measures"&&(n=a),s[r].splice(e,1),s[i].splice(n,0,o),s}function cE(t,e,n){const r=[...t],[i]=r.splice(e,1);return r.splice(n,0,i),r}function Kh(t=[]){return t.reduce((e,n)=>n.or||n.and?[...e,...Kh(n.or||n.and)]:[...e,n],[])}function fE(t={}){const e=["measures","dimensions","segments"],n=new Set;return e.forEach(r=>(t[r]||[]).forEach(i=>n.add(i))),(t.timeDimensions||[]).forEach(r=>n.add(r.dimension)),Kh(t.filters).forEach(r=>n.add(r.dimension||r.member)),[...n]}function cg(t,e,n,r){const i=t.filter(s=>s!=null);return n&&n.aliasSeries&&n.aliasSeries[e]?[n.aliasSeries[e],...i]:r.has(i[0])?[e,...i]:i}Zr.extend(KS);const ur=(...t)=>Zr(...t).locale({...JS,weekStart:1}),fg={day:t=>t.by("d").map(e=>e.format("YYYY-MM-DDT00:00:00.000")),month:t=>t.snapTo("month").by("M").map(e=>e.format("YYYY-MM-01T00:00:00.000")),year:t=>t.snapTo("year").by("y").map(e=>e.format("YYYY-01-01T00:00:00.000")),hour:t=>t.by("h").map(e=>e.format("YYYY-MM-DDTHH:00:00.000")),minute:t=>t.by("m").map(e=>e.format("YYYY-MM-DDTHH:mm:00.000")),second:t=>t.by("s").map(e=>e.format("YYYY-MM-DDTHH:mm:ss.000")),week:t=>t.snapTo("week").by("w").map(e=>e.startOf("week").format("YYYY-MM-DDT00:00:00.000")),quarter:t=>t.snapTo("quarter").by("quarter").map(e=>e.startOf("quarter").format("YYYY-MM-DDT00:00:00.000"))},hE=/^\d\d\d\d-\d\d-\d\d$/,dE=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z?$/,pE=t=>{const e=new Map;return n=>(n.forEach(r=>{const i=t(r);e.has(i)||e.set(i,[]),e.get(i).push(r)}),Array.from(e.entries()))},Ui=t=>{const e=[];return t.forEach(n=>{n.forEach(r=>e.push(r))}),e},pf=(t,e)=>({by:n=>{const r=[];let i=ur(t);const s=ur(e);for(;i.isBefore(s)||i.isSame(s);)r.push(i),i=i.add(1,n);return r},snapTo:n=>pf(ur(t).startOf(n),ur(e).endOf(n)),start:ur(t),end:ur(e)}),Ot={REGULAR_QUERY:"regularQuery",COMPARE_DATE_RANGE_QUERY:"compareDateRangeQuery",BLENDING_QUERY:"blendingQuery"};class Me{static measureFromAxis(e){return e[e.length-1]}static timeDimensionMember(e){return`${e.dimension}.${e.granularity}`}static deserialize(e,n={}){return new Me(e.loadResponse,n)}constructor(e,n={}){if(this.loadResponse=e,this.loadResponse.queryType!=null?(this.queryType=e.queryType,this.loadResponses=e.results):(this.queryType=Ot.REGULAR_QUERY,this.loadResponse.pivotQuery={...e.query,queryType:this.queryType},this.loadResponses=[e]),!Object.values(Ot).includes(this.queryType))throw new Error("Unknown query type");this.parseDateMeasures=n.parseDateMeasures,this.options=n,this.backwardCompatibleData=[]}drillDown(e,n){if(this.queryType===Ot.COMPARE_DATE_RANGE_QUERY)throw new Error("compareDateRange drillDown query is not currently supported");if(this.queryType===Ot.BLENDING_QUERY)throw new Error("Data blending drillDown query is not currently supported");const{query:r}=this.loadResponses[0],{xValues:i=[],yValues:s=[]}=e,o=this.normalizePivotConfig(n),a=[];o.x.forEach((g,y)=>a.push([g,i[y]])),o.y.forEach((g,y)=>a.push([g,s[y]]));const{filters:l=[],segments:u=[]}=this.query(),{measures:c}=this.loadResponses[0].annotation;let[,f]=a.find(([g])=>g==="measures")||[];if(f===void 0&&([f]=Object.keys(c)),!(c[f]&&c[f].drillMembers||[]).length)return null;const h=[{member:f,operator:"measureFilter"},...l],d=[];return a.filter(([g])=>g!=="measures").forEach(([g,y])=>{const[_,m,p]=g.split(".");if(p!==void 0){const v=pf(y,y).snapTo(p),x=r.timeDimensions.find(M=>M.dimension);let b=[v.start,v.end];if(x!=null&&x.dateRange){const[M,C]=x.dateRange;b=[Zr(M)>v.start?Zr(M):v.start,Zr(C)<v.end?Zr(C):v.end]}d.push({dimension:[_,m].join("."),dateRange:b.map(M=>M.format("YYYY-MM-DDTHH:mm:ss.SSS"))})}else y==null?h.push({member:g,operator:"notSet"}):h.push({member:g,operator:"equals",values:[y.toString()]})}),d.length===0&&r.timeDimensions.length>0&&r.timeDimensions[0].granularity==null&&d.push(r.timeDimensions[0]),{...c[f].drillMembersGrouped,filters:h,...u.length>0?{segments:u}:{},timeDimensions:d,segments:u,timezone:r.timezone}}series(e){return this.seriesNames(e).map(({title:n,shortTitle:r,key:i})=>({title:n,shortTitle:r,key:i,series:this.chartPivot(e).map(({x:s,...o})=>({value:o[i],x:s}))}))}axisValues(e,n=0){const{query:r}=this.loadResponses[n];return i=>{const s=o=>e.filter(a=>a!=="measures").map(a=>i[a]!=null?i[a]:null).concat(o?[o]:[]);return e.find(o=>o==="measures")&&(r.measures||[]).length?r.measures.map(s):[s()]}}axisValuesString(e,n){const r=i=>i==null?"∅":i===""?"[Empty string]":i;return e.map(r).join(n||", ")}static getNormalizedPivotConfig(e={},n=null){const r={x:[],y:[],fillMissingDates:!0,joinDateRange:!1},{measures:i=[],dimensions:s=[]}=e,o=(e.timeDimensions||[]).filter(f=>!!f.granularity);n=n||(o.length?{x:o.map(f=>Me.timeDimensionMember(f)),y:s}:{x:s,y:[]}),n=ug(n,r);const a=f=>f.map(h=>o.find(d=>d.dimension===h)&&!s.find(d=>d===h)?Me.timeDimensionMember(e.timeDimensions.find(d=>d.dimension===h)):h);n.x=a(n.x),n.y=a(n.y);const l=n.x.concat(n.y),u=o.map(f=>Me.timeDimensionMember(f)).concat(s),c=f=>u.includes(f)||f==="measures";return n.x=n.x.concat(u.filter(f=>!l.includes(f)&&f!=="compareDateRange")).filter(c),n.y=n.y.filter(c),n.x.concat(n.y).find(f=>f==="measures")||n.y.push("measures"),s.includes("compareDateRange")&&!n.y.concat(n.x).includes("compareDateRange")&&n.y.unshift("compareDateRange"),i.length||(n.x=n.x.filter(f=>f!=="measures"),n.y=n.y.filter(f=>f!=="measures")),n}normalizePivotConfig(e){return Me.getNormalizedPivotConfig(this.loadResponse.pivotQuery,e)}timeSeries(e,n){if(!e.granularity)return null;let{dateRange:r}=e;if(!r){const l=Me.timeDimensionMember(e),u=Vi(ui(c=>c[l]&&ur(c[l])),Lk(Boolean))(this.timeDimensionBackwardCompatibleData(n));r=u.length&&[ya(tE(c=>c.toDate()),u[0],u),ya(Xk(c=>c.toDate()),u[0],u)]||null}if(!r)return null;const i=e.dateRange?e.dateRange.find(l=>l.match(hE)):!["hour","minute","second"].includes(e.granularity),[s,o]=r,a=pf(s,o);if(!fg[e.granularity])throw new Error(`Unsupported time granularity: ${e.granularity}`);return fg[e.granularity](i?a.snapTo("d"):a)}pivot(e){e=this.normalizePivotConfig(e);const{pivotQuery:n}=this.loadResponse,r=(s=0)=>{let o=pE(({xValues:h})=>this.axisValuesString(h));const a=(h,d)=>h[d]||0;if(e.fillMissingDates&&e.x.length===1&&at(e.x,(n.timeDimensions||[]).filter(h=>!!h.granularity).map(h=>Me.timeDimensionMember(h)))){const h=this.loadResponses.map(d=>this.timeSeries(d.query.timeDimensions[0],s));h[0]&&(o=d=>{const g=Qk(({xValues:y})=>y[0],d);return h[s].map(y=>[y,g[y]||[{xValues:[y],row:{}}]])})}const l=Vi(ui(h=>this.axisValues(e.x,s)(h).map(d=>({xValues:d,row:h}))),Ui,o)(this.timeDimensionBackwardCompatibleData(s)),u={};l.forEach(([,h])=>{h.forEach(({row:d})=>{this.axisValues(e.y,s)(d).forEach(g=>{Object.keys(d).length>0&&(u[g.join()]=g)})})});const c=Object.values(u),f=!!e.x.find(h=>h==="measures");return l.map(([,h])=>{const{xValues:d}=h[0],g={};return h.forEach(({row:y})=>{this.axisValues(e.y,s)(y).map(m=>({yValues:m,row:y})).forEach(m=>{g[this.axisValuesString(m.yValues)]=m})}),{xValues:d,yValuesArray:Ui(c.map(y=>{const _=f?Me.measureFromAxis(d):Me.measureFromAxis(y);return[[y,a((g[this.axisValuesString(y)]||{row:{}}).row,_)]]}))}})},i=this.loadResponses.length>1?this.loadResponses.map((s,o)=>r(o)):[];return i.length?this.mergePivots(i,e.joinDateRange):r()}mergePivots(e,n){const r=e.reduce((i,s)=>i!=null&&s.length>=i.length?i:s,null);return r.map((i,s)=>({xValues:n?[e.map(a=>a[s]&&a[s].xValues||[]).join(", ")]:r[s].xValues,yValuesArray:Ui(e.map(a=>a[s].yValuesArray))}))}pivotedRows(e){return this.chartPivot(e)}chartPivot(e){const n=i=>this.parseDateMeasures&&dE.test(i)?new Date(i):Number.isNaN(Number.parseFloat(i))?i:Number.parseFloat(i),r=new Set;return this.queryType===Ot.BLENDING_QUERY&&ag(this.loadResponses.map(({query:s})=>s.measures)).filter((s,o,a)=>a.indexOf(s)!==o).forEach(s=>r.add(s)),this.pivot(e).map(({xValues:i,yValuesArray:s})=>{const o={};return s.forEach(([a,l],u)=>{o[this.axisValuesString(cg(a,u,e,r),",")]=l&&n(l)}),{x:this.axisValuesString(i,","),xValues:i,...o}})}tablePivot(e){const n=this.normalizePivotConfig(e||{}),r=n.x.concat(n.y).includes("measures");return this.pivot(n).map(({xValues:i,yValuesArray:s})=>xi(n.x.map((o,a)=>[o,i[a]]).concat(r?s.map(([o,a])=>[o.length?o.join():"value",a]):[])))}tableColumns(e){const n=this.normalizePivotConfig(e||{}),r=Vi(ku("annotation"),ya(ug(),{}))(this.loadResponses),i=Object.values(r).reduce((c,f)=>({...c,...f}),{}),s={},o=c=>{const{title:f,shortTitle:h,type:d,format:g,meta:y}=i[c]||{};return{key:c,title:f,shortTitle:h,type:d,format:g,meta:y}},a=this.pivot(n);(a[0]&&a[0].yValuesArray||[]).forEach(([c])=>{if(c.length>0){let f=s;c.forEach((h,d)=>{f[`_${h}`]={key:h,memberId:n.y[d]==="measures"?h:n.y[d],children:f[`_${h}`]&&f[`_${h}`].children||{}},f=f[`_${h}`].children})}});const l=(c={},f=[])=>Object.keys(c).length===0?[]:Object.values(c).map(({key:h,...d})=>{const g=l(d.children,[...f,h]),{title:y,shortTitle:_,...m}=o(d.memberId),p=h!==d.memberId||y==null?h:"";return g.length?{...m,key:h,title:[y,p].join(" ").trim(),shortTitle:p||_,children:g}:{...m,key:h,dataIndex:[...f,h].join(),title:[y,p].join(" ").trim(),shortTitle:p||_}});let u=[];return!a.length&&n.y.includes("measures")&&(u=(this.loadResponses[0].query.measures||[]).map(c=>({...o(c),dataIndex:c}))),!n.y.length&&n.x.includes("measures")&&u.push({key:"value",dataIndex:"value",title:"Value",shortTitle:"Value",type:"string"}),n.x.map(c=>c==="measures"?{key:"measures",dataIndex:"measures",title:"Measures",shortTitle:"Measures",type:"string"}:{...o(c),dataIndex:c}).concat(l(s)).concat(u)}totalRow(e){return this.chartPivot(e)[0]}categories(e){return this.chartPivot(e)}seriesNames(e){e=this.normalizePivotConfig(e);const n=Vi(ku("annotation"),ku("measures"),Jk)(this.loadResponses),r=Ui(this.loadResponses.map((s,o)=>Vi(ui(this.axisValues(e.y,o)),Ui,E_)(this.timeDimensionBackwardCompatibleData(o)))),i=new Set;return this.queryType===Ot.BLENDING_QUERY&&ag(this.loadResponses.map(({query:o})=>o.measures)).filter((o,a,l)=>l.indexOf(o)!==a).forEach(o=>i.add(o)),r.map((s,o)=>{const a=cg(s,o,e,i);return{title:this.axisValuesString(e.y.find(l=>l==="measures")?og(1,a).concat(n[Me.measureFromAxis(s)].title):a,", "),shortTitle:this.axisValuesString(e.y.find(l=>l==="measures")?og(1,a).concat(n[Me.measureFromAxis(s)].shortTitle):a,", "),key:this.axisValuesString(a,","),yValues:s}})}query(){if(this.queryType!==Ot.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].query}pivotQuery(){return this.loadResponse.pivotQuery||null}totalRows(){return this.loadResponses[0].total}rawData(){if(this.queryType!==Ot.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].data}annotation(){if(this.queryType!==Ot.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].annotation}timeDimensionBackwardCompatibleData(e){if(e===void 0)throw new Error("resultIndex is required");if(!this.backwardCompatibleData[e]){const{data:n,query:r}=this.loadResponses[e],i=(r.timeDimensions||[]).filter(s=>!!s.granularity);this.backwardCompatibleData[e]=n.map(s=>({...s,...xi(Object.keys(s).filter(o=>i.find(a=>a.dimension===o)&&!s[Me.timeDimensionMember(i.find(a=>a.dimension===o))]).map(o=>[Me.timeDimensionMember(i.find(a=>a.dimension===o)),s[o]]))}))}return this.backwardCompatibleData[e]}decompose(){return this.loadResponses.map(e=>new Me({queryType:Ot.REGULAR_QUERY,pivotQuery:{...e.query,queryType:Ot.REGULAR_QUERY},results:[e]},this.options))}serialize(){return{loadResponse:qh(this.loadResponse)}}}class hg{constructor(e){this.sqlQuery=e}rawQuery(){return this.sqlQuery.sql}sql(){return this.rawQuery().sql[0]}}const Mu=t=>xi(t.map(e=>[e.name,e])),dg={string:[{name:"contains",title:"contains"},{name:"notContains",title:"does not contain"},{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"startsWith",title:"starts with"},{name:"notStartsWith",title:"does not start with"},{name:"endsWith",title:"ends with"},{name:"notEndsWith",title:"does not end with"}],number:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"gt",title:">"},{name:"gte",title:">="},{name:"lt",title:"<"},{name:"lte",title:"<="}],time:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"inDateRange",title:"in date range"},{name:"notInDateRange",title:"not in date range"},{name:"afterDate",title:"after date"},{name:"afterOrOnDate",title:"after or on date"},{name:"beforeDate",title:"before date"},{name:"beforeOrOnDate",title:"before or on date"}]};class gE{constructor(e){this.meta=e;const{cubes:n}=this.meta;this.cubes=n,this.cubesMap=xi(n.map(r=>[r.name,{measures:Mu(r.measures),dimensions:Mu(r.dimensions),segments:Mu(r.segments)}]))}membersForQuery(e,n){return nE(this.cubes.map(r=>r[n])).sort((r,i)=>r.title>i.title?1:-1)}membersGroupedByCube(){const e=["measures","dimensions","segments","timeDimensions"];return this.cubes.reduce((n,r)=>(e.forEach(i=>{let s=r[i];i==="timeDimensions"&&(s=r.dimensions.filter(o=>o.type==="time")),n[i]=[...n[i],{cubeName:r.name,cubeTitle:r.title,type:r.type,public:r.public,members:s}]}),n),{measures:[],dimensions:[],segments:[],timeDimensions:[]})}resolveMember(e,n){const[r]=e.split(".");if(!this.cubesMap[r])return{title:e,error:`Cube not found ${r} for path '${e}'`};const s=(Array.isArray(n)?n:[n]).map(o=>this.cubesMap[r][o]&&this.cubesMap[r][o][e]).find(o=>o);return s||{title:e,error:`Path not found '${e}'`}}defaultTimeDimensionNameFor(e){const[n]=e.split(".");return this.cubesMap[n]?Object.keys(this.cubesMap[n].dimensions||{}).find(r=>this.cubesMap[n].dimensions[r].type==="time"):null}filterOperatorsForMember(e,n){const r=this.resolveMember(e,n);return dg[r.type]||dg.string}}class mE{constructor(e){this.progressResponse=e}stage(){return this.progressResponse.stage}timeElapsed(){return this.progressResponse.timeElapsed}}class yE{constructor({authorization:e,apiUrl:n,method:r,headers:i={},credentials:s}){this.authorization=e,this.apiUrl=n,this.method=r,this.headers=i,this.credentials=s}request(e,{baseRequestId:n,...r}){let i=1;const s=new URLSearchParams(r&&Object.keys(r).map(u=>({[u]:typeof r[u]=="object"?JSON.stringify(r[u]):r[u]})).reduce((u,c)=>({...u,...c}),{}));let o=`${this.apiUrl}/${e}${s.toString().length?`?${s}`:""}`;const a=this.method||(o.length<2e3?"GET":"POST");a==="POST"&&(o=`${this.apiUrl}/${e}`,this.headers["Content-Type"]="application/json");const l=()=>iE(o,{method:a,headers:{Authorization:this.authorization,"x-request-id":n&&`${n}-span-${i++}`,...this.headers},credentials:this.credentials,body:a==="POST"?JSON.stringify(r):null});return{async subscribe(u){let c={error:"network Error"};try{c=await l()}finally{return u(c,()=>this.subscribe(u))}}}}}class vE extends Error{constructor(e,n,r){super(e),this.response=n,this.status=r}}let _E=0;const C_="Mutex has been changed",mt={DEFAULT:"default",COMPACT:"compact"};function xE(t){return new Promise(async(e,n)=>{try{e(await t)}catch(r){r!==C_&&n(r)}})}class bE{constructor(e,n){if(e!==null&&!Array.isArray(e)&&typeof e=="object"&&(n=e,e=void 0),n=n||{},!n.transport&&!n.apiUrl)throw new Error("The `apiUrl` option is required");this.apiToken=e,this.apiUrl=n.apiUrl,this.method=n.method,this.headers=n.headers||{},this.credentials=n.credentials,this.transport=n.transport||new yE({authorization:typeof e=="function"?void 0:e,apiUrl:this.apiUrl,method:this.method,headers:this.headers,credentials:this.credentials}),this.pollInterval=n.pollInterval||5,this.parseDateMeasures=n.parseDateMeasures,this.castNumerics=typeof n.castNumerics=="boolean"?n.castNumerics:!1,this.updateAuthorizationPromise=null}request(e,n){return this.transport.request(e,{baseRequestId:qS(),...n})}loadMethod(e,n,r,i){const s=++_E;typeof r=="function"&&!i&&(i=r,r=void 0),r=r||{};const o=r.mutexKey||"default";r.mutexObj&&(r.mutexObj[o]=s);const a=this.updateTransportAuthorization().then(()=>e());let l=!0,u=!1;const c=async()=>{const d=await a;if(r.mutexObj&&r.mutexObj[o]!==s)throw u=!0,d.unsubscribe&&await d.unsubscribe(),C_},f=async(d,g)=>{const y=await a,_=async()=>r.subscribe&&!u?(y.unsubscribe||await new Promise(b=>setTimeout(()=>b(),this.pollInterval*1e3)),g()):null,m=async b=>u?null:(b&&await new Promise(M=>setTimeout(()=>M(),this.pollInterval*1e3)),g());if(r.subscribe&&!l&&await this.updateTransportAuthorization(),l=!1,d.status===502)return await c(),m(!0);let p={},v="";try{v=await d.text(),p=JSON.parse(v)}catch{p.error=v}if(p.error==="Continue wait")return await c(),r.progressCallback&&r.progressCallback(new mE(p)),m();if(d.status!==200){await c(),!r.subscribe&&y.unsubscribe&&await y.unsubscribe();const b=new vE(p.error,p,d.status);if(i)i(b);else throw b;return _()}await c(),!r.subscribe&&y.unsubscribe&&await y.unsubscribe();const x=n(p);if(i)i(null,x);else return x;return _()},h=a.then(d=>xE(d.subscribe(f)));return i?{unsubscribe:async()=>{const d=await a;return u=!0,d.unsubscribe?d.unsubscribe():null}}:h}async updateTransportAuthorization(){if(this.updateAuthorizationPromise){await this.updateAuthorizationPromise;return}typeof this.apiToken=="function"&&(this.updateAuthorizationPromise=new Promise(async(e,n)=>{try{const r=await this.apiToken();this.transport.authorization!==r&&(this.transport.authorization=r),e()}catch(r){n(r)}finally{this.updateAuthorizationPromise=null}}),await this.updateAuthorizationPromise)}patchQueryInternal(e,n){return n===mt.COMPACT&&e.responseFormat!==mt.COMPACT?{...e,responseFormat:mt.COMPACT}:e}loadResponseInternal(e,n={}){return e.results.length&&(n.castNumerics&&e.results.forEach(r=>{const i=Object.entries({...r.annotation.measures,...r.annotation.dimensions}).map(([s,o])=>{if(o.type==="number")return s}).filter(Boolean);r.data=r.data.map(s=>(i.forEach(o=>{s[o]!=null&&(s[o]=Number(s[o]))}),s))}),e.results[0].query.responseFormat&&e.results[0].query.responseFormat===mt.COMPACT&&e.results.forEach((r,i)=>{const s=[];r.data.dataset.forEach(o=>{const a={};r.data.members.forEach((l,u)=>{a[l]=o[u]}),s.push(a)}),e.results[i].data=s})),new Me(e,{parseDateMeasures:this.parseDateMeasures})}load(e,n,r,i=mt.DEFAULT){return n={castNumerics:this.castNumerics,...n},i===mt.COMPACT&&(Array.isArray(e)?e=e.map(s=>this.patchQueryInternal(s,mt.COMPACT)):e=this.patchQueryInternal(e,mt.COMPACT)),this.loadMethod(()=>this.request("load",{query:e,queryType:"multi"}),s=>this.loadResponseInternal(s,n),n,r)}subscribe(e,n,r,i=mt.DEFAULT){return n={castNumerics:this.castNumerics,...n},i===mt.COMPACT&&(Array.isArray(e)?e=e.map(s=>this.patchQueryInternal(s,mt.COMPACT)):e=this.patchQueryInternal(e,mt.COMPACT)),this.loadMethod(()=>this.request("subscribe",{query:e,queryType:"multi"}),s=>this.loadResponseInternal(s,n),{...n,subscribe:!0},r)}sql(e,n,r){return this.loadMethod(()=>this.request("sql",{query:e}),i=>Array.isArray(i)?i.map(s=>new hg(s)):new hg(i),n,r)}meta(e,n){return this.loadMethod(()=>this.request("meta"),r=>new gE(r),e,n)}dryRun(e,n,r){return this.loadMethod(()=>this.request("dry-run",{query:e}),i=>i,n,r)}}var wE=(t,e)=>new bE(t,e),Al=se.createContext(null),ia;let pg=(ia=class extends xr.Component{static isQueryPresent(e){return Vs(e)}constructor(e){super(e),this.state={},this.mutexObj={}}componentDidMount(){const{query:e,queries:n}=this.props;e&&this.load(e),n&&this.loadQueries(n)}shouldComponentUpdate(e,n){const{query:r,queries:i,render:s,cubeApi:o,loadSql:a,updateOnlyOnStateChange:l}=this.props;return l?!at(e.query,r)||!at(e.queries,i)||(e.render==null||s==null)&&e.render!==s||e.cubeApi!==o||e.loadSql!==a||!at(n,this.state)||e.updateOnlyOnStateChange!==l:!0}componentDidUpdate(e){const{query:n,queries:r}=this.props;at(e.query,n)||this.load(n),at(e.queries,r)||this.loadQueries(r)}cubeApi(){return this.props.cubeApi||this.context&&this.context.cubeApi}load(e){const{resetResultSetOnChange:n}=this.props;this.setState({isLoading:!0,error:null,sqlQuery:null,...n?{resultSet:null}:{}});const{loadSql:r}=this.props,i=this.cubeApi();e&&Vs(e)&&(r==="only"?i.sql(e,{mutexObj:this.mutexObj,mutexKey:"sql"}).then(s=>this.setState({sqlQuery:s,error:null,isLoading:!1})).catch(s=>this.setState({...n?{resultSet:null}:{},error:s,isLoading:!1})):r?Promise.all([i.sql(e,{mutexObj:this.mutexObj,mutexKey:"sql"}),i.load(e,{mutexObj:this.mutexObj,mutexKey:"query"})]).then(([s,o])=>this.setState({sqlQuery:s,resultSet:o,error:null,isLoading:!1})).catch(s=>this.setState({...n?{resultSet:null}:{},error:s,isLoading:!1})):i.load(e,{mutexObj:this.mutexObj,mutexKey:"query"}).then(s=>this.setState({resultSet:s,error:null,isLoading:!1})).catch(s=>this.setState({...n?{resultSet:null}:{},error:s,isLoading:!1})))}loadQueries(e){const n=this.cubeApi(),{resetResultSetOnChange:r}=this.props;this.setState({isLoading:!0,...r?{resultSet:null}:{},error:null}),Promise.all(M_(e).map(([s,o])=>n.load(o,{mutexObj:this.mutexObj,mutexKey:s}).then(a=>[s,a]))).then(s=>this.setState({resultSet:xi(s),error:null,isLoading:!1})).catch(s=>this.setState({...r?{resultSet:null}:{},error:s,isLoading:!1}))}render(){var l;const{error:e,queries:n,resultSet:r,isLoading:i,sqlQuery:s}=this.state,{render:o}=this.props,a={error:e?new Error(((l=e.response)==null?void 0:l.plainError)||e.message||e.toString()):null,resultSet:n?r||{}:r,loadingState:{isLoading:i},sqlQuery:s};return o?o(a):null}},F(ia,"contextType",Al),F(ia,"defaultProps",{cubeApi:null,query:null,render:null,queries:null,loadSql:null,updateOnlyOnStateChange:!1,resetResultSetOnChange:!0}),ia);function gf(t){return typeof t!="object"?t:Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>Array.isArray(n)?[e,n.map(gf)]:[e,typeof n=="object"?gf(n):n]))}const SE=[{name:void 0,title:"w/o grouping"},{name:"second",title:"Second"},{name:"minute",title:"Minute"},{name:"hour",title:"Hour"},{name:"day",title:"Day"},{name:"week",title:"Week"},{name:"month",title:"Month"},{name:"quarter",title:"Quarter"},{name:"year",title:"Year"}],En=class En extends xr.Component{constructor(n){super(n);F(this,"fetchMeta",async()=>{var o,a,l;if(!this.cubeApi())return;let n,r=null,i=null,s=null;try{this.setState({isFetchingMeta:!0}),n=await this.cubeApi().meta()}catch(u){r=((o=u.response)==null?void 0:o.plainError)||u,i=u,s=((l=(a=u.response)==null?void 0:a.stack)==null?void 0:l.replace(u.message||"",""))||""}this.setState({meta:n,metaError:r?new Error(r.message||r.toString()):null,richMetaError:i,metaErrorStack:s,isFetchingMeta:!1},()=>{this.updateQuery({})})});this.state={query:n.defaultQuery||n.query,chartType:n.defaultChartType,validatedQuery:n.query,missingMembers:[],isFetchingMeta:!0,dryRunResponse:null,...n.vizState,...n.initialVizState},this.mutexObj={},this.orderMembersOrderKeys=[]}static getDerivedStateFromProps(n,r){if(n.query||n.vizState){const i={...r,...n.vizState||{}};if(Array.isArray(n.query))throw new Error("Array of queries is not supported.");return{...i,query:{...i.query,...n.query||{}}}}return null}static resolveMember(n,{meta:r,query:i}){return r?Array.isArray(i)?i.reduce((s,o)=>s.concat(En.resolveMember(n,{meta:r,query:o})),[]):n==="timeDimensions"?(i.timeDimensions||[]).map((s,o)=>({...s,dimension:{...r.resolveMember(s.dimension,"dimensions"),granularities:SE},index:o})):(i[n]||[]).map((s,o)=>({index:o,...r.resolveMember(s,n)})):[]}async componentDidMount(){this.prevContext=this.context,await this.fetchMeta()}async componentDidUpdate(n){var o,a;const{schemaVersion:r,onSchemaChange:i}=this.props,{meta:s}=this.state;if(((o=this.prevContext)==null?void 0:o.cubeApi)!==((a=this.context)==null?void 0:a.cubeApi)&&(this.prevContext=this.context,await this.fetchMeta()),n.schemaVersion!==r)try{const l=await this.cubeApi().meta();!at(l,s)&&typeof i=="function"&&i({schemaVersion:r,refresh:async()=>{await this.fetchMeta()}})}catch(l){this.setState({metaError:l})}}cubeApi(){const{cubeApi:n}=this.props;return n||this.context&&this.context.cubeApi}getMissingMembers(n,r){return r?fE(n).map(i=>r.resolveMember(i,["measures","dimensions","segments"]).error?i:!1).filter(Boolean):[]}isQueryPresent(){const{query:n}=this.state;return pg.isQueryPresent(n)}prepareRenderProps(n){const r=O=>O.name,i=O=>{const E=O.compareDateRange?{compareDateRange:O.compareDateRange}:{dateRange:O.dateRange};return gf({dimension:O.dimension.name,granularity:O.granularity,...E})},s=O=>{var E,w;return{member:((E=O.member)==null?void 0:E.name)||((w=O.dimension)==null?void 0:w.name),operator:O.operator,...["set","notSet"].includes(O.operator)?{}:{values:O.values}}},o=(O,E=r)=>({add:w=>{const{query:S}=this.state;this.updateQuery({[O]:(S[O]||[]).concat(E(w))})},remove:w=>{const{query:S}=this.state;return this.updateQuery({[O]:(S[O]||[]).filter((R,A)=>A!==w.index)})},update:(w,S)=>{const{query:R}=this.state,A=(R[O]||[]).concat([]);return A.splice(w.index,1,E(S)),this.updateQuery({[O]:A})}}),{meta:a,metaError:l,richMetaError:u,query:c,queryError:f,chartType:h,pivotConfig:d,validatedQuery:g,missingMembers:y,isFetchingMeta:_,dryRunResponse:m,metaErrorStack:p}=this.state,x=hf(O=>`${Fr("member",O)}${Fr("operator",O)}`,Kh(a&&c.filters||[]).map(O=>({...O,member:O.member||O.dimension}))).map((O,E)=>({...O,dimension:a.resolveMember(O.member||O.dimension,["dimensions","measures"]),operators:a.filterOperatorsForMember(O.member||O.dimension,["dimensions","measures"]),index:E})),b=En.resolveMember("measures",this.state),M=En.resolveMember("dimensions",this.state),C=En.resolveMember("timeDimensions",this.state),T=(a&&c.segments||[]).map((O,E)=>({index:E,...a.resolveMember(O,"segments")}));let $=[],I=[],L=[],V=[];const Y=(a==null?void 0:a.membersGroupedByCube())||{measures:[],dimensions:[],segments:[],timeDimensions:[]};if(a){$=a.membersForQuery(c,"measures"),I=a.membersForQuery(c,"dimensions"),L=a.membersForQuery(c,"segments");const O=lg(Fr("cubeName"),Y.measures),E=lg(Fr("cubeName"),Y.dimensions);V=E_([...Object.keys(O),...Object.keys(E)]).sort().map(S=>{var A,j;return{...O[S]||E[S],members:[...(A=O[S])==null?void 0:A.members,...(j=E[S])==null?void 0:j.members].sort((z,U)=>z.shortTitle>U.shortTitle?1:-1)}})}const k=Array.isArray(c.order)?Object.fromEntries(c.order):c.order,P=[...b,...M,...C.map(({dimension:O})=>O)];let D=hf(Fr("id"),[...P.map(({name:O,title:E})=>({id:O,title:E,order:(k==null?void 0:k[O])||"none"}))]);return this.orderMembersOrderKeys.length!==D.length&&(this.orderMembersOrderKeys=D.map(({id:O})=>O)),this.orderMembersOrderKeys.length&&(D=(this.orderMembersOrderKeys||[]).map(O=>D.find(E=>E.id===O)).filter(Boolean)),{meta:a,metaError:l,richMetaError:u,metaErrorStack:p,query:c,error:f,validatedQuery:g,isQueryPresent:this.isQueryPresent(),chartType:h,measures:b,dimensions:M,timeDimensions:C,segments:T,filters:x,orderMembers:D,availableMeasures:$,availableDimensions:I,availableTimeDimensions:I.filter(O=>O.type==="time"),availableSegments:L,availableMembers:Y,availableFilterMembers:V,updateQuery:O=>this.updateQuery(O),updateMeasures:o("measures"),updateDimensions:o("dimensions"),updateSegments:o("segments"),updateTimeDimensions:o("timeDimensions",i),updateFilters:o("filters",s),updateChartType:O=>this.updateVizState({chartType:O}),updateOrder:{set:(O,E="asc")=>{this.updateQuery({order:D.map(w=>({...w,order:w.id===O?E:w.order})).reduce((w,{id:S,order:R})=>R!=="none"?[...w,[S,R]]:w,[])})},update:O=>{this.updateQuery({order:O})},reorder:(O,E)=>{if(O==null||E==null)return;const w=cE(D,O,E);this.orderMembersOrderKeys=w.map(({id:S})=>S),this.updateQuery({order:w.reduce((S,{id:R,order:A})=>A!=="none"?[...S,[R,A]]:S,[])})}},pivotConfig:d,updatePivotConfig:{moveItem:({sourceIndex:O,destinationIndex:E,sourceAxis:w,destinationAxis:S})=>{this.updateVizState({pivotConfig:uE(d,O,E,w,S)})},update:O=>{const{limit:E}=O;this.updateVizState({pivotConfig:{...d,...O},...E?{query:{...c,limit:E}}:null})}},missingMembers:y,refresh:this.fetchMeta,isFetchingMeta:_,dryRunResponse:m,...n}}updateQuery(n){const{query:r}=this.state;this.updateVizState({query:P_({...r,...n})})}async updateVizState(n){var g;const{setQuery:r,setVizState:i}=this.props,{query:s,pivotConfig:o,chartType:a,meta:l}=this.state,u=this.applyStateChangeHeuristics(n);u.query||(u.query={...s});let c=null;const f=y=>{const{onVizStateChanged:_}=this.props;if(_){const m=Ro(["chartType","pivotConfig","query"],y);(!c||!at(c,m))&&(_(m),c=qh(m))}},h=y=>{i&&i(Ro(["chartType","pivotConfig","query"],y)),y.query&&r&&r(y.query)};if(u.shouldApplyHeuristicOrder&&(u.query.order=aE(u.query)),u.pivotConfig=Me.getNormalizedPivotConfig(u.query,u.pivotConfig!==void 0?u.pivotConfig:o),u.missingMembers=this.getMissingMembers(u.query,l),u.chartType=u.chartType||n.chartType||a,h({...n,query:u.query}),this.setState({...u,queryError:null}),f(u),!at(Ro(["measures","dimensions","timeDimensions"],s),Ro(["measures","dimensions","timeDimensions"],u.query))&&Vs(u.query)&&u.missingMembers.length===0)try{const y=await this.cubeApi().dryRun(u.query,{mutexObj:this.mutexObj});u.shouldApplyHeuristicOrder&&(u.query.order=(y.queryOrder||[]).reduce((_,m)=>({..._,...m}),{})),u.pivotConfig=Me.getNormalizedPivotConfig(y.pivotQuery,u.pivotConfig),u.validatedQuery=this.validatedQuery(u),u.dryRunResponse=y,Vs(s)&&h({...this.state,...u})}catch(y){this.setState({queryError:new Error(((g=y.response)==null?void 0:g.plainError)||y.message),richQueryError:new Error(y.message||y.toString())})}this.setState(u,()=>f(this.state))}validatedQuery(n){const{query:r}=n||this.state;return oE(r)}defaultHeuristics(n){const{query:r,sessionGranularity:i,meta:s}=this.state;return lE(n,r,{meta:s,sessionGranularity:i||"day"})}applyStateChangeHeuristics(n){const{stateChangeHeuristics:r,disableHeuristics:i}=this.props;return i?n:r&&r(this.state,n)||this.defaultHeuristics(n)}render(){const{query:n}=this.state,{cubeApi:r,render:i,wrapWithQueryRenderer:s}=this.props;return s?xr.createElement(pg,{query:n,cubeApi:r,resetResultSetOnChange:!1,render:o=>i?i(this.prepareRenderProps(o)):null}):i?i(this.prepareRenderProps()):null}};F(En,"contextType",Al),F(En,"defaultProps",{cubeApi:null,stateChangeHeuristics:null,disableHeuristics:!1,render:null,wrapWithQueryRenderer:!0,defaultChartType:"line",defaultQuery:{},initialVizState:null,onVizStateChanged:null,query:null,setQuery:null,vizState:null,setVizState:null});let gg=En;function kE({cubeApi:t,children:e,options:n={}}){return xr.createElement(Al.Provider,{value:{cubeApi:t,options:n}},e)}function EE(t){const e=se.useRef([]);return at(t,e.current)||(e.current=t),e.current}function ME(){const t=se.useRef(!1);return se.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),()=>t.current}function PE(t,e={}){const n=se.useRef({}),r=ME(),[i,s]=se.useState(null),[o,a]=se.useState(!1),[l,u]=se.useState(null),[c,f]=se.useState(null),[h,d]=se.useState(null),g=se.useContext(Al);let y=null;const _=({progressResponse:p})=>f(p);async function m(){var x;const{resetResultSetOnChange:p}=e,v=e.cubeApi||(g==null?void 0:g.cubeApi);if(!v)throw new Error("Cube API client is not provided");p&&u(null),d(null),a(!0);try{const b=await v.load(t,{mutexObj:n.current,mutexKey:"query",progressCallback:_,castNumerics:!!(typeof e.castNumerics=="boolean"?e.castNumerics:(x=g==null?void 0:g.options)!=null&&x.castNumerics)});r()&&(u(b),f(null))}catch(b){r()&&(d(b),u(null),f(null))}r()&&a(!1)}return se.useEffect(()=>{const{skip:p=!1,resetResultSetOnChange:v}=e,x=e.cubeApi||(g==null?void 0:g.cubeApi);if(!x)throw new Error("Cube API client is not provided");async function b(){if(!p&&Vs(t)){O_(i,t)||((v==null||v)&&u(null),s(t)),d(null),a(!0);try{y&&(await y.unsubscribe(),y=null),e.subscribe?y=x.subscribe(t,{mutexObj:n.current,mutexKey:"query",progressCallback:_},(M,C)=>{r()&&(M?d(M):u(C),a(!1),f(null))}):await m()}catch(M){r()&&(d(M),u(null),a(!1),f(null))}}}return b(),()=>{y&&(y.unsubscribe(),y=null)}},EE([t,Object.keys(t&&t.order||{}),e,g])),{isLoading:o,resultSet:l,error:h,progress:c,previousQuery:i,refetch:m}}var T_={exports:{}},D_={exports:{}};(function(t){function e(n,r){if(n==null)return{};var i={},s=Object.keys(n),o,a;for(a=0;a<s.length;a++)o=s[a],!(r.indexOf(o)>=0)&&(i[o]=n[o]);return i}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(D_);var OE=D_.exports;(function(t){var e=OE;function n(r,i){if(r==null)return{};var s=e(r,i),o,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(a=0;a<l.length;a++)o=l[a],!(i.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(s[o]=r[o])}return s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(T_);var CE=T_.exports,R_={exports:{}};(function(t){function e(r,i,s,o,a,l,u){try{var c=r[l](u),f=c.value}catch(h){s(h);return}c.done?i(f):Promise.resolve(f).then(o,a)}function n(r){return function(){var i=this,s=arguments;return new Promise(function(o,a){var l=r.apply(i,s);function u(f){e(l,o,a,u,c,"next",f)}function c(f){e(l,o,a,u,c,"throw",f)}u(void 0)})}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(R_);var TE=R_.exports,I_={exports:{}};(function(t){function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(I_);var DE=I_.exports,A_={exports:{}},L_={exports:{}},$_={exports:{}};(function(t){function e(n){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})($_);var Xh=$_.exports,N_={exports:{}};(function(t){var e=Xh.default;function n(r,i){if(e(r)!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var o=s.call(r,i||"default");if(e(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(N_);var RE=N_.exports;(function(t){var e=Xh.default,n=RE;function r(i){var s=n(i,"string");return e(s)=="symbol"?s:String(s)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(L_);var F_=L_.exports;(function(t){var e=F_;function n(i,s){for(var o=0;o<s.length;o++){var a=s[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,e(a.key),a)}}function r(i,s,o){return s&&n(i.prototype,s),o&&n(i,o),Object.defineProperty(i,"prototype",{writable:!1}),i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(A_);var IE=A_.exports,z_={exports:{}};(function(t){var e=F_;function n(r,i,s){return i=e(i),i in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(z_);var AE=z_.exports,Wi=function(t){return t&&t.Math===Math&&t},xe=Wi(typeof globalThis=="object"&&globalThis)||Wi(typeof window=="object"&&window)||Wi(typeof self=="object"&&self)||Wi(typeof Je=="object"&&Je)||Wi(typeof Je=="object"&&Je)||function(){return this}()||Function("return this")(),Jh={},pt=function(t){try{return!!t()}catch{return!0}},LE=pt,Gt=!LE(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),$E=pt,Ll=!$E(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),NE=Ll,Io=Function.prototype.call,mn=NE?Io.bind(Io):function(){return Io.apply(Io,arguments)},j_={},B_={}.propertyIsEnumerable,V_=Object.getOwnPropertyDescriptor,FE=V_&&!B_.call({1:2},1);j_.f=FE?function(e){var n=V_(this,e);return!!n&&n.enumerable}:B_;var U_=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},W_=Ll,H_=Function.prototype,mf=H_.call,zE=W_&&H_.bind.bind(mf,mf),qe=W_?zE:function(t){return function(){return mf.apply(t,arguments)}},Y_=qe,jE=Y_({}.toString),BE=Y_("".slice),io=function(t){return BE(jE(t),8,-1)},VE=qe,UE=pt,WE=io,Pu=Object,HE=VE("".split),q_=UE(function(){return!Pu("z").propertyIsEnumerable(0)})?function(t){return WE(t)==="String"?HE(t,""):Pu(t)}:Pu,$l=function(t){return t==null},YE=$l,qE=TypeError,Q_=function(t){if(YE(t))throw new qE("Can't call method on "+t);return t},QE=q_,GE=Q_,Nl=function(t){return QE(GE(t))},Ou=typeof document=="object"&&document.all,Ae=typeof Ou>"u"&&Ou!==void 0?function(t){return typeof t=="function"||t===Ou}:function(t){return typeof t=="function"},KE=Ae,yn=function(t){return typeof t=="object"?t!==null:KE(t)},Cu=xe,XE=Ae,JE=function(t){return XE(t)?t:void 0},Tr=function(t,e){return arguments.length<2?JE(Cu[t]):Cu[t]&&Cu[t][e]},ZE=qe,Zh=ZE({}.isPrototypeOf),so=typeof navigator<"u"&&String(navigator.userAgent)||"",G_=xe,Tu=so,mg=G_.process,yg=G_.Deno,vg=mg&&mg.versions||yg&&yg.version,_g=vg&&vg.v8,Rt,nl;_g&&(Rt=_g.split("."),nl=Rt[0]>0&&Rt[0]<4?1:+(Rt[0]+Rt[1]));!nl&&Tu&&(Rt=Tu.match(/Edge\/(\d+)/),(!Rt||Rt[1]>=74)&&(Rt=Tu.match(/Chrome\/(\d+)/),Rt&&(nl=+Rt[1])));var ed=nl,xg=ed,eM=pt,tM=xe,nM=tM.String,K_=!!Object.getOwnPropertySymbols&&!eM(function(){var t=Symbol("symbol detection");return!nM(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&xg&&xg<41}),rM=K_,X_=rM&&!Symbol.sham&&typeof Symbol.iterator=="symbol",iM=Tr,sM=Ae,oM=Zh,aM=X_,lM=Object,J_=aM?function(t){return typeof t=="symbol"}:function(t){var e=iM("Symbol");return sM(e)&&oM(e.prototype,lM(t))},uM=String,Fl=function(t){try{return uM(t)}catch{return"Object"}},cM=Ae,fM=Fl,hM=TypeError,Jn=function(t){if(cM(t))return t;throw new hM(fM(t)+" is not a function")},dM=Jn,pM=$l,td=function(t,e){var n=t[e];return pM(n)?void 0:dM(n)},Du=mn,Ru=Ae,Iu=yn,gM=TypeError,mM=function(t,e){var n,r;if(e==="string"&&Ru(n=t.toString)&&!Iu(r=Du(n,t))||Ru(n=t.valueOf)&&!Iu(r=Du(n,t))||e!=="string"&&Ru(n=t.toString)&&!Iu(r=Du(n,t)))return r;throw new gM("Can't convert object to primitive value")},Z_={exports:{}},bg=xe,yM=Object.defineProperty,nd=function(t,e){try{yM(bg,t,{value:e,configurable:!0,writable:!0})}catch{bg[t]=e}return e},vM=xe,_M=nd,wg="__core-js_shared__",Sg=Z_.exports=vM[wg]||_M(wg,{});(Sg.versions||(Sg.versions=[])).push({version:"3.36.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"});var rd=Z_.exports,kg=rd,e1=function(t,e){return kg[t]||(kg[t]=e||{})},xM=Q_,bM=Object,id=function(t){return bM(xM(t))},wM=qe,SM=id,kM=wM({}.hasOwnProperty),vn=Object.hasOwn||function(e,n){return kM(SM(e),n)},EM=qe,MM=0,PM=Math.random(),OM=EM(1 .toString),t1=function(t){return"Symbol("+(t===void 0?"":t)+")_"+OM(++MM+PM,36)},CM=xe,TM=e1,Eg=vn,DM=t1,RM=K_,IM=X_,ei=CM.Symbol,Au=TM("wks"),AM=IM?ei.for||ei:ei&&ei.withoutSetter||DM,gt=function(t){return Eg(Au,t)||(Au[t]=RM&&Eg(ei,t)?ei[t]:AM("Symbol."+t)),Au[t]},LM=mn,Mg=yn,Pg=J_,$M=td,NM=mM,FM=gt,zM=TypeError,jM=FM("toPrimitive"),BM=function(t,e){if(!Mg(t)||Pg(t))return t;var n=$M(t,jM),r;if(n){if(e===void 0&&(e="default"),r=LM(n,t,e),!Mg(r)||Pg(r))return r;throw new zM("Can't convert object to primitive value")}return e===void 0&&(e="number"),NM(t,e)},VM=BM,UM=J_,n1=function(t){var e=VM(t,"string");return UM(e)?e:e+""},WM=xe,Og=yn,yf=WM.document,HM=Og(yf)&&Og(yf.createElement),zl=function(t){return HM?yf.createElement(t):{}},YM=Gt,qM=pt,QM=zl,r1=!YM&&!qM(function(){return Object.defineProperty(QM("div"),"a",{get:function(){return 7}}).a!==7}),GM=Gt,KM=mn,XM=j_,JM=U_,ZM=Nl,eP=n1,tP=vn,nP=r1,Cg=Object.getOwnPropertyDescriptor;Jh.f=GM?Cg:function(e,n){if(e=ZM(e),n=eP(n),nP)try{return Cg(e,n)}catch{}if(tP(e,n))return JM(!KM(XM.f,e,n),e[n])};var Zn={},rP=Gt,iP=pt,i1=rP&&iP(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),sP=yn,oP=String,aP=TypeError,Kt=function(t){if(sP(t))return t;throw new aP(oP(t)+" is not an object")},lP=Gt,uP=r1,cP=i1,Ao=Kt,Tg=n1,fP=TypeError,Lu=Object.defineProperty,hP=Object.getOwnPropertyDescriptor,$u="enumerable",Nu="configurable",Fu="writable";Zn.f=lP?cP?function(e,n,r){if(Ao(e),n=Tg(n),Ao(r),typeof e=="function"&&n==="prototype"&&"value"in r&&Fu in r&&!r[Fu]){var i=hP(e,n);i&&i[Fu]&&(e[n]=r.value,r={configurable:Nu in r?r[Nu]:i[Nu],enumerable:$u in r?r[$u]:i[$u],writable:!1})}return Lu(e,n,r)}:Lu:function(e,n,r){if(Ao(e),n=Tg(n),Ao(r),uP)try{return Lu(e,n,r)}catch{}if("get"in r||"set"in r)throw new fP("Accessors not supported");return"value"in r&&(e[n]=r.value),e};var dP=Gt,pP=Zn,gP=U_,sd=dP?function(t,e,n){return pP.f(t,e,gP(1,n))}:function(t,e,n){return t[e]=n,t},s1={exports:{}},vf=Gt,mP=vn,o1=Function.prototype,yP=vf&&Object.getOwnPropertyDescriptor,od=mP(o1,"name"),vP=od&&(function(){}).name==="something",_P=od&&(!vf||vf&&yP(o1,"name").configurable),xP={EXISTS:od,PROPER:vP,CONFIGURABLE:_P},bP=qe,wP=Ae,_f=rd,SP=bP(Function.toString);wP(_f.inspectSource)||(_f.inspectSource=function(t){return SP(t)});var ad=_f.inspectSource,kP=xe,EP=Ae,Dg=kP.WeakMap,MP=EP(Dg)&&/native code/.test(String(Dg)),PP=e1,OP=t1,Rg=PP("keys"),a1=function(t){return Rg[t]||(Rg[t]=OP(t))},ld={},CP=MP,l1=xe,TP=yn,DP=sd,zu=vn,ju=rd,RP=a1,IP=ld,Ig="Object already initialized",xf=l1.TypeError,AP=l1.WeakMap,rl,Us,il,LP=function(t){return il(t)?Us(t):rl(t,{})},$P=function(t){return function(e){var n;if(!TP(e)||(n=Us(e)).type!==t)throw new xf("Incompatible receiver, "+t+" required");return n}};if(CP||ju.state){var jt=ju.state||(ju.state=new AP);jt.get=jt.get,jt.has=jt.has,jt.set=jt.set,rl=function(t,e){if(jt.has(t))throw new xf(Ig);return e.facade=t,jt.set(t,e),e},Us=function(t){return jt.get(t)||{}},il=function(t){return jt.has(t)}}else{var Ar=RP("state");IP[Ar]=!0,rl=function(t,e){if(zu(t,Ar))throw new xf(Ig);return e.facade=t,DP(t,Ar,e),e},Us=function(t){return zu(t,Ar)?t[Ar]:{}},il=function(t){return zu(t,Ar)}}var u1={set:rl,get:Us,has:il,enforce:LP,getterFor:$P},ud=qe,NP=pt,FP=Ae,Lo=vn,bf=Gt,zP=xP.CONFIGURABLE,jP=ad,c1=u1,BP=c1.enforce,VP=c1.get,Ag=String,va=Object.defineProperty,UP=ud("".slice),WP=ud("".replace),HP=ud([].join),YP=bf&&!NP(function(){return va(function(){},"length",{value:8}).length!==8}),qP=String(String).split("String"),QP=s1.exports=function(t,e,n){UP(Ag(e),0,7)==="Symbol("&&(e="["+WP(Ag(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Lo(t,"name")||zP&&t.name!==e)&&(bf?va(t,"name",{value:e,configurable:!0}):t.name=e),YP&&n&&Lo(n,"arity")&&t.length!==n.arity&&va(t,"length",{value:n.arity});try{n&&Lo(n,"constructor")&&n.constructor?bf&&va(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var r=BP(t);return Lo(r,"source")||(r.source=HP(qP,typeof e=="string"?e:"")),t};Function.prototype.toString=QP(function(){return FP(this)&&VP(this).source||jP(this)},"toString");var f1=s1.exports,GP=Ae,KP=Zn,XP=f1,JP=nd,oo=function(t,e,n,r){r||(r={});var i=r.enumerable,s=r.name!==void 0?r.name:e;if(GP(n)&&XP(n,s,r),r.global)i?t[e]=n:JP(e,n);else{try{r.unsafe?t[e]&&(i=!0):delete t[e]}catch{}i?t[e]=n:KP.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},h1={},ZP=Math.ceil,eO=Math.floor,tO=Math.trunc||function(e){var n=+e;return(n>0?eO:ZP)(n)},nO=tO,d1=function(t){var e=+t;return e!==e||e===0?0:nO(e)},rO=d1,iO=Math.max,sO=Math.min,oO=function(t,e){var n=rO(t);return n<0?iO(n+e,0):sO(n,e)},aO=d1,lO=Math.min,uO=function(t){var e=aO(t);return e>0?lO(e,9007199254740991):0},cO=uO,cd=function(t){return cO(t.length)},fO=Nl,hO=oO,dO=cd,Lg=function(t){return function(e,n,r){var i=fO(e),s=dO(i);if(s===0)return!t&&-1;var o=hO(r,s),a;if(t&&n!==n){for(;s>o;)if(a=i[o++],a!==a)return!0}else for(;s>o;o++)if((t||o in i)&&i[o]===n)return t||o||0;return!t&&-1}},pO={includes:Lg(!0),indexOf:Lg(!1)},gO=qe,Bu=vn,mO=Nl,yO=pO.indexOf,vO=ld,$g=gO([].push),p1=function(t,e){var n=mO(t),r=0,i=[],s;for(s in n)!Bu(vO,s)&&Bu(n,s)&&$g(i,s);for(;e.length>r;)Bu(n,s=e[r++])&&(~yO(i,s)||$g(i,s));return i},fd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_O=p1,xO=fd,bO=xO.concat("length","prototype");h1.f=Object.getOwnPropertyNames||function(e){return _O(e,bO)};var g1={};g1.f=Object.getOwnPropertySymbols;var wO=Tr,SO=qe,kO=h1,EO=g1,MO=Kt,PO=SO([].concat),OO=wO("Reflect","ownKeys")||function(e){var n=kO.f(MO(e)),r=EO.f;return r?PO(n,r(e)):n},Ng=vn,CO=OO,TO=Jh,DO=Zn,RO=function(t,e,n){for(var r=CO(e),i=DO.f,s=TO.f,o=0;o<r.length;o++){var a=r[o];!Ng(t,a)&&!(n&&Ng(n,a))&&i(t,a,s(e,a))}},IO=pt,AO=Ae,LO=/#|\.prototype\./,ao=function(t,e){var n=NO[$O(t)];return n===zO?!0:n===FO?!1:AO(e)?IO(e):!!e},$O=ao.normalize=function(t){return String(t).replace(LO,".").toLowerCase()},NO=ao.data={},FO=ao.NATIVE="N",zO=ao.POLYFILL="P",m1=ao,$o=xe,jO=Jh.f,BO=sd,VO=oo,UO=nd,WO=RO,HO=m1,Mt=function(t,e){var n=t.target,r=t.global,i=t.stat,s,o,a,l,u,c;if(r?o=$o:i?o=$o[n]||UO(n,{}):o=$o[n]&&$o[n].prototype,o)for(a in e){if(u=e[a],t.dontCallGetSet?(c=jO(o,a),l=c&&c.value):l=o[a],s=HO(r?a:n+(i?".":"#")+a,t.forced),!s&&l!==void 0){if(typeof u==typeof l)continue;WO(u,l)}(t.sham||l&&l.sham)&&BO(u,"sham",!0),VO(o,a,u,t)}},YO=io,qO=qe,QO=function(t){if(YO(t)==="Function")return qO(t)},Fg=QO,GO=Jn,KO=Ll,XO=Fg(Fg.bind),jl=function(t,e){return GO(t),e===void 0?t:KO?XO(t,e):function(){return t.apply(e,arguments)}},JO=io,ZO=Array.isArray||function(e){return JO(e)==="Array"},eC=gt,tC=eC("toStringTag"),y1={};y1[tC]="z";var hd=String(y1)==="[object z]",nC=hd,rC=Ae,_a=io,iC=gt,sC=iC("toStringTag"),oC=Object,aC=_a(function(){return arguments}())==="Arguments",lC=function(t,e){try{return t[e]}catch{}},dd=nC?_a:function(t){var e,n,r;return t===void 0?"Undefined":t===null?"Null":typeof(n=lC(e=oC(t),sC))=="string"?n:aC?_a(e):(r=_a(e))==="Object"&&rC(e.callee)?"Arguments":r},uC=qe,cC=pt,v1=Ae,fC=dd,hC=Tr,dC=ad,_1=function(){},x1=hC("Reflect","construct"),pd=/^\s*(?:class|function)\b/,pC=uC(pd.exec),gC=!pd.test(_1),Hi=function(e){if(!v1(e))return!1;try{return x1(_1,[],e),!0}catch{return!1}},b1=function(e){if(!v1(e))return!1;switch(fC(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gC||!!pC(pd,dC(e))}catch{return!0}};b1.sham=!0;var w1=!x1||cC(function(){var t;return Hi(Hi.call)||!Hi(Object)||!Hi(function(){t=!0})||t})?b1:Hi,zg=ZO,mC=w1,yC=yn,vC=gt,_C=vC("species"),jg=Array,xC=function(t){var e;return zg(t)&&(e=t.constructor,mC(e)&&(e===jg||zg(e.prototype))?e=void 0:yC(e)&&(e=e[_C],e===null&&(e=void 0))),e===void 0?jg:e},bC=xC,wC=function(t,e){return new(bC(t))(e===0?0:e)},SC=jl,kC=qe,EC=q_,MC=id,PC=cd,OC=wC,Bg=kC([].push),bn=function(t){var e=t===1,n=t===2,r=t===3,i=t===4,s=t===6,o=t===7,a=t===5||s;return function(l,u,c,f){for(var h=MC(l),d=EC(h),g=PC(d),y=SC(u,c),_=0,m=f||OC,p=e?m(l,g):n||o?m(l,0):void 0,v,x;g>_;_++)if((a||_ in d)&&(v=d[_],x=y(v,_,h),t))if(e)p[_]=x;else if(x)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:Bg(p,v)}else switch(t){case 4:return!1;case 7:Bg(p,v)}return s?-1:r||i?i:p}},gd={forEach:bn(0),map:bn(1),filter:bn(2),some:bn(3),every:bn(4),find:bn(5),findIndex:bn(6),filterReject:bn(7)},CC=pt,TC=function(t,e){var n=[][t];return!!n&&CC(function(){n.call(null,e||function(){return 1},1)})},DC=gd.forEach,RC=TC,IC=RC("forEach"),S1=IC?[].forEach:function(e){return DC(this,e,arguments.length>1?arguments[1]:void 0)},AC=Mt,Vg=S1;AC({target:"Array",proto:!0,forced:[].forEach!==Vg},{forEach:Vg});var LC=hd,$C=dd,NC=LC?{}.toString:function(){return"[object "+$C(this)+"]"},FC=hd,zC=oo,jC=NC;FC||zC(Object.prototype,"toString",jC,{unsafe:!0});var BC={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},VC=zl,Vu=VC("span").classList,Ug=Vu&&Vu.constructor&&Vu.constructor.prototype,UC=Ug===Object.prototype?void 0:Ug,Wg=xe,Hg=BC,WC=UC,Uu=S1,HC=sd,k1=function(t){if(t&&t.forEach!==Uu)try{HC(t,"forEach",Uu)}catch{t.forEach=Uu}};for(var Wu in Hg)Hg[Wu]&&k1(Wg[Wu]&&Wg[Wu].prototype);k1(WC);var E1=qe,YC=oo,md=Date.prototype,Yg="Invalid Date",M1="toString",qC=E1(md[M1]),QC=E1(md.getTime);String(new Date(NaN))!==Yg&&YC(md,M1,function(){var e=QC(this);return e===e?qC(this):Yg});var GC=p1,KC=fd,P1=Object.keys||function(e){return GC(e,KC)},XC=Mt,JC=id,O1=P1,ZC=pt,eT=ZC(function(){O1(1)});XC({target:"Object",stat:!0,forced:eT},{keys:function(e){return O1(JC(e))}});var tT=xe,nT=io,Bl=nT(tT.process)==="process",rT=qe,iT=Jn,sT=function(t,e,n){try{return rT(iT(Object.getOwnPropertyDescriptor(t,e)[n]))}catch{}},oT=yn,aT=function(t){return oT(t)||t===null},lT=aT,uT=String,cT=TypeError,fT=function(t){if(lT(t))return t;throw new cT("Can't set "+uT(t)+" as a prototype")},hT=sT,dT=Kt,pT=fT,gT=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},n;try{n=hT(Object.prototype,"__proto__","set"),n(e,[]),t=e instanceof Array}catch{}return function(i,s){return dT(i),pT(s),t?n(i,s):i.__proto__=s,i}}():void 0),mT=Zn.f,yT=vn,vT=gt,qg=vT("toStringTag"),_T=function(t,e,n){t&&!n&&(t=t.prototype),t&&!yT(t,qg)&&mT(t,qg,{configurable:!0,value:e})},Qg=f1,xT=Zn,bT=function(t,e,n){return n.get&&Qg(n.get,e,{getter:!0}),n.set&&Qg(n.set,e,{setter:!0}),xT.f(t,e,n)},wT=Tr,ST=bT,kT=gt,ET=Gt,Gg=kT("species"),MT=function(t){var e=wT(t);ET&&e&&!e[Gg]&&ST(e,Gg,{configurable:!0,get:function(){return this}})},PT=Zh,OT=TypeError,CT=function(t,e){if(PT(e,t))return t;throw new OT("Incorrect invocation")},TT=w1,DT=Fl,RT=TypeError,IT=function(t){if(TT(t))return t;throw new RT(DT(t)+" is not a constructor")},Kg=Kt,AT=IT,LT=$l,$T=gt,NT=$T("species"),FT=function(t,e){var n=Kg(t).constructor,r;return n===void 0||LT(r=Kg(n)[NT])?e:AT(r)},zT=Ll,C1=Function.prototype,Xg=C1.apply,Jg=C1.call,T1=typeof Reflect=="object"&&Reflect.apply||(zT?Jg.bind(Xg):function(){return Jg.apply(Xg,arguments)}),jT=Tr,D1=jT("document","documentElement"),BT=qe,R1=BT([].slice),VT=TypeError,I1=function(t,e){if(t<e)throw new VT("Not enough arguments");return t},UT=so,A1=/(?:ipad|iphone|ipod).*applewebkit/i.test(UT),ut=xe,WT=T1,HT=jl,Zg=Ae,YT=vn,L1=pt,em=D1,qT=R1,tm=zl,QT=I1,GT=A1,KT=Bl,wf=ut.setImmediate,Sf=ut.clearImmediate,XT=ut.process,Hu=ut.Dispatch,JT=ut.Function,nm=ut.MessageChannel,ZT=ut.String,Yu=0,ms={},rm="onreadystatechange",Ws,tr,qu,Qu;L1(function(){Ws=ut.location});var yd=function(t){if(YT(ms,t)){var e=ms[t];delete ms[t],e()}},Gu=function(t){return function(){yd(t)}},im=function(t){yd(t.data)},sm=function(t){ut.postMessage(ZT(t),Ws.protocol+"//"+Ws.host)};(!wf||!Sf)&&(wf=function(e){QT(arguments.length,1);var n=Zg(e)?e:JT(e),r=qT(arguments,1);return ms[++Yu]=function(){WT(n,void 0,r)},tr(Yu),Yu},Sf=function(e){delete ms[e]},KT?tr=function(t){XT.nextTick(Gu(t))}:Hu&&Hu.now?tr=function(t){Hu.now(Gu(t))}:nm&&!GT?(qu=new nm,Qu=qu.port2,qu.port1.onmessage=im,tr=HT(Qu.postMessage,Qu)):ut.addEventListener&&Zg(ut.postMessage)&&!ut.importScripts&&Ws&&Ws.protocol!=="file:"&&!L1(sm)?(tr=sm,ut.addEventListener("message",im,!1)):rm in tm("script")?tr=function(t){em.appendChild(tm("script"))[rm]=function(){em.removeChild(this),yd(t)}}:tr=function(t){setTimeout(Gu(t),0)});var $1={set:wf,clear:Sf},om=xe,e2=Gt,t2=Object.getOwnPropertyDescriptor,n2=function(t){if(!e2)return om[t];var e=t2(om,t);return e&&e.value},N1=function(){this.head=null,this.tail=null};N1.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var F1=N1,r2=so,i2=/ipad|iphone|ipod/i.test(r2)&&typeof Pebble<"u",s2=so,o2=/web0s(?!.*chrome)/i.test(s2),bi=xe,a2=n2,am=jl,Ku=$1.set,l2=F1,u2=A1,c2=i2,f2=o2,Xu=Bl,lm=bi.MutationObserver||bi.WebKitMutationObserver,um=bi.document,cm=bi.process,No=bi.Promise,kf=a2("queueMicrotask"),Lr,Ju,Zu,Fo,fm;if(!kf){var zo=new l2,jo=function(){var t,e;for(Xu&&(t=cm.domain)&&t.exit();e=zo.get();)try{e()}catch(n){throw zo.head&&Lr(),n}t&&t.enter()};!u2&&!Xu&&!f2&&lm&&um?(Ju=!0,Zu=um.createTextNode(""),new lm(jo).observe(Zu,{characterData:!0}),Lr=function(){Zu.data=Ju=!Ju}):!c2&&No&&No.resolve?(Fo=No.resolve(void 0),Fo.constructor=No,fm=am(Fo.then,Fo),Lr=function(){fm(jo)}):Xu?Lr=function(){cm.nextTick(jo)}:(Ku=am(Ku,bi),Lr=function(){Ku(jo)}),kf=function(t){zo.head||Lr(),zo.add(t)}}var h2=kf,d2=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}},vd=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},p2=xe,Vl=p2.Promise,z1=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",g2=z1,m2=Bl,y2=!g2&&!m2&&typeof window=="object"&&typeof document=="object",v2=xe,ys=Vl,_2=Ae,x2=m1,b2=ad,w2=gt,S2=y2,k2=z1,ec=ed;ys&&ys.prototype;var E2=w2("species"),Ef=!1,j1=_2(v2.PromiseRejectionEvent),M2=x2("Promise",function(){var t=b2(ys),e=t!==String(ys);if(!e&&ec===66)return!0;if(!ec||ec<51||!/native code/.test(t)){var n=new ys(function(s){s(1)}),r=function(s){s(function(){},function(){})},i=n.constructor={};if(i[E2]=r,Ef=n.then(function(){})instanceof r,!Ef)return!0}return!e&&(S2||k2)&&!j1}),lo={CONSTRUCTOR:M2,REJECTION_EVENT:j1,SUBCLASSING:Ef},Ri={},hm=Jn,P2=TypeError,O2=function(t){var e,n;this.promise=new t(function(r,i){if(e!==void 0||n!==void 0)throw new P2("Bad Promise constructor");e=r,n=i}),this.resolve=hm(e),this.reject=hm(n)};Ri.f=function(t){return new O2(t)};var C2=Mt,sl=Bl,Yn=xe,wi=mn,dm=oo,pm=gT,T2=_T,D2=MT,R2=Jn,xa=Ae,I2=yn,A2=CT,L2=FT,B1=$1.set,_d=h2,$2=d2,N2=vd,F2=F1,V1=u1,ol=Vl,xd=lo,U1=Ri,Ul="Promise",W1=xd.CONSTRUCTOR,z2=xd.REJECTION_EVENT,j2=xd.SUBCLASSING,tc=V1.getterFor(Ul),B2=V1.set,zr=ol&&ol.prototype,hr=ol,Bo=zr,H1=Yn.TypeError,Mf=Yn.document,bd=Yn.process,Pf=U1.f,V2=Pf,U2=!!(Mf&&Mf.createEvent&&Yn.dispatchEvent),Y1="unhandledrejection",W2="rejectionhandled",gm=0,q1=1,H2=2,wd=1,Q1=2,Vo,mm,Y2,ym,G1=function(t){var e;return I2(t)&&xa(e=t.then)?e:!1},K1=function(t,e){var n=e.value,r=e.state===q1,i=r?t.ok:t.fail,s=t.resolve,o=t.reject,a=t.domain,l,u,c;try{i?(r||(e.rejection===Q1&&Q2(e),e.rejection=wd),i===!0?l=n:(a&&a.enter(),l=i(n),a&&(a.exit(),c=!0)),l===t.promise?o(new H1("Promise-chain cycle")):(u=G1(l))?wi(u,l,s,o):s(l)):o(n)}catch(f){a&&!c&&a.exit(),o(f)}},X1=function(t,e){t.notified||(t.notified=!0,_d(function(){for(var n=t.reactions,r;r=n.get();)K1(r,t);t.notified=!1,e&&!t.rejection&&q2(t)}))},J1=function(t,e,n){var r,i;U2?(r=Mf.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),Yn.dispatchEvent(r)):r={promise:e,reason:n},!z2&&(i=Yn["on"+t])?i(r):t===Y1&&$2("Unhandled promise rejection",n)},q2=function(t){wi(B1,Yn,function(){var e=t.facade,n=t.value,r=vm(t),i;if(r&&(i=N2(function(){sl?bd.emit("unhandledRejection",n,e):J1(Y1,e,n)}),t.rejection=sl||vm(t)?Q1:wd,i.error))throw i.value})},vm=function(t){return t.rejection!==wd&&!t.parent},Q2=function(t){wi(B1,Yn,function(){var e=t.facade;sl?bd.emit("rejectionHandled",e):J1(W2,e,t.value)})},ti=function(t,e,n){return function(r){t(e,r,n)}},ci=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=H2,X1(t,!0))},Of=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new H1("Promise can't be resolved itself");var r=G1(e);r?_d(function(){var i={done:!1};try{wi(r,e,ti(Of,i,t),ti(ci,i,t))}catch(s){ci(i,s,t)}}):(t.value=e,t.state=q1,X1(t,!1))}catch(i){ci({done:!1},i,t)}}};if(W1&&(hr=function(e){A2(this,Bo),R2(e),wi(Vo,this);var n=tc(this);try{e(ti(Of,n),ti(ci,n))}catch(r){ci(n,r)}},Bo=hr.prototype,Vo=function(e){B2(this,{type:Ul,done:!1,notified:!1,parent:!1,reactions:new F2,rejection:!1,state:gm,value:void 0})},Vo.prototype=dm(Bo,"then",function(e,n){var r=tc(this),i=Pf(L2(this,hr));return r.parent=!0,i.ok=xa(e)?e:!0,i.fail=xa(n)&&n,i.domain=sl?bd.domain:void 0,r.state===gm?r.reactions.add(i):_d(function(){K1(i,r)}),i.promise}),mm=function(){var t=new Vo,e=tc(t);this.promise=t,this.resolve=ti(Of,e),this.reject=ti(ci,e)},U1.f=Pf=function(t){return t===hr||t===Y2?new mm(t):V2(t)},xa(ol)&&zr!==Object.prototype)){ym=zr.then,j2||dm(zr,"then",function(e,n){var r=this;return new hr(function(i,s){wi(ym,r,i,s)}).then(e,n)},{unsafe:!0});try{delete zr.constructor}catch{}pm&&pm(zr,Bo)}C2({global:!0,constructor:!0,wrap:!0,forced:W1},{Promise:hr});T2(hr,Ul,!1);D2(Ul);var Z1={},G2=gt,K2=Z1,X2=G2("iterator"),J2=Array.prototype,Z2=function(t){return t!==void 0&&(K2.Array===t||J2[X2]===t)},eD=dd,_m=td,tD=$l,nD=Z1,rD=gt,iD=rD("iterator"),ex=function(t){if(!tD(t))return _m(t,iD)||_m(t,"@@iterator")||nD[eD(t)]},sD=mn,oD=Jn,aD=Kt,lD=Fl,uD=ex,cD=TypeError,fD=function(t,e){var n=arguments.length<2?uD(t):e;if(oD(n))return aD(sD(n,t));throw new cD(lD(t)+" is not iterable")},hD=mn,xm=Kt,dD=td,pD=function(t,e,n){var r,i;xm(t);try{if(r=dD(t,"return"),!r){if(e==="throw")throw n;return n}r=hD(r,t)}catch(s){i=!0,r=s}if(e==="throw")throw n;if(i)throw r;return xm(r),n},gD=jl,mD=mn,yD=Kt,vD=Fl,_D=Z2,xD=cd,bm=Zh,bD=fD,wD=ex,wm=pD,SD=TypeError,ba=function(t,e){this.stopped=t,this.result=e},Sm=ba.prototype,tx=function(t,e,n){var r=n&&n.that,i=!!(n&&n.AS_ENTRIES),s=!!(n&&n.IS_RECORD),o=!!(n&&n.IS_ITERATOR),a=!!(n&&n.INTERRUPTED),l=gD(e,r),u,c,f,h,d,g,y,_=function(p){return u&&wm(u,"normal",p),new ba(!0,p)},m=function(p){return i?(yD(p),a?l(p[0],p[1],_):l(p[0],p[1])):a?l(p,_):l(p)};if(s)u=t.iterator;else if(o)u=t;else{if(c=wD(t),!c)throw new SD(vD(t)+" is not iterable");if(_D(c)){for(f=0,h=xD(t);h>f;f++)if(d=m(t[f]),d&&bm(Sm,d))return d;return new ba(!1)}u=bD(t,c)}for(g=s?t.next:u.next;!(y=mD(g,u)).done;){try{d=m(y.value)}catch(p){wm(u,"throw",p)}if(typeof d=="object"&&d&&bm(Sm,d))return d}return new ba(!1)},kD=gt,nx=kD("iterator"),rx=!1;try{var ED=0,km={next:function(){return{done:!!ED++}},return:function(){rx=!0}};km[nx]=function(){return this},Array.from(km,function(){throw 2})}catch{}var MD=function(t,e){try{if(!e&&!rx)return!1}catch{return!1}var n=!1;try{var r={};r[nx]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch{}return n},PD=Vl,OD=MD,CD=lo.CONSTRUCTOR,ix=CD||!OD(function(t){PD.all(t).then(void 0,function(){})}),TD=Mt,DD=mn,RD=Jn,ID=Ri,AD=vd,LD=tx,$D=ix;TD({target:"Promise",stat:!0,forced:$D},{all:function(e){var n=this,r=ID.f(n),i=r.resolve,s=r.reject,o=AD(function(){var a=RD(n.resolve),l=[],u=0,c=1;LD(e,function(f){var h=u++,d=!1;c++,DD(a,n,f).then(function(g){d||(d=!0,l[h]=g,--c||i(l))},s)}),--c||i(l)});return o.error&&s(o.value),r.promise}});var ND=Mt,FD=lo.CONSTRUCTOR,Cf=Vl,zD=Tr,jD=Ae,BD=oo,Em=Cf&&Cf.prototype;ND({target:"Promise",proto:!0,forced:FD,real:!0},{catch:function(t){return this.then(void 0,t)}});if(jD(Cf)){var Mm=zD("Promise").prototype.catch;Em.catch!==Mm&&BD(Em,"catch",Mm,{unsafe:!0})}var VD=Mt,UD=mn,WD=Jn,HD=Ri,YD=vd,qD=tx,QD=ix;VD({target:"Promise",stat:!0,forced:QD},{race:function(e){var n=this,r=HD.f(n),i=r.reject,s=YD(function(){var o=WD(n.resolve);qD(e,function(a){UD(o,n,a).then(r.resolve,i)})});return s.error&&i(s.value),r.promise}});var GD=Mt,KD=Ri,XD=lo.CONSTRUCTOR;GD({target:"Promise",stat:!0,forced:XD},{reject:function(e){var n=KD.f(this),r=n.reject;return r(e),n.promise}});var JD=Kt,ZD=yn,eR=Ri,tR=function(t,e){if(JD(t),ZD(e)&&e.constructor===t)return e;var n=eR.f(t),r=n.resolve;return r(e),n.promise},nR=Mt,rR=Tr,iR=lo.CONSTRUCTOR,sR=tR;rR("Promise");nR({target:"Promise",stat:!0,forced:iR},{resolve:function(e){return sR(this,e)}});var oR=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",sx=xe,aR=T1,lR=Ae,uR=oR,cR=so,fR=R1,hR=I1,dR=sx.Function,pR=/MSIE .\./.test(cR)||uR&&function(){var t=sx.Bun.version.split(".");return t.length<3||t[0]==="0"&&(t[1]<3||t[1]==="3"&&t[2]==="0")}(),ox=function(t,e){var n=e?2:1;return pR?function(r,i){var s=hR(arguments.length,1)>n,o=lR(r)?r:dR(r),a=s?fR(arguments,n):[],l=s?function(){aR(o,this,a)}:o;return e?t(l,i):t(l)}:t},gR=Mt,ax=xe,mR=ox,Pm=mR(ax.setInterval,!0);gR({global:!0,bind:!0,forced:ax.setInterval!==Pm},{setInterval:Pm});var yR=Mt,lx=xe,vR=ox,Om=vR(lx.setTimeout,!0);yR({global:!0,bind:!0,forced:lx.setTimeout!==Om},{setTimeout:Om});var ux={},_R=Gt,xR=i1,bR=Zn,wR=Kt,SR=Nl,kR=P1;ux.f=_R&&!xR?Object.defineProperties:function(e,n){wR(e);for(var r=SR(n),i=kR(n),s=i.length,o=0,a;s>o;)bR.f(e,a=i[o++],r[a]);return e};var ER=Kt,MR=ux,Cm=fd,PR=ld,OR=D1,CR=zl,TR=a1,Tm=">",Dm="<",Tf="prototype",Df="script",cx=TR("IE_PROTO"),nc=function(){},fx=function(t){return Dm+Df+Tm+t+Dm+"/"+Df+Tm},Rm=function(t){t.write(fx("")),t.close();var e=t.parentWindow.Object;return t=null,e},DR=function(){var t=CR("iframe"),e="java"+Df+":",n;return t.style.display="none",OR.appendChild(t),t.src=String(e),n=t.contentWindow.document,n.open(),n.write(fx("document.F=Object")),n.close(),n.F},Uo,wa=function(){try{Uo=new ActiveXObject("htmlfile")}catch{}wa=typeof document<"u"?document.domain&&Uo?Rm(Uo):DR():Rm(Uo);for(var t=Cm.length;t--;)delete wa[Tf][Cm[t]];return wa()};PR[cx]=!0;var RR=Object.create||function(e,n){var r;return e!==null?(nc[Tf]=ER(e),r=new nc,nc[Tf]=null,r[cx]=e):r=wa(),n===void 0?r:MR.f(r,n)},IR=gt,AR=RR,LR=Zn.f,Rf=IR("unscopables"),If=Array.prototype;If[Rf]===void 0&&LR(If,Rf,{configurable:!0,value:AR(null)});var $R=function(t){If[Rf][t]=!0},NR=Mt,FR=gd.find,zR=$R,Af="find",hx=!0;Af in[]&&Array(1)[Af](function(){hx=!1});NR({target:"Array",proto:!0,forced:hx},{find:function(e){return FR(this,e,arguments.length>1?arguments[1]:void 0)}});zR(Af);var jR=pt,BR=gt,VR=ed,UR=BR("species"),WR=function(t){return VR>=51||!jR(function(){var e=[],n=e.constructor={};return n[UR]=function(){return{foo:1}},e[t](Boolean).foo!==1})},HR=Mt,YR=gd.filter,qR=WR,QR=qR("filter");HR({target:"Array",proto:!0,forced:!QR},{filter:function(e){return YR(this,e,arguments.length>1?arguments[1]:void 0)}});var dx={exports:{}};(function(t){var e=Xh.default;function n(){t.exports=n=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var r,i={},s=Object.prototype,o=s.hasOwnProperty,a=Object.defineProperty||function(w,S,R){w[S]=R.value},l=typeof Symbol=="function"?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",f=l.toStringTag||"@@toStringTag";function h(w,S,R){return Object.defineProperty(w,S,{value:R,enumerable:!0,configurable:!0,writable:!0}),w[S]}try{h({},"")}catch{h=function(R,A,j){return R[A]=j}}function d(w,S,R,A){var j=S&&S.prototype instanceof x?S:x,z=Object.create(j.prototype),U=new O(A||[]);return a(z,"_invoke",{value:Y(w,R,U)}),z}function g(w,S,R){try{return{type:"normal",arg:w.call(S,R)}}catch(A){return{type:"throw",arg:A}}}i.wrap=d;var y="suspendedStart",_="suspendedYield",m="executing",p="completed",v={};function x(){}function b(){}function M(){}var C={};h(C,u,function(){return this});var T=Object.getPrototypeOf,$=T&&T(T(E([])));$&&$!==s&&o.call($,u)&&(C=$);var I=M.prototype=x.prototype=Object.create(C);function L(w){["next","throw","return"].forEach(function(S){h(w,S,function(R){return this._invoke(S,R)})})}function V(w,S){function R(j,z,U,H){var ee=g(w[j],w,z);if(ee.type!=="throw"){var rt=ee.arg,Le=rt.value;return Le&&e(Le)=="object"&&o.call(Le,"__await")?S.resolve(Le.__await).then(function(pe){R("next",pe,U,H)},function(pe){R("throw",pe,U,H)}):S.resolve(Le).then(function(pe){rt.value=pe,U(rt)},function(pe){return R("throw",pe,U,H)})}H(ee.arg)}var A;a(this,"_invoke",{value:function(z,U){function H(){return new S(function(ee,rt){R(z,U,ee,rt)})}return A=A?A.then(H,H):H()}})}function Y(w,S,R){var A=y;return function(j,z){if(A===m)throw new Error("Generator is already running");if(A===p){if(j==="throw")throw z;return{value:r,done:!0}}for(R.method=j,R.arg=z;;){var U=R.delegate;if(U){var H=k(U,R);if(H){if(H===v)continue;return H}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(A===y)throw A=p,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);A=m;var ee=g(w,S,R);if(ee.type==="normal"){if(A=R.done?p:_,ee.arg===v)continue;return{value:ee.arg,done:R.done}}ee.type==="throw"&&(A=p,R.method="throw",R.arg=ee.arg)}}}function k(w,S){var R=S.method,A=w.iterator[R];if(A===r)return S.delegate=null,R==="throw"&&w.iterator.return&&(S.method="return",S.arg=r,k(w,S),S.method==="throw")||R!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+R+"' method")),v;var j=g(A,w.iterator,S.arg);if(j.type==="throw")return S.method="throw",S.arg=j.arg,S.delegate=null,v;var z=j.arg;return z?z.done?(S[w.resultName]=z.value,S.next=w.nextLoc,S.method!=="return"&&(S.method="next",S.arg=r),S.delegate=null,v):z:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,v)}function P(w){var S={tryLoc:w[0]};1 in w&&(S.catchLoc=w[1]),2 in w&&(S.finallyLoc=w[2],S.afterLoc=w[3]),this.tryEntries.push(S)}function D(w){var S=w.completion||{};S.type="normal",delete S.arg,w.completion=S}function O(w){this.tryEntries=[{tryLoc:"root"}],w.forEach(P,this),this.reset(!0)}function E(w){if(w||w===""){var S=w[u];if(S)return S.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var R=-1,A=function j(){for(;++R<w.length;)if(o.call(w,R))return j.value=w[R],j.done=!1,j;return j.value=r,j.done=!0,j};return A.next=A}}throw new TypeError(e(w)+" is not iterable")}return b.prototype=M,a(I,"constructor",{value:M,configurable:!0}),a(M,"constructor",{value:b,configurable:!0}),b.displayName=h(M,f,"GeneratorFunction"),i.isGeneratorFunction=function(w){var S=typeof w=="function"&&w.constructor;return!!S&&(S===b||(S.displayName||S.name)==="GeneratorFunction")},i.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,M):(w.__proto__=M,h(w,f,"GeneratorFunction")),w.prototype=Object.create(I),w},i.awrap=function(w){return{__await:w}},L(V.prototype),h(V.prototype,c,function(){return this}),i.AsyncIterator=V,i.async=function(w,S,R,A,j){j===void 0&&(j=Promise);var z=new V(d(w,S,R,A),j);return i.isGeneratorFunction(S)?z:z.next().then(function(U){return U.done?U.value:z.next()})},L(I),h(I,f,"Generator"),h(I,u,function(){return this}),h(I,"toString",function(){return"[object Generator]"}),i.keys=function(w){var S=Object(w),R=[];for(var A in S)R.push(A);return R.reverse(),function j(){for(;R.length;){var z=R.pop();if(z in S)return j.value=z,j.done=!1,j}return j.done=!0,j}},i.values=E,O.prototype={constructor:O,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(D),!S)for(var R in this)R.charAt(0)==="t"&&o.call(this,R)&&!isNaN(+R.slice(1))&&(this[R]=r)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var R=this;function A(rt,Le){return U.type="throw",U.arg=S,R.next=rt,Le&&(R.method="next",R.arg=r),!!Le}for(var j=this.tryEntries.length-1;j>=0;--j){var z=this.tryEntries[j],U=z.completion;if(z.tryLoc==="root")return A("end");if(z.tryLoc<=this.prev){var H=o.call(z,"catchLoc"),ee=o.call(z,"finallyLoc");if(H&&ee){if(this.prev<z.catchLoc)return A(z.catchLoc,!0);if(this.prev<z.finallyLoc)return A(z.finallyLoc)}else if(H){if(this.prev<z.catchLoc)return A(z.catchLoc,!0)}else{if(!ee)throw new Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return A(z.finallyLoc)}}}},abrupt:function(S,R){for(var A=this.tryEntries.length-1;A>=0;--A){var j=this.tryEntries[A];if(j.tryLoc<=this.prev&&o.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var z=j;break}}z&&(S==="break"||S==="continue")&&z.tryLoc<=R&&R<=z.finallyLoc&&(z=null);var U=z?z.completion:{};return U.type=S,U.arg=R,z?(this.method="next",this.next=z.finallyLoc,v):this.complete(U)},complete:function(S,R){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&R&&(this.next=R),v},finish:function(S){for(var R=this.tryEntries.length-1;R>=0;--R){var A=this.tryEntries[R];if(A.finallyLoc===S)return this.complete(A.completion,A.afterLoc),D(A),v}},catch:function(S){for(var R=this.tryEntries.length-1;R>=0;--R){var A=this.tryEntries[R];if(A.tryLoc===S){var j=A.completion;if(j.type==="throw"){var z=j.arg;D(A)}return z}}throw new Error("illegal catch attempt")},delegateYield:function(S,R,A){return this.delegate={iterator:E(S),resultName:R,nextLoc:A},this.method==="next"&&(this.arg=r),v}},i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(dx);var GR=dx.exports,Sa=GR(),KR=Sa;try{regeneratorRuntime=Sa}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Sa:Function("r","regeneratorRuntime = r")(Sa)}var jr=null;typeof WebSocket<"u"?jr=WebSocket:typeof MozWebSocket<"u"?jr=MozWebSocket:typeof Je<"u"?jr=Je.WebSocket||Je.MozWebSocket:typeof window<"u"?jr=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(jr=self.WebSocket||self.MozWebSocket);var XR=jr,JR=CE,ZR=TE,eI=DE,tI=IE,nI=AE,rI=KR,iI=XR;function Dr(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var sI=Dr(JR),ni=Dr(ZR),px=Dr(eI),gx=Dr(tI),tn=Dr(nI),vt=Dr(rI),rc=Dr(iI),oI=["baseRequestId"],aI=function(){function t(e){var n=e.status,r=e.message;px.default(this,t),tn.default(this,"status",void 0),tn.default(this,"result",void 0),this.status=n,this.result=r}return gx.default(t,[{key:"json",value:function(){var e=ni.default(vt.default.mark(function r(){return vt.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this.result);case 1:case"end":return s.stop()}},r,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"clone",value:function(){return this}},{key:"text",value:function(){var e=ni.default(vt.default.mark(function r(){return vt.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",typeof this.result=="string"?this.result:JSON.stringify(this.result));case 1:case"end":return s.stop()}},r,this)}));function n(){return e.apply(this,arguments)}return n}()}]),t}(),lI=function(){function t(e){var n=e.authorization,r=e.apiUrl,i=e.heartBeatInterval,s=e.hearBeatInterval;px.default(this,t),tn.default(this,"apiUrl",void 0),tn.default(this,"heartBeatInterval",60),tn.default(this,"token",void 0),tn.default(this,"ws",null),tn.default(this,"messageCounter",1),tn.default(this,"messageIdToSubscription",{}),tn.default(this,"messageQueue",[]),this.token=n,this.apiUrl=r,i?this.heartBeatInterval=i:s&&(console.warn("Option hearBeatInterval is deprecated. It was replaced by heartBeatInterval."),this.heartBeatInterval=s)}return gx.default(t,[{key:"authorization",get:function(){return this.token},set:function(n){this.token=n,this.ws&&this.ws.close()}},{key:"close",value:function(){var e=ni.default(vt.default.mark(function r(){return vt.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:this.ws&&this.ws.close();case 1:case"end":return s.stop()}},r,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"initSocket",value:function(){var n=this;if(this.ws)return this.ws.initPromise;var r=new rc.default(this.apiUrl);return r.messageIdSent={},r.sendMessage=function(i){(!i.messageId||i.messageId&&!r.messageIdSent[i.messageId])&&(r.send(JSON.stringify(i)),r.messageIdSent[i.messageId]=!0)},r.sendQueue=function(){n.messageQueue.forEach(function(i){return r.sendMessage(i)}),n.messageQueue=[]},r.reconcile=function(){new Date().getTime()-r.lastMessageTimestamp.getTime()>4*n.heartBeatInterval*1e3?r.close():Object.keys(n.messageIdToSubscription).forEach(function(i){r.sendMessage(n.messageIdToSubscription[i].message)})},r.lastMessageTimestamp=new Date,r.initPromise=new Promise(function(i){r.onopen=function(){r.sendMessage({authorization:n.authorization})},r.onmessage=function(s){r.lastMessageTimestamp=new Date;var o=JSON.parse(s.data);o.handshake&&(r.reconcile(),r.reconcileTimer=setInterval(function(){r.messageIdSent={},r.reconcile()},n.heartBeatInterval*1e3),i()),n.messageIdToSubscription[o.messageId]&&n.messageIdToSubscription[o.messageId].callback(new aI(o)),r.sendQueue()},r.onclose=function(){r&&r.readyState!==rc.default.CLOSED&&r.readyState!==rc.default.CLOSING&&r.close(),r.reconcileTimer&&(clearInterval(r.reconcileTimer),r.reconcileTimer=null),n.ws===r&&(n.ws=null,Object.keys(n.messageIdToSubscription).length&&n.initSocket())},r.onerror=r.onclose}),this.ws=r,this.ws.initPromise}},{key:"sendMessage",value:function(n){var r=this;n.unsubscribe&&this.messageQueue.find(function(i){return i.messageId===n.unsubscribe})?this.messageQueue=this.messageQueue.filter(function(i){return i.messageId!==n.unsubscribe}):this.messageQueue.push(n),setTimeout(ni.default(vt.default.mark(function i(){return vt.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.initSocket();case 2:r.ws.sendQueue();case 3:case"end":return o.stop()}},i)})),100)}},{key:"request",value:function(n,r){var i=r.baseRequestId,s=sI.default(r,oI),o={messageId:this.messageCounter++,requestId:i,method:n,params:s},a=[],l=null,u=function(){l&&(l(a.pop()),l=null)};this.messageIdToSubscription[o.messageId]={message:o,callback:function(h){a.push(h),u()}};var c=this;return{subscribe:function(h){var d=this;return ni.default(vt.default.mark(function g(){var y;return vt.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return c.sendMessage(o),m.next=3,new Promise(function(p){l=p,a.length&&u()});case 3:return y=m.sent,m.abrupt("return",h(y,function(){return d.subscribe(h)}));case 5:case"end":return m.stop()}},g)}))()},unsubscribe:function(){return ni.default(vt.default.mark(function h(){return vt.default.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:c.sendMessage({unsubscribe:o.messageId}),delete c.messageIdToSubscription[o.messageId];case 2:case"end":return g.stop()}},h)}))()}}}}]),t}(),uI=lI;const cI=Mi(uI);/*!
41
+ * @kurkle/color v0.3.2
42
+ * https://github.com/kurkle/color#readme
43
+ * (c) 2023 Jukka Kurkela
44
+ * Released under the MIT License
45
+ */function uo(t){return t+.5|0}const Tn=(t,e,n)=>Math.max(Math.min(t,n),e);function ts(t){return Tn(uo(t*2.55),0,255)}function Un(t){return Tn(uo(t*255),0,255)}function rn(t){return Tn(uo(t/2.55)/100,0,1)}function Im(t){return Tn(uo(t*100),0,100)}const yt={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},Lf=[..."0123456789ABCDEF"],fI=t=>Lf[t&15],hI=t=>Lf[(t&240)>>4]+Lf[t&15],Wo=t=>(t&240)>>4===(t&15),dI=t=>Wo(t.r)&&Wo(t.g)&&Wo(t.b)&&Wo(t.a);function pI(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&yt[t[1]]*17,g:255&yt[t[2]]*17,b:255&yt[t[3]]*17,a:e===5?yt[t[4]]*17:255}:(e===7||e===9)&&(n={r:yt[t[1]]<<4|yt[t[2]],g:yt[t[3]]<<4|yt[t[4]],b:yt[t[5]]<<4|yt[t[6]],a:e===9?yt[t[7]]<<4|yt[t[8]]:255})),n}const gI=(t,e)=>t<255?e(t):"";function mI(t){var e=dI(t)?fI:hI;return t?"#"+e(t.r)+e(t.g)+e(t.b)+gI(t.a,e):void 0}const yI=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function mx(t,e,n){const r=e*Math.min(n,1-n),i=(s,o=(s+t/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function vI(t,e,n){const r=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function _I(t,e,n){const r=mx(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function xI(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}function Sd(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=(s+o)/2;let l,u,c;return s!==o&&(c=s-o,u=a>.5?c/(2-s-o):c/(s+o),l=xI(n,r,i,c,s),l=l*60+.5),[l|0,u||0,a]}function kd(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Un)}function Ed(t,e,n){return kd(mx,t,e,n)}function bI(t,e,n){return kd(_I,t,e,n)}function wI(t,e,n){return kd(vI,t,e,n)}function yx(t){return(t%360+360)%360}function SI(t){const e=yI.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?ts(+e[5]):Un(+e[5]));const i=yx(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?r=bI(i,s,o):e[1]==="hsv"?r=wI(i,s,o):r=Ed(i,s,o),{r:r[0],g:r[1],b:r[2],a:n}}function kI(t,e){var n=Sd(t);n[0]=yx(n[0]+e),n=Ed(n),t.r=n[0],t.g=n[1],t.b=n[2]}function EI(t){if(!t)return;const e=Sd(t),n=e[0],r=Im(e[1]),i=Im(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${rn(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Am={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"},Lm={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 MI(){const t={},e=Object.keys(Lm),n=Object.keys(Am);let r,i,s,o,a;for(r=0;r<e.length;r++){for(o=a=e[r],i=0;i<n.length;i++)s=n[i],a=a.replace(s,Am[s]);s=parseInt(Lm[o],16),t[a]=[s>>16&255,s>>8&255,s&255]}return t}let Ho;function PI(t){Ho||(Ho=MI(),Ho.transparent=[0,0,0,0]);const e=Ho[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const OI=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function CI(t){const e=OI.exec(t);let n=255,r,i,s;if(e){if(e[7]!==r){const o=+e[7];n=e[8]?ts(o):Tn(o*255,0,255)}return r=+e[1],i=+e[3],s=+e[5],r=255&(e[2]?ts(r):Tn(r,0,255)),i=255&(e[4]?ts(i):Tn(i,0,255)),s=255&(e[6]?ts(s):Tn(s,0,255)),{r,g:i,b:s,a:n}}}function TI(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${rn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const ic=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,$r=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function DI(t,e,n){const r=$r(rn(t.r)),i=$r(rn(t.g)),s=$r(rn(t.b));return{r:Un(ic(r+n*($r(rn(e.r))-r))),g:Un(ic(i+n*($r(rn(e.g))-i))),b:Un(ic(s+n*($r(rn(e.b))-s))),a:t.a+n*(e.a-t.a)}}function Yo(t,e,n){if(t){let r=Sd(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=Ed(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function vx(t,e){return t&&Object.assign(e||{},t)}function $m(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=Un(t[3]))):(e=vx(t,{r:0,g:0,b:0,a:1}),e.a=Un(e.a)),e}function RI(t){return t.charAt(0)==="r"?CI(t):SI(t)}class Hs{constructor(e){if(e instanceof Hs)return e;const n=typeof e;let r;n==="object"?r=$m(e):n==="string"&&(r=pI(e)||PI(e)||RI(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=vx(this._rgb);return e&&(e.a=rn(e.a)),e}set rgb(e){this._rgb=$m(e)}rgbString(){return this._valid?TI(this._rgb):void 0}hexString(){return this._valid?mI(this._rgb):void 0}hslString(){return this._valid?EI(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,i=e.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=r.a-i.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-u,r.r=255&u*r.r+s*i.r+.5,r.g=255&u*r.g+s*i.g+.5,r.b=255&u*r.b+s*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=DI(this._rgb,e._rgb,n)),this}clone(){return new Hs(this.rgb)}alpha(e){return this._rgb.a=Un(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=uo(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 Yo(this._rgb,2,e),this}darken(e){return Yo(this._rgb,2,-e),this}saturate(e){return Yo(this._rgb,1,e),this}desaturate(e){return Yo(this._rgb,1,-e),this}rotate(e){return kI(this._rgb,e),this}}/*!
46
+ * Chart.js v4.4.2
47
+ * https://www.chartjs.org
48
+ * (c) 2024 Chart.js Contributors
49
+ * Released under the MIT License
50
+ */function Xt(){}const II=(()=>{let t=0;return()=>t++})();function K(t){return t===null||typeof t>"u"}function oe(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 q(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function me(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function it(t,e){return me(t)?t:e}function W(t,e){return typeof t>"u"?e:t}const AI=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,_x=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function te(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function X(t,e,n,r){let i,s,o;if(oe(t))if(s=t.length,r)for(i=s-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<s;i++)e.call(n,t[i],i);else if(q(t))for(o=Object.keys(t),s=o.length,i=0;i<s;i++)e.call(n,t[o[i]],o[i])}function al(t,e){let n,r,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function ll(t){if(oe(t))return t.map(ll);if(q(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let i=0;for(;i<r;++i)e[n[i]]=ll(t[n[i]]);return e}return t}function xx(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function LI(t,e,n,r){if(!xx(t))return;const i=e[t],s=n[t];q(i)&&q(s)?Ys(i,s,r):e[t]=ll(s)}function Ys(t,e,n){const r=oe(e)?e:[e],i=r.length;if(!q(t))return t;n=n||{};const s=n.merger||LI;let o;for(let a=0;a<i;++a){if(o=r[a],!q(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],t,o,n)}return t}function vs(t,e){return Ys(t,e,{merger:$I})}function $I(t,e,n){if(!xx(t))return;const r=e[t],i=n[t];q(r)&&q(i)?vs(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ll(i))}const Nm={"":t=>t,x:t=>t.x,y:t=>t.y};function NI(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function FI(t){const e=NI(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function qn(t,e){return(Nm[e]||(Nm[e]=FI(e)))(t)}function Md(t){return t.charAt(0).toUpperCase()+t.slice(1)}const qs=t=>typeof t<"u",Qn=t=>typeof t=="function",Fm=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function zI(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ue=Math.PI,le=2*ue,jI=le+ue,ul=Number.POSITIVE_INFINITY,BI=ue/180,_e=ue/2,nr=ue/4,zm=ue*2/3,Dn=Math.log10,qt=Math.sign;function _s(t,e,n){return Math.abs(t-e)<n}function jm(t){const e=Math.round(t);t=_s(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Dn(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function VI(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function Si(t){return!isNaN(parseFloat(t))&&isFinite(t)}function UI(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function bx(t,e,n){let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function It(t){return t*(ue/180)}function Pd(t){return t*(180/ue)}function Bm(t){if(!me(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function wx(t,e){const n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*ue&&(s+=le),{angle:s,distance:i}}function $f(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function WI(t,e){return(t-e+jI)%le-ue}function ot(t){return(t%le+le)%le}function Qs(t,e,n,r){const i=ot(t),s=ot(e),o=ot(n),a=ot(s-i),l=ot(o-i),u=ot(i-s),c=ot(i-o);return i===s||i===o||r&&s===o||a>l&&u<c}function Oe(t,e,n){return Math.max(e,Math.min(n,t))}function HI(t){return Oe(t,-32768,32767)}function an(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function Od(t,e,n){n=n||(o=>t[o]<e);let r=t.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const ln=(t,e,n,r)=>Od(t,n,r?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),YI=(t,e,n)=>Od(t,n,r=>t[r][e]>=n);function qI(t,e,n){let r=0,i=t.length;for(;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}const Sx=["push","pop","shift","splice","unshift"];function QI(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Sx.forEach(n=>{const r="_onData"+Md(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function Vm(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(Sx.forEach(s=>{delete t[s]}),delete t._chartjs)}function kx(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ex=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Mx(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Ex.call(window,()=>{r=!1,t.apply(e,n)}))}}function GI(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const Cd=t=>t==="start"?"left":t==="end"?"right":"center",Fe=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,KI=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function Px(t,e,n){const r=e.length;let i=0,s=r;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:u,max:c,minDefined:f,maxDefined:h}=o.getUserBounds();f&&(i=Oe(Math.min(ln(a,l,u).lo,n?r:ln(e,l,o.getPixelForValue(u)).lo),0,r-1)),h?s=Oe(Math.max(ln(a,o.axis,c,!0).hi+1,n?0:ln(e,l,o.getPixelForValue(c),!0).hi+1),i,r)-i:s=r-i}return{start:i,count:s}}function Ox(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const s=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const qo=t=>t===0||t===1,Um=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*le/n)),Wm=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*le/n)+1,xs={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*_e)+1,easeOutSine:t=>Math.sin(t*_e),easeInOutSine:t=>-.5*(Math.cos(ue*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:Um(t,.075,.3),easeOutElastic:t=>qo(t)?t:Wm(t,.075,.3),easeInOutElastic(t){return qo(t)?t:t<.5?.5*Um(t*2,.1125,.45):.5+.5*Wm(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-xs.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?xs.easeInBounce(t*2)*.5:xs.easeOutBounce(t*2-1)*.5+.5};function Td(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Hm(t){return Td(t)?t:new Hs(t)}function sc(t){return Td(t)?t:new Hs(t).saturate(.5).darken(.1).hexString()}const XI=["x","y","borderWidth","radius","tension"],JI=["color","borderColor","backgroundColor"];function ZI(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:JI},numbers:{type:"number",properties:XI}}),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 eA(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ym=new Map;function tA(t,e){e=e||{};const n=t+JSON.stringify(e);let r=Ym.get(n);return r||(r=new Intl.NumberFormat(t,e),Ym.set(n,r)),r}function co(t,e,n){return tA(e,n).format(t)}const Cx={values(t){return oe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let i,s=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=nA(t,n)}const o=Dn(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),co(t,r,l)},logarithmic(t,e,n){if(t===0)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(Dn(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?Cx.numeric.call(this,t,e,n):""}};function nA(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 Wl={formatters:Cx};function rA(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:Wl.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 Mr=Object.create(null),Nf=Object.create(null);function bs(t,e){if(!e)return t;const n=e.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];t=t[s]||(t[s]=Object.create(null))}return t}function oc(t,e,n){return typeof e=="string"?Ys(bs(t,e),n):Ys(bs(t,""),e)}class iA{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=r=>r.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=(r,i)=>sc(i.backgroundColor),this.hoverBorderColor=(r,i)=>sc(i.borderColor),this.hoverColor=(r,i)=>sc(i.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 oc(this,e,n)}get(e){return bs(this,e)}describe(e,n){return oc(Nf,e,n)}override(e,n){return oc(Mr,e,n)}route(e,n,r,i){const s=bs(this,e),o=bs(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[i];return q(l)?Object.assign({},u,l):W(l,u)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var ye=new iA({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ZI,eA,rA]);function sA(t){return!t||K(t.size)||K(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function cl(t,e,n,r,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>r&&(r=s),r}function oA(t,e,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},s=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,u,c,f,h;for(l=0;l<a;l++)if(f=n[l],f!=null&&!oe(f))o=cl(t,i,s,o,f);else if(oe(f))for(u=0,c=f.length;u<c;u++)h=f[u],h!=null&&!oe(h)&&(o=cl(t,i,s,o,h));t.restore();const d=s.length/2;if(d>n.length){for(l=0;l<d;l++)delete i[s[l]];s.splice(0,d)}return o}function rr(t,e,n){const r=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function qm(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ff(t,e,n,r){Tx(t,e,n,r,null)}function Tx(t,e,n,r,i){let s,o,a,l,u,c,f,h;const d=e.pointStyle,g=e.rotation,y=e.radius;let _=(g||0)*BI;if(d&&typeof d=="object"&&(s=d.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(_),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),t.restore();return}if(!(isNaN(y)||y<=0)){switch(t.beginPath(),d){default:i?t.ellipse(n,r,i/2,y,0,0,le):t.arc(n,r,y,0,le),t.closePath();break;case"triangle":c=i?i/2:y,t.moveTo(n+Math.sin(_)*c,r-Math.cos(_)*y),_+=zm,t.lineTo(n+Math.sin(_)*c,r-Math.cos(_)*y),_+=zm,t.lineTo(n+Math.sin(_)*c,r-Math.cos(_)*y),t.closePath();break;case"rectRounded":u=y*.516,l=y-u,o=Math.cos(_+nr)*l,f=Math.cos(_+nr)*(i?i/2-u:l),a=Math.sin(_+nr)*l,h=Math.sin(_+nr)*(i?i/2-u:l),t.arc(n-f,r-a,u,_-ue,_-_e),t.arc(n+h,r-o,u,_-_e,_),t.arc(n+f,r+a,u,_,_+_e),t.arc(n-h,r+o,u,_+_e,_+ue),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*y,c=i?i/2:l,t.rect(n-c,r-l,2*c,2*l);break}_+=nr;case"rectRot":f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+h,r-o),t.lineTo(n+f,r+a),t.lineTo(n-h,r+o),t.closePath();break;case"crossRot":_+=nr;case"cross":f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+f,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"star":f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+f,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o),_+=nr,f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+f,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"line":o=i?i/2:Math.cos(_)*y,a=Math.sin(_)*y,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(_)*(i?i/2:y),r+Math.sin(_)*y);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function un(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 Hl(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Yl(t){t.restore()}function aA(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function lA(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function uA(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),K(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 cA(t,e,n,r,i){if(i.strikethrough||i.underline){const s=t.measureText(r),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,c),t.lineTo(a,c),t.stroke()}}function fA(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Pr(t,e,n,r,i,s={}){const o=oe(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(t.save(),t.font=i.string,uA(t,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&fA(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),K(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,n,r,s.maxWidth)),t.fillText(u,n,r,s.maxWidth),cA(t,n,r,u,s),r+=Number(i.lineHeight);t.restore()}function Gs(t,e){const{x:n,y:r,w:i,h:s,radius:o}=e;t.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*ue,ue,!0),t.lineTo(n,r+s-o.bottomLeft),t.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,ue,_e,!0),t.lineTo(n+i-o.bottomRight,r+s),t.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,_e,0,!0),t.lineTo(n+i,r+o.topRight),t.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-_e,!0),t.lineTo(n+o.topLeft,r)}const hA=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,dA=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function pA(t,e){const n=(""+t).match(hA);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 gA=t=>+t||0;function Dd(t,e){const n={},r=q(e),i=r?Object.keys(e):e,s=q(t)?r?o=>W(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)n[o]=gA(s(o));return n}function Dx(t){return Dd(t,{top:"y",right:"x",bottom:"y",left:"x"})}function vr(t){return Dd(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ve(t){const e=Dx(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ee(t,e){t=t||{},e=e||ye.font;let n=W(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=W(t.style,e.style);r&&!(""+r).match(dA)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:W(t.family,e.family),lineHeight:pA(W(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:W(t.weight,e.weight),string:""};return i.string=sA(i),i}function ns(t,e,n,r){let i=!0,s,o,a;for(s=0,o=t.length;s<o;++s)if(a=t[s],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&oe(a)&&(a=a[n%a.length],i=!1),a!==void 0))return r&&!i&&(r.cacheable=!1),a}function mA(t,e,n){const{min:r,max:i}=t,s=_x(e,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function er(t,e){return Object.assign(Object.create(t),e)}function Rd(t,e=[""],n,r,i=()=>t[0]){const s=n||t;typeof r>"u"&&(r=Lx("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>Rd([a,...t],e,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return Ix(a,l,()=>kA(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Gm(a).includes(l)},ownKeys(a){return Gm(a)},set(a,l,u){const c=a._storage||(a._storage=i());return a[l]=c[l]=u,delete a._keys,!0}})}function ki(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Rx(t,r),setContext:s=>ki(t,s,n,r),override:s=>ki(t.override(s),e,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,a){return Ix(s,o,()=>vA(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,a){return t[o]=a,delete s[o],!0}})}function Rx(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Qn(n)?n:()=>n,isIndexable:Qn(r)?r:()=>r}}const yA=(t,e)=>t?t+Md(e):e,Id=(t,e)=>q(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Ix(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const r=n();return t[e]=r,r}function vA(t,e,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=t;let a=r[e];return Qn(a)&&o.isScriptable(e)&&(a=_A(e,a,t,n)),oe(a)&&a.length&&(a=xA(e,a,t,o.isIndexable)),Id(e,a)&&(a=ki(a,i,s&&s[e],o)),a}function _A(t,e,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,o||r);return a.delete(t),Id(t,l)&&(l=Ad(i._scopes,i,t,l)),l}function xA(t,e,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index<"u"&&r(t))return e[s.index%e.length];if(q(e[0])){const l=e,u=i._scopes.filter(c=>c!==l);e=[];for(const c of l){const f=Ad(u,i,t,c);e.push(ki(f,s,o&&o[t],a))}}return e}function Ax(t,e,n){return Qn(t)?t(e,n):t}const bA=(t,e)=>t===!0?e:typeof t=="string"?qn(e,t):void 0;function wA(t,e,n,r,i){for(const s of e){const o=bA(n,s);if(o){t.add(o);const a=Ax(o._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function Ad(t,e,n,r){const i=e._rootScopes,s=Ax(e._fallback,n,r),o=[...t,...i],a=new Set;a.add(r);let l=Qm(a,o,n,s||n,r);return l===null||typeof s<"u"&&s!==n&&(l=Qm(a,o,s,l,r),l===null)?!1:Rd(Array.from(a),[""],i,s,()=>SA(e,n,r))}function Qm(t,e,n,r,i){for(;n;)n=wA(t,e,n,r,i);return n}function SA(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];return oe(i)&&q(n)?n:i||{}}function kA(t,e,n,r){let i;for(const s of e)if(i=Lx(yA(s,t),n),typeof i<"u")return Id(t,i)?Ad(n,r,t,i):i}function Lx(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function Gm(t){let e=t._keys;return e||(e=t._keys=EA(t._scopes)),e}function EA(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function $x(t,e,n,r){const{iScale:i}=t,{key:s="r"}=this._parsing,o=new Array(r);let a,l,u,c;for(a=0,l=r;a<l;++a)u=a+n,c=e[u],o[a]={r:i.parse(qn(c,s),u)};return o}const MA=Number.EPSILON||1e-14,Ei=(t,e)=>e<t.length&&!t[e].skip&&t[e],Nx=t=>t==="x"?"y":"x";function PA(t,e,n,r){const i=t.skip?e:t,s=e,o=n.skip?e:n,a=$f(s,i),l=$f(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const f=r*u,h=r*c;return{previous:{x:s.x-f*(o.x-i.x),y:s.y-f*(o.y-i.y)},next:{x:s.x+h*(o.x-i.x),y:s.y+h*(o.y-i.y)}}}function OA(t,e,n){const r=t.length;let i,s,o,a,l,u=Ei(t,0);for(let c=0;c<r-1;++c)if(l=u,u=Ei(t,c+1),!(!l||!u)){if(_s(e[c],0,MA)){n[c]=n[c+1]=0;continue}i=n[c]/e[c],s=n[c+1]/e[c],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[c]=i*o*e[c],n[c+1]=s*o*e[c])}}function CA(t,e,n="x"){const r=Nx(n),i=t.length;let s,o,a,l=Ei(t,0);for(let u=0;u<i;++u){if(o=a,a=l,l=Ei(t,u+1),!a)continue;const c=a[n],f=a[r];o&&(s=(c-o[n])/3,a[`cp1${n}`]=c-s,a[`cp1${r}`]=f-s*e[u]),l&&(s=(l[n]-c)/3,a[`cp2${n}`]=c+s,a[`cp2${r}`]=f+s*e[u])}}function TA(t,e="x"){const n=Nx(e),r=t.length,i=Array(r).fill(0),s=Array(r);let o,a,l,u=Ei(t,0);for(o=0;o<r;++o)if(a=l,l=u,u=Ei(t,o+1),!!l){if(u){const c=u[e]-l[e];i[o]=c!==0?(u[n]-l[n])/c:0}s[o]=a?u?qt(i[o-1])!==qt(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}OA(t,i,s),CA(t,s,e)}function Qo(t,e,n){return Math.max(Math.min(t,n),e)}function DA(t,e){let n,r,i,s,o,a=un(t[0],e);for(n=0,r=t.length;n<r;++n)o=s,s=a,a=n<r-1&&un(t[n+1],e),s&&(i=t[n],o&&(i.cp1x=Qo(i.cp1x,e.left,e.right),i.cp1y=Qo(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=Qo(i.cp2x,e.left,e.right),i.cp2y=Qo(i.cp2y,e.top,e.bottom)))}function RA(t,e,n,r,i){let s,o,a,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")TA(t,i);else{let u=r?t[t.length-1]:t[0];for(s=0,o=t.length;s<o;++s)a=t[s],l=PA(u,a,t[Math.min(s+1,o-(r?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,u=a}e.capBezierPoints&&DA(t,n)}function Ld(){return typeof window<"u"&&typeof document<"u"}function $d(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function fl(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const ql=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function IA(t,e){return ql(t).getPropertyValue(e)}const AA=["top","right","bottom","left"];function _r(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=AA[i];r[s]=parseFloat(t[e+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const LA=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function $A(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(LA(i,s,t.target))a=i,l=s;else{const u=e.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function cr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=ql(n),s=i.boxSizing==="border-box",o=_r(i,"padding"),a=_r(i,"border","width"),{x:l,y:u,box:c}=$A(t,n),f=o.left+(c&&a.left),h=o.top+(c&&a.top);let{width:d,height:g}=e;return s&&(d-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-f)/d*n.width/r),y:Math.round((u-h)/g*n.height/r)}}function NA(t,e,n){let r,i;if(e===void 0||n===void 0){const s=$d(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const o=s.getBoundingClientRect(),a=ql(s),l=_r(a,"border","width"),u=_r(a,"padding");e=o.width-u.width-l.width,n=o.height-u.height-l.height,r=fl(a.maxWidth,s,"clientWidth"),i=fl(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:r||ul,maxHeight:i||ul}}const Go=t=>Math.round(t*10)/10;function FA(t,e,n,r){const i=ql(t),s=_r(i,"margin"),o=fl(i.maxWidth,t,"clientWidth")||ul,a=fl(i.maxHeight,t,"clientHeight")||ul,l=NA(t,e,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const h=_r(i,"border","width"),d=_r(i,"padding");u-=d.width+h.width,c-=d.height+h.height}return u=Math.max(0,u-s.width),c=Math.max(0,r?u/r:c-s.height),u=Go(Math.min(u,o,l.maxWidth)),c=Go(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Go(u/2)),(e!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Go(Math.floor(c*r))),{width:u,height:c}}function Km(t,e,n){const r=e||1,i=Math.floor(t.height*r),s=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(t.currentDevicePixelRatio=r,o.height=i,o.width=s,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const zA=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ld()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Xm(t,e){const n=IA(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function fr(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function jA(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function BA(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=fr(t,i,n),a=fr(i,s,n),l=fr(s,e,n),u=fr(o,a,n),c=fr(a,l,n);return fr(u,c,n)}const VA=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,r){return n-r},leftForLtr(n,r){return n-r}}},UA=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function fi(t,e,n){return t?VA(e,n):UA()}function Fx(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function zx(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function jx(t){return t==="angle"?{between:Qs,compare:WI,normalize:ot}:{between:an,compare:(e,n)=>e-n,normalize:e=>e}}function Jm({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function WA(t,e,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=jx(r),l=e.length;let{start:u,end:c,loop:f}=t,h,d;if(f){for(u+=l,c+=l,h=0,d=l;h<d&&o(a(e[u%l][r]),i,s);++h)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:f,style:t.style}}function Bx(t,e,n){if(!n)return[t];const{property:r,start:i,end:s}=n,o=e.length,{compare:a,between:l,normalize:u}=jx(r),{start:c,end:f,loop:h,style:d}=WA(t,e,n),g=[];let y=!1,_=null,m,p,v;const x=()=>l(i,v,m)&&a(i,v)!==0,b=()=>a(s,m)===0||l(s,v,m),M=()=>y||x(),C=()=>!y||b();for(let T=c,$=c;T<=f;++T)p=e[T%o],!p.skip&&(m=u(p[r]),m!==v&&(y=l(m,i,s),_===null&&M()&&(_=a(m,i)===0?T:$),_!==null&&C()&&(g.push(Jm({start:_,end:T,loop:h,count:o,style:d})),_=null),$=T,v=m));return _!==null&&g.push(Jm({start:_,end:f,loop:h,count:o,style:d})),g}function Vx(t,e){const n=[],r=t.segments;for(let i=0;i<r.length;i++){const s=Bx(r[i],t.points,e);s.length&&n.push(...s)}return n}function HA(t,e,n,r){let i=0,s=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function YA(t,e,n,r){const i=t.length,s=[];let o=e,a=t[e],l;for(l=e+1;l<=n;++l){const u=t[l%i];u.skip||u.stop?a.skip||(r=!1,s.push({start:e%i,end:(l-1)%i,loop:r}),e=o=u.stop?l:null):(o=l,a.skip&&(e=l)),a=u}return o!==null&&s.push({start:e%i,end:o%i,loop:r}),s}function qA(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:o,end:a}=HA(n,i,s,r);if(r===!0)return Zm(t,[{start:o,end:a,loop:s}],n,e);const l=a<o?a+i:a,u=!!t._fullLoop&&o===0&&a===i-1;return Zm(t,YA(n,o,l,u),n,e)}function Zm(t,e,n,r){return!r||!r.setContext||!n?e:QA(t,e,n,r)}function QA(t,e,n,r){const i=t._chart.getContext(),s=ey(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=n.length,u=[];let c=s,f=e[0].start,h=f;function d(g,y,_,m){const p=a?-1:1;if(g!==y){for(g+=l;n[g%l].skip;)g-=p;for(;n[y%l].skip;)y+=p;g%l!==y%l&&(u.push({start:g%l,end:y%l,loop:_,style:m}),c=m,f=y%l)}}for(const g of e){f=a?f:g.start;let y=n[f%l],_;for(h=f+1;h<=g.end;h++){const m=n[h%l];_=ey(r.setContext(er(i,{type:"segment",p0:y,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),GA(_,c)&&d(f,h-1,g.loop,c),y=m,c=_}f<h-1&&d(f,h-1,g.loop,c)}return u}function ey(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function GA(t,e){if(!e)return!1;const n=[],r=function(i,s){return Td(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,r)!==JSON.stringify(e,r)}/*!
51
+ * Chart.js v4.4.2
52
+ * https://www.chartjs.org
53
+ * (c) 2024 Chart.js Contributors
54
+ * Released under the MIT License
55
+ */class KA{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Ex.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,e,"progress")),s.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}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((r,i)=>Math.max(r,i._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 r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Jt=new KA;const ty="transparent",XA={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=Hm(t||ty),i=r.valid&&Hm(e||ty);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class JA{constructor(e,n,r,i){const s=n[r];i=ns([e.to,i,s,e.from]);const o=ns([e.from,s,i]);this._active=!0,this._fn=e.fn||XA[e.type||typeof o],this._easing=xs[e.easing]||xs.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=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=ns([e.to,n,i,e.from]),this._from=ns([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class Ux{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!q(e))return;const n=Object.keys(ye.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!q(s))return;const o={};for(const a of n)o[a]=s[a];(oe(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(e,n){const r=n.options,i=eL(e,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&ZA(e.options.$animations,r).then(()=>{e.options=r},()=>{}),s}_createAnimations(e,n){const r=this._properties,i=[],s=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const c=n[u];let f=s[u];const h=r.get(u);if(f)if(h&&f.active()){f.update(h,c,a);continue}else f.cancel();if(!h||!h.duration){e[u]=c;continue}s[u]=f=new JA(h,e,u,c),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Jt.add(this._chart,r),!0}}function ZA(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const s=t[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function eL(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 ny(t,e){const n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:r?s:i,end:r?i:s}}function tL(t,e,n){if(n===!1)return!1;const r=ny(t,n),i=ny(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function nL(t){let e,n,r,i;return q(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===!1}}function Wx(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function ry(t,e,n,r={}){const i=t.keys,s=r.mode==="single";let o,a,l,u;if(e!==null){for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(r.all)continue;break}u=t.values[l],me(u)&&(s||e===0||qt(e)===qt(u))&&(e+=u)}return e}}function rL(t){const e=Object.keys(t),n=new Array(e.length);let r,i,s;for(r=0,i=e.length;r<i;++r)s=e[r],n[r]={x:s,y:t[s]};return n}function iy(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function iL(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function sL(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function oL(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function sy(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function oy(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,u=o.axis,c=iL(s,o,r),f=e.length;let h;for(let d=0;d<f;++d){const g=e[d],{[l]:y,[u]:_}=g,m=g._stacks||(g._stacks={});h=m[u]=oL(i,c,y),h[a]=_,h._top=sy(h,o,!0,r.type),h._bottom=sy(h,o,!1,r.type);const p=h._visualValues||(h._visualValues={});p[a]=_}}function ac(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function aL(t,e){return er(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function lL(t,e,n){return er(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Yi(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const lc=t=>t==="reset"||t==="none",ay=(t,e)=>e?t:Object.assign({},t),uL=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Wx(n,!0),values:null};class $t{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=iy(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&&Yi(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,h,d,g)=>f==="x"?h:f==="r"?g:d,s=n.xAxisID=W(r.xAxisID,ac(e,"x")),o=n.yAxisID=W(r.yAxisID,ac(e,"y")),a=n.rAxisID=W(r.rAxisID,ac(e,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,o,a),c=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}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&&Vm(this._data,this),e._stacked&&Yi(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(q(n))this._data=rL(n);else if(r!==n){if(r){Vm(r,this);const i=this._cachedMeta;Yi(i),i._parsed=[]}n&&Object.isExtensible(n)&&QI(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,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=iy(n.vScale,n),n.stack!==r.stack&&(i=!0,Yi(n),n.stack=r.stack),this._resyncElements(e),(i||s!==n._stacked)&&oy(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=e===0&&n===i.length?!0:r._sorted,u=e>0&&r._parsed[e-1],c,f,h;if(this._parsing===!1)r._parsed=i,r._sorted=!0,h=i;else{oe(i[e])?h=this.parseArrayData(r,i,e,n):q(i[e])?h=this.parseObjectData(r,i,e,n):h=this.parsePrimitiveData(r,i,e,n);const d=()=>f[a]===null||u&&f[a]<u[a];for(c=0;c<n;++c)r._parsed[c+e]=f=h[c],l&&(d()&&(l=!1),u=f);r._sorted=l}o&&oy(this,h)}parsePrimitiveData(e,n,r,i){const{iScale:s,vScale:o}=e,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,f=new Array(i);let h,d,g;for(h=0,d=i;h<d;++h)g=h+r,f[h]={[a]:c||s.parse(u[g],g),[l]:o.parse(n[g],g)};return f}parseArrayData(e,n,r,i){const{xScale:s,yScale:o}=e,a=new Array(i);let l,u,c,f;for(l=0,u=i;l<u;++l)c=l+r,f=n[c],a[l]={x:s.parse(f[0],c),y:o.parse(f[1],c)};return a}parseObjectData(e,n,r,i){const{xScale:s,yScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,f,h,d;for(c=0,f=i;c<f;++c)h=c+r,d=n[h],u[c]={x:s.parse(qn(d,a),h),y:o.parse(qn(d,l),h)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const i=this.chart,s=this._cachedMeta,o=n[e.axis],a={keys:Wx(i,!0),values:n._stacks[e.axis]._visualValues};return ry(a,o,s.index,{mode:r})}updateRangeFromParsed(e,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=ry(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&e===r.iScale,o=i.length,a=this._getOtherScale(e),l=uL(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:f}=sL(a);let h,d;function g(){d=i[h];const y=d[a.axis];return!me(d[e.axis])||c>y||f<y}for(h=0;h<o&&!(!g()&&(this.updateRangeFromParsed(u,e,d,l),s));++h);if(s){for(h=o-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(u,e,d,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][e.axis],me(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=nL(W(this.options.clip,tL(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(e,s,a,l),c=a;c<a+l;++c){const f=i[c];f.hidden||(f.active&&u?o.push(f):f.draw(e,s))}for(c=0;c<o.length;++c)o[c].draw(e,s)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];s=o.$context||(o.$context=lL(this.getContext(),e,o)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=aL(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=e+"-"+n,a=s[o],l=this.enableOptionSharing&&qs(r);if(a)return ay(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],h=u.getOptionScopes(this.getDataset(),c),d=Object.keys(ye.elements[e]),g=()=>this.getContext(r,i,n),y=u.resolveNamedOptions(h,d,g,f);return y.$shared&&(y.$shared=l,s[o]=Object.freeze(ay(y,l))),y}_resolveAnimations(e,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const c=this.chart.config,f=c.datasetAnimationScopeKeys(this._type,n),h=c.getOptionScopes(this.getDataset(),f);l=c.createResolver(h,this.getContext(e,r,n))}const u=new Ux(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||lc(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(e,n,r,i){lc(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!lc(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"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,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,r=!0){const i=this._cachedMeta,s=i.data,o=e+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(s),a=e;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,n),r&&this.updateElements(s,e,n,"reset")}updateElements(e,n,r,i){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(e,n);r._stacked&&Yi(r,i)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,i]=e;this[n](r,i)}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 r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}F($t,"defaults",{}),F($t,"datasetElementType",null),F($t,"dataElementType",null);function cL(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let i=0,s=n.length;i<s;i++)r=r.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=kx(r.sort((i,s)=>i-s))}return t._cache.$bar}function fL(t){const e=t.iScale,n=cL(e,t.type);let r=e._length,i,s,o,a;const l=()=>{o===32767||o===-32768||(qs(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(i=0,s=n.length;i<s;++i)o=e.getPixelForValue(n[i]),l();for(a=void 0,i=0,s=e.ticks.length;i<s;++i)o=e.getPixelForTick(i),l();return r}function hL(t,e,n,r){const i=n.barThickness;let s,o;return K(i)?(s=e.min*n.categoryPercentage,o=n.barPercentage):(s=i*r,o=1),{chunk:s/r,ratio:o,start:e.pixels[t]-s/2}}function dL(t,e,n,r){const i=e.pixels,s=i[t];let o=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const l=n.categoryPercentage;o===null&&(o=s-(a===null?e.end-e.start:a-s)),a===null&&(a=s+s-o);const u=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:u}}function pL(t,e,n,r){const i=n.parse(t[0],r),s=n.parse(t[1],r),o=Math.min(i,s),a=Math.max(i,s);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),e[n.axis]=u,e._custom={barStart:l,barEnd:u,start:i,end:s,min:o,max:a}}function Hx(t,e,n,r){return oe(t)?pL(t,e,n,r):e[n.axis]=n.parse(t,r),e}function ly(t,e,n,r){const i=t.iScale,s=t.vScale,o=i.getLabels(),a=i===s,l=[];let u,c,f,h;for(u=n,c=n+r;u<c;++u)h=e[u],f={},f[i.axis]=a||i.parse(o[u],u),l.push(Hx(h,f,s,u));return l}function uc(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function gL(t,e,n){return t!==0?qt(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function mL(t){let e,n,r,i,s;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:r,reverse:e,top:i,bottom:s}}function yL(t,e,n,r){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=mL(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?i=u:(n._bottom||0)===r?i=c:(s[uy(c,o,a,l)]=!0,i=u)),s[uy(i,o,a,l)]=!0,t.borderSkipped=s}function uy(t,e,n,r){return r?(t=vL(t,e,n),t=cy(t,n,e)):t=cy(t,e,n),t}function vL(t,e,n){return t===e?n:t===n?e:t}function cy(t,e,n){return t==="start"?e:t==="end"?n:t}function _L(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class ws extends $t{parsePrimitiveData(e,n,r,i){return ly(e,n,r,i)}parseArrayData(e,n,r,i){return ly(e,n,r,i)}parseObjectData(e,n,r,i){const{iScale:s,vScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=s.axis==="x"?a:l,c=o.axis==="x"?a:l,f=[];let h,d,g,y;for(h=r,d=r+i;h<d;++h)y=n[h],g={},g[s.axis]=s.parse(qn(y,u),h),f.push(Hx(qn(y,c),g,o,h));return f}updateRangeFromParsed(e,n,r,i){super.updateRangeFromParsed(e,n,r,i);const s=r._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:r,vScale:i}=n,s=this.getParsed(e),o=s._custom,a=uc(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:a}}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,r,i){const s=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i);for(let d=n;d<n+r;d++){const g=this.getParsed(d),y=s||K(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),_=this._calculateBarIndexPixels(d,c),m=(g._stacks||{})[a.axis],p={horizontal:u,base:y.base,enableBorderRadius:!m||uc(g._custom)||o===m._top||o===m._bottom,x:u?y.head:_.center,y:u?_.center:y.head,height:u?_.size:Math.abs(y.size),width:u?Math.abs(y.size):_.size};h&&(p.options=f||this.resolveDataElementOptions(d,e[d].active?"active":i));const v=p.options||e[d].options;yL(p,v,m,o),_L(p,v,c.ratio),this.updateElement(e[d],d,p,i)}}_getStacks(e,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),s=r.options.stacked,o=[],a=l=>{const u=l.controller.getParsed(n),c=u&&u[l.vScale.axis];if(K(c)||isNaN(c))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((s===!1||o.indexOf(l.stack)===-1||s===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){const i=this._getStacks(e,r),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,i=[];let s,o;for(s=0,o=n.data.length;s<o;++s)i.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const a=e.barThickness;return{min:a||fL(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:s,minBarLength:o}}=this,a=s||0,l=this.getParsed(e),u=l._custom,c=uc(u);let f=l[n.axis],h=0,d=r?this.applyStack(n,l,r):f,g,y;d!==f&&(h=d-f,d=f),c&&(f=u.barStart,d=u.barEnd-u.barStart,f!==0&&qt(f)!==qt(u.barEnd)&&(h=0),h+=f);const _=!K(s)&&!c?s:h;let m=n.getPixelForValue(_);if(this.chart.getDataVisibility(e)?g=n.getPixelForValue(h+d):g=m,y=g-m,Math.abs(y)<o){y=gL(y,n,a)*o,f===a&&(m-=y/2);const p=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),x=Math.min(p,v),b=Math.max(p,v);m=Math.max(Math.min(m,b),x),g=m+y,r&&!c&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(g)-n.getValueForPixel(m))}if(m===n.getPixelForValue(a)){const p=qt(y)*n.getLineWidthForValue(a)/2;m+=p,y-=p}return{size:y,base:m,head:g,center:g+y/2}}_calculateBarIndexPixels(e,n){const r=n.scale,i=this.options,s=i.skipNull,o=W(i.maxBarThickness,1/0);let a,l;if(n.grouped){const u=s?this._getStackCount(e):n.stackCount,c=i.barThickness==="flex"?dL(e,n,i,u):hL(e,n,i,u),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);a=c.start+c.chunk*f+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else a=r.getPixelForValue(this.getParsed(e)[r.axis],e),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,r=e.data,i=r.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&r[s].draw(this._ctx)}}F(ws,"id","bar"),F(ws,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),F(ws,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ka extends $t{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,r,i){const s=super.parsePrimitiveData(e,n,r,i);for(let o=0;o<s.length;o++)s[o]._custom=this.resolveDataElementOptions(o+r).radius;return s}parseArrayData(e,n,r,i){const s=super.parseArrayData(e,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=W(a[2],this.resolveDataElementOptions(o+r).radius)}return s}parseObjectData(e,n,r,i){const s=super.parseObjectData(e,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=W(a&&a.r&&+a.r,this.resolveDataElementOptions(o+r).radius)}return s}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let r=e.length-1;r>=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(e),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y),u=o._custom;return{label:r[e]||"",value:"("+a+", "+l+(u?", "+u:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(n,i),c=o.axis,f=a.axis;for(let h=n;h<n+r;h++){const d=e[h],g=!s&&this.getParsed(h),y={},_=y[c]=s?o.getPixelForDecimal(.5):o.getPixelForValue(g[c]),m=y[f]=s?a.getBasePixel():a.getPixelForValue(g[f]);y.skip=isNaN(_)||isNaN(m),u&&(y.options=l||this.resolveDataElementOptions(h,d.active?"active":i),s&&(y.options.radius=0)),this.updateElement(d,h,y,i)}}resolveDataElementOptions(e,n){const r=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=W(r&&r._custom,s),i}}F(ka,"id","bubble"),F(ka,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),F(ka,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function xL(t,e,n){let r=1,i=1,s=0,o=0;if(e<le){const a=t,l=a+e,u=Math.cos(a),c=Math.sin(a),f=Math.cos(l),h=Math.sin(l),d=(v,x,b)=>Qs(v,a,l,!0)?1:Math.max(x,x*n,b,b*n),g=(v,x,b)=>Qs(v,a,l,!0)?-1:Math.min(x,x*n,b,b*n),y=d(0,u,f),_=d(_e,c,h),m=g(ue,u,f),p=g(ue+_e,c,h);r=(y-m)/2,i=(_-p)/2,s=-(y+m)/2,o=-(_+p)/2}return{ratioX:r,ratioY:i,offsetX:s,offsetY:o}}class Rn extends $t{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 r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let s=l=>+r[l];if(q(r[e])){const{key:l="value"}=this._parsing;s=u=>+qn(r[u],l)}let o,a;for(o=e,a=e+n;o<a;++o)i._parsed[o]=s(o)}}_getRotation(){return It(this.options.rotation-90)}_getCircumference(){return It(this.options.circumference)}_getRotationExtents(){let e=le,n=-le;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,s=i._getRotation(),o=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,s=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(AI(this.options.cutout,a),1),u=this._getRingWeight(this.index),{circumference:c,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:d,offsetX:g,offsetY:y}=xL(f,c,l),_=(r.width-o)/h,m=(r.height-o)/d,p=Math.max(Math.min(_,m)/2,0),v=_x(this.options.radius,p),x=Math.max(v*l,0),b=(v-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*v,this.offsetY=y*v,i.total=this.calculateTotal(),this.outerRadius=v-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*u,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const r=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*s/le)}updateElements(e,n,r,i){const s=i==="reset",o=this.chart,a=o.chartArea,u=o.options.animation,c=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=s&&u.animateScale,d=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:y,includeOptions:_}=this._getSharedOptions(n,i);let m=this._getRotation(),p;for(p=0;p<n;++p)m+=this._circumference(p,s);for(p=n;p<n+r;++p){const v=this._circumference(p,s),x=e[p],b={x:c+this.offsetX,y:f+this.offsetY,startAngle:m,endAngle:m+v,circumference:v,outerRadius:g,innerRadius:d};_&&(b.options=y||this.resolveDataElementOptions(p,x.active?"active":i)),m+=v,this.updateElement(x,p,b,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let r=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?le*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=co(n._parsed[e],r.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const r=this.chart;let i,s,o,a,l;if(!e){for(i=0,s=r.data.datasets.length;i<s;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),e=o.data,a=o.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,i=e.length;r<i;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(W(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}F(Rn,"id","doughnut"),F(Rn,"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"}),F(Rn,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),F(Rn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((s,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Ss extends $t{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=Px(n,i,o);this._drawStart=a,this._drawCount=l,Ox(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},e),this.updateElements(i,a,l,e)}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:f}=this._getSharedOptions(n,i),h=o.axis,d=a.axis,{spanGaps:g,segment:y}=this.options,_=Si(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||i==="none",p=n+r,v=e.length;let x=n>0&&this.getParsed(n-1);for(let b=0;b<v;++b){const M=e[b],C=m?M:{};if(b<n||b>=p){C.skip=!0;continue}const T=this.getParsed(b),$=K(T[d]),I=C[h]=o.getPixelForValue(T[h],b),L=C[d]=s||$?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[d],b);C.skip=isNaN(I)||isNaN(L)||$,C.stop=b>0&&Math.abs(T[h]-x[h])>_,y&&(C.parsed=T,C.raw=u.data[b]),f&&(C.options=c||this.resolveDataElementOptions(b,M.active?"active":i)),m||this.updateElement(M,b,C,i),x=T}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}F(Ss,"id","line"),F(Ss,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),F(Ss,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ks extends $t{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=co(n._parsed[e].r,r.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,r,i){return $x.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,r=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),o=Math.max(r.cutoutPercentage?s/100*r.cutoutPercentage:1,0),a=(s-o)/e.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,r,i){const s=i==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,f=u.yCenter,h=u.getIndexAngle(0)-.5*ue;let d=h,g;const y=360/this.countVisibleElements();for(g=0;g<n;++g)d+=this._computeAngle(g,i,y);for(g=n;g<n+r;g++){const _=e[g];let m=d,p=d+this._computeAngle(g,i,y),v=o.getDataVisibility(g)?u.getDistanceFromCenterForValue(this.getParsed(g).r):0;d=p,s&&(l.animateScale&&(v=0),l.animateRotate&&(m=p=h));const x={x:c,y:f,innerRadius:0,outerRadius:v,startAngle:m,endAngle:p,options:this.resolveDataElementOptions(g,_.active?"active":i)};this.updateElement(_,g,x,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?It(this.resolveDataElementOptions(e,n).angle||r):0}}F(ks,"id","polarArea"),F(ks,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),F(ks,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((s,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class hl extends Rn{}F(hl,"id","pie"),F(hl,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Ea extends $t{getLabelAndValue(e){const n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,i){return $x.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=e[a],u=this.resolveDataElementOptions(a,l.active?"active":i),c=s.getPointPositionForValue(a,this.getParsed(a).r),f=o?s.xCenter:c.x,h=o?s.yCenter:c.y,d={x:f,y:h,angle:c.angle,skip:isNaN(f)||isNaN(h),options:u};this.updateElement(l,a,d,i)}}}F(Ea,"id","radar"),F(Ea,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),F(Ea,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ma extends $t{getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(e),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y);return{label:r[e]||"",value:"("+a+", "+l+")"}}update(e){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:o}=Px(n,r,i);if(this._drawStart=s,this._drawCount=o,Ox(n)&&(s=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=r;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,s,o,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(c),h=this.includeOptions(i,f),d=o.axis,g=a.axis,{spanGaps:y,segment:_}=this.options,m=Si(y)?y:Number.POSITIVE_INFINITY,p=this.chart._animationsDisabled||s||i==="none";let v=n>0&&this.getParsed(n-1);for(let x=n;x<n+r;++x){const b=e[x],M=this.getParsed(x),C=p?b:{},T=K(M[g]),$=C[d]=o.getPixelForValue(M[d],x),I=C[g]=s||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[g],x);C.skip=isNaN($)||isNaN(I)||T,C.stop=x>0&&Math.abs(M[d]-v[d])>m,_&&(C.parsed=M,C.raw=u.data[x]),h&&(C.options=f||this.resolveDataElementOptions(x,b.active?"active":i)),p||this.updateElement(b,x,C,i),v=M}this.updateSharedOptions(f,i,c)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=e.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}}F(Ma,"id","scatter"),F(Ma,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),F(Ma,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var bL=Object.freeze({__proto__:null,BarController:ws,BubbleController:ka,DoughnutController:Rn,LineController:Ss,PieController:hl,PolarAreaController:ks,RadarController:Ea,ScatterController:Ma});function ir(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Nd{constructor(e){F(this,"options");this.options=e||{}}static override(e){Object.assign(Nd.prototype,e)}init(){}formats(){return ir()}parse(){return ir()}format(){return ir()}add(){return ir()}diff(){return ir()}startOf(){return ir()}endOf(){return ir()}}var wL={_date:Nd};function SL(t,e,n,r){const{controller:i,data:s,_sorted:o}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&o&&s.length){const l=a._reversePixels?YI:ln;if(r){if(i._sharedOptions){const u=s[0],c=typeof u.getRange=="function"&&u.getRange(e);if(c){const f=l(s,e,n-c),h=l(s,e,n+c);return{lo:f.lo,hi:h.hi}}}}else return l(s,e,n)}return{lo:0,hi:s.length-1}}function fo(t,e,n,r,i){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:f,hi:h}=SL(s[a],e,o,i);for(let d=f;d<=h;++d){const g=c[d];g.skip||r(g,u,d)}}}function kL(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){const s=e?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function cc(t,e,n,r,i){const s=[];return!i&&!t.isPointInArea(e)||fo(t,n,e,function(a,l,u){!i&&!un(a,t.chartArea,0)||a.inRange(e.x,e.y,r)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function EL(t,e,n,r){let i=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:f}=wx(o,{x:e.x,y:e.y});Qs(f,u,c)&&i.push({element:o,datasetIndex:a,index:l})}return fo(t,n,e,s),i}function ML(t,e,n,r,i,s){let o=[];const a=kL(n);let l=Number.POSITIVE_INFINITY;function u(c,f,h){const d=c.inRange(e.x,e.y,i);if(r&&!d)return;const g=c.getCenterPoint(i);if(!(!!s||t.isPointInArea(g))&&!d)return;const _=a(e,g);_<l?(o=[{element:c,datasetIndex:f,index:h}],l=_):_===l&&o.push({element:c,datasetIndex:f,index:h})}return fo(t,n,e,u),o}function fc(t,e,n,r,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!r?EL(t,e,n,i):ML(t,e,n,r,i,s)}function fy(t,e,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return fo(t,n,e,(l,u,c)=>{l[o](e[n],i)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(e.x,e.y,i))}),r&&!a?[]:s}var PL={evaluateInteractionItems:fo,modes:{index(t,e,n,r){const i=cr(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?cc(t,i,s,r,o):fc(t,i,s,!1,r,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,f=u.data[c];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,n,r){const i=cr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?cc(t,i,s,r,o):fc(t,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=t.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(t,e,n,r){const i=cr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return cc(t,i,s,r,o)},nearest(t,e,n,r){const i=cr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return fc(t,i,s,n.intersect,r,o)},x(t,e,n,r){const i=cr(e,t);return fy(t,i,"x",n.intersect,r)},y(t,e,n,r){const i=cr(e,t);return fy(t,i,"y",n.intersect,r)}}};const Yx=["left","top","right","bottom"];function qi(t,e){return t.filter(n=>n.pos===e)}function hy(t,e){return t.filter(n=>Yx.indexOf(n.pos)===-1&&n.box.axis===e)}function Qi(t,e){return t.sort((n,r)=>{const i=e?r:n,s=e?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function OL(t){const e=[];let n,r,i,s,o,a;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return e}function CL(t){const e={};for(const n of t){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!Yx.includes(i))continue;const o=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}function TL(t,e){const n=CL(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let s,o,a;for(s=0,o=t.length;s<o;++s){a=t[s];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&e.availableWidth,a.height=i):(a.width=r,a.height=c?c*i:l&&e.availableHeight)}return n}function DL(t){const e=OL(t),n=Qi(e.filter(u=>u.box.fullSize),!0),r=Qi(qi(e,"left"),!0),i=Qi(qi(e,"right")),s=Qi(qi(e,"top"),!0),o=Qi(qi(e,"bottom")),a=hy(e,"x"),l=hy(e,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:qi(e,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function dy(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function qx(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 RL(t,e,n,r){const{pos:i,box:s}=n,o=t.maxPadding;if(!q(i)){n.size&&(t[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&qx(o,s.getPadding());const a=Math.max(0,e.outerWidth-dy(o,t,"left","right")),l=Math.max(0,e.outerHeight-dy(o,t,"top","bottom")),u=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function IL(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function AL(t,e){const n=e.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(e[o],n[o])}),s}return r(t?["left","right"]:["top","bottom"])}function rs(t,e,n,r){const i=[];let s,o,a,l,u,c;for(s=0,o=t.length,u=0;s<o;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,AL(a.horizontal,e));const{same:f,other:h}=RL(e,n,a,r);u|=f&&i.length,c=c||h,l.fullSize||i.push(a)}return u&&rs(i,e,n,r)||c}function Ko(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function py(t,e,n,r){const i=n.padding;let{x:s,y:o}=e;for(const a of t){const l=a.box,u=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const f=e.w*c,h=u.size||l.height;qs(u.start)&&(o=u.start),l.fullSize?Ko(l,i.left,o,n.outerWidth-i.right-i.left,h):Ko(l,e.left+u.placed,o,f,h),u.start=o,u.placed+=f,o=l.bottom}else{const f=e.h*c,h=u.size||l.width;qs(u.start)&&(s=u.start),l.fullSize?Ko(l,s,i.top,h,n.outerHeight-i.bottom-i.top):Ko(l,s,e.top+u.placed,h,f),u.start=s,u.placed+=f,s=l.right}}e.x=s,e.y=o}var je={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,r){if(!t)return;const i=Ve(t.options.layout.padding),s=Math.max(e-i.width,0),o=Math.max(n-i.height,0),a=DL(t.boxes),l=a.vertical,u=a.horizontal;X(t.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const c=l.reduce((y,_)=>_.box.options&&_.box.options.display===!1?y:y+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),h=Object.assign({},i);qx(h,Ve(r));const d=Object.assign({maxPadding:h,w:s,h:o,x:i.left,y:i.top},i),g=TL(l.concat(u),f);rs(a.fullSize,d,f,g),rs(l,d,f,g),rs(u,d,f,g)&&rs(l,d,f,g),IL(d),py(a.leftAndTop,d,f,g),d.x+=d.w,d.y+=d.h,py(a.rightAndBottom,d,f,g),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},X(a.chartArea,y=>{const _=y.box;Object.assign(_,t.chartArea),_.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class Qx{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class LL extends Qx{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Pa="$chartjs",$L={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},gy=t=>t===null||t==="";function NL(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[Pa]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",gy(i)){const s=Xm(t,"width");s!==void 0&&(t.width=s)}if(gy(r))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Xm(t,"height");s!==void 0&&(t.height=s)}return t}const Gx=zA?{passive:!0}:!1;function FL(t,e,n){t&&t.addEventListener(e,n,Gx)}function zL(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Gx)}function jL(t,e){const n=$L[t.type]||t.type,{x:r,y:i}=cr(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function dl(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function BL(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||dl(a.addedNodes,r),o=o&&!dl(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function VL(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||dl(a.removedNodes,r),o=o&&!dl(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ks=new Map;let my=0;function Kx(){const t=window.devicePixelRatio;t!==my&&(my=t,Ks.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function UL(t,e){Ks.size||window.addEventListener("resize",Kx),Ks.set(t,e)}function WL(t){Ks.delete(t),Ks.size||window.removeEventListener("resize",Kx)}function HL(t,e,n){const r=t.canvas,i=r&&$d(r);if(!i)return;const s=Mx((a,l)=>{const u=i.clientWidth;n(a,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(i),UL(t,s),o}function hc(t,e,n){n&&n.disconnect(),e==="resize"&&WL(t)}function YL(t,e,n){const r=t.canvas,i=Mx(s=>{t.ctx!==null&&n(jL(s,t))},t);return FL(r,e,i),i}class qL extends Qx{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(NL(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[Pa])return!1;const r=n[Pa].initial;["height","width"].forEach(s=>{const o=r[s];K(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Pa],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:BL,detach:VL,resize:HL}[n]||YL;i[n]=o(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;({attach:hc,detach:hc,resize:hc}[n]||zL)(e,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return FA(e,n,r,i)}isAttached(e){const n=$d(e);return!!(n&&n.isConnected)}}function QL(t){return!Ld()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?LL:qL}class Ft{constructor(){F(this,"x");F(this,"y");F(this,"active",!1);F(this,"options");F(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return Si(this.x)&&Si(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const i={};return e.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}}F(Ft,"defaults",{}),F(Ft,"defaultRoutes");function GL(t,e){const n=t.options.ticks,r=KL(t),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?JL(e):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>i)return ZL(e,u,s,o/i),u;const c=XL(s,e,i);if(o>0){let f,h;const d=o>1?Math.round((l-a)/(o-1)):null;for(Xo(e,u,c,K(d)?0:a-d,a),f=0,h=o-1;f<h;f++)Xo(e,u,c,s[f],s[f+1]);return Xo(e,u,c,l,K(d)?e.length:l+d),u}return Xo(e,u,c),u}function KL(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function XL(t,e,n){const r=e$(t),i=e.length/n;if(!r)return Math.max(i,1);const s=VI(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function JL(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function ZL(t,e,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<t.length;o++)o===s&&(e.push(t[o]),i++,s=n[i*r])}function Xo(t,e,n,r,i){const s=W(r,0),o=Math.min(W(i,t.length),t.length);let a=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=s;c<0;)a++,c=Math.round(s+a*n);for(u=Math.max(s,0);u<o;u++)u===c&&(e.push(t[u]),a++,c=Math.round(s+a*n))}function e$(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const t$=t=>t==="left"?"right":t==="right"?"left":t,yy=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,vy=(t,e)=>Math.min(e||t,t);function _y(t,e){const n=[],r=t.length/e,i=t.length;let s=0;for(;s<i;s+=r)n.push(t[Math.floor(s)]);return n}function n$(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),s=t._startPixel,o=t._endPixel,a=1e-6;let l=t.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-s,o-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(i-1))/2,l+=i<e?u:-u,l<s-a||l>o+a)))return l}function r$(t,e){X(t,n=>{const r=n.gc,i=r.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function Gi(t){return t.drawTicks?t.tickLength:0}function xy(t,e){if(!t.display)return 0;const n=Ee(t.font,e),r=Ve(t.padding);return(oe(t.text)?t.text.length:1)*n.lineHeight+r.height}function i$(t,e){return er(t,{scale:e,type:"scale"})}function s$(t,e,n){return er(t,{tick:n,index:e,type:"tick"})}function o$(t,e,n){let r=Cd(t);return(n&&e!=="right"||!n&&e==="right")&&(r=t$(r)),r}function a$(t,e,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=t,{chartArea:u,scales:c}=l;let f=0,h,d,g;const y=o-i,_=a-s;if(t.isHorizontal()){if(d=Fe(r,s,a),q(n)){const m=Object.keys(n)[0],p=n[m];g=c[m].getPixelForValue(p)+y-e}else n==="center"?g=(u.bottom+u.top)/2+y-e:g=yy(t,n,e);h=a-s}else{if(q(n)){const m=Object.keys(n)[0],p=n[m];d=c[m].getPixelForValue(p)-_+e}else n==="center"?d=(u.left+u.right)/2-_+e:d=yy(t,n,e);g=Fe(r,o,i),f=n==="left"?-_e:_e}return{titleX:d,titleY:g,maxWidth:h,rotation:f}}class Rr extends Ft{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:r,_suggestedMax:i}=this;return e=it(e,Number.POSITIVE_INFINITY),n=it(n,Number.NEGATIVE_INFINITY),r=it(r,Number.POSITIVE_INFINITY),i=it(i,Number.NEGATIVE_INFINITY),{min:it(e,r),max:it(n,i),minDefined:me(e),maxDefined:me(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:it(n,it(r,n)),max:it(r,it(n,r))}}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(){te(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=mA(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?_y(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=GL(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){te(this.options.afterUpdate,[this])}beforeSetDimensions(){te(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(){te(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),te(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){te(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r],s.label=te(n.callback,[s.value,r,e],this)}afterTickToLabelConversion(){te(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){te(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=vy(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),f=c.widest.width,h=c.highest.height,d=Oe(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/r:d/(r-1),f+6>a&&(a=d/(r-(e.offset?.5:1)),l=this.maxHeight-Gi(e.grid)-n.padding-xy(e.title,this.chart.options.font),u=Math.sqrt(f*f+h*h),o=Pd(Math.min(Math.asin(Oe((c.highest.height+6)/a,-1,1)),Math.asin(Oe(l/u,-1,1))-Math.asin(Oe(h/u,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){te(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){te(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=xy(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Gi(s)+l):(e.height=this.maxHeight,e.width=Gi(s)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:f,highest:h}=this._getLabelSizes(),d=r.padding*2,g=It(this.labelRotation),y=Math.cos(g),_=Math.sin(g);if(a){const m=r.mirror?0:_*f.width+y*h.height;e.height=Math.min(this.maxHeight,e.height+m+d)}else{const m=r.mirror?0:y*f.width+_*h.height;e.width=Math.min(this.maxWidth,e.width+m+d)}this._calculatePadding(u,c,_,y)}}this._handleMargins(),a?(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,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;l?u?(h=i*e.width,d=r*n.height):(h=r*e.height,d=i*n.width):s==="start"?d=n.width:s==="end"?h=e.width:s!=="inner"&&(h=e.width/2,d=n.width/2),this.paddingLeft=Math.max((h-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((d-f+o)*this.width/(this.width-f),0)}else{let c=n.height/2,f=e.height/2;s==="start"?(c=0,f=e.height):s==="end"&&(c=n.height,f=0),this.paddingTop=c+o,this.paddingBottom=f+o}}_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(){te(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,r;for(n=0,r=e.length;n<r;n++)K(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=_y(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/vy(n,r));let u=0,c=0,f,h,d,g,y,_,m,p,v,x,b;for(f=0;f<n;f+=l){if(g=e[f].label,y=this._resolveTickFontOptions(f),i.font=_=y.string,m=s[_]=s[_]||{data:{},gc:[]},p=y.lineHeight,v=x=0,!K(g)&&!oe(g))v=cl(i,m.data,m.gc,v,g),x=p;else if(oe(g))for(h=0,d=g.length;h<d;++h)b=g[h],!K(b)&&!oe(b)&&(v=cl(i,m.data,m.gc,v,b),x+=p);o.push(v),a.push(x),u=Math.max(v,u),c=Math.max(x,c)}r$(s,n);const M=o.indexOf(u),C=a.indexOf(c),T=$=>({width:o[$]||0,height:a[$]||0});return{first:T(0),last:T(n-1),widest:T(M),highest:T(C),widths:o,heights:a}}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 HI(this._alignToPixels?rr(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 r=n[e];return r.$context||(r.$context=s$(this.getContext(),e,r))}return this.$context||(this.$context=i$(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=It(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=e.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,u=this.isHorizontal(),f=this.ticks.length+(l?1:0),h=Gi(s),d=[],g=a.setContext(this.getContext()),y=g.display?g.width:0,_=y/2,m=function(D){return rr(r,D,y)};let p,v,x,b,M,C,T,$,I,L,V,Y;if(o==="top")p=m(this.bottom),C=this.bottom-h,$=p-_,L=m(e.top)+_,Y=e.bottom;else if(o==="bottom")p=m(this.top),L=e.top,Y=m(e.bottom)-_,C=p+_,$=this.top+h;else if(o==="left")p=m(this.right),M=this.right-h,T=p-_,I=m(e.left)+_,V=e.right;else if(o==="right")p=m(this.left),I=e.left,V=m(e.right)-_,M=p+_,T=this.left+h;else if(n==="x"){if(o==="center")p=m((e.top+e.bottom)/2+.5);else if(q(o)){const D=Object.keys(o)[0],O=o[D];p=m(this.chart.scales[D].getPixelForValue(O))}L=e.top,Y=e.bottom,C=p+_,$=C+h}else if(n==="y"){if(o==="center")p=m((e.left+e.right)/2);else if(q(o)){const D=Object.keys(o)[0],O=o[D];p=m(this.chart.scales[D].getPixelForValue(O))}M=p-_,T=M-h,I=e.left,V=e.right}const k=W(i.ticks.maxTicksLimit,f),P=Math.max(1,Math.ceil(f/k));for(v=0;v<f;v+=P){const D=this.getContext(v),O=s.setContext(D),E=a.setContext(D),w=O.lineWidth,S=O.color,R=E.dash||[],A=E.dashOffset,j=O.tickWidth,z=O.tickColor,U=O.tickBorderDash||[],H=O.tickBorderDashOffset;x=n$(this,v,l),x!==void 0&&(b=rr(r,x,w),u?M=T=I=V=b:C=$=L=Y=b,d.push({tx1:M,ty1:C,tx2:T,ty2:$,x1:I,y1:L,x2:V,y2:Y,width:w,color:S,borderDash:R,borderDashOffset:A,tickWidth:j,tickColor:z,tickBorderDash:U,tickBorderDashOffset:H}))}return this._ticksLength=f,this._borderValue=p,d}_computeLabelItems(e){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:f}=s,h=Gi(r.grid),d=h+c,g=f?-c:d,y=-It(this.labelRotation),_=[];let m,p,v,x,b,M,C,T,$,I,L,V,Y="middle";if(i==="top")M=this.bottom-g,C=this._getXAxisLabelAlignment();else if(i==="bottom")M=this.top+g,C=this._getXAxisLabelAlignment();else if(i==="left"){const P=this._getYAxisLabelAlignment(h);C=P.textAlign,b=P.x}else if(i==="right"){const P=this._getYAxisLabelAlignment(h);C=P.textAlign,b=P.x}else if(n==="x"){if(i==="center")M=(e.top+e.bottom)/2+d;else if(q(i)){const P=Object.keys(i)[0],D=i[P];M=this.chart.scales[P].getPixelForValue(D)+d}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")b=(e.left+e.right)/2-d;else if(q(i)){const P=Object.keys(i)[0],D=i[P];b=this.chart.scales[P].getPixelForValue(D)}C=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?Y="top":l==="end"&&(Y="bottom"));const k=this._getLabelSizes();for(m=0,p=a.length;m<p;++m){v=a[m],x=v.label;const P=s.setContext(this.getContext(m));T=this.getPixelForTick(m)+s.labelOffset,$=this._resolveTickFontOptions(m),I=$.lineHeight,L=oe(x)?x.length:1;const D=L/2,O=P.color,E=P.textStrokeColor,w=P.textStrokeWidth;let S=C;o?(b=T,C==="inner"&&(m===p-1?S=this.options.reverse?"left":"right":m===0?S=this.options.reverse?"right":"left":S="center"),i==="top"?u==="near"||y!==0?V=-L*I+I/2:u==="center"?V=-k.highest.height/2-D*I+I:V=-k.highest.height+I/2:u==="near"||y!==0?V=I/2:u==="center"?V=k.highest.height/2-D*I:V=k.highest.height-L*I,f&&(V*=-1),y!==0&&!P.showLabelBackdrop&&(b+=I/2*Math.sin(y))):(M=T,V=(1-L)*I/2);let R;if(P.showLabelBackdrop){const A=Ve(P.backdropPadding),j=k.heights[m],z=k.widths[m];let U=V-A.top,H=0-A.left;switch(Y){case"middle":U-=j/2;break;case"bottom":U-=j;break}switch(C){case"center":H-=z/2;break;case"right":H-=z;break;case"inner":m===p-1?H-=z:m>0&&(H-=z/2);break}R={left:H,top:U,width:z+A.width,height:j+A.height,color:P.backdropColor}}_.push({label:x,font:$,textOffset:V,options:{rotation:y,color:O,strokeColor:E,strokeWidth:w,textAlign:S,textBaseline:Y,translation:[b,M],backdrop:R}})}return _}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-It(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=e+s,l=o.widest.width;let u,c;return n==="left"?i?(c=this.right+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_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:r,top:i,width:s,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,s,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,f,h;this.isHorizontal()?(u=rr(e,this.left,o)-o/2,c=rr(e,this.right,a)+a/2,f=h=l):(f=rr(e,this.top,o)-o/2,h=rr(e,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,f),n.lineTo(c,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Hl(r,i);const s=this.getLabelItems(e);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;Pr(r,u,0,c,l,a)}i&&Yl(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=Ee(r.font),o=Ve(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||q(n)?(l+=o.bottom,oe(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:f,rotation:h}=a$(this,l,n,a);Pr(e,r.text,0,0,s,{color:r.color,maxWidth:f,rotation:h,textAlign:o$(a,n,i),textBaseline:"middle",translation:[u,c]})}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,r=W(e.grid&&e.grid.z,-1),i=W(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Rr.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Ee(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Jo{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,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 r;c$(n)&&(r=this.register(n));const i=this.items,s=e.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,l$(e,o,r),this.override&&ye.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in ye[i]&&(delete ye[i][r],this.override&&delete Mr[r])}}function l$(t,e,n){const r=Ys(Object.create(null),[n?ye.get(n):{},ye.get(e),t.defaults]);ye.set(e,r),t.defaultRoutes&&u$(e,t.defaultRoutes),t.descriptors&&ye.describe(e,t.descriptors)}function u$(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),s=[t].concat(r).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");ye.route(s,i,l,a)})}function c$(t){return"id"in t&&"defaults"in t}class f${constructor(){this.controllers=new Jo($t,"datasets",!0),this.elements=new Jo(Ft,"elements"),this.plugins=new Jo(Object,"plugins"),this.scales=new Jo(Rr,"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,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):X(i,o=>{const a=r||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,r){const i=Md(e);te(r["before"+i],[],r),n[e](r),te(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}}var Ut=new f$;class h${constructor(){this._init=[]}notify(e,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(s,e,n,r);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,r,i){i=i||{};for(const s of e){const o=s.plugin,a=o[r],l=[n,i,s.options];if(te(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){K(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 r=e&&e.config,i=W(r.options&&r.options.plugins,{}),s=d$(r);return i===!1&&!n?[]:g$(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function d$(t){const e={},n=[],r=Object.keys(Ut.plugins.items);for(let s=0;s<r.length;s++)n.push(Ut.getPlugin(r[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function p$(t,e){return!e&&t===!1?null:t===!0?{}:t}function g$(t,{plugins:e,localIds:n},r,i){const s=[],o=t.getContext();for(const a of e){const l=a.id,u=p$(r[l],i);u!==null&&s.push({plugin:a,options:m$(t.config,{plugin:a,local:n[l]},u,o)})}return s}function m$(t,{plugin:e,local:n},r,i){const s=t.pluginScopeKeys(e),o=t.getOptionScopes(r,s);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function zf(t,e){const n=ye.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function y$(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function v$(t,e){return t===e?"_index_":"_value_"}function by(t){if(t==="x"||t==="y"||t==="r")return t}function _$(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function jf(t,...e){if(by(t))return t;for(const n of e){const r=n.axis||_$(n.position)||t.length>1&&by(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function wy(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function x$(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return wy(t,"x",n[0])||wy(t,"y",n[0])}return{}}function b$(t,e){const n=Mr[t.type]||{scales:{}},r=e.scales||{},i=zf(t.type,e),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!q(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=jf(o,a,x$(o,t),ye.scales[a.type]),u=v$(l,i),c=n.scales||{};s[o]=vs(Object.create(null),[{axis:l},a,c[l],c[u]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||zf(a,e),c=(Mr[a]||{}).scales||{};Object.keys(c).forEach(f=>{const h=y$(f,l),d=o[h+"AxisID"]||h;s[d]=s[d]||Object.create(null),vs(s[d],[{axis:h},r[d],c[f]])})}),Object.keys(s).forEach(o=>{const a=s[o];vs(a,[ye.scales[a.type],ye.scale])}),s}function Xx(t){const e=t.options||(t.options={});e.plugins=W(e.plugins,{}),e.scales=b$(t,e)}function Jx(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function w$(t){return t=t||{},t.data=Jx(t.data),Xx(t),t}const Sy=new Map,Zx=new Set;function Zo(t,e){let n=Sy.get(t);return n||(n=e(),Sy.set(t,n),Zx.add(n)),n}const Ki=(t,e,n)=>{const r=qn(e,n);r!==void 0&&t.add(r)};class S${constructor(e){this._config=w$(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=Jx(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(),Xx(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Zo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Zo(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Zo(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Zo(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:s}=this,o=this._cachedScopes(e,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{e&&(l.add(e),c.forEach(f=>Ki(l,e,f))),c.forEach(f=>Ki(l,i,f)),c.forEach(f=>Ki(l,Mr[s]||{},f)),c.forEach(f=>Ki(l,ye,f)),c.forEach(f=>Ki(l,Nf,f))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Zx.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Mr[n]||{},ye.datasets[n]||{},{type:n},ye,Nf]}resolveNamedOptions(e,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=ky(this._resolverCache,e,i);let l=o;if(E$(o,n)){s.$shared=!1,r=Qn(r)?r():r;const u=this.createResolver(e,r,a);l=ki(o,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,r=[""],i){const{resolver:s}=ky(this._resolverCache,e,r);return q(n)?ki(s,n,void 0,i):s}}function ky(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let s=r.get(i);return s||(s={resolver:Rd(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const k$=t=>q(t)&&Object.getOwnPropertyNames(t).some(e=>Qn(t[e]));function E$(t,e){const{isScriptable:n,isIndexable:r}=Rx(t);for(const i of e){const s=n(i),o=r(i),a=(o||s)&&t[i];if(s&&(Qn(a)||k$(a))||o&&oe(a))return!0}return!1}var M$="4.4.2";const P$=["top","bottom","left","right","chartArea"];function Ey(t,e){return t==="top"||t==="bottom"||P$.indexOf(t)===-1&&e==="x"}function My(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function Py(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),te(n&&n.onComplete,[t],e)}function O$(t){const e=t.chart,n=e.options.animation;te(n&&n.onProgress,[t],e)}function eb(t){return Ld()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Oa={},Oy=t=>{const e=eb(t);return Object.values(Oa).filter(n=>n.canvas===e).pop()};function C$(t,e,n){const r=Object.keys(t);for(const i of r){const s=+i;if(s>=e){const o=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=o)}}}function T$(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function ea(t,e,n){return t.options.clip?t[n]:e[n]}function D$(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:ea(n,e,"left"),right:ea(n,e,"right"),top:ea(r,e,"top"),bottom:ea(r,e,"bottom")}:e}var wn;let Ql=(wn=class{static register(...e){Ut.add(...e),Cy()}static unregister(...e){Ut.remove(...e),Cy()}constructor(e,n){const r=this.config=new S$(n),i=eb(e),s=Oy(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||QL(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=II(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,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 h$,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=GI(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],Oa[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Jt.listen(this,"complete",Py),Jt.listen(this,"progress",O$),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return K(e)?n&&s?s:i?r/i: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 Ut}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Km(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qm(this.canvas,this.ctx),this}stop(){return Jt.stop(this),this}resize(e,n){Jt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Km(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),te(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};X(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=jf(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),X(s,o=>{const a=o.options,l=a.id,u=jf(l,a),c=W(a.type,o.dtype);(a.position===void 0||Ey(a.position,u)!==Ey(o.dposition))&&(a.position=o.dposition),i[l]=!0;let f=null;if(l in r&&r[l].type===c)f=r[l];else{const h=Ut.getScale(c);f=new h({id:l,type:c,ctx:this.ctx,chart:this}),r[f.id]=f}f.init(a,e)}),X(i,(o,a)=>{o||delete r[a]}),X(r,o=>{je.configure(this,o,o.options),je.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(My("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||zf(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Ut.getController(a),{datasetElementType:u,dataElementType:c}=ye.datasets[a];Object.assign(l,{dataElementType:Ut.getElement(c),datasetElementType:u&&Ut.getElement(u)}),o.controller=new l(this,r),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){X(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 r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:f}=this.getDatasetMeta(u),h=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(h),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||X(s,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(My("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){X(this.scales,e=>{je.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!Fm(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;C$(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(e.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!Fm(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;je.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],X(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Qn(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Jt.has(this)?this.attached&&!Jt.running(this)&&Jt.start(this):(this.draw(),Py({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}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,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!e||o.visible)&&r.push(o)}return r}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,r=e._clip,i=!r.disabled,s=D$(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Hl(n,{left:r.left===!1?0:s.left-r.left,right:r.right===!1?this.width:s.right+r.right,top:r.top===!1?0:s.top-r.top,bottom:r.bottom===!1?this.height:s.bottom+r.bottom}),e.controller.draw(),i&&Yl(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return un(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){const s=PL.modes[n];return typeof s=="function"?s(this,e,r,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={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},r.push(i)),i}getContext(){return this.$context||(this.$context=er(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,i);qs(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===e?i: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(),Jt.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(),qm(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Oa[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,r=(s,o)=>{n.addEventListener(this,s,o),e[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};X(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},i=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){X(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},X(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){o=e[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!al(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const i=this.options.hover,s=(l,u)=>l.filter(c=>!u.some(f=>c.datasetIndex===f.datasetIndex&&c.index===f.index)),o=s(n,e),a=r?e:s(e,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(e,i,r,o),l=zI(e),u=T$(e,this._lastEvent,r,l);r&&(this._lastEvent=null,te(s.onHover,[e,a,this],this),l&&te(s.onClick,[e,a,this],this));const c=!al(a,i);return(c||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=u,c}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}},F(wn,"defaults",ye),F(wn,"instances",Oa),F(wn,"overrides",Mr),F(wn,"registry",Ut),F(wn,"version",M$),F(wn,"getChart",Oy),wn);function Cy(){return X(Ql.instances,t=>t._plugins.invalidate())}function R$(t,e,n){const{startAngle:r,pixelMargin:i,x:s,y:o,outerRadius:a,innerRadius:l}=e;let u=i/a;t.beginPath(),t.arc(s,o,a,r-u,n+u),l>i?(u=i/l,t.arc(s,o,l,n+u,r-u,!0)):t.arc(s,o,i,n+_e,r-_e),t.closePath(),t.clip()}function I$(t){return Dd(t,["outerStart","outerEnd","innerStart","innerEnd"])}function A$(t,e,n,r){const i=I$(t.options.borderRadius),s=(n-e)/2,o=Math.min(s,r*e/2),a=l=>{const u=(n-Math.min(s,l))*r/2;return Oe(l,0,Math.min(s,u))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Oe(i.innerStart,0,o),innerEnd:Oe(i.innerEnd,0,o)}}function Nr(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function pl(t,e,n,r,i,s){const{x:o,y:a,startAngle:l,pixelMargin:u,innerRadius:c}=e,f=Math.max(e.outerRadius+r+n-u,0),h=c>0?c+r+n+u:0;let d=0;const g=i-l;if(r){const P=c>0?c-r:0,D=f>0?f-r:0,O=(P+D)/2,E=O!==0?g*O/(O+r):g;d=(g-E)/2}const y=Math.max(.001,g*f-n/ue)/f,_=(g-y)/2,m=l+_+d,p=i-_-d,{outerStart:v,outerEnd:x,innerStart:b,innerEnd:M}=A$(e,h,f,p-m),C=f-v,T=f-x,$=m+v/C,I=p-x/T,L=h+b,V=h+M,Y=m+b/L,k=p-M/V;if(t.beginPath(),s){const P=($+I)/2;if(t.arc(o,a,f,$,P),t.arc(o,a,f,P,I),x>0){const w=Nr(T,I,o,a);t.arc(w.x,w.y,x,I,p+_e)}const D=Nr(V,p,o,a);if(t.lineTo(D.x,D.y),M>0){const w=Nr(V,k,o,a);t.arc(w.x,w.y,M,p+_e,k+Math.PI)}const O=(p-M/h+(m+b/h))/2;if(t.arc(o,a,h,p-M/h,O,!0),t.arc(o,a,h,O,m+b/h,!0),b>0){const w=Nr(L,Y,o,a);t.arc(w.x,w.y,b,Y+Math.PI,m-_e)}const E=Nr(C,m,o,a);if(t.lineTo(E.x,E.y),v>0){const w=Nr(C,$,o,a);t.arc(w.x,w.y,v,m-_e,$)}}else{t.moveTo(o,a);const P=Math.cos($)*f+o,D=Math.sin($)*f+a;t.lineTo(P,D);const O=Math.cos(I)*f+o,E=Math.sin(I)*f+a;t.lineTo(O,E)}t.closePath()}function L$(t,e,n,r,i){const{fullCircles:s,startAngle:o,circumference:a}=e;let l=e.endAngle;if(s){pl(t,e,n,r,l,i);for(let u=0;u<s;++u)t.fill();isNaN(a)||(l=o+(a%le||le))}return pl(t,e,n,r,l,i),t.fill(),l}function $$(t,e,n,r,i){const{fullCircles:s,startAngle:o,circumference:a,options:l}=e,{borderWidth:u,borderJoinStyle:c,borderDash:f,borderDashOffset:h}=l,d=l.borderAlign==="inner";if(!u)return;t.setLineDash(f||[]),t.lineDashOffset=h,d?(t.lineWidth=u*2,t.lineJoin=c||"round"):(t.lineWidth=u,t.lineJoin=c||"bevel");let g=e.endAngle;if(s){pl(t,e,n,r,g,i);for(let y=0;y<s;++y)t.stroke();isNaN(a)||(g=o+(a%le||le))}d&&R$(t,e,g),s||(pl(t,e,n,r,g,i),t.stroke())}class is extends Ft{constructor(n){super();F(this,"circumference");F(this,"endAngle");F(this,"fullCircles");F(this,"innerRadius");F(this,"outerRadius");F(this,"pixelMargin");F(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,r,i){const s=this.getProps(["x","y"],i),{angle:o,distance:a}=wx(s,{x:n,y:r}),{startAngle:l,endAngle:u,innerRadius:c,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,y=W(h,u-l)>=le||Qs(o,l,u),_=an(a,c+d,f+d);return y&&_}getCenterPoint(n){const{x:r,y:i,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:c}=this.options,f=(s+o)/2,h=(a+l+c+u)/2;return{x:r+Math.cos(f)*h,y:i+Math.sin(f)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,s=(r.offset||0)/4,o=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>le?Math.floor(i/le):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const u=1-Math.sin(Math.min(ue,i||0)),c=s*u;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,L$(n,this,c,o,a),$$(n,this,c,o,a),n.restore()}}F(is,"id","arc"),F(is,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),F(is,"defaultRoutes",{backgroundColor:"backgroundColor"}),F(is,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function tb(t,e,n=e){t.lineCap=W(n.borderCapStyle,e.borderCapStyle),t.setLineDash(W(n.borderDash,e.borderDash)),t.lineDashOffset=W(n.borderDashOffset,e.borderDashOffset),t.lineJoin=W(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=W(n.borderWidth,e.borderWidth),t.strokeStyle=W(n.borderColor,e.borderColor)}function N$(t,e,n){t.lineTo(n.x,n.y)}function F$(t){return t.stepped?aA:t.tension||t.cubicInterpolationMode==="monotone"?lA:N$}function nb(t,e,n={}){const r=t.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=e,l=Math.max(i,o),u=Math.min(s,a),c=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:e.loop,ilen:u<l&&!c?r+u-l:u-l}}function z$(t,e,n,r){const{points:i,options:s}=e,{count:o,start:a,loop:l,ilen:u}=nb(i,n,r),c=F$(s);let{move:f=!0,reverse:h}=r||{},d,g,y;for(d=0;d<=u;++d)g=i[(a+(h?u-d:d))%o],!g.skip&&(f?(t.moveTo(g.x,g.y),f=!1):c(t,y,g,h,s.stepped),y=g);return l&&(g=i[(a+(h?u:0))%o],c(t,y,g,h,s.stepped)),!!l}function j$(t,e,n,r){const i=e.points,{count:s,start:o,ilen:a}=nb(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,f=0,h,d,g,y,_,m;const p=x=>(o+(u?a-x:x))%s,v=()=>{y!==_&&(t.lineTo(c,_),t.lineTo(c,y),t.lineTo(c,m))};for(l&&(d=i[p(0)],t.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=i[p(h)],d.skip)continue;const x=d.x,b=d.y,M=x|0;M===g?(b<y?y=b:b>_&&(_=b),c=(f*c+x)/++f):(v(),t.lineTo(x,b),g=M,f=0,y=_=b),m=b}v()}function Bf(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?j$:z$}function B$(t){return t.stepped?jA:t.tension||t.cubicInterpolationMode==="monotone"?BA:fr}function V$(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),tb(t,e.options),t.stroke(i)}function U$(t,e,n,r){const{segments:i,options:s}=e,o=Bf(e);for(const a of i)tb(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const W$=typeof Path2D=="function";function H$(t,e,n,r){W$&&!e.options.segment?V$(t,e,n,r):U$(t,e,n,r)}class In extends Ft{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 r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;RA(this._points,r,e,i,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=qA(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,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,i=e[n],s=this.points,o=Vx(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=B$(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:f,end:h}=o[u],d=s[f],g=s[h];if(d===g){a.push(d);continue}const y=Math.abs((i-d[n])/(g[n]-d[n])),_=l(d,g,y,r.stepped);_[n]=e[n],a.push(_)}return a.length===1?a[0]:a}pathSegment(e,n,r){return Bf(this)(e,this,n,r)}path(e,n,r){const i=this.segments,s=Bf(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(e,this,a,{start:n,end:n+r-1});return!!o}draw(e,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),H$(e,this,r,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}F(In,"id","line"),F(In,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),F(In,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),F(In,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Ty(t,e,n,r){const i=t.options,{[n]:s}=t.getProps([n],r);return Math.abs(e-s)<i.radius+i.hitRadius}class Ca extends Ft{constructor(n){super();F(this,"parsed");F(this,"skip");F(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,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return Ty(this,n,"x",r)}inYRange(n,r){return Ty(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!un(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Ff(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}F(Ca,"id","point"),F(Ca,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),F(Ca,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function rb(t,e){const{x:n,y:r,base:i,width:s,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,u,c,f;return t.horizontal?(f=o/2,a=Math.min(n,i),l=Math.max(n,i),u=r-f,c=r+f):(f=s/2,a=n-f,l=n+f,u=Math.min(r,i),c=Math.max(r,i)),{left:a,top:u,right:l,bottom:c}}function An(t,e,n,r){return t?0:Oe(e,n,r)}function Y$(t,e,n){const r=t.options.borderWidth,i=t.borderSkipped,s=Dx(r);return{t:An(i.top,s.top,0,n),r:An(i.right,s.right,0,e),b:An(i.bottom,s.bottom,0,n),l:An(i.left,s.left,0,e)}}function q$(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=vr(i),o=Math.min(e,n),a=t.borderSkipped,l=r||q(i);return{topLeft:An(!l||a.top||a.left,s.topLeft,0,o),topRight:An(!l||a.top||a.right,s.topRight,0,o),bottomLeft:An(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:An(!l||a.bottom||a.right,s.bottomRight,0,o)}}function Q$(t){const e=rb(t),n=e.right-e.left,r=e.bottom-e.top,i=Y$(t,n/2,r/2),s=q$(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:s},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function dc(t,e,n,r){const i=e===null,s=n===null,a=t&&!(i&&s)&&rb(t,r);return a&&(i||an(e,a.left,a.right))&&(s||an(n,a.top,a.bottom))}function G$(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function K$(t,e){t.rect(e.x,e.y,e.w,e.h)}function pc(t,e,n={}){const r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-r,o=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+r,y:t.y+i,w:t.w+s,h:t.h+o,radius:t.radius}}class Ta extends Ft{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:r,backgroundColor:i}}=this,{inner:s,outer:o}=Q$(this),a=G$(o.radius)?Gs:K$;e.save(),(o.w!==s.w||o.h!==s.h)&&(e.beginPath(),a(e,pc(o,n,s)),e.clip(),a(e,pc(s,-n,o)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),a(e,pc(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,r){return dc(this,e,n,r)}inXRange(e,n){return dc(this,e,null,n)}inYRange(e,n){return dc(this,null,e,n)}getCenterPoint(e){const{x:n,y:r,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?r:(r+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}F(Ta,"id","bar"),F(Ta,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),F(Ta,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var X$=Object.freeze({__proto__:null,ArcElement:is,BarElement:Ta,LineElement:In,PointElement:Ca});const Vf=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Dy=Vf.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function ib(t){return Vf[t%Vf.length]}function sb(t){return Dy[t%Dy.length]}function J$(t,e){return t.borderColor=ib(e),t.backgroundColor=sb(e),++e}function Z$(t,e){return t.backgroundColor=t.data.map(()=>ib(e++)),e}function eN(t,e){return t.backgroundColor=t.data.map(()=>sb(e++)),e}function tN(t){let e=0;return(n,r)=>{const i=t.getDatasetMeta(r).controller;i instanceof Rn?e=Z$(n,e):i instanceof ks?e=eN(n,e):i&&(e=J$(n,e))}}function Ry(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function nN(t){return t&&(t.borderColor||t.backgroundColor)}var rN={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(Ry(r)||nN(i)||s&&Ry(s)))return;const o=tN(t);r.forEach(o)}};function iN(t,e,n,r,i){const s=i.samples||r;if(s>=n)return t.slice(e,e+n);const o=[],a=(n-2)/(s-2);let l=0;const u=e+n-1;let c=e,f,h,d,g,y;for(o[l++]=t[c],f=0;f<s-2;f++){let _=0,m=0,p;const v=Math.floor((f+1)*a)+1+e,x=Math.min(Math.floor((f+2)*a)+1,n)+e,b=x-v;for(p=v;p<x;p++)_+=t[p].x,m+=t[p].y;_/=b,m/=b;const M=Math.floor(f*a)+1+e,C=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:T,y:$}=t[c];for(d=g=-1,p=M;p<C;p++)g=.5*Math.abs((T-_)*(t[p].y-$)-(T-t[p].x)*(m-$)),g>d&&(d=g,h=t[p],y=p);o[l++]=h,c=y}return o[l++]=t[u],o}function sN(t,e,n,r){let i=0,s=0,o,a,l,u,c,f,h,d,g,y;const _=[],m=e+n-1,p=t[e].x,x=t[m].x-p;for(o=e;o<e+n;++o){a=t[o],l=(a.x-p)/x*r,u=a.y;const b=l|0;if(b===c)u<g?(g=u,f=o):u>y&&(y=u,h=o),i=(s*i+a.x)/++s;else{const M=o-1;if(!K(f)&&!K(h)){const C=Math.min(f,h),T=Math.max(f,h);C!==d&&C!==M&&_.push({...t[C],x:i}),T!==d&&T!==M&&_.push({...t[T],x:i})}o>0&&M!==d&&_.push(t[M]),_.push(a),c=b,s=0,g=y=u,f=h=d=o}}return _}function ob(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Iy(t){t.data.datasets.forEach(e=>{ob(e)})}function oN(t,e){const n=e.length;let r=0,i;const{iScale:s}=t,{min:o,max:a,minDefined:l,maxDefined:u}=s.getUserBounds();return l&&(r=Oe(ln(e,s.axis,o).lo,0,n-1)),u?i=Oe(ln(e,s.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var aN={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){Iy(t);return}const r=t.width;t.data.datasets.forEach((i,s)=>{const{_data:o,indexAxis:a}=i,l=t.getDatasetMeta(s),u=o||i.data;if(ns([a,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const c=t.scales[l.xAxisID];if(c.type!=="linear"&&c.type!=="time"||t.options.parsing)return;let{start:f,count:h}=oN(l,u);const d=n.threshold||4*r;if(h<=d){ob(i);return}K(o)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let g;switch(n.algorithm){case"lttb":g=iN(u,f,h,r,n);break;case"min-max":g=sN(u,f,h,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=g})},destroy(t){Iy(t)}};function lN(t,e,n){const r=t.segments,i=t.points,s=e.points,o=[];for(const a of r){let{start:l,end:u}=a;u=Fd(l,u,i);const c=Uf(n,i[l],i[u],a.loop);if(!e.segments){o.push({source:a,target:c,start:i[l],end:i[u]});continue}const f=Vx(e,c);for(const h of f){const d=Uf(n,s[h.start],s[h.end],h.loop),g=Bx(a,i,d);for(const y of g)o.push({source:y,target:h,start:{[n]:Ay(c,d,"start",Math.max)},end:{[n]:Ay(c,d,"end",Math.min)}})}}return o}function Uf(t,e,n,r){if(r)return;let i=e[t],s=n[t];return t==="angle"&&(i=ot(i),s=ot(s)),{property:t,start:i,end:s}}function uN(t,e){const{x:n=null,y:r=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:o,end:a})=>{a=Fd(o,a,i);const l=i[o],u=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function Fd(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function Ay(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function ab(t,e){let n=[],r=!1;return oe(t)?(r=!0,n=t):n=uN(t,e),n.length?new In({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ly(t){return t&&t.fill!==!1}function cN(t,e,n){let i=t[e].fill;const s=[e];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!me(i))return i;if(o=t[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function fN(t,e,n){const r=gN(t);if(q(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return me(i)&&Math.floor(i)===i?hN(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function hN(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function dN(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:q(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function pN(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:q(t)?r=t.value:r=e.getBaseValue(),r}function gN(t){const e=t.options,n=e.fill;let r=W(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function mN(t){const{scale:e,index:n,line:r}=t,i=[],s=r.segments,o=r.points,a=yN(e,n);a.push(ab({x:null,y:e.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let c=u.start;c<=u.end;c++)vN(i,o[c],a)}return new In({points:i,options:{}})}function yN(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function vN(t,e,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=_N(s,e,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(t.push(l),!a)break}}t.push(...r)}function _N(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const i=r[n],s=t.segments,o=t.points;let a=!1,l=!1;for(let u=0;u<s.length;u++){const c=s[u],f=o[c.start][n],h=o[c.end][n];if(an(i,f,h)){a=i===f,l=i===h;break}}return{first:a,last:l,point:r}}class lb{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:le},e.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function xN(t){const{chart:e,fill:n,line:r}=t;if(me(n))return bN(e,n);if(n==="stack")return mN(t);if(n==="shape")return!0;const i=wN(t);return i instanceof lb?i:ab(i,r)}function bN(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function wN(t){return(t.scale||{}).getPointPositionForValue?kN(t):SN(t)}function SN(t){const{scale:e={},fill:n}=t,r=dN(n,e);if(me(r)){const i=e.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function kN(t){const{scale:e,fill:n}=t,r=e.options,i=e.getLabels().length,s=r.reverse?e.max:e.min,o=pN(n,e,s),a=[];if(r.grid.circular){const l=e.getPointPositionForValue(0,s);return new lb({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(e.getPointPositionForValue(l,o));return a}function gc(t,e,n){const r=xN(e),{line:i,scale:s,axis:o}=e,a=i.options,l=a.fill,u=a.backgroundColor,{above:c=u,below:f=u}=l||{};r&&i.points.length&&(Hl(t,n),EN(t,{line:i,target:r,above:c,below:f,area:n,scale:s,axis:o}),Yl(t))}function EN(t,e){const{line:n,target:r,above:i,below:s,area:o,scale:a}=e,l=n._loop?"angle":e.axis;t.save(),l==="x"&&s!==i&&($y(t,r,o.top),Ny(t,{line:n,target:r,color:i,scale:a,property:l}),t.restore(),t.save(),$y(t,r,o.bottom)),Ny(t,{line:n,target:r,color:s,scale:a,property:l}),t.restore()}function $y(t,e,n){const{segments:r,points:i}=e;let s=!0,o=!1;t.beginPath();for(const a of r){const{start:l,end:u}=a,c=i[l],f=i[Fd(l,u,i)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Ny(t,e){const{line:n,target:r,property:i,color:s,scale:o}=e,a=lN(n,r,i);for(const{source:l,target:u,start:c,end:f}of a){const{style:{backgroundColor:h=s}={}}=l,d=r!==!0;t.save(),t.fillStyle=h,MN(t,o,d&&Uf(i,c,f)),t.beginPath();const g=!!n.pathSegment(t,l);let y;if(d){g?t.closePath():Fy(t,r,f,i);const _=!!r.pathSegment(t,u,{move:g,reverse:!0});y=g&&_,y||Fy(t,r,c,i)}t.closePath(),t.fill(y?"evenodd":"nonzero"),t.restore()}}function MN(t,e,n){const{top:r,bottom:i}=e.chart.chartArea,{property:s,start:o,end:a}=n||{};s==="x"&&(t.beginPath(),t.rect(o,r,a-o,i-r),t.clip())}function Fy(t,e,n,r){const i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y)}var PN={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=t.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof In&&(l={visible:t.isDatasetVisible(o),index:o,fill:fN(a,o,r),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=cN(i,o,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&gc(t.ctx,a,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;Ly(s)&&gc(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!Ly(r)||n.drawTime!=="beforeDatasetDraw"||gc(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const zy=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},ON=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class jy extends Ft{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,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,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=te(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,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 r=e.labels,i=Ee(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=zy(r,s);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,i,a,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+a;let f=e;s.textAlign="left",s.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach((g,y)=>{const _=r+n/2+s.measureText(g.text).width;(y===0||u[u.length-1]+_+2*a>o)&&(f+=c,u[u.length-(y>0?0:1)]=0,d+=c,h++),l[y]={left:0,top:d,row:h,width:_,height:i},u[u.length-1]+=_+a}),f}_fitCols(e,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-e;let f=a,h=0,d=0,g=0,y=0;return this.legendItems.forEach((_,m)=>{const{itemWidth:p,itemHeight:v}=CN(r,n,s,_,i);m>0&&d+v+2*a>c&&(f+=h+a,u.push({width:h,height:d}),g+=h+a,y++,h=d=0),l[m]={left:g,top:d,col:y,width:p,height:v},h=Math.max(h,p),d+=v+a}),f+=h,u.push({width:h,height:d}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=fi(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=Fe(r,this.left+i,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=Fe(r,this.left+i,this.right-this.lineWidths[a])),u.top+=this.top+e+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let a=0,l=Fe(r,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=Fe(r,this.top+e+i,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Hl(e,this),this._draw(),Yl(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=e,a=ye.color,l=fi(e.rtl,this.left,this.width),u=Ee(o.font),{padding:c}=o,f=u.size,h=f/2;let d;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:g,boxHeight:y,itemHeight:_}=zy(o,f),m=function(M,C,T){if(isNaN(g)||g<=0||isNaN(y)||y<0)return;i.save();const $=W(T.lineWidth,1);if(i.fillStyle=W(T.fillStyle,a),i.lineCap=W(T.lineCap,"butt"),i.lineDashOffset=W(T.lineDashOffset,0),i.lineJoin=W(T.lineJoin,"miter"),i.lineWidth=$,i.strokeStyle=W(T.strokeStyle,a),i.setLineDash(W(T.lineDash,[])),o.usePointStyle){const I={radius:y*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:$},L=l.xPlus(M,g/2),V=C+h;Tx(i,I,L,V,o.pointStyleWidth&&g)}else{const I=C+Math.max((f-y)/2,0),L=l.leftForLtr(M,g),V=vr(T.borderRadius);i.beginPath(),Object.values(V).some(Y=>Y!==0)?Gs(i,{x:L,y:I,w:g,h:y,radius:V}):i.rect(L,I,g,y),i.fill(),$!==0&&i.stroke()}i.restore()},p=function(M,C,T){Pr(i,T.text,M,C+_/2,u,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},v=this.isHorizontal(),x=this._computeTitleHeight();v?d={x:Fe(s,this.left+c,this.right-r[0]),y:this.top+c+x,line:0}:d={x:this.left+c,y:Fe(s,this.top+x+c,this.bottom-n[0].height),line:0},Fx(this.ctx,e.textDirection);const b=_+c;this.legendItems.forEach((M,C)=>{i.strokeStyle=M.fontColor,i.fillStyle=M.fontColor;const T=i.measureText(M.text).width,$=l.textAlign(M.textAlign||(M.textAlign=o.textAlign)),I=g+h+T;let L=d.x,V=d.y;l.setWidth(this.width),v?C>0&&L+I+c>this.right&&(V=d.y+=b,d.line++,L=d.x=Fe(s,this.left+c,this.right-r[d.line])):C>0&&V+b>this.bottom&&(L=d.x=L+n[d.line].width+c,d.line++,V=d.y=Fe(s,this.top+x+c,this.bottom-n[d.line].height));const Y=l.x(L);if(m(Y,V,M),L=KI($,L+g+h,v?L+I:this.right,e.rtl),p(l.x(L),V,M),v)d.x+=I+c;else if(typeof M.text!="string"){const k=u.lineHeight;d.y+=ub(M,k)+c}else d.y+=b}),zx(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=Ee(n.font),i=Ve(n.padding);if(!n.display)return;const s=fi(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=i.top+l;let c,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+u,f=Fe(e.align,f,this.right-h);else{const g=this.columnSizes.reduce((y,_)=>Math.max(y,_.height),0);c=u+Fe(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}const d=Fe(a,f,f+h);o.textAlign=s.textAlign(Cd(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Pr(o,n.text,d,c,r)}_computeTitleHeight(){const e=this.options.title,n=Ee(e.font),r=Ve(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,s;if(an(e,this.left,this.right)&&an(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],an(e,i.left,i.left+i.width)&&an(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!RN(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=ON(i,r);i&&!s&&te(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!s&&te(n.onHover,[e,r,this],this)}else r&&te(n.onClick,[e,r,this],this)}}function CN(t,e,n,r,i){const s=TN(r,t,e,n),o=DN(i,r,e.lineHeight);return{itemWidth:s,itemHeight:o}}function TN(t,e,n,r){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),e+n.size/2+r.measureText(i).width}function DN(t,e,n){let r=t;return typeof e.text!="string"&&(r=ub(e,n)),r}function ub(t,e){const n=t.text?t.text.length:0;return e*n}function RN(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var IN={id:"legend",_element:jy,start(t,e,n){const r=t.legend=new jy({ctx:t.ctx,options:n,chart:t});je.configure(t,r,n),je.addBox(t,r)},stop(t){je.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;je.configure(t,r,n),r.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 r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),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:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=Ve(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.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 zd extends Ft{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 r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=oe(r.text)?r.text.length:1;this._padding=Ve(r.padding);const s=i*Ee(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,u,c,f;return this.isHorizontal()?(c=Fe(a,r,s),f=n+e,u=s-r):(o.position==="left"?(c=r+e,f=Fe(a,i,n),l=ue*-.5):(c=s-e,f=Fe(a,n,i),l=ue*.5),u=i-n),{titleX:c,titleY:f,maxWidth:u,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=Ee(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);Pr(e,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:Cd(n.align),textBaseline:"middle",translation:[o,a]})}}function AN(t,e){const n=new zd({ctx:t.ctx,options:e,chart:t});je.configure(t,n,e),je.addBox(t,n),t.titleBlock=n}var LN={id:"title",_element:zd,start(t,e,n){AN(t,n)},stop(t){const e=t.titleBlock;je.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;je.configure(t,r,n),r.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 ta=new WeakMap;var $N={id:"subtitle",start(t,e,n){const r=new zd({ctx:t.ctx,options:n,chart:t});je.configure(t,r,n),je.addBox(t,r),ta.set(t,r)},stop(t){je.removeBox(t,ta.get(t)),ta.delete(t)},beforeUpdate(t,e,n){const r=ta.get(t);je.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ss={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=t.length;s<o;++s){const l=t[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=$f(e,u);c<i&&(i=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Bt(t,e){return e&&(oe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Zt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
56
+ `)>-1?t.split(`
57
+ `):t}function NN(t,e){const{element:n,datasetIndex:r,index:i}=e,s=t.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:t,label:o,parsed:s.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function By(t,e){const n=t.chart.ctx,{body:r,footer:i,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=Ee(e.bodyFont),u=Ee(e.titleFont),c=Ee(e.footerFont),f=s.length,h=i.length,d=r.length,g=Ve(e.padding);let y=g.height,_=0,m=r.reduce((x,b)=>x+b.before.length+b.lines.length+b.after.length,0);if(m+=t.beforeBody.length+t.afterBody.length,f&&(y+=f*u.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),m){const x=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=d*x+(m-d)*l.lineHeight+(m-1)*e.bodySpacing}h&&(y+=e.footerMarginTop+h*c.lineHeight+(h-1)*e.footerSpacing);let p=0;const v=function(x){_=Math.max(_,n.measureText(x).width+p)};return n.save(),n.font=u.string,X(t.title,v),n.font=l.string,X(t.beforeBody.concat(t.afterBody),v),p=e.displayColors?o+2+e.boxPadding:0,X(r,x=>{X(x.before,v),X(x.lines,v),X(x.after,v)}),p=0,n.font=c.string,X(t.footer,v),n.restore(),_+=g.width,{width:_,height:y}}function FN(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function zN(t,e,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(t==="left"&&i+s+o>e.width||t==="right"&&i-s-o<0)return!0}function jN(t,e,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let u="center";return r==="center"?u=i<=(a+l)/2?"left":"right":i<=s/2?u="left":i>=o-s/2&&(u="right"),zN(u,t,e,n)&&(u="center"),u}function Vy(t,e,n){const r=n.yAlign||e.yAlign||FN(t,n);return{xAlign:n.xAlign||e.xAlign||jN(t,e,n,r),yAlign:r}}function BN(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function VN(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function Uy(t,e,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,u=i+s,{topLeft:c,topRight:f,bottomLeft:h,bottomRight:d}=vr(o);let g=BN(e,a);const y=VN(e,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,h)+i:a==="right"&&(g+=Math.max(f,d)+i),{x:Oe(g,0,r.width-e.width),y:Oe(y,0,r.height-e.height)}}function na(t,e,n){const r=Ve(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function Wy(t){return Bt([],Zt(t))}function UN(t,e,n){return er(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Hy(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const cb={beforeTitle:Xt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Xt,beforeBody:Xt,beforeLabel:Xt,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 K(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:Xt,afterBody:Xt,beforeFooter:Xt,footer:Xt,afterFooter:Xt};function Qe(t,e,n,r){const i=t[e].call(n,r);return typeof i>"u"?cb[e].call(n,r):i}class Wf extends Ft{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,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new Ux(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=UN(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,i=Qe(r,"beforeTitle",this,e),s=Qe(r,"title",this,e),o=Qe(r,"afterTitle",this,e);let a=[];return a=Bt(a,Zt(i)),a=Bt(a,Zt(s)),a=Bt(a,Zt(o)),a}getBeforeBody(e,n){return Wy(Qe(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,i=[];return X(e,s=>{const o={before:[],lines:[],after:[]},a=Hy(r,s);Bt(o.before,Zt(Qe(a,"beforeLabel",this,s))),Bt(o.lines,Qe(a,"label",this,s)),Bt(o.after,Zt(Qe(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(e,n){return Wy(Qe(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,i=Qe(r,"beforeFooter",this,e),s=Qe(r,"footer",this,e),o=Qe(r,"afterFooter",this,e);let a=[];return a=Bt(a,Zt(i)),a=Bt(a,Zt(s)),a=Bt(a,Zt(o)),a}_createItems(e){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(NN(this.chart,n[l]));return e.filter&&(a=a.filter((c,f,h)=>e.filter(c,f,h,r))),e.itemSort&&(a=a.sort((c,f)=>e.itemSort(c,f,r))),X(a,c=>{const f=Hy(e.callbacks,c);i.push(Qe(f,"labelColor",this,c)),s.push(Qe(f,"labelPointStyle",this,c)),o.push(Qe(f,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=ss[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=By(this,r),u=Object.assign({},a,l),c=Vy(this.chart,r,u),f=Uy(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,i){const s=this.getCaretPosition(e,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:f}=vr(a),{x:h,y:d}=e,{width:g,height:y}=n;let _,m,p,v,x,b;return s==="center"?(x=d+y/2,i==="left"?(_=h,m=_-o,v=x+o,b=x-o):(_=h+g,m=_+o,v=x-o,b=x+o),p=_):(i==="left"?m=h+Math.max(l,c)+o:i==="right"?m=h+g-Math.max(u,f)-o:m=this.caretX,s==="top"?(v=d,x=v-o,_=m-o,p=m+o):(v=d+y,x=v+o,_=m+o,p=m-o),b=v),{x1:_,x2:m,x3:p,y1:v,y2:x,y3:b}}drawTitle(e,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const u=fi(r.rtl,this.x,this.width);for(e.x=na(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=Ee(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+a,l+1===s&&(e.y+=r.titleMarginBottom-a)}}_drawColorBox(e,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=s,c=Ee(s.bodyFont),f=na(this,"left",s),h=i.x(f),d=l<c.lineHeight?(c.lineHeight-l)/2:0,g=n.y+d;if(s.usePointStyle){const y={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},_=i.leftForLtr(h,u)+u/2,m=g+l/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Ff(e,y,_,m),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,Ff(e,y,_,m)}else{e.lineWidth=q(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const y=i.leftForLtr(h,u),_=i.leftForLtr(i.xPlus(h,1),u-2),m=vr(o.borderRadius);Object.values(m).some(p=>p!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Gs(e,{x:y,y:g,w:u,h:l,radius:m}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Gs(e,{x:_,y:g+1,w:u-2,h:l-2,radius:m}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(y,g,u,l),e.strokeRect(y,g,u,l),e.fillStyle=o.backgroundColor,e.fillRect(_,g+1,u-2,l-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,f=Ee(r.bodyFont);let h=f.lineHeight,d=0;const g=fi(r.rtl,this.x,this.width),y=function(T){n.fillText(T,g.x(e.x+d),e.y+h/2),e.y+=h+s},_=g.textAlign(o);let m,p,v,x,b,M,C;for(n.textAlign=o,n.textBaseline="middle",n.font=f.string,e.x=na(this,_,r),n.fillStyle=r.bodyColor,X(this.beforeBody,y),d=a&&_!=="right"?o==="center"?u/2+c:u+2+c:0,x=0,M=i.length;x<M;++x){for(m=i[x],p=this.labelTextColors[x],n.fillStyle=p,X(m.before,y),v=m.lines,a&&v.length&&(this._drawColorBox(n,e,x,g,r),h=Math.max(f.lineHeight,l)),b=0,C=v.length;b<C;++b)y(v[b]),h=f.lineHeight;X(m.after,y)}d=0,h=f.lineHeight,X(this.afterBody,y),e.y-=s}drawFooter(e,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=fi(r.rtl,this.x,this.width);for(e.x=na(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=Ee(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+r.footerSpacing}}drawBackground(e,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=e,{width:u,height:c}=r,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:g}=vr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,l),o==="top"&&this.drawCaret(e,n,r,i),n.lineTo(a+u-h,l),n.quadraticCurveTo(a+u,l,a+u,l+h),o==="center"&&s==="right"&&this.drawCaret(e,n,r,i),n.lineTo(a+u,l+c-g),n.quadraticCurveTo(a+u,l+c,a+u-g,l+c),o==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(a+d,l+c),n.quadraticCurveTo(a,l+c,a,l+c-d),o==="center"&&s==="left"&&this.drawCaret(e,n,r,i),n.lineTo(a,l+f),n.quadraticCurveTo(a,l,a+f,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=ss[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=By(this,e),l=Object.assign({},o,this._size),u=Vy(n,e,l),c=Uy(e,l,u,n);(i._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Ve(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=r,this.drawBackground(s,e,i,n),Fx(e,n.textDirection),s.y+=o.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),zx(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,i=e.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!al(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(e,s,n,r),a=this._positionChanged(o,e),l=n||!al(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,r,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:r,caretY:i,options:s}=this,o=ss[s.position].call(this,e,n);return o!==!1&&(r!==o.x||i!==o.y)}}F(Wf,"positioners",ss);var WN={id:"tooltip",_element:Wf,positioners:ss,afterInit(t,e,n){n&&(t.tooltip=new Wf({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:cb},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"]},HN=Object.freeze({__proto__:null,Colors:rN,Decimation:aN,Filler:PN,Legend:IN,SubTitle:$N,Title:LN,Tooltip:WN});const YN=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function qN(t,e,n,r){const i=t.indexOf(e);if(i===-1)return YN(t,e,n,r);const s=t.lastIndexOf(e);return i!==s?n:i}const QN=(t,e)=>t===null?null:Oe(Math.round(t),0,e);function Yy(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Hf extends Rr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(K(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:qN(r,e,W(n,e),this._addedLabels),QN(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(e){return Yy.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}}F(Hf,"id","category"),F(Hf,"defaults",{ticks:{callback:Yy}});function GN(t,e){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:f,includeBounds:h}=t,d=s||1,g=c-1,{min:y,max:_}=e,m=!K(o),p=!K(a),v=!K(u),x=(_-y)/(f+1);let b=jm((_-y)/g/d)*d,M,C,T,$;if(b<1e-14&&!m&&!p)return[{value:y},{value:_}];$=Math.ceil(_/b)-Math.floor(y/b),$>g&&(b=jm($*b/g/d)*d),K(l)||(M=Math.pow(10,l),b=Math.ceil(b*M)/M),i==="ticks"?(C=Math.floor(y/b)*b,T=Math.ceil(_/b)*b):(C=y,T=_),m&&p&&s&&UI((a-o)/s,b/1e3)?($=Math.round(Math.min((a-o)/b,c)),b=(a-o)/$,C=o,T=a):v?(C=m?o:C,T=p?a:T,$=u-1,b=(T-C)/$):($=(T-C)/b,_s($,Math.round($),b/1e3)?$=Math.round($):$=Math.ceil($));const I=Math.max(Bm(b),Bm(C));M=Math.pow(10,K(l)?I:l),C=Math.round(C*M)/M,T=Math.round(T*M)/M;let L=0;for(m&&(h&&C!==o?(n.push({value:o}),C<o&&L++,_s(Math.round((C+L*b)*M)/M,o,qy(o,x,t))&&L++):C<o&&L++);L<$;++L){const V=Math.round((C+L*b)*M)/M;if(p&&V>a)break;n.push({value:V})}return p&&h&&T!==a?n.length&&_s(n[n.length-1].value,a,qy(a,x,t))?n[n.length-1].value=a:n.push({value:a}):(!p||T===a)&&n.push({value:T}),n}function qy(t,e,{horizontal:n,minRotation:r}){const i=It(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class gl extends Rr{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 K(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(e){const l=qt(i),u=qt(s);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),e||o(i-l)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,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},s=this._range||this,o=GN(i,s);return e.bounds==="ticks"&&bx(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return co(e,this.chart.options.locale,this.options.ticks.format)}}class Yf extends gl{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=me(e)?e:0,this.max=me(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=It(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}F(Yf,"id","linear"),F(Yf,"defaults",{ticks:{callback:Wl.formatters.numeric}});const Xs=t=>Math.floor(Dn(t)),sr=(t,e)=>Math.pow(10,Xs(t)+e);function Qy(t){return t/Math.pow(10,Xs(t))===1}function Gy(t,e,n){const r=Math.pow(10,n),i=Math.floor(t/r);return Math.ceil(e/r)-i}function KN(t,e){const n=e-t;let r=Xs(n);for(;Gy(t,e,r)>10;)r++;for(;Gy(t,e,r)<10;)r--;return Math.min(r,Xs(t))}function XN(t,{min:e,max:n}){e=it(t.min,e);const r=[],i=Xs(e);let s=KN(e,n),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=i>s?Math.pow(10,i):0,u=Math.round((e-l)*o)/o,c=Math.floor((e-l)/a/10)*a*10;let f=Math.floor((u-c)/Math.pow(10,s)),h=it(t.min,Math.round((l+c+f*Math.pow(10,s))*o)/o);for(;h<n;)r.push({value:h,major:Qy(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,o=s>=0?1:o),h=Math.round((l+c+f*Math.pow(10,s))*o)/o;const d=it(t.max,h);return r.push({value:d,major:Qy(d),significand:f}),r}class qf extends Rr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const r=gl.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=!0;return}return me(r)&&r>0?r:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=me(e)?Math.max(0,e):null,this.max=me(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!me(this._userMin)&&(this.min=e===sr(this.min,0)?sr(this.min,-1):sr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const s=a=>r=e?r:a,o=a=>i=n?i:a;r===i&&(r<=0?(s(1),o(10)):(s(sr(r,-1)),o(sr(i,1)))),r<=0&&s(sr(i,-1)),i<=0&&o(sr(r,1)),this.min=r,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},r=XN(n,this);return e.bounds==="ticks"&&bx(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":co(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Dn(e),this._valueRange=Dn(this.max)-Dn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Dn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}F(qf,"id","logarithmic"),F(qf,"defaults",{ticks:{callback:Wl.formatters.logarithmic,major:{enabled:!0}}});function Qf(t){const e=t.ticks;if(e.display&&t.display){const n=Ve(e.backdropPadding);return W(e.font&&e.font.size,ye.font.size)+n.height}return 0}function JN(t,e,n){return n=oe(n)?n:[n],{w:oA(t,e.string,n),h:n.length*e.lineHeight}}function Ky(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:t<r||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function ZN(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],i=[],s=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?ue/s:0;for(let l=0;l<s;l++){const u=o.setContext(t.getPointLabelContext(l));i[l]=u.padding;const c=t.getPointPosition(l,t.drawingArea+i[l],a),f=Ee(u.font),h=JN(t.ctx,f,t._pointLabels[l]);r[l]=h;const d=ot(t.getIndexAngle(l)+a),g=Math.round(Pd(d)),y=Ky(g,c.x,h.w,0,180),_=Ky(g,c.y,h.h,90,270);eF(n,e,d,y,_)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=rF(t,r,i)}function eF(t,e,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<e.l?(a=(e.l-r.start)/s,t.l=Math.min(t.l,e.l-a)):r.end>e.r&&(a=(r.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(l=(e.t-i.start)/o,t.t=Math.min(t.t,e.t-l)):i.end>e.b&&(l=(i.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function tF(t,e,n){const r=t.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=t.getPointPosition(e,r+i+o,s),u=Math.round(Pd(ot(l.angle+_e))),c=oF(l.y,a.h,u),f=iF(u),h=sF(l.x,a.w,f);return{visible:!0,x:l.x,y:c,textAlign:f,left:h,top:c,right:h+a.w,bottom:c+a.h}}function nF(t,e){if(!e)return!0;const{left:n,top:r,right:i,bottom:s}=t;return!(un({x:n,y:r},e)||un({x:n,y:s},e)||un({x:i,y:r},e)||un({x:i,y:s},e))}function rF(t,e,n){const r=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:Qf(s)/2,additionalAngle:o?ue/i:0};let u;for(let c=0;c<i;c++){l.padding=n[c],l.size=e[c];const f=tF(t,c,l);r.push(f),a==="auto"&&(f.visible=nF(f,u),f.visible&&(u=f))}return r}function iF(t){return t===0||t===180?"center":t<180?"left":"right"}function sF(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function oF(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function aF(t,e,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=e;if(!K(a)){const l=vr(e.borderRadius),u=Ve(e.backdropPadding);t.fillStyle=a;const c=r-u.left,f=i-u.top,h=s-r+u.width,d=o-i+u.height;Object.values(l).some(g=>g!==0)?(t.beginPath(),Gs(t,{x:c,y:f,w:h,h:d,radius:l}),t.fill()):t.fillRect(c,f,h,d)}}function lF(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(t.getPointLabelContext(i));aF(n,o,s);const a=Ee(o.font),{x:l,y:u,textAlign:c}=s;Pr(n,t._pointLabels[i],l,u+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function fb(t,e,n,r){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,le);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=t.getPointPosition(o,e),i.lineTo(s.x,s.y)}}function uF(t,e,n,r,i){const s=t.ctx,o=e.circular,{color:a,lineWidth:l}=e;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),fb(t,n,o,r),s.closePath(),s.stroke(),s.restore())}function cF(t,e,n){return er(t,{label:n,index:e,type:"pointLabel"})}class os extends gl{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Ve(Qf(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=me(e)&&!isNaN(e)?e:0,this.max=me(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Qf(this.options))}generateTickLabels(e){gl.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{const i=te(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?ZN(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,i))}getIndexAngle(e){const n=le/(this._pointLabels.length||1),r=this.options.startAngle||0;return ot(e*n+It(r))}getDistanceFromCenterForValue(e){if(K(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(K(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const r=n[e];return cF(this.getContext(),e,r)}}getPointPosition(e,n,r=0){const i=this.getIndexAngle(e)-_e+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[e];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const r=this.ctx;r.save(),r.beginPath(),fb(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,u;if(n.pointLabels.display&&lF(this,o),i.display&&this.ticks.forEach((c,f)=>{if(f!==0||f===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const h=this.getContext(f),d=i.setContext(h),g=s.setContext(h);uF(this,d,l,o,g)}}),r.display){for(e.save(),a=o-1;a>=0;a--){const c=r.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:h}=c;!h||!f||(e.lineWidth=h,e.strokeStyle=f,e.setLineDash(c.borderDash),e.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=r.setContext(this.getContext(l)),c=Ee(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=c.string,o=e.measureText(a.label).width,e.fillStyle=u.backdropColor;const f=Ve(u.backdropPadding);e.fillRect(-o/2-f.left,-s-c.size/2-f.top,o+f.width,c.size+f.height)}Pr(e,a.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}F(os,"id","radialLinear"),F(os,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wl.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),F(os,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),F(os,"descriptors",{angleLines:{_fallback:"grid"}});const Gl={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}},Xe=Object.keys(Gl);function Xy(t,e){return t-e}function Jy(t,e){if(K(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:s}=t._parseOpts;let o=e;return typeof r=="function"&&(o=r(o)),me(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(Si(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Zy(t,e,n,r){const i=Xe.length;for(let s=Xe.indexOf(t);s<i-1;++s){const o=Gl[Xe[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(a*o.size))<=r)return Xe[s]}return Xe[i-1]}function fF(t,e,n,r,i){for(let s=Xe.length-1;s>=Xe.indexOf(n);s--){const o=Xe[s];if(Gl[o].common&&t._adapter.diff(i,r,o)>=e-1)return o}return Xe[n?Xe.indexOf(n):0]}function hF(t){for(let e=Xe.indexOf(t)+1,n=Xe.length;e<n;++e)if(Gl[Xe[e]].common)return Xe[e]}function ev(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:i}=Od(n,e),s=n[r]>=e?n[r]:n[i];t[s]=!0}}function dF(t,e,n,r){const i=t._adapter,s=+i.startOf(e[0].value,r),o=e[e.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(e[l].major=!0);return e}function tv(t,e,n){const r=[],i={},s=e.length;let o,a;for(o=0;o<s;++o)a=e[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:dF(t,r,i,n)}class Js extends Rr{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 r=e.time||(e.time={}),i=this._adapter=new wL._date(e.adapters.date);i.init(n),vs(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Jy(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=me(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=me(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=qI(i,s,o);return this._unit=n.unit||(r.autoSkip?Zy(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):fF(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:hF(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),tv(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?r=s:r=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Oe(n,0,o),r=Oe(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||Zy(s.minUnit,n,r,this._getLabelCapacity(n)),a=W(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=Si(l)||l===!0,c={};let f=n,h,d;if(u&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,u?"day":o),e.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,d=0;h<r;h=+e.add(h,a,o),d++)ev(c,h,g);return(h===r||i.bounds==="ticks"||d===1)&&ev(c,h,g),Object.keys(c).sort(Xy).map(y=>+y)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(e,o)}_tickFormatFunction(e,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return te(o,[e,n,r],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],f=u&&a[u],h=r[n],d=u&&f&&h&&h.major;return this._adapter.format(e,i||(d?f:c))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,i=It(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(e,0,tv(this,[e],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(Jy(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return kx(e.sort(Xy))}}F(Js,"id","time"),F(Js,"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 ra(t,e,n){let r=0,i=t.length-1,s,o,a,l;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=ln(t,"pos",e)),{pos:s,time:a}=t[r],{pos:o,time:l}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=ln(t,"time",e)),{time:s,pos:a}=t[r],{time:o,pos:l}=t[i]);const u=o-s;return u?a+(l-a)*(e-s)/u:a}class Gf extends Js{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=ra(n,this.min),this._tableRange=ra(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],s=[];let o,a,l,u,c;for(o=0,a=e.length;o<a;++o)u=e[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&s.push({time:u,pos:o/(a-1)});return s}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(ra(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return ra(this._table,r*this._tableRange+this._minPos,!0)}}F(Gf,"id","timeseries"),F(Gf,"defaults",Js.defaults);var pF=Object.freeze({__proto__:null,CategoryScale:Hf,LinearScale:Yf,LogarithmicScale:qf,RadialLinearScale:os,TimeScale:Js,TimeSeriesScale:Gf});const gF=[bL,X$,HN,pF];Ql.register(...gF);const hb="label";function nv(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function mF(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function db(t,e){t.labels=e}function pb(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hb;const r=[];t.datasets=e.map(i=>{const s=t.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function yF(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hb;const n={labels:[],datasets:[]};return db(n,t.labels),pb(n,t.datasets,e),n}function vF(t,e){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:u=[],fallbackContent:c,updateMode:f,...h}=t,d=se.useRef(null),g=se.useRef(),y=()=>{d.current&&(g.current=new Ql(d.current,{type:o,data:yF(a,s),options:l&&{...l},plugins:u}),nv(e,g.current))},_=()=>{nv(e,null),g.current&&(g.current.destroy(),g.current=null)};return se.useEffect(()=>{!i&&g.current&&l&&mF(g.current,l)},[i,l]),se.useEffect(()=>{!i&&g.current&&db(g.current.config.data,a.labels)},[i,a.labels]),se.useEffect(()=>{!i&&g.current&&a.datasets&&pb(g.current.config.data,a.datasets,s)},[i,a.datasets]),se.useEffect(()=>{g.current&&(i?(_(),setTimeout(y)):g.current.update(f))},[i,l,a.labels,a.datasets,f]),se.useEffect(()=>{g.current&&(_(),setTimeout(y))},[o]),se.useEffect(()=>(y(),()=>_()),[]),xr.createElement("canvas",Object.assign({ref:d,role:"img",height:n,width:r},h),c)}const _F=se.forwardRef(vF);function Kl(t,e){return Ql.register(e),se.forwardRef((n,r)=>xr.createElement(_F,Object.assign({},n,{ref:r,type:t})))}const rv=Kl("line",Ss),xF=Kl("bar",ws),bF=Kl("doughnut",Rn),wF=Kl("pie",hl);function SF(t){const{resultSet:e,pivotConfig:n,chartType:r}=t,i={labels:e.chartPivot(n).map(o=>o.x),datasets:e.series(n).map(o=>({fill:r==="area",label:o.title,data:o.series.map(({value:a})=>a)}))},s={area:rv,bar:xF,doughnut:bF,line:rv,pie:wF}[r];return Ge.jsx(s,{data:i})}function kF(t){const e=location.hash.slice(1);if(e)try{return{...t,...JSON.parse(atob(decodeURIComponent(e)))}}catch{console.error("Invalid hash",e)}return{...t}}function EF(t){const{children:e,query:n,subscribe:r}=t,{resultSet:i,isLoading:s,error:o}=PE(n??{},{subscribe:r,skip:!n});return s?Ge.jsx(Ge.Fragment,{children:"Loading..."}):o?Ge.jsx(Ge.Fragment,{children:o.toString()}):i?(e==null?void 0:e({resultSet:i}))||null:Ge.jsx(Ge.Fragment,{children:"Empty result set"})}var or={BASE_URL:"/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function MF(){const{apiUrl:t,apiToken:e,query:n,pivotConfig:r,chartType:i,useWebSockets:s,useSubscription:o}=kF({apiUrl:or.VITE_CUBE_API_URL||"",apiToken:or.VITE_CUBE_API_TOKEN||"",query:JSON.parse(or.VITE_CUBE_QUERY||"{}"),pivotConfig:JSON.parse(or.VITE_CUBE_PIVOT_CONFIG||"{}"),chartType:or.VITE_CHART_TYPE,websockets:or.VITE_CUBE_API_USE_WEBSOCKETS==="true",subscription:or.VITE_CUBE_API_USE_SUBSCRIPTION==="true"});let a;s&&(a=new cI({authorization:e,apiUrl:t}));const l=wE(e,{apiUrl:t,transport:a});return Ge.jsx(Ge.Fragment,{children:Ge.jsx(kE,{cubeApi:l,children:Ge.jsx(EF,{query:n,subscribe:o,children:({resultSet:u})=>Ge.jsx(SF,{chartType:i,resultSet:u,pivotConfig:r})})})})}mc.createRoot(document.getElementById("root")).render(Ge.jsx(xr.StrictMode,{children:Ge.jsx(MF,{})}));