@tapflowio/relay 0.8.1 → 0.9.0

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 (226) hide show
  1. package/dist/RelayServer.d.ts +13 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +80 -9
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/api/auth.d.ts +3 -2
  6. package/dist/api/auth.d.ts.map +1 -1
  7. package/dist/api/auth.js +37 -3
  8. package/dist/api/auth.js.map +1 -1
  9. package/dist/api/builds.d.ts.map +1 -1
  10. package/dist/api/builds.js +14 -13
  11. package/dist/api/builds.js.map +1 -1
  12. package/dist/api/comments.d.ts.map +1 -1
  13. package/dist/api/comments.js +23 -10
  14. package/dist/api/comments.js.map +1 -1
  15. package/dist/api/team.d.ts.map +1 -1
  16. package/dist/api/team.js +4 -2
  17. package/dist/api/team.js.map +1 -1
  18. package/dist/index.d.ts +7 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/lib/cert/AcmeCertProvider.d.ts +55 -0
  23. package/dist/lib/cert/AcmeCertProvider.d.ts.map +1 -0
  24. package/dist/lib/cert/AcmeCertProvider.js +62 -0
  25. package/dist/lib/cert/AcmeCertProvider.js.map +1 -0
  26. package/dist/lib/cert/AcmeClientIssuer.d.ts +23 -0
  27. package/dist/lib/cert/AcmeClientIssuer.d.ts.map +1 -0
  28. package/dist/lib/cert/AcmeClientIssuer.js +54 -0
  29. package/dist/lib/cert/AcmeClientIssuer.js.map +1 -0
  30. package/dist/lib/cert/CertProvider.d.ts +30 -0
  31. package/dist/lib/cert/CertProvider.d.ts.map +1 -0
  32. package/dist/lib/cert/CertProvider.js +4 -0
  33. package/dist/lib/cert/CertProvider.js.map +1 -0
  34. package/dist/lib/cert/CloudflareDnsProvider.d.ts +40 -0
  35. package/dist/lib/cert/CloudflareDnsProvider.d.ts.map +1 -0
  36. package/dist/lib/cert/CloudflareDnsProvider.js +93 -0
  37. package/dist/lib/cert/CloudflareDnsProvider.js.map +1 -0
  38. package/dist/lib/cert/DiskCertStore.d.ts +10 -0
  39. package/dist/lib/cert/DiskCertStore.d.ts.map +1 -0
  40. package/dist/lib/cert/DiskCertStore.js +35 -0
  41. package/dist/lib/cert/DiskCertStore.js.map +1 -0
  42. package/dist/lib/cert/DnsProvider.d.ts +7 -0
  43. package/dist/lib/cert/DnsProvider.d.ts.map +1 -0
  44. package/dist/lib/cert/DnsProvider.js +2 -0
  45. package/dist/lib/cert/DnsProvider.js.map +1 -0
  46. package/dist/lib/cert/ImportCertProvider.d.ts +20 -0
  47. package/dist/lib/cert/ImportCertProvider.d.ts.map +1 -0
  48. package/dist/lib/cert/ImportCertProvider.js +24 -0
  49. package/dist/lib/cert/ImportCertProvider.js.map +1 -0
  50. package/dist/lib/cert/VercelDnsProvider.d.ts +38 -0
  51. package/dist/lib/cert/VercelDnsProvider.d.ts.map +1 -0
  52. package/dist/lib/cert/VercelDnsProvider.js +146 -0
  53. package/dist/lib/cert/VercelDnsProvider.js.map +1 -0
  54. package/dist/lib/cert/accountKey.d.ts +2 -0
  55. package/dist/lib/cert/accountKey.d.ts.map +1 -0
  56. package/dist/lib/cert/accountKey.js +23 -0
  57. package/dist/lib/cert/accountKey.js.map +1 -0
  58. package/dist/lib/cert/addressPublisher.d.ts +20 -0
  59. package/dist/lib/cert/addressPublisher.d.ts.map +1 -0
  60. package/dist/lib/cert/addressPublisher.js +103 -0
  61. package/dist/lib/cert/addressPublisher.js.map +1 -0
  62. package/dist/lib/cert/createCertProvider.d.ts +20 -0
  63. package/dist/lib/cert/createCertProvider.d.ts.map +1 -0
  64. package/dist/lib/cert/createCertProvider.js +25 -0
  65. package/dist/lib/cert/createCertProvider.js.map +1 -0
  66. package/dist/lib/cert/dnsRegistry.d.ts +24 -0
  67. package/dist/lib/cert/dnsRegistry.d.ts.map +1 -0
  68. package/dist/lib/cert/dnsRegistry.js +36 -0
  69. package/dist/lib/cert/dnsRegistry.js.map +1 -0
  70. package/dist/lib/cert/index.d.ts +23 -0
  71. package/dist/lib/cert/index.d.ts.map +1 -0
  72. package/dist/lib/cert/index.js +12 -0
  73. package/dist/lib/cert/index.js.map +1 -0
  74. package/dist/lib/cert/parseCert.d.ts +3 -0
  75. package/dist/lib/cert/parseCert.d.ts.map +1 -0
  76. package/dist/lib/cert/parseCert.js +6 -0
  77. package/dist/lib/cert/parseCert.js.map +1 -0
  78. package/dist/lib/cert/renewal.d.ts +13 -0
  79. package/dist/lib/cert/renewal.d.ts.map +1 -0
  80. package/dist/lib/cert/renewal.js +28 -0
  81. package/dist/lib/cert/renewal.js.map +1 -0
  82. package/dist/lib/clientAddress.d.ts +12 -0
  83. package/dist/lib/clientAddress.d.ts.map +1 -0
  84. package/dist/lib/clientAddress.js +46 -0
  85. package/dist/lib/clientAddress.js.map +1 -0
  86. package/dist/lib/config.d.ts +25 -0
  87. package/dist/lib/config.d.ts.map +1 -1
  88. package/dist/lib/config.js +69 -3
  89. package/dist/lib/config.js.map +1 -1
  90. package/dist/lib/cors.d.ts +2 -0
  91. package/dist/lib/cors.d.ts.map +1 -0
  92. package/dist/lib/cors.js +18 -0
  93. package/dist/lib/cors.js.map +1 -0
  94. package/dist/lib/csrf.d.ts +3 -0
  95. package/dist/lib/csrf.d.ts.map +1 -0
  96. package/dist/lib/csrf.js +42 -0
  97. package/dist/lib/csrf.js.map +1 -0
  98. package/dist/lib/loadEnvFile.d.ts +2 -0
  99. package/dist/lib/loadEnvFile.d.ts.map +1 -0
  100. package/dist/lib/loadEnvFile.js +17 -0
  101. package/dist/lib/loadEnvFile.js.map +1 -0
  102. package/dist/lib/proxyConfig.d.ts +6 -0
  103. package/dist/lib/proxyConfig.d.ts.map +1 -0
  104. package/dist/lib/proxyConfig.js +27 -0
  105. package/dist/lib/proxyConfig.js.map +1 -0
  106. package/dist/lib/publicUrl.d.ts +3 -0
  107. package/dist/lib/publicUrl.d.ts.map +1 -0
  108. package/dist/lib/publicUrl.js +17 -0
  109. package/dist/lib/publicUrl.js.map +1 -0
  110. package/dist/lib/uploads.d.ts +2 -0
  111. package/dist/lib/uploads.d.ts.map +1 -0
  112. package/dist/lib/uploads.js +14 -0
  113. package/dist/lib/uploads.js.map +1 -0
  114. package/dist/middleware/rateLimit.d.ts +18 -0
  115. package/dist/middleware/rateLimit.d.ts.map +1 -0
  116. package/dist/middleware/rateLimit.js +55 -0
  117. package/dist/middleware/rateLimit.js.map +1 -0
  118. package/dist/router.d.ts.map +1 -1
  119. package/dist/router.js +13 -1
  120. package/dist/router.js.map +1 -1
  121. package/dist/server.js +44 -5
  122. package/dist/server.js.map +1 -1
  123. package/package.json +6 -5
  124. package/public/assets/AppCenter-CaY73Tvf.js +16 -0
  125. package/public/assets/AppCenter-CaY73Tvf.js.br +0 -0
  126. package/public/assets/Default-DQiKj0NT.js +1 -0
  127. package/public/assets/Default-DQiKj0NT.js.br +0 -0
  128. package/public/assets/Invite-B4MMcQtw.js +1 -0
  129. package/public/assets/Invite-B4MMcQtw.js.br +0 -0
  130. package/public/assets/MacResources-BfZAJ5BP.js +5 -0
  131. package/public/assets/MacResources-BfZAJ5BP.js.br +0 -0
  132. package/public/assets/NotFound-D85RKzwv.js +1 -0
  133. package/public/assets/NotFound-D85RKzwv.js.br +0 -0
  134. package/public/assets/QASession-B9FSUtZo.js +130 -0
  135. package/public/assets/QASession-B9FSUtZo.js.br +0 -0
  136. package/public/assets/ResetPassword-Degmb6sl.js +1 -0
  137. package/public/assets/ResetPassword-Degmb6sl.js.br +0 -0
  138. package/public/assets/Setup-DKOFxDo2.js +1 -0
  139. package/public/assets/Setup-DKOFxDo2.js.br +0 -0
  140. package/public/assets/Team-Bgspan2B.js +6 -0
  141. package/public/assets/Team-Bgspan2B.js.br +0 -0
  142. package/public/assets/Tokens-C3u48FUG.js +6 -0
  143. package/public/assets/Tokens-C3u48FUG.js.br +0 -0
  144. package/public/assets/alert-dialog-Ci_cWoVo.js +7 -0
  145. package/public/assets/alert-dialog-Ci_cWoVo.js.br +0 -0
  146. package/public/assets/badge-Cktrrdvf.js +1 -0
  147. package/public/assets/badge-Cktrrdvf.js.br +0 -0
  148. package/public/assets/build-format-Blzidb1D.js +11 -0
  149. package/public/assets/build-format-Blzidb1D.js.br +0 -0
  150. package/public/assets/dialog-BuZjQWBQ.js +11 -0
  151. package/public/assets/dialog-BuZjQWBQ.js.br +0 -0
  152. package/public/assets/index-BI7E3MD-.css +1 -0
  153. package/public/assets/index-BI7E3MD-.css.br +0 -0
  154. package/public/assets/index-ClAB0eKw.js +258 -0
  155. package/public/assets/index-ClAB0eKw.js.br +0 -0
  156. package/public/assets/inter-latin-ext-standard-normal-DpK-iCPk.woff2 +0 -0
  157. package/public/assets/inter-latin-standard-normal-BwkfbSeq.woff2 +0 -0
  158. package/public/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  159. package/public/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  160. package/public/assets/pencil-BoxokH2R.js +6 -0
  161. package/public/assets/pencil-BoxokH2R.js.br +0 -0
  162. package/public/assets/plus-C0Y4Yk9P.js +6 -0
  163. package/public/assets/plus-C0Y4Yk9P.js.br +0 -0
  164. package/public/assets/table-NBRnBazr.js +1 -0
  165. package/public/assets/table-NBRnBazr.js.br +0 -0
  166. package/public/assets/tabs-CB9a8dpY.js +1 -0
  167. package/public/assets/tabs-CB9a8dpY.js.br +0 -0
  168. package/public/assets/tinyh264.worker-DiJ50Hai.js.br +0 -0
  169. package/public/favicon.svg.br +0 -0
  170. package/public/index.html +2 -2
  171. package/public/index.html.br +0 -0
  172. package/public/logo-dark.svg.br +0 -0
  173. package/public/logo.svg.br +0 -0
  174. package/public/assets/index-Bhoumejm.js +0 -520
  175. package/public/assets/index-DX5Pf9T6.css +0 -1
  176. package/public/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  177. package/public/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  178. package/public/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  179. package/public/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  180. package/public/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
  181. package/public/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
  182. package/public/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  183. package/public/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  184. package/public/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  185. package/public/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  186. package/public/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
  187. package/public/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
  188. package/public/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  189. package/public/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  190. package/public/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  191. package/public/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  192. package/public/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
  193. package/public/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
  194. package/public/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  195. package/public/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  196. package/public/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  197. package/public/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  198. package/public/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
  199. package/public/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
  200. package/public/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  201. package/public/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  202. package/public/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  203. package/public/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  204. package/public/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
  205. package/public/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  206. package/public/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  207. package/public/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  208. package/public/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  209. package/public/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  210. package/public/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
  211. package/public/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
  212. package/public/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  213. package/public/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  214. package/public/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  215. package/public/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  216. package/public/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
  217. package/public/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  218. package/public/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  219. package/public/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  220. package/public/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  221. package/public/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  222. package/public/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  223. package/public/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  224. package/public/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  225. package/public/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  226. package/public/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
@@ -1,520 +0,0 @@
1
- function d9(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ob={exports:{}},Mu={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and 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 hC;function h9(){if(hC)return Mu;hC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Mu.Fragment=t,Mu.jsx=n,Mu.jsxs=n,Mu}var pC;function p9(){return pC||(pC=1,Ob.exports=h9()),Ob.exports}var v=p9(),jb={exports:{}},nt={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and 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 mC;function m9(){if(mC)return nt;mC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function E(I,Z,X){this.props=I,this.context=Z,this.refs=w,this.updater=X||A}E.prototype.isReactComponent={},E.prototype.setState=function(I,Z){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,Z,"setState")},E.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function O(){}O.prototype=E.prototype;function j(I,Z,X){this.props=I,this.context=Z,this.refs=w,this.updater=X||A}var R=j.prototype=new O;R.constructor=j,S(R,E.prototype),R.isPureReactComponent=!0;var C=Array.isArray;function T(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function z(I,Z,X){var oe=X.ref;return{$$typeof:e,type:I,key:Z,ref:oe!==void 0?oe:null,props:X}}function G(I,Z){return z(I.type,Z,I.props)}function U(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function P(I){var Z={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(X){return Z[X]})}var B=/\/+/g;function q(I,Z){return typeof I=="object"&&I!==null&&I.key!=null?P(""+I.key):Z.toString(36)}function W(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(T,T):(I.status="pending",I.then(function(Z){I.status==="pending"&&(I.status="fulfilled",I.value=Z)},function(Z){I.status==="pending"&&(I.status="rejected",I.reason=Z)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function $(I,Z,X,oe,ge){var Ee=typeof I;(Ee==="undefined"||Ee==="boolean")&&(I=null);var me=!1;if(I===null)me=!0;else switch(Ee){case"bigint":case"string":case"number":me=!0;break;case"object":switch(I.$$typeof){case e:case t:me=!0;break;case m:return me=I._init,$(me(I._payload),Z,X,oe,ge)}}if(me)return ge=ge(I),me=oe===""?"."+q(I,0):oe,C(ge)?(X="",me!=null&&(X=me.replace(B,"$&/")+"/"),$(ge,Z,X,"",function(_e){return _e})):ge!=null&&(U(ge)&&(ge=G(ge,X+(ge.key==null||I&&I.key===ge.key?"":(""+ge.key).replace(B,"$&/")+"/")+me)),Z.push(ge)),1;me=0;var we=oe===""?".":oe+":";if(C(I))for(var ce=0;ce<I.length;ce++)oe=I[ce],Ee=we+q(oe,ce),me+=$(oe,Z,X,Ee,ge);else if(ce=x(I),typeof ce=="function")for(I=ce.call(I),ce=0;!(oe=I.next()).done;)oe=oe.value,Ee=we+q(oe,ce++),me+=$(oe,Z,X,Ee,ge);else if(Ee==="object"){if(typeof I.then=="function")return $(W(I),Z,X,oe,ge);throw Z=String(I),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return me}function V(I,Z,X){if(I==null)return I;var oe=[],ge=0;return $(I,oe,"","",function(Ee){return Z.call(X,Ee,ge++)}),oe}function F(I){if(I._status===-1){var Z=I._result;Z=Z(),Z.then(function(X){(I._status===0||I._status===-1)&&(I._status=1,I._result=X)},function(X){(I._status===0||I._status===-1)&&(I._status=2,I._result=X)}),I._status===-1&&(I._status=0,I._result=Z)}if(I._status===1)return I._result.default;throw I._result}var K=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},ie={map:V,forEach:function(I,Z,X){V(I,function(){Z.apply(this,arguments)},X)},count:function(I){var Z=0;return V(I,function(){Z++}),Z},toArray:function(I){return V(I,function(Z){return Z})||[]},only:function(I){if(!U(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return nt.Activity=h,nt.Children=ie,nt.Component=E,nt.Fragment=n,nt.Profiler=a,nt.PureComponent=j,nt.StrictMode=r,nt.Suspense=f,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,nt.__COMPILER_RUNTIME={__proto__:null,c:function(I){return N.H.useMemoCache(I)}},nt.cache=function(I){return function(){return I.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(I,Z,X){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var oe=S({},I.props),ge=I.key;if(Z!=null)for(Ee in Z.key!==void 0&&(ge=""+Z.key),Z)!D.call(Z,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&Z.ref===void 0||(oe[Ee]=Z[Ee]);var Ee=arguments.length-2;if(Ee===1)oe.children=X;else if(1<Ee){for(var me=Array(Ee),we=0;we<Ee;we++)me[we]=arguments[we+2];oe.children=me}return z(I.type,ge,oe)},nt.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:o,_context:I},I},nt.createElement=function(I,Z,X){var oe,ge={},Ee=null;if(Z!=null)for(oe in Z.key!==void 0&&(Ee=""+Z.key),Z)D.call(Z,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ge[oe]=Z[oe]);var me=arguments.length-2;if(me===1)ge.children=X;else if(1<me){for(var we=Array(me),ce=0;ce<me;ce++)we[ce]=arguments[ce+2];ge.children=we}if(I&&I.defaultProps)for(oe in me=I.defaultProps,me)ge[oe]===void 0&&(ge[oe]=me[oe]);return z(I,Ee,ge)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(I){return{$$typeof:c,render:I}},nt.isValidElement=U,nt.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:F}},nt.memo=function(I,Z){return{$$typeof:d,type:I,compare:Z===void 0?null:Z}},nt.startTransition=function(I){var Z=N.T,X={};N.T=X;try{var oe=I(),ge=N.S;ge!==null&&ge(X,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(T,K)}catch(Ee){K(Ee)}finally{Z!==null&&X.types!==null&&(Z.types=X.types),N.T=Z}},nt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},nt.use=function(I){return N.H.use(I)},nt.useActionState=function(I,Z,X){return N.H.useActionState(I,Z,X)},nt.useCallback=function(I,Z){return N.H.useCallback(I,Z)},nt.useContext=function(I){return N.H.useContext(I)},nt.useDebugValue=function(){},nt.useDeferredValue=function(I,Z){return N.H.useDeferredValue(I,Z)},nt.useEffect=function(I,Z){return N.H.useEffect(I,Z)},nt.useEffectEvent=function(I){return N.H.useEffectEvent(I)},nt.useId=function(){return N.H.useId()},nt.useImperativeHandle=function(I,Z,X){return N.H.useImperativeHandle(I,Z,X)},nt.useInsertionEffect=function(I,Z){return N.H.useInsertionEffect(I,Z)},nt.useLayoutEffect=function(I,Z){return N.H.useLayoutEffect(I,Z)},nt.useMemo=function(I,Z){return N.H.useMemo(I,Z)},nt.useOptimistic=function(I,Z){return N.H.useOptimistic(I,Z)},nt.useReducer=function(I,Z,X){return N.H.useReducer(I,Z,X)},nt.useRef=function(I){return N.H.useRef(I)},nt.useState=function(I){return N.H.useState(I)},nt.useSyncExternalStore=function(I,Z,X){return N.H.useSyncExternalStore(I,Z,X)},nt.useTransition=function(){return N.H.useTransition()},nt.version="19.2.6",nt}var vC;function X_(){return vC||(vC=1,jb.exports=m9()),jb.exports}var y=X_();const L=Ht(y),Q_=d9({__proto__:null,default:L},[y]);var Tb={exports:{}},Pu={},Cb={exports:{}},Rb={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and 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
- */var gC;function v9(){return gC||(gC=1,(function(e){function t($,V){var F=$.length;$.push(V);e:for(;0<F;){var K=F-1>>>1,ie=$[K];if(0<a(ie,V))$[K]=V,$[F]=ie,F=K;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var V=$[0],F=$.pop();if(F!==V){$[0]=F;e:for(var K=0,ie=$.length,I=ie>>>1;K<I;){var Z=2*(K+1)-1,X=$[Z],oe=Z+1,ge=$[oe];if(0>a(X,F))oe<ie&&0>a(ge,X)?($[K]=ge,$[oe]=F,K=oe):($[K]=X,$[Z]=F,K=Z);else if(oe<ie&&0>a(ge,F))$[K]=ge,$[oe]=F,K=oe;else break e}}return V}function a($,V){var F=$.sortIndex-V.sortIndex;return F!==0?F:$.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],m=1,h=null,g=3,x=!1,A=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function R($){for(var V=n(d);V!==null;){if(V.callback===null)r(d);else if(V.startTime<=$)r(d),V.sortIndex=V.expirationTime,t(f,V);else break;V=n(d)}}function C($){if(S=!1,R($),!A)if(n(f)!==null)A=!0,T||(T=!0,P());else{var V=n(d);V!==null&&W(C,V.startTime-$)}}var T=!1,N=-1,D=5,z=-1;function G(){return w?!0:!(e.unstable_now()-z<D)}function U(){if(w=!1,T){var $=e.unstable_now();z=$;var V=!0;try{e:{A=!1,S&&(S=!1,O(N),N=-1),x=!0;var F=g;try{t:{for(R($),h=n(f);h!==null&&!(h.expirationTime>$&&G());){var K=h.callback;if(typeof K=="function"){h.callback=null,g=h.priorityLevel;var ie=K(h.expirationTime<=$);if($=e.unstable_now(),typeof ie=="function"){h.callback=ie,R($),V=!0;break t}h===n(f)&&r(f),R($)}else r(f);h=n(f)}if(h!==null)V=!0;else{var I=n(d);I!==null&&W(C,I.startTime-$),V=!1}}break e}finally{h=null,g=F,x=!1}V=void 0}}finally{V?P():T=!1}}}var P;if(typeof j=="function")P=function(){j(U)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,q=B.port2;B.port1.onmessage=U,P=function(){q.postMessage(null)}}else P=function(){E(U,0)};function W($,V){N=E(function(){$(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function($){switch(g){case 1:case 2:case 3:var V=3;break;default:V=g}var F=g;g=V;try{return $()}finally{g=F}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function($,V){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var F=g;g=$;try{return V()}finally{g=F}},e.unstable_scheduleCallback=function($,V,F){var K=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?K+F:K):F=K,$){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=F+ie,$={id:m++,callback:V,priorityLevel:$,startTime:F,expirationTime:ie,sortIndex:-1},F>K?($.sortIndex=F,t(d,$),n(f)===null&&$===n(d)&&(S?(O(N),N=-1):S=!0,W(C,F-K))):($.sortIndex=ie,t(f,$),A||x||(A=!0,T||(T=!0,P()))),$},e.unstable_shouldYield=G,e.unstable_wrapCallback=function($){var V=g;return function(){var F=g;g=V;try{return $.apply(this,arguments)}finally{g=F}}}})(Rb)),Rb}var yC;function g9(){return yC||(yC=1,Cb.exports=v9()),Cb.exports}var Nb={exports:{}},Jn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and 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 bC;function y9(){if(bC)return Jn;bC=1;var e=X_();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(f,d,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:h==null?null:""+h,children:f,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Jn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Jn.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(f,d,null,m)},Jn.flushSync=function(f){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=m,r.d.f()}},Jn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},Jn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Jn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,h=c(m,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:g,fetchPriority:x}):m==="script"&&r.d.X(f,{crossOrigin:h,integrity:g,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Jn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},Jn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,h=c(m,d.crossOrigin);r.d.L(f,m,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Jn.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},Jn.requestFormReset=function(f){r.d.r(f)},Jn.unstable_batchedUpdates=function(f,d){return f(d)},Jn.useFormState=function(f,d,m){return l.H.useFormState(f,d,m)},Jn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Jn.version="19.2.6",Jn}var xC;function Bz(){if(xC)return Nb.exports;xC=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Nb.exports=y9(),Nb.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var wC;function b9(){if(wC)return Pu;wC=1;var e=g9(),t=X_(),n=Bz();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(u=s.return),i=s.return;while(i)}return s.tag===3?u:null}function l(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function c(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function f(i){if(o(i)!==i)throw Error(r(188))}function d(i){var s=i.alternate;if(!s){if(s=o(i),s===null)throw Error(r(188));return s!==i?null:i}for(var u=i,p=s;;){var b=u.return;if(b===null)break;var _=b.alternate;if(_===null){if(p=b.return,p!==null){u=p;continue}break}if(b.child===_.child){for(_=b.child;_;){if(_===u)return f(b),i;if(_===p)return f(b),s;_=_.sibling}throw Error(r(188))}if(u.return!==p.return)u=b,p=_;else{for(var M=!1,k=b.child;k;){if(k===u){M=!0,u=b,p=_;break}if(k===p){M=!0,p=b,u=_;break}k=k.sibling}if(!M){for(k=_.child;k;){if(k===u){M=!0,u=_,p=b;break}if(k===p){M=!0,p=_,u=b;break}k=k.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==p)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:s}function m(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=m(i),s!==null)return s;i=i.sibling}return null}var h=Object.assign,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),j=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function P(i){return i===null||typeof i!="object"?null:(i=U&&i[U]||i["@@iterator"],typeof i=="function"?i:null)}var B=Symbol.for("react.client.reference");function q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===B?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case E:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case T:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case A:return"Portal";case j:return i.displayName||"Context";case O:return(i._context.displayName||"Context")+".Consumer";case R:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case N:return s=i.displayName||null,s!==null?s:q(i.type)||"Memo";case D:s=i._payload,i=i._init;try{return q(i(s))}catch{}}return null}var W=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},K=[],ie=-1;function I(i){return{current:i}}function Z(i){0>ie||(i.current=K[ie],K[ie]=null,ie--)}function X(i,s){ie++,K[ie]=i.current,i.current=s}var oe=I(null),ge=I(null),Ee=I(null),me=I(null);function we(i,s){switch(X(Ee,s),X(ge,i),X(oe,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?$2(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=$2(s),i=z2(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Z(oe),X(oe,i)}function ce(){Z(oe),Z(ge),Z(Ee)}function _e(i){i.memoizedState!==null&&X(me,i);var s=oe.current,u=z2(s,i.type);s!==u&&(X(ge,i),X(oe,u))}function Ae(i){ge.current===i&&(Z(oe),Z(ge)),me.current===i&&(Z(me),Tu._currentValue=F)}var se,He;function $e(i){if(se===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);se=s&&s[1]||"",He=-1<u.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+se+i+He}var Je=!1;function We(i,s){if(!i||Je)return"";Je=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(ue){var le=ue}Reflect.construct(i,[],ye)}else{try{ye.call()}catch(ue){le=ue}i.call(ye.prototype)}}else{try{throw Error()}catch(ue){le=ue}(ye=i())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(ue){if(ue&&le&&typeof ue.stack=="string")return[ue.stack,le.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=p.DetermineComponentFrameRoot(),M=_[0],k=_[1];if(M&&k){var Y=M.split(`
44
- `),ae=k.split(`
45
- `);for(b=p=0;p<Y.length&&!Y[p].includes("DetermineComponentFrameRoot");)p++;for(;b<ae.length&&!ae[b].includes("DetermineComponentFrameRoot");)b++;if(p===Y.length||b===ae.length)for(p=Y.length-1,b=ae.length-1;1<=p&&0<=b&&Y[p]!==ae[b];)b--;for(;1<=p&&0<=b;p--,b--)if(Y[p]!==ae[b]){if(p!==1||b!==1)do if(p--,b--,0>b||Y[p]!==ae[b]){var de=`
46
- `+Y[p].replace(" at new "," at ");return i.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",i.displayName)),de}while(1<=p&&0<=b);break}}}finally{Je=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?$e(u):""}function at(i,s){switch(i.tag){case 26:case 27:case 5:return $e(i.type);case 16:return $e("Lazy");case 13:return i.child!==s&&s!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return We(i.type,!1);case 11:return We(i.type.render,!1);case 1:return We(i.type,!0);case 31:return $e("Activity");default:return""}}function Rt(i){try{var s="",u=null;do s+=at(i,u),u=i,i=i.return;while(i);return s}catch(p){return`
47
- Error generating stack: `+p.message+`
48
- `+p.stack}}var ft=Object.prototype.hasOwnProperty,bn=e.unstable_scheduleCallback,tn=e.unstable_cancelCallback,Nt=e.unstable_shouldYield,ln=e.unstable_requestPaint,H=e.unstable_now,J=e.unstable_getCurrentPriorityLevel,re=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,je=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,Fe=e.log,Xe=e.unstable_setDisableYieldValue,St=null,wt=null;function Mt(i){if(typeof Fe=="function"&&Xe(i),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(St,i)}catch{}}var Ft=Math.clz32?Math.clz32:Rn,Hr=Math.log,Fr=Math.LN2;function Rn(i){return i>>>=0,i===0?32:31-(Hr(i)/Fr|0)|0}var Un=256,Qn=262144,qn=4194304;function Te(i){var s=i&42;if(s!==0)return s;switch(i&-i){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Se(i,s,u){var p=i.pendingLanes;if(p===0)return 0;var b=0,_=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var k=p&134217727;return k!==0?(p=k&~_,p!==0?b=Te(p):(M&=k,M!==0?b=Te(M):u||(u=k&~i,u!==0&&(b=Te(u))))):(k=p&~_,k!==0?b=Te(k):M!==0?b=Te(M):u||(u=p&~i,u!==0&&(b=Te(u)))),b===0?0:s!==0&&s!==b&&(s&_)===0&&(_=b&-b,u=s&-s,_>=u||_===32&&(u&4194048)!==0)?s:b}function Ve(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function Re(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dt(){var i=qn;return qn<<=1,(qn&62914560)===0&&(qn=4194304),i}function Ke(i){for(var s=[],u=0;31>u;u++)s.push(i);return s}function te(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function pe(i,s,u,p,b,_){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var k=i.entanglements,Y=i.expirationTimes,ae=i.hiddenUpdates;for(u=M&~u;0<u;){var de=31-Ft(u),ye=1<<de;k[de]=0,Y[de]=-1;var le=ae[de];if(le!==null)for(ae[de]=null,de=0;de<le.length;de++){var ue=le[de];ue!==null&&(ue.lane&=-536870913)}u&=~ye}p!==0&&fe(i,p,0),_!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=_&~(M&~s))}function fe(i,s,u){i.pendingLanes|=s,i.suspendedLanes&=~s;var p=31-Ft(s);i.entangledLanes|=s,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function ke(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var p=31-Ft(u),b=1<<p;b&s|i[p]&s&&(i[p]|=s),u&=~b}}function Le(i,s){var u=s&-s;return u=(u&42)!==0?1:Ne(u),(u&(i.suspendedLanes|s))!==0?0:u}function Ne(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Ue(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function tt(){var i=V.p;return i!==0?i:(i=window.event,i===void 0?32:oC(i.type))}function Yt(i,s){var u=V.p;try{return V.p=i,s()}finally{V.p=u}}var fn=Math.random().toString(36).slice(2),Vt="__reactFiber$"+fn,Nn="__reactProps$"+fn,Vr="__reactContainer$"+fn,qs="__reactEvents$"+fn,gg="__reactListeners$"+fn,nq="__reactHandles$"+fn,_O="__reactResources$"+fn,Hc="__reactMarker$"+fn;function yg(i){delete i[Vt],delete i[Nn],delete i[qs],delete i[gg],delete i[nq]}function Hs(i){var s=i[Vt];if(s)return s;for(var u=i.parentNode;u;){if(s=u[Vr]||u[Vt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=F2(i);i!==null;){if(u=i[Vt])return u;i=F2(i)}return s}i=u,u=i.parentNode}return null}function Fs(i){if(i=i[Vt]||i[Vr]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Fc(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function Vs(i){var s=i[_O];return s||(s=i[_O]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function zn(i){i[Hc]=!0}var AO=new Set,EO={};function Fo(i,s){Gs(i,s),Gs(i+"Capture",s)}function Gs(i,s){for(EO[i]=s,i=0;i<s.length;i++)AO.add(s[i])}var rq=RegExp("^[: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]*$"),OO={},jO={};function aq(i){return ft.call(jO,i)?!0:ft.call(OO,i)?!1:rq.test(i)?jO[i]=!0:(OO[i]=!0,!1)}function Dd(i,s,u){if(aq(s))if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+u)}}function kd(i,s,u){if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+u)}}function oi(i,s,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(s,u,""+p)}}function Gr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function TO(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function iq(i,s,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var b=p.get,_=p.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return b.call(this)},set:function(M){u=""+M,_.call(this,M)}}),Object.defineProperty(i,s,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function bg(i){if(!i._valueTracker){var s=TO(i)?"checked":"value";i._valueTracker=iq(i,s,""+i[s])}}function CO(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),p="";return i&&(p=TO(i)?i.checked?"true":"false":i.value),i=p,i!==u?(s.setValue(i),!0):!1}function $d(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var oq=/[\n"\\]/g;function Wr(i){return i.replace(oq,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function xg(i,s,u,p,b,_,M,k){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),s!=null?M==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Gr(s)):i.value!==""+Gr(s)&&(i.value=""+Gr(s)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),s!=null?wg(i,M,Gr(s)):u!=null?wg(i,M,Gr(u)):p!=null&&i.removeAttribute("value"),b==null&&_!=null&&(i.defaultChecked=!!_),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Gr(k):i.removeAttribute("name")}function RO(i,s,u,p,b,_,M,k){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.type=_),s!=null||u!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){bg(i);return}u=u!=null?""+Gr(u):"",s=s!=null?""+Gr(s):u,k||s===i.value||(i.value=s),i.defaultValue=s}p=p??b,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=k?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),bg(i)}function wg(i,s,u){s==="number"&&$d(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Ws(i,s,u,p){if(i=i.options,s){s={};for(var b=0;b<u.length;b++)s["$"+u[b]]=!0;for(u=0;u<i.length;u++)b=s.hasOwnProperty("$"+i[u].value),i[u].selected!==b&&(i[u].selected=b),b&&p&&(i[u].defaultSelected=!0)}else{for(u=""+Gr(u),s=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,p&&(i[b].defaultSelected=!0);return}s!==null||i[b].disabled||(s=i[b])}s!==null&&(s.selected=!0)}}function NO(i,s,u){if(s!=null&&(s=""+Gr(s),s!==i.value&&(i.value=s),u==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=u!=null?""+Gr(u):""}function MO(i,s,u,p){if(s==null){if(p!=null){if(u!=null)throw Error(r(92));if(W(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),s=u}u=Gr(s),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),bg(i)}function Ys(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var sq=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function PO(i,s,u){var p=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":p?i.setProperty(s,u):typeof u!="number"||u===0||sq.has(s)?s==="float"?i.cssFloat=u:i[s]=(""+u).trim():i[s]=u+"px"}function DO(i,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var b in s)p=s[b],s.hasOwnProperty(b)&&u[b]!==p&&PO(i,b,p)}else for(var _ in s)s.hasOwnProperty(_)&&PO(i,_,s[_])}function Sg(i){if(i.indexOf("-")===-1)return!1;switch(i){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 lq=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cq=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function zd(i){return cq.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function si(){}var _g=null;function Ag(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ks=null,Zs=null;function kO(i){var s=Fs(i);if(s&&(i=s.stateNode)){var u=i[Nn]||null;e:switch(i=s.stateNode,s.type){case"input":if(xg(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Wr(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var p=u[s];if(p!==i&&p.form===i.form){var b=p[Nn]||null;if(!b)throw Error(r(90));xg(p,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<u.length;s++)p=u[s],p.form===i.form&&CO(p)}break e;case"textarea":NO(i,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Ws(i,!!u.multiple,s,!1)}}}var Eg=!1;function $O(i,s,u){if(Eg)return i(s,u);Eg=!0;try{var p=i(s);return p}finally{if(Eg=!1,(Ks!==null||Zs!==null)&&(Ah(),Ks&&(s=Ks,i=Zs,Zs=Ks=null,kO(s),i)))for(s=0;s<i.length;s++)kO(i[s])}}function Vc(i,s){var u=i.stateNode;if(u===null)return null;var p=u[Nn]||null;if(p===null)return null;u=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var li=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Og=!1;if(li)try{var Gc={};Object.defineProperty(Gc,"passive",{get:function(){Og=!0}}),window.addEventListener("test",Gc,Gc),window.removeEventListener("test",Gc,Gc)}catch{Og=!1}var Yi=null,jg=null,Ld=null;function zO(){if(Ld)return Ld;var i,s=jg,u=s.length,p,b="value"in Yi?Yi.value:Yi.textContent,_=b.length;for(i=0;i<u&&s[i]===b[i];i++);var M=u-i;for(p=1;p<=M&&s[u-p]===b[_-p];p++);return Ld=b.slice(i,1<p?1-p:void 0)}function Id(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Bd(){return!0}function LO(){return!1}function dr(i){function s(u,p,b,_,M){this._reactName=u,this._targetInst=b,this.type=p,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(u=i[k],this[k]=u?u(_):_[k]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Bd:LO,this.isPropagationStopped=LO,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Bd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Bd)},persist:function(){},isPersistent:Bd}),s}var Vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ud=dr(Vo),Wc=h({},Vo,{view:0,detail:0}),uq=dr(Wc),Tg,Cg,Yc,qd=h({},Wc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ng,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Yc&&(Yc&&i.type==="mousemove"?(Tg=i.screenX-Yc.screenX,Cg=i.screenY-Yc.screenY):Cg=Tg=0,Yc=i),Tg)},movementY:function(i){return"movementY"in i?i.movementY:Cg}}),IO=dr(qd),fq=h({},qd,{dataTransfer:0}),dq=dr(fq),hq=h({},Wc,{relatedTarget:0}),Rg=dr(hq),pq=h({},Vo,{animationName:0,elapsedTime:0,pseudoElement:0}),mq=dr(pq),vq=h({},Vo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),gq=dr(vq),yq=h({},Vo,{data:0}),BO=dr(yq),bq={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xq={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"},wq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sq(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=wq[i])?!!s[i]:!1}function Ng(){return Sq}var _q=h({},Wc,{key:function(i){if(i.key){var s=bq[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Id(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xq[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ng,charCode:function(i){return i.type==="keypress"?Id(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Id(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Aq=dr(_q),Eq=h({},qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),UO=dr(Eq),Oq=h({},Wc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ng}),jq=dr(Oq),Tq=h({},Vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cq=dr(Tq),Rq=h({},qd,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),Nq=dr(Rq),Mq=h({},Vo,{newState:0,oldState:0}),Pq=dr(Mq),Dq=[9,13,27,32],Mg=li&&"CompositionEvent"in window,Kc=null;li&&"documentMode"in document&&(Kc=document.documentMode);var kq=li&&"TextEvent"in window&&!Kc,qO=li&&(!Mg||Kc&&8<Kc&&11>=Kc),HO=" ",FO=!1;function VO(i,s){switch(i){case"keyup":return Dq.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GO(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Xs=!1;function $q(i,s){switch(i){case"compositionend":return GO(s);case"keypress":return s.which!==32?null:(FO=!0,HO);case"textInput":return i=s.data,i===HO&&FO?null:i;default:return null}}function zq(i,s){if(Xs)return i==="compositionend"||!Mg&&VO(i,s)?(i=zO(),Ld=jg=Yi=null,Xs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return qO&&s.locale!=="ko"?null:s.data;default:return null}}var Lq={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 WO(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!Lq[i.type]:s==="textarea"}function YO(i,s,u,p){Ks?Zs?Zs.push(p):Zs=[p]:Ks=p,s=Nh(s,"onChange"),0<s.length&&(u=new Ud("onChange","change",null,u,p),i.push({event:u,listeners:s}))}var Zc=null,Xc=null;function Iq(i){R2(i,0)}function Hd(i){var s=Fc(i);if(CO(s))return i}function KO(i,s){if(i==="change")return s}var ZO=!1;if(li){var Pg;if(li){var Dg="oninput"in document;if(!Dg){var XO=document.createElement("div");XO.setAttribute("oninput","return;"),Dg=typeof XO.oninput=="function"}Pg=Dg}else Pg=!1;ZO=Pg&&(!document.documentMode||9<document.documentMode)}function QO(){Zc&&(Zc.detachEvent("onpropertychange",JO),Xc=Zc=null)}function JO(i){if(i.propertyName==="value"&&Hd(Xc)){var s=[];YO(s,Xc,i,Ag(i)),$O(Iq,s)}}function Bq(i,s,u){i==="focusin"?(QO(),Zc=s,Xc=u,Zc.attachEvent("onpropertychange",JO)):i==="focusout"&&QO()}function Uq(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Hd(Xc)}function qq(i,s){if(i==="click")return Hd(s)}function Hq(i,s){if(i==="input"||i==="change")return Hd(s)}function Fq(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Sr=typeof Object.is=="function"?Object.is:Fq;function Qc(i,s){if(Sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),p=Object.keys(s);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var b=u[p];if(!ft.call(s,b)||!Sr(i[b],s[b]))return!1}return!0}function ej(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tj(i,s){var u=ej(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=s&&p>=s)return{node:u,offset:s-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ej(u)}}function nj(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?nj(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function rj(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=$d(i.document);s instanceof i.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)i=s.contentWindow;else break;s=$d(i.document)}return s}function kg(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var Vq=li&&"documentMode"in document&&11>=document.documentMode,Qs=null,$g=null,Jc=null,zg=!1;function aj(i,s,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;zg||Qs==null||Qs!==$d(p)||(p=Qs,"selectionStart"in p&&kg(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Jc&&Qc(Jc,p)||(Jc=p,p=Nh($g,"onSelect"),0<p.length&&(s=new Ud("onSelect","select",null,s,u),i.push({event:s,listeners:p}),s.target=Qs)))}function Go(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var Js={animationend:Go("Animation","AnimationEnd"),animationiteration:Go("Animation","AnimationIteration"),animationstart:Go("Animation","AnimationStart"),transitionrun:Go("Transition","TransitionRun"),transitionstart:Go("Transition","TransitionStart"),transitioncancel:Go("Transition","TransitionCancel"),transitionend:Go("Transition","TransitionEnd")},Lg={},ij={};li&&(ij=document.createElement("div").style,"AnimationEvent"in window||(delete Js.animationend.animation,delete Js.animationiteration.animation,delete Js.animationstart.animation),"TransitionEvent"in window||delete Js.transitionend.transition);function Wo(i){if(Lg[i])return Lg[i];if(!Js[i])return i;var s=Js[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in ij)return Lg[i]=s[u];return i}var oj=Wo("animationend"),sj=Wo("animationiteration"),lj=Wo("animationstart"),Gq=Wo("transitionrun"),Wq=Wo("transitionstart"),Yq=Wo("transitioncancel"),cj=Wo("transitionend"),uj=new Map,Ig="abort auxClick beforeToggle 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(" ");Ig.push("scrollEnd");function ya(i,s){uj.set(i,s),Fo(s,[i])}var Fd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Yr=[],el=0,Bg=0;function Vd(){for(var i=el,s=Bg=el=0;s<i;){var u=Yr[s];Yr[s++]=null;var p=Yr[s];Yr[s++]=null;var b=Yr[s];Yr[s++]=null;var _=Yr[s];if(Yr[s++]=null,p!==null&&b!==null){var M=p.pending;M===null?b.next=b:(b.next=M.next,M.next=b),p.pending=b}_!==0&&fj(u,b,_)}}function Gd(i,s,u,p){Yr[el++]=i,Yr[el++]=s,Yr[el++]=u,Yr[el++]=p,Bg|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Ug(i,s,u,p){return Gd(i,s,u,p),Wd(i)}function Yo(i,s){return Gd(i,null,null,s),Wd(i)}function fj(i,s,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var b=!1,_=i.return;_!==null;)_.childLanes|=u,p=_.alternate,p!==null&&(p.childLanes|=u),_.tag===22&&(i=_.stateNode,i===null||i._visibility&1||(b=!0)),i=_,_=_.return;return i.tag===3?(_=i.stateNode,b&&s!==null&&(b=31-Ft(u),i=_.hiddenUpdates,p=i[b],p===null?i[b]=[s]:p.push(s),s.lane=u|536870912),_):null}function Wd(i){if(50<wu)throw wu=0,Zy=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var tl={};function Kq(i,s,u,p){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _r(i,s,u,p){return new Kq(i,s,u,p)}function qg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ci(i,s){var u=i.alternate;return u===null?(u=_r(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,s=i.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function dj(i,s){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,s=u.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function Yd(i,s,u,p,b,_){var M=0;if(p=i,typeof i=="function")qg(i)&&(M=1);else if(typeof i=="string")M=e9(i,u,oe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=_r(31,u,s,b),i.elementType=z,i.lanes=_,i;case S:return Ko(u.children,b,_,s);case w:M=8,b|=24;break;case E:return i=_r(12,u,s,b|2),i.elementType=E,i.lanes=_,i;case C:return i=_r(13,u,s,b),i.elementType=C,i.lanes=_,i;case T:return i=_r(19,u,s,b),i.elementType=T,i.lanes=_,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case j:M=10;break e;case O:M=9;break e;case R:M=11;break e;case N:M=14;break e;case D:M=16,p=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return s=_r(M,u,s,b),s.elementType=i,s.type=p,s.lanes=_,s}function Ko(i,s,u,p){return i=_r(7,i,p,s),i.lanes=u,i}function Hg(i,s,u){return i=_r(6,i,null,s),i.lanes=u,i}function hj(i){var s=_r(18,null,null,0);return s.stateNode=i,s}function Fg(i,s,u){return s=_r(4,i.children!==null?i.children:[],i.key,s),s.lanes=u,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var pj=new WeakMap;function Kr(i,s){if(typeof i=="object"&&i!==null){var u=pj.get(i);return u!==void 0?u:(s={value:i,source:s,stack:Rt(s)},pj.set(i,s),s)}return{value:i,source:s,stack:Rt(s)}}var nl=[],rl=0,Kd=null,eu=0,Zr=[],Xr=0,Ki=null,Ia=1,Ba="";function ui(i,s){nl[rl++]=eu,nl[rl++]=Kd,Kd=i,eu=s}function mj(i,s,u){Zr[Xr++]=Ia,Zr[Xr++]=Ba,Zr[Xr++]=Ki,Ki=i;var p=Ia;i=Ba;var b=32-Ft(p)-1;p&=~(1<<b),u+=1;var _=32-Ft(s)+b;if(30<_){var M=b-b%5;_=(p&(1<<M)-1).toString(32),p>>=M,b-=M,Ia=1<<32-Ft(s)+b|u<<b|p,Ba=_+i}else Ia=1<<_|u<<b|p,Ba=i}function Vg(i){i.return!==null&&(ui(i,1),mj(i,1,0))}function Gg(i){for(;i===Kd;)Kd=nl[--rl],nl[rl]=null,eu=nl[--rl],nl[rl]=null;for(;i===Ki;)Ki=Zr[--Xr],Zr[Xr]=null,Ba=Zr[--Xr],Zr[Xr]=null,Ia=Zr[--Xr],Zr[Xr]=null}function vj(i,s){Zr[Xr++]=Ia,Zr[Xr++]=Ba,Zr[Xr++]=Ki,Ia=s.id,Ba=s.overflow,Ki=i}var Hn=null,Zt=null,bt=!1,Zi=null,Qr=!1,Wg=Error(r(519));function Xi(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tu(Kr(s,i)),Wg}function gj(i){var s=i.stateNode,u=i.type,p=i.memoizedProps;switch(s[Vt]=i,s[Nn]=p,u){case"dialog":pt("cancel",s),pt("close",s);break;case"iframe":case"object":case"embed":pt("load",s);break;case"video":case"audio":for(u=0;u<_u.length;u++)pt(_u[u],s);break;case"source":pt("error",s);break;case"img":case"image":case"link":pt("error",s),pt("load",s);break;case"details":pt("toggle",s);break;case"input":pt("invalid",s),RO(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":pt("invalid",s);break;case"textarea":pt("invalid",s),MO(s,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||p.suppressHydrationWarning===!0||D2(s.textContent,u)?(p.popover!=null&&(pt("beforetoggle",s),pt("toggle",s)),p.onScroll!=null&&pt("scroll",s),p.onScrollEnd!=null&&pt("scrollend",s),p.onClick!=null&&(s.onclick=si),s=!0):s=!1,s||Xi(i,!0)}function yj(i){for(Hn=i.return;Hn;)switch(Hn.tag){case 5:case 31:case 13:Qr=!1;return;case 27:case 3:Qr=!0;return;default:Hn=Hn.return}}function al(i){if(i!==Hn)return!1;if(!bt)return yj(i),bt=!0,!1;var s=i.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||fb(i.type,i.memoizedProps)),u=!u),u&&Zt&&Xi(i),yj(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Zt=H2(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Zt=H2(i)}else s===27?(s=Zt,fo(i.type)?(i=vb,vb=null,Zt=i):Zt=s):Zt=Hn?ea(i.stateNode.nextSibling):null;return!0}function Zo(){Zt=Hn=null,bt=!1}function Yg(){var i=Zi;return i!==null&&(vr===null?vr=i:vr.push.apply(vr,i),Zi=null),i}function tu(i){Zi===null?Zi=[i]:Zi.push(i)}var Kg=I(null),Xo=null,fi=null;function Qi(i,s,u){X(Kg,s._currentValue),s._currentValue=u}function di(i){i._currentValue=Kg.current,Z(Kg)}function Zg(i,s,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===u)break;i=i.return}}function Xg(i,s,u,p){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var _=b.dependencies;if(_!==null){var M=b.child;_=_.firstContext;e:for(;_!==null;){var k=_;_=b;for(var Y=0;Y<s.length;Y++)if(k.context===s[Y]){_.lanes|=u,k=_.alternate,k!==null&&(k.lanes|=u),Zg(_.return,u,i),p||(M=null);break e}_=k.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(r(341));M.lanes|=u,_=M.alternate,_!==null&&(_.lanes|=u),Zg(M,u,i),M=null}else M=b.child;if(M!==null)M.return=b;else for(M=b;M!==null;){if(M===i){M=null;break}if(b=M.sibling,b!==null){b.return=M.return,M=b;break}M=M.return}b=M}}function il(i,s,u,p){i=null;for(var b=s,_=!1;b!==null;){if(!_){if((b.flags&524288)!==0)_=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var M=b.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var k=b.type;Sr(b.pendingProps.value,M.value)||(i!==null?i.push(k):i=[k])}}else if(b===me.current){if(M=b.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(Tu):i=[Tu])}b=b.return}i!==null&&Xg(s,i,u,p),s.flags|=262144}function Zd(i){for(i=i.firstContext;i!==null;){if(!Sr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Qo(i){Xo=i,fi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Fn(i){return bj(Xo,i)}function Xd(i,s){return Xo===null&&Qo(i),bj(i,s)}function bj(i,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},fi===null){if(i===null)throw Error(r(308));fi=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else fi=fi.next=s;return u}var Zq=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){s.aborted=!0,i.forEach(function(u){return u()})}},Xq=e.unstable_scheduleCallback,Qq=e.unstable_NormalPriority,xn={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qg(){return{controller:new Zq,data:new Map,refCount:0}}function nu(i){i.refCount--,i.refCount===0&&Xq(Qq,function(){i.controller.abort()})}var ru=null,Jg=0,ol=0,sl=null;function Jq(i,s){if(ru===null){var u=ru=[];Jg=0,ol=nb(),sl={status:"pending",value:void 0,then:function(p){u.push(p)}}}return Jg++,s.then(xj,xj),s}function xj(){if(--Jg===0&&ru!==null){sl!==null&&(sl.status="fulfilled");var i=ru;ru=null,ol=0,sl=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function eH(i,s){var u=[],p={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){p.status="fulfilled",p.value=s;for(var b=0;b<u.length;b++)(0,u[b])(s)},function(b){for(p.status="rejected",p.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),p}var wj=$.S;$.S=function(i,s){a2=H(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Jq(i,s),wj!==null&&wj(i,s)};var Jo=I(null);function ey(){var i=Jo.current;return i!==null?i:Gt.pooledCache}function Qd(i,s){s===null?X(Jo,Jo.current):X(Jo,s.pool)}function Sj(){var i=ey();return i===null?null:{parent:xn._currentValue,pool:i}}var ll=Error(r(460)),ty=Error(r(474)),Jd=Error(r(542)),eh={then:function(){}};function _j(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Aj(i,s,u){switch(u=i[u],u===void 0?i.push(s):u!==s&&(s.then(si,si),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Oj(i),i;default:if(typeof s.status=="string")s.then(si,si);else{if(i=Gt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(p){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=p}},function(p){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Oj(i),i}throw ts=s,ll}}function es(i){try{var s=i._init;return s(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ts=u,ll):u}}var ts=null;function Ej(){if(ts===null)throw Error(r(459));var i=ts;return ts=null,i}function Oj(i){if(i===ll||i===Jd)throw Error(r(483))}var cl=null,au=0;function th(i){var s=au;return au+=1,cl===null&&(cl=[]),Aj(cl,i,s)}function iu(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function nh(i,s){throw s.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function jj(i){function s(ee,Q){if(i){var ne=ee.deletions;ne===null?(ee.deletions=[Q],ee.flags|=16):ne.push(Q)}}function u(ee,Q){if(!i)return null;for(;Q!==null;)s(ee,Q),Q=Q.sibling;return null}function p(ee){for(var Q=new Map;ee!==null;)ee.key!==null?Q.set(ee.key,ee):Q.set(ee.index,ee),ee=ee.sibling;return Q}function b(ee,Q){return ee=ci(ee,Q),ee.index=0,ee.sibling=null,ee}function _(ee,Q,ne){return ee.index=ne,i?(ne=ee.alternate,ne!==null?(ne=ne.index,ne<Q?(ee.flags|=67108866,Q):ne):(ee.flags|=67108866,Q)):(ee.flags|=1048576,Q)}function M(ee){return i&&ee.alternate===null&&(ee.flags|=67108866),ee}function k(ee,Q,ne,ve){return Q===null||Q.tag!==6?(Q=Hg(ne,ee.mode,ve),Q.return=ee,Q):(Q=b(Q,ne),Q.return=ee,Q)}function Y(ee,Q,ne,ve){var Ge=ne.type;return Ge===S?de(ee,Q,ne.props.children,ve,ne.key):Q!==null&&(Q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===D&&es(Ge)===Q.type)?(Q=b(Q,ne.props),iu(Q,ne),Q.return=ee,Q):(Q=Yd(ne.type,ne.key,ne.props,null,ee.mode,ve),iu(Q,ne),Q.return=ee,Q)}function ae(ee,Q,ne,ve){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ne.containerInfo||Q.stateNode.implementation!==ne.implementation?(Q=Fg(ne,ee.mode,ve),Q.return=ee,Q):(Q=b(Q,ne.children||[]),Q.return=ee,Q)}function de(ee,Q,ne,ve,Ge){return Q===null||Q.tag!==7?(Q=Ko(ne,ee.mode,ve,Ge),Q.return=ee,Q):(Q=b(Q,ne),Q.return=ee,Q)}function ye(ee,Q,ne){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Hg(""+Q,ee.mode,ne),Q.return=ee,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return ne=Yd(Q.type,Q.key,Q.props,null,ee.mode,ne),iu(ne,Q),ne.return=ee,ne;case A:return Q=Fg(Q,ee.mode,ne),Q.return=ee,Q;case D:return Q=es(Q),ye(ee,Q,ne)}if(W(Q)||P(Q))return Q=Ko(Q,ee.mode,ne,null),Q.return=ee,Q;if(typeof Q.then=="function")return ye(ee,th(Q),ne);if(Q.$$typeof===j)return ye(ee,Xd(ee,Q),ne);nh(ee,Q)}return null}function le(ee,Q,ne,ve){var Ge=Q!==null?Q.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Ge!==null?null:k(ee,Q,""+ne,ve);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return ne.key===Ge?Y(ee,Q,ne,ve):null;case A:return ne.key===Ge?ae(ee,Q,ne,ve):null;case D:return ne=es(ne),le(ee,Q,ne,ve)}if(W(ne)||P(ne))return Ge!==null?null:de(ee,Q,ne,ve,null);if(typeof ne.then=="function")return le(ee,Q,th(ne),ve);if(ne.$$typeof===j)return le(ee,Q,Xd(ee,ne),ve);nh(ee,ne)}return null}function ue(ee,Q,ne,ve,Ge){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return ee=ee.get(ne)||null,k(Q,ee,""+ve,Ge);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case x:return ee=ee.get(ve.key===null?ne:ve.key)||null,Y(Q,ee,ve,Ge);case A:return ee=ee.get(ve.key===null?ne:ve.key)||null,ae(Q,ee,ve,Ge);case D:return ve=es(ve),ue(ee,Q,ne,ve,Ge)}if(W(ve)||P(ve))return ee=ee.get(ne)||null,de(Q,ee,ve,Ge,null);if(typeof ve.then=="function")return ue(ee,Q,ne,th(ve),Ge);if(ve.$$typeof===j)return ue(ee,Q,ne,Xd(Q,ve),Ge);nh(Q,ve)}return null}function Be(ee,Q,ne,ve){for(var Ge=null,_t=null,qe=Q,ot=Q=0,gt=null;qe!==null&&ot<ne.length;ot++){qe.index>ot?(gt=qe,qe=null):gt=qe.sibling;var At=le(ee,qe,ne[ot],ve);if(At===null){qe===null&&(qe=gt);break}i&&qe&&At.alternate===null&&s(ee,qe),Q=_(At,Q,ot),_t===null?Ge=At:_t.sibling=At,_t=At,qe=gt}if(ot===ne.length)return u(ee,qe),bt&&ui(ee,ot),Ge;if(qe===null){for(;ot<ne.length;ot++)qe=ye(ee,ne[ot],ve),qe!==null&&(Q=_(qe,Q,ot),_t===null?Ge=qe:_t.sibling=qe,_t=qe);return bt&&ui(ee,ot),Ge}for(qe=p(qe);ot<ne.length;ot++)gt=ue(qe,ee,ot,ne[ot],ve),gt!==null&&(i&&gt.alternate!==null&&qe.delete(gt.key===null?ot:gt.key),Q=_(gt,Q,ot),_t===null?Ge=gt:_t.sibling=gt,_t=gt);return i&&qe.forEach(function(go){return s(ee,go)}),bt&&ui(ee,ot),Ge}function Ye(ee,Q,ne,ve){if(ne==null)throw Error(r(151));for(var Ge=null,_t=null,qe=Q,ot=Q=0,gt=null,At=ne.next();qe!==null&&!At.done;ot++,At=ne.next()){qe.index>ot?(gt=qe,qe=null):gt=qe.sibling;var go=le(ee,qe,At.value,ve);if(go===null){qe===null&&(qe=gt);break}i&&qe&&go.alternate===null&&s(ee,qe),Q=_(go,Q,ot),_t===null?Ge=go:_t.sibling=go,_t=go,qe=gt}if(At.done)return u(ee,qe),bt&&ui(ee,ot),Ge;if(qe===null){for(;!At.done;ot++,At=ne.next())At=ye(ee,At.value,ve),At!==null&&(Q=_(At,Q,ot),_t===null?Ge=At:_t.sibling=At,_t=At);return bt&&ui(ee,ot),Ge}for(qe=p(qe);!At.done;ot++,At=ne.next())At=ue(qe,ee,ot,At.value,ve),At!==null&&(i&&At.alternate!==null&&qe.delete(At.key===null?ot:At.key),Q=_(At,Q,ot),_t===null?Ge=At:_t.sibling=At,_t=At);return i&&qe.forEach(function(f9){return s(ee,f9)}),bt&&ui(ee,ot),Ge}function Bt(ee,Q,ne,ve){if(typeof ne=="object"&&ne!==null&&ne.type===S&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:e:{for(var Ge=ne.key;Q!==null;){if(Q.key===Ge){if(Ge=ne.type,Ge===S){if(Q.tag===7){u(ee,Q.sibling),ve=b(Q,ne.props.children),ve.return=ee,ee=ve;break e}}else if(Q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===D&&es(Ge)===Q.type){u(ee,Q.sibling),ve=b(Q,ne.props),iu(ve,ne),ve.return=ee,ee=ve;break e}u(ee,Q);break}else s(ee,Q);Q=Q.sibling}ne.type===S?(ve=Ko(ne.props.children,ee.mode,ve,ne.key),ve.return=ee,ee=ve):(ve=Yd(ne.type,ne.key,ne.props,null,ee.mode,ve),iu(ve,ne),ve.return=ee,ee=ve)}return M(ee);case A:e:{for(Ge=ne.key;Q!==null;){if(Q.key===Ge)if(Q.tag===4&&Q.stateNode.containerInfo===ne.containerInfo&&Q.stateNode.implementation===ne.implementation){u(ee,Q.sibling),ve=b(Q,ne.children||[]),ve.return=ee,ee=ve;break e}else{u(ee,Q);break}else s(ee,Q);Q=Q.sibling}ve=Fg(ne,ee.mode,ve),ve.return=ee,ee=ve}return M(ee);case D:return ne=es(ne),Bt(ee,Q,ne,ve)}if(W(ne))return Be(ee,Q,ne,ve);if(P(ne)){if(Ge=P(ne),typeof Ge!="function")throw Error(r(150));return ne=Ge.call(ne),Ye(ee,Q,ne,ve)}if(typeof ne.then=="function")return Bt(ee,Q,th(ne),ve);if(ne.$$typeof===j)return Bt(ee,Q,Xd(ee,ne),ve);nh(ee,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,Q!==null&&Q.tag===6?(u(ee,Q.sibling),ve=b(Q,ne),ve.return=ee,ee=ve):(u(ee,Q),ve=Hg(ne,ee.mode,ve),ve.return=ee,ee=ve),M(ee)):u(ee,Q)}return function(ee,Q,ne,ve){try{au=0;var Ge=Bt(ee,Q,ne,ve);return cl=null,Ge}catch(qe){if(qe===ll||qe===Jd)throw qe;var _t=_r(29,qe,null,ee.mode);return _t.lanes=ve,_t.return=ee,_t}finally{}}}var ns=jj(!0),Tj=jj(!1),Ji=!1;function ny(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ry(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function eo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function to(i,s,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(jt&2)!==0){var b=p.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),p.pending=s,s=Wd(i),fj(i,null,u),s}return Gd(i,p,s,u),Wd(i)}function ou(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,ke(i,u)}}function ay(i,s){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var b=null,_=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};_===null?b=_=M:_=_.next=M,u=u.next}while(u!==null);_===null?b=_=s:_=_.next=s}else b=_=s;u={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:_,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}var iy=!1;function su(){if(iy){var i=sl;if(i!==null)throw i}}function lu(i,s,u,p){iy=!1;var b=i.updateQueue;Ji=!1;var _=b.firstBaseUpdate,M=b.lastBaseUpdate,k=b.shared.pending;if(k!==null){b.shared.pending=null;var Y=k,ae=Y.next;Y.next=null,M===null?_=ae:M.next=ae,M=Y;var de=i.alternate;de!==null&&(de=de.updateQueue,k=de.lastBaseUpdate,k!==M&&(k===null?de.firstBaseUpdate=ae:k.next=ae,de.lastBaseUpdate=Y))}if(_!==null){var ye=b.baseState;M=0,de=ae=Y=null,k=_;do{var le=k.lane&-536870913,ue=le!==k.lane;if(ue?(vt&le)===le:(p&le)===le){le!==0&&le===ol&&(iy=!0),de!==null&&(de=de.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Be=i,Ye=k;le=s;var Bt=u;switch(Ye.tag){case 1:if(Be=Ye.payload,typeof Be=="function"){ye=Be.call(Bt,ye,le);break e}ye=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=Ye.payload,le=typeof Be=="function"?Be.call(Bt,ye,le):Be,le==null)break e;ye=h({},ye,le);break e;case 2:Ji=!0}}le=k.callback,le!==null&&(i.flags|=64,ue&&(i.flags|=8192),ue=b.callbacks,ue===null?b.callbacks=[le]:ue.push(le))}else ue={lane:le,tag:k.tag,payload:k.payload,callback:k.callback,next:null},de===null?(ae=de=ue,Y=ye):de=de.next=ue,M|=le;if(k=k.next,k===null){if(k=b.shared.pending,k===null)break;ue=k,k=ue.next,ue.next=null,b.lastBaseUpdate=ue,b.shared.pending=null}}while(!0);de===null&&(Y=ye),b.baseState=Y,b.firstBaseUpdate=ae,b.lastBaseUpdate=de,_===null&&(b.shared.lanes=0),oo|=M,i.lanes=M,i.memoizedState=ye}}function Cj(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function Rj(i,s){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Cj(u[i],s)}var ul=I(null),rh=I(0);function Nj(i,s){i=wi,X(rh,i),X(ul,s),wi=i|s.baseLanes}function oy(){X(rh,wi),X(ul,ul.current)}function sy(){wi=rh.current,Z(ul),Z(rh)}var Ar=I(null),Jr=null;function no(i){var s=i.alternate;X(vn,vn.current&1),X(Ar,i),Jr===null&&(s===null||ul.current!==null||s.memoizedState!==null)&&(Jr=i)}function ly(i){X(vn,vn.current),X(Ar,i),Jr===null&&(Jr=i)}function Mj(i){i.tag===22?(X(vn,vn.current),X(Ar,i),Jr===null&&(Jr=i)):ro()}function ro(){X(vn,vn.current),X(Ar,Ar.current)}function Er(i){Z(Ar),Jr===i&&(Jr=null),Z(vn)}var vn=I(0);function ah(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||pb(u)||mb(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var hi=0,it=null,Lt=null,wn=null,ih=!1,fl=!1,rs=!1,oh=0,cu=0,dl=null,tH=0;function dn(){throw Error(r(321))}function cy(i,s){if(s===null)return!1;for(var u=0;u<s.length&&u<i.length;u++)if(!Sr(i[u],s[u]))return!1;return!0}function uy(i,s,u,p,b,_){return hi=_,it=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=i===null||i.memoizedState===null?mT:Ey,rs=!1,_=u(p,b),rs=!1,fl&&(_=Dj(s,u,p,b)),Pj(i),_}function Pj(i){$.H=du;var s=Lt!==null&&Lt.next!==null;if(hi=0,wn=Lt=it=null,ih=!1,cu=0,dl=null,s)throw Error(r(300));i===null||Sn||(i=i.dependencies,i!==null&&Zd(i)&&(Sn=!0))}function Dj(i,s,u,p){it=i;var b=0;do{if(fl&&(dl=null),cu=0,fl=!1,25<=b)throw Error(r(301));if(b+=1,wn=Lt=null,i.updateQueue!=null){var _=i.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}$.H=vT,_=s(u,p)}while(fl);return _}function nH(){var i=$.H,s=i.useState()[0];return s=typeof s.then=="function"?uu(s):s,i=i.useState()[0],(Lt!==null?Lt.memoizedState:null)!==i&&(it.flags|=1024),s}function fy(){var i=oh!==0;return oh=0,i}function dy(i,s,u){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~u}function hy(i){if(ih){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}ih=!1}hi=0,wn=Lt=it=null,fl=!1,cu=oh=0,dl=null}function or(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wn===null?it.memoizedState=wn=i:wn=wn.next=i,wn}function gn(){if(Lt===null){var i=it.alternate;i=i!==null?i.memoizedState:null}else i=Lt.next;var s=wn===null?it.memoizedState:wn.next;if(s!==null)wn=s,Lt=i;else{if(i===null)throw it.alternate===null?Error(r(467)):Error(r(310));Lt=i,i={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},wn===null?it.memoizedState=wn=i:wn=wn.next=i}return wn}function sh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function uu(i){var s=cu;return cu+=1,dl===null&&(dl=[]),i=Aj(dl,i,s),s=it,(wn===null?s.memoizedState:wn.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?mT:Ey),i}function lh(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return uu(i);if(i.$$typeof===j)return Fn(i)}throw Error(r(438,String(i)))}function py(i){var s=null,u=it.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var p=it.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=sh(),it.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(i),p=0;p<i;p++)u[p]=G;return s.index++,u}function pi(i,s){return typeof s=="function"?s(i):s}function ch(i){var s=gn();return my(s,Lt,i)}function my(i,s,u){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var b=i.baseQueue,_=p.pending;if(_!==null){if(b!==null){var M=b.next;b.next=_.next,_.next=M}s.baseQueue=b=_,p.pending=null}if(_=i.baseState,b===null)i.memoizedState=_;else{s=b.next;var k=M=null,Y=null,ae=s,de=!1;do{var ye=ae.lane&-536870913;if(ye!==ae.lane?(vt&ye)===ye:(hi&ye)===ye){var le=ae.revertLane;if(le===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),ye===ol&&(de=!0);else if((hi&le)===le){ae=ae.next,le===ol&&(de=!0);continue}else ye={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Y===null?(k=Y=ye,M=_):Y=Y.next=ye,it.lanes|=le,oo|=le;ye=ae.action,rs&&u(_,ye),_=ae.hasEagerState?ae.eagerState:u(_,ye)}else le={lane:ye,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Y===null?(k=Y=le,M=_):Y=Y.next=le,it.lanes|=ye,oo|=ye;ae=ae.next}while(ae!==null&&ae!==s);if(Y===null?M=_:Y.next=k,!Sr(_,i.memoizedState)&&(Sn=!0,de&&(u=sl,u!==null)))throw u;i.memoizedState=_,i.baseState=M,i.baseQueue=Y,p.lastRenderedState=_}return b===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function vy(i){var s=gn(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var p=u.dispatch,b=u.pending,_=s.memoizedState;if(b!==null){u.pending=null;var M=b=b.next;do _=i(_,M.action),M=M.next;while(M!==b);Sr(_,s.memoizedState)||(Sn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),u.lastRenderedState=_}return[_,p]}function kj(i,s,u){var p=it,b=gn(),_=bt;if(_){if(u===void 0)throw Error(r(407));u=u()}else u=s();var M=!Sr((Lt||b).memoizedState,u);if(M&&(b.memoizedState=u,Sn=!0),b=b.queue,by(Lj.bind(null,p,b,i),[i]),b.getSnapshot!==s||M||wn!==null&&wn.memoizedState.tag&1){if(p.flags|=2048,hl(9,{destroy:void 0},zj.bind(null,p,b,u,s),null),Gt===null)throw Error(r(349));_||(hi&127)!==0||$j(p,s,u)}return u}function $j(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=it.updateQueue,s===null?(s=sh(),it.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function zj(i,s,u,p){s.value=u,s.getSnapshot=p,Ij(s)&&Bj(i)}function Lj(i,s,u){return u(function(){Ij(s)&&Bj(i)})}function Ij(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!Sr(i,u)}catch{return!0}}function Bj(i){var s=Yo(i,2);s!==null&&gr(s,i,2)}function gy(i){var s=or();if(typeof i=="function"){var u=i;if(i=u(),rs){Mt(!0);try{u()}finally{Mt(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:i},s}function Uj(i,s,u,p){return i.baseState=u,my(i,Lt,typeof p=="function"?p:pi)}function rH(i,s,u,p,b){if(dh(i))throw Error(r(485));if(i=s.action,i!==null){var _={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){_.listeners.push(M)}};$.T!==null?u(!0):_.isTransition=!1,p(_),u=s.pending,u===null?(_.next=s.pending=_,qj(s,_)):(_.next=u.next,s.pending=u.next=_)}}function qj(i,s){var u=s.action,p=s.payload,b=i.state;if(s.isTransition){var _=$.T,M={};$.T=M;try{var k=u(b,p),Y=$.S;Y!==null&&Y(M,k),Hj(i,s,k)}catch(ae){yy(i,s,ae)}finally{_!==null&&M.types!==null&&(_.types=M.types),$.T=_}}else try{_=u(b,p),Hj(i,s,_)}catch(ae){yy(i,s,ae)}}function Hj(i,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){Fj(i,s,p)},function(p){return yy(i,s,p)}):Fj(i,s,u)}function Fj(i,s,u){s.status="fulfilled",s.value=u,Vj(s),i.state=u,s=i.pending,s!==null&&(u=s.next,u===s?i.pending=null:(u=u.next,s.next=u,qj(i,u)))}function yy(i,s,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=u,Vj(s),s=s.next;while(s!==p)}i.action=null}function Vj(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function Gj(i,s){return s}function Wj(i,s){if(bt){var u=Gt.formState;if(u!==null){e:{var p=it;if(bt){if(Zt){t:{for(var b=Zt,_=Qr;b.nodeType!==8;){if(!_){b=null;break t}if(b=ea(b.nextSibling),b===null){b=null;break t}}_=b.data,b=_==="F!"||_==="F"?b:null}if(b){Zt=ea(b.nextSibling),p=b.data==="F!";break e}}Xi(p)}p=!1}p&&(s=u[0])}}return u=or(),u.memoizedState=u.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gj,lastRenderedState:s},u.queue=p,u=dT.bind(null,it,p),p.dispatch=u,p=gy(!1),_=Ay.bind(null,it,!1,p.queue),p=or(),b={state:s,dispatch:null,action:i,pending:null},p.queue=b,u=rH.bind(null,it,b,_,u),b.dispatch=u,p.memoizedState=i,[s,u,!1]}function Yj(i){var s=gn();return Kj(s,Lt,i)}function Kj(i,s,u){if(s=my(i,s,Gj)[0],i=ch(pi)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=uu(s)}catch(M){throw M===ll?Jd:M}else p=s;s=gn();var b=s.queue,_=b.dispatch;return u!==s.memoizedState&&(it.flags|=2048,hl(9,{destroy:void 0},aH.bind(null,b,u),null)),[p,_,i]}function aH(i,s){i.action=s}function Zj(i){var s=gn(),u=Lt;if(u!==null)return Kj(s,u,i);gn(),s=s.memoizedState,u=gn();var p=u.queue.dispatch;return u.memoizedState=i,[s,p,!1]}function hl(i,s,u,p){return i={tag:i,create:u,deps:p,inst:s,next:null},s=it.updateQueue,s===null&&(s=sh(),it.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,s.lastEffect=i),i}function Xj(){return gn().memoizedState}function uh(i,s,u,p){var b=or();it.flags|=i,b.memoizedState=hl(1|s,{destroy:void 0},u,p===void 0?null:p)}function fh(i,s,u,p){var b=gn();p=p===void 0?null:p;var _=b.memoizedState.inst;Lt!==null&&p!==null&&cy(p,Lt.memoizedState.deps)?b.memoizedState=hl(s,_,u,p):(it.flags|=i,b.memoizedState=hl(1|s,_,u,p))}function Qj(i,s){uh(8390656,8,i,s)}function by(i,s){fh(2048,8,i,s)}function iH(i){it.flags|=4;var s=it.updateQueue;if(s===null)s=sh(),it.updateQueue=s,s.events=[i];else{var u=s.events;u===null?s.events=[i]:u.push(i)}}function Jj(i){var s=gn().memoizedState;return iH({ref:s,nextImpl:i}),function(){if((jt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function eT(i,s){return fh(4,2,i,s)}function tT(i,s){return fh(4,4,i,s)}function nT(i,s){if(typeof s=="function"){i=i();var u=s(i);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function rT(i,s,u){u=u!=null?u.concat([i]):null,fh(4,4,nT.bind(null,s,i),u)}function xy(){}function aT(i,s){var u=gn();s=s===void 0?null:s;var p=u.memoizedState;return s!==null&&cy(s,p[1])?p[0]:(u.memoizedState=[i,s],i)}function iT(i,s){var u=gn();s=s===void 0?null:s;var p=u.memoizedState;if(s!==null&&cy(s,p[1]))return p[0];if(p=i(),rs){Mt(!0);try{i()}finally{Mt(!1)}}return u.memoizedState=[p,s],p}function wy(i,s,u){return u===void 0||(hi&1073741824)!==0&&(vt&261930)===0?i.memoizedState=s:(i.memoizedState=u,i=o2(),it.lanes|=i,oo|=i,u)}function oT(i,s,u,p){return Sr(u,s)?u:ul.current!==null?(i=wy(i,u,p),Sr(i,s)||(Sn=!0),i):(hi&42)===0||(hi&1073741824)!==0&&(vt&261930)===0?(Sn=!0,i.memoizedState=u):(i=o2(),it.lanes|=i,oo|=i,s)}function sT(i,s,u,p,b){var _=V.p;V.p=_!==0&&8>_?_:8;var M=$.T,k={};$.T=k,Ay(i,!1,s,u);try{var Y=b(),ae=$.S;if(ae!==null&&ae(k,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var de=eH(Y,p);fu(i,s,de,Tr(i))}else fu(i,s,p,Tr(i))}catch(ye){fu(i,s,{then:function(){},status:"rejected",reason:ye},Tr())}finally{V.p=_,M!==null&&k.types!==null&&(M.types=k.types),$.T=M}}function oH(){}function Sy(i,s,u,p){if(i.tag!==5)throw Error(r(476));var b=lT(i).queue;sT(i,b,s,F,u===null?oH:function(){return cT(i),u(p)})}function lT(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:F},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:u},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function cT(i){var s=lT(i);s.next===null&&(s=i.alternate.memoizedState),fu(i,s.next.queue,{},Tr())}function _y(){return Fn(Tu)}function uT(){return gn().memoizedState}function fT(){return gn().memoizedState}function sH(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var u=Tr();i=eo(u);var p=to(s,i,u);p!==null&&(gr(p,s,u),ou(p,s,u)),s={cache:Qg()},i.payload=s;return}s=s.return}}function lH(i,s,u){var p=Tr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},dh(i)?hT(s,u):(u=Ug(i,s,u,p),u!==null&&(gr(u,i,p),pT(u,s,p)))}function dT(i,s,u){var p=Tr();fu(i,s,u,p)}function fu(i,s,u,p){var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(dh(i))hT(s,b);else{var _=i.alternate;if(i.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var M=s.lastRenderedState,k=_(M,u);if(b.hasEagerState=!0,b.eagerState=k,Sr(k,M))return Gd(i,s,b,0),Gt===null&&Vd(),!1}catch{}finally{}if(u=Ug(i,s,b,p),u!==null)return gr(u,i,p),pT(u,s,p),!0}return!1}function Ay(i,s,u,p){if(p={lane:2,revertLane:nb(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},dh(i)){if(s)throw Error(r(479))}else s=Ug(i,u,p,2),s!==null&&gr(s,i,2)}function dh(i){var s=i.alternate;return i===it||s!==null&&s===it}function hT(i,s){fl=ih=!0;var u=i.pending;u===null?s.next=s:(s.next=u.next,u.next=s),i.pending=s}function pT(i,s,u){if((u&4194048)!==0){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,ke(i,u)}}var du={readContext:Fn,use:lh,useCallback:dn,useContext:dn,useEffect:dn,useImperativeHandle:dn,useLayoutEffect:dn,useInsertionEffect:dn,useMemo:dn,useReducer:dn,useRef:dn,useState:dn,useDebugValue:dn,useDeferredValue:dn,useTransition:dn,useSyncExternalStore:dn,useId:dn,useHostTransitionStatus:dn,useFormState:dn,useActionState:dn,useOptimistic:dn,useMemoCache:dn,useCacheRefresh:dn};du.useEffectEvent=dn;var mT={readContext:Fn,use:lh,useCallback:function(i,s){return or().memoizedState=[i,s===void 0?null:s],i},useContext:Fn,useEffect:Qj,useImperativeHandle:function(i,s,u){u=u!=null?u.concat([i]):null,uh(4194308,4,nT.bind(null,s,i),u)},useLayoutEffect:function(i,s){return uh(4194308,4,i,s)},useInsertionEffect:function(i,s){uh(4,2,i,s)},useMemo:function(i,s){var u=or();s=s===void 0?null:s;var p=i();if(rs){Mt(!0);try{i()}finally{Mt(!1)}}return u.memoizedState=[p,s],p},useReducer:function(i,s,u){var p=or();if(u!==void 0){var b=u(s);if(rs){Mt(!0);try{u(s)}finally{Mt(!1)}}}else b=s;return p.memoizedState=p.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},p.queue=i,i=i.dispatch=lH.bind(null,it,i),[p.memoizedState,i]},useRef:function(i){var s=or();return i={current:i},s.memoizedState=i},useState:function(i){i=gy(i);var s=i.queue,u=dT.bind(null,it,s);return s.dispatch=u,[i.memoizedState,u]},useDebugValue:xy,useDeferredValue:function(i,s){var u=or();return wy(u,i,s)},useTransition:function(){var i=gy(!1);return i=sT.bind(null,it,i.queue,!0,!1),or().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,u){var p=it,b=or();if(bt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),Gt===null)throw Error(r(349));(vt&127)!==0||$j(p,s,u)}b.memoizedState=u;var _={value:u,getSnapshot:s};return b.queue=_,Qj(Lj.bind(null,p,_,i),[i]),p.flags|=2048,hl(9,{destroy:void 0},zj.bind(null,p,_,u,s),null),u},useId:function(){var i=or(),s=Gt.identifierPrefix;if(bt){var u=Ba,p=Ia;u=(p&~(1<<32-Ft(p)-1)).toString(32)+u,s="_"+s+"R_"+u,u=oh++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=tH++,s="_"+s+"r_"+u.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:_y,useFormState:Wj,useActionState:Wj,useOptimistic:function(i){var s=or();s.memoizedState=s.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=Ay.bind(null,it,!0,u),u.dispatch=s,[i,s]},useMemoCache:py,useCacheRefresh:function(){return or().memoizedState=sH.bind(null,it)},useEffectEvent:function(i){var s=or(),u={impl:i};return s.memoizedState=u,function(){if((jt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Ey={readContext:Fn,use:lh,useCallback:aT,useContext:Fn,useEffect:by,useImperativeHandle:rT,useInsertionEffect:eT,useLayoutEffect:tT,useMemo:iT,useReducer:ch,useRef:Xj,useState:function(){return ch(pi)},useDebugValue:xy,useDeferredValue:function(i,s){var u=gn();return oT(u,Lt.memoizedState,i,s)},useTransition:function(){var i=ch(pi)[0],s=gn().memoizedState;return[typeof i=="boolean"?i:uu(i),s]},useSyncExternalStore:kj,useId:uT,useHostTransitionStatus:_y,useFormState:Yj,useActionState:Yj,useOptimistic:function(i,s){var u=gn();return Uj(u,Lt,i,s)},useMemoCache:py,useCacheRefresh:fT};Ey.useEffectEvent=Jj;var vT={readContext:Fn,use:lh,useCallback:aT,useContext:Fn,useEffect:by,useImperativeHandle:rT,useInsertionEffect:eT,useLayoutEffect:tT,useMemo:iT,useReducer:vy,useRef:Xj,useState:function(){return vy(pi)},useDebugValue:xy,useDeferredValue:function(i,s){var u=gn();return Lt===null?wy(u,i,s):oT(u,Lt.memoizedState,i,s)},useTransition:function(){var i=vy(pi)[0],s=gn().memoizedState;return[typeof i=="boolean"?i:uu(i),s]},useSyncExternalStore:kj,useId:uT,useHostTransitionStatus:_y,useFormState:Zj,useActionState:Zj,useOptimistic:function(i,s){var u=gn();return Lt!==null?Uj(u,Lt,i,s):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:py,useCacheRefresh:fT};vT.useEffectEvent=Jj;function Oy(i,s,u,p){s=i.memoizedState,u=u(p,s),u=u==null?s:h({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var jy={enqueueSetState:function(i,s,u){i=i._reactInternals;var p=Tr(),b=eo(p);b.payload=s,u!=null&&(b.callback=u),s=to(i,b,p),s!==null&&(gr(s,i,p),ou(s,i,p))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var p=Tr(),b=eo(p);b.tag=1,b.payload=s,u!=null&&(b.callback=u),s=to(i,b,p),s!==null&&(gr(s,i,p),ou(s,i,p))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=Tr(),p=eo(u);p.tag=2,s!=null&&(p.callback=s),s=to(i,p,u),s!==null&&(gr(s,i,u),ou(s,i,u))}};function gT(i,s,u,p,b,_,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,_,M):s.prototype&&s.prototype.isPureReactComponent?!Qc(u,p)||!Qc(b,_):!0}function yT(i,s,u,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,p),s.state!==i&&jy.enqueueReplaceState(s,s.state,null)}function as(i,s){var u=s;if("ref"in s){u={};for(var p in s)p!=="ref"&&(u[p]=s[p])}if(i=i.defaultProps){u===s&&(u=h({},u));for(var b in i)u[b]===void 0&&(u[b]=i[b])}return u}function bT(i){Fd(i)}function xT(i){console.error(i)}function wT(i){Fd(i)}function hh(i,s){try{var u=i.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function ST(i,s,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Ty(i,s,u){return u=eo(u),u.tag=3,u.payload={element:null},u.callback=function(){hh(i,s)},u}function _T(i){return i=eo(i),i.tag=3,i}function AT(i,s,u,p){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var _=p.value;i.payload=function(){return b(_)},i.callback=function(){ST(s,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){ST(s,u,p),typeof b!="function"&&(so===null?so=new Set([this]):so.add(this));var k=p.stack;this.componentDidCatch(p.value,{componentStack:k!==null?k:""})})}function cH(i,s,u,p,b){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=u.alternate,s!==null&&il(s,u,b,!0),u=Ar.current,u!==null){switch(u.tag){case 31:case 13:return Jr===null?Eh():u.alternate===null&&hn===0&&(hn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,p===eh?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([p]):s.add(p),Jy(i,p,b)),!1;case 22:return u.flags|=65536,p===eh?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([p]):u.add(p)),Jy(i,p,b)),!1}throw Error(r(435,u.tag))}return Jy(i,p,b),Eh(),!1}if(bt)return s=Ar.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,p!==Wg&&(i=Error(r(422),{cause:p}),tu(Kr(i,u)))):(p!==Wg&&(s=Error(r(423),{cause:p}),tu(Kr(s,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,p=Kr(p,u),b=Ty(i.stateNode,p,b),ay(i,b),hn!==4&&(hn=2)),!1;var _=Error(r(520),{cause:p});if(_=Kr(_,u),xu===null?xu=[_]:xu.push(_),hn!==4&&(hn=2),s===null)return!0;p=Kr(p,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=Ty(u.stateNode,p,i),ay(u,i),!1;case 1:if(s=u.type,_=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(so===null||!so.has(_))))return u.flags|=65536,b&=-b,u.lanes|=b,b=_T(b),AT(b,i,u,p),ay(u,b),!1}u=u.return}while(u!==null);return!1}var Cy=Error(r(461)),Sn=!1;function Vn(i,s,u,p){s.child=i===null?Tj(s,null,u,p):ns(s,i.child,u,p)}function ET(i,s,u,p,b){u=u.render;var _=s.ref;if("ref"in p){var M={};for(var k in p)k!=="ref"&&(M[k]=p[k])}else M=p;return Qo(s),p=uy(i,s,u,M,_,b),k=fy(),i!==null&&!Sn?(dy(i,s,b),mi(i,s,b)):(bt&&k&&Vg(s),s.flags|=1,Vn(i,s,p,b),s.child)}function OT(i,s,u,p,b){if(i===null){var _=u.type;return typeof _=="function"&&!qg(_)&&_.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=_,jT(i,s,_,p,b)):(i=Yd(u.type,null,p,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(_=i.child,!zy(i,b)){var M=_.memoizedProps;if(u=u.compare,u=u!==null?u:Qc,u(M,p)&&i.ref===s.ref)return mi(i,s,b)}return s.flags|=1,i=ci(_,p),i.ref=s.ref,i.return=s,s.child=i}function jT(i,s,u,p,b){if(i!==null){var _=i.memoizedProps;if(Qc(_,p)&&i.ref===s.ref)if(Sn=!1,s.pendingProps=p=_,zy(i,b))(i.flags&131072)!==0&&(Sn=!0);else return s.lanes=i.lanes,mi(i,s,b)}return Ry(i,s,u,p,b)}function TT(i,s,u,p){var b=p.children,_=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|u:u,i!==null){for(p=s.child=i.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;p=b&~_}else p=0,s.child=null;return CT(i,s,_,u,p)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Qd(s,_!==null?_.cachePool:null),_!==null?Nj(s,_):oy(),Mj(s);else return p=s.lanes=536870912,CT(i,s,_!==null?_.baseLanes|u:u,u,p)}else _!==null?(Qd(s,_.cachePool),Nj(s,_),ro(),s.memoizedState=null):(i!==null&&Qd(s,null),oy(),ro());return Vn(i,s,b,u),s.child}function hu(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function CT(i,s,u,p,b){var _=ey();return _=_===null?null:{parent:xn._currentValue,pool:_},s.memoizedState={baseLanes:u,cachePool:_},i!==null&&Qd(s,null),oy(),Mj(s),i!==null&&il(i,s,p,!0),s.childLanes=b,null}function ph(i,s){return s=vh({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function RT(i,s,u){return ns(s,i.child,null,u),i=ph(s,s.pendingProps),i.flags|=2,Er(s),s.memoizedState=null,i}function uH(i,s,u){var p=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(bt){if(p.mode==="hidden")return i=ph(s,p),s.lanes=536870912,hu(null,i);if(ly(s),(i=Zt)?(i=q2(i,Qr),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ki!==null?{id:Ia,overflow:Ba}:null,retryLane:536870912,hydrationErrors:null},u=hj(i),u.return=s,s.child=u,Hn=s,Zt=null)):i=null,i===null)throw Xi(s);return s.lanes=536870912,null}return ph(s,p)}var _=i.memoizedState;if(_!==null){var M=_.dehydrated;if(ly(s),b)if(s.flags&256)s.flags&=-257,s=RT(i,s,u);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(Sn||il(i,s,u,!1),b=(u&i.childLanes)!==0,Sn||b){if(p=Gt,p!==null&&(M=Le(p,u),M!==0&&M!==_.retryLane))throw _.retryLane=M,Yo(i,M),gr(p,i,M),Cy;Eh(),s=RT(i,s,u)}else i=_.treeContext,Zt=ea(M.nextSibling),Hn=s,bt=!0,Zi=null,Qr=!1,i!==null&&vj(s,i),s=ph(s,p),s.flags|=4096;return s}return i=ci(i.child,{mode:p.mode,children:p.children}),i.ref=s.ref,s.child=i,i.return=s,i}function mh(i,s){var u=s.ref;if(u===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(s.flags|=4194816)}}function Ry(i,s,u,p,b){return Qo(s),u=uy(i,s,u,p,void 0,b),p=fy(),i!==null&&!Sn?(dy(i,s,b),mi(i,s,b)):(bt&&p&&Vg(s),s.flags|=1,Vn(i,s,u,b),s.child)}function NT(i,s,u,p,b,_){return Qo(s),s.updateQueue=null,u=Dj(s,p,u,b),Pj(i),p=fy(),i!==null&&!Sn?(dy(i,s,_),mi(i,s,_)):(bt&&p&&Vg(s),s.flags|=1,Vn(i,s,u,_),s.child)}function MT(i,s,u,p,b){if(Qo(s),s.stateNode===null){var _=tl,M=u.contextType;typeof M=="object"&&M!==null&&(_=Fn(M)),_=new u(p,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=jy,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=p,_.state=s.memoizedState,_.refs={},ny(s),M=u.contextType,_.context=typeof M=="object"&&M!==null?Fn(M):tl,_.state=s.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Oy(s,u,M,p),_.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(M=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),M!==_.state&&jy.enqueueReplaceState(_,_.state,null),lu(s,p,_,b),su(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(i===null){_=s.stateNode;var k=s.memoizedProps,Y=as(u,k);_.props=Y;var ae=_.context,de=u.contextType;M=tl,typeof de=="object"&&de!==null&&(M=Fn(de));var ye=u.getDerivedStateFromProps;de=typeof ye=="function"||typeof _.getSnapshotBeforeUpdate=="function",k=s.pendingProps!==k,de||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k||ae!==M)&&yT(s,_,p,M),Ji=!1;var le=s.memoizedState;_.state=le,lu(s,p,_,b),su(),ae=s.memoizedState,k||le!==ae||Ji?(typeof ye=="function"&&(Oy(s,u,ye,p),ae=s.memoizedState),(Y=Ji||gT(s,u,Y,p,le,ae,M))?(de||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=ae),_.props=p,_.state=ae,_.context=M,p=Y):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{_=s.stateNode,ry(i,s),M=s.memoizedProps,de=as(u,M),_.props=de,ye=s.pendingProps,le=_.context,ae=u.contextType,Y=tl,typeof ae=="object"&&ae!==null&&(Y=Fn(ae)),k=u.getDerivedStateFromProps,(ae=typeof k=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==ye||le!==Y)&&yT(s,_,p,Y),Ji=!1,le=s.memoizedState,_.state=le,lu(s,p,_,b),su();var ue=s.memoizedState;M!==ye||le!==ue||Ji||i!==null&&i.dependencies!==null&&Zd(i.dependencies)?(typeof k=="function"&&(Oy(s,u,k,p),ue=s.memoizedState),(de=Ji||gT(s,u,de,p,le,ue,Y)||i!==null&&i.dependencies!==null&&Zd(i.dependencies))?(ae||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(p,ue,Y),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(p,ue,Y)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ue),_.props=p,_.state=ue,_.context=Y,p=de):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),p=!1)}return _=p,mh(i,s),p=(s.flags&128)!==0,_||p?(_=s.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,i!==null&&p?(s.child=ns(s,i.child,null,b),s.child=ns(s,null,u,b)):Vn(i,s,u,b),s.memoizedState=_.state,i=s.child):i=mi(i,s,b),i}function PT(i,s,u,p){return Zo(),s.flags|=256,Vn(i,s,u,p),s.child}var Ny={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function My(i){return{baseLanes:i,cachePool:Sj()}}function Py(i,s,u){return i=i!==null?i.childLanes&~u:0,s&&(i|=jr),i}function DT(i,s,u){var p=s.pendingProps,b=!1,_=(s.flags&128)!==0,M;if((M=_)||(M=i!==null&&i.memoizedState===null?!1:(vn.current&2)!==0),M&&(b=!0,s.flags&=-129),M=(s.flags&32)!==0,s.flags&=-33,i===null){if(bt){if(b?no(s):ro(),(i=Zt)?(i=q2(i,Qr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ki!==null?{id:Ia,overflow:Ba}:null,retryLane:536870912,hydrationErrors:null},u=hj(i),u.return=s,s.child=u,Hn=s,Zt=null)):i=null,i===null)throw Xi(s);return mb(i)?s.lanes=32:s.lanes=536870912,null}var k=p.children;return p=p.fallback,b?(ro(),b=s.mode,k=vh({mode:"hidden",children:k},b),p=Ko(p,b,u,null),k.return=s,p.return=s,k.sibling=p,s.child=k,p=s.child,p.memoizedState=My(u),p.childLanes=Py(i,M,u),s.memoizedState=Ny,hu(null,p)):(no(s),Dy(s,k))}var Y=i.memoizedState;if(Y!==null&&(k=Y.dehydrated,k!==null)){if(_)s.flags&256?(no(s),s.flags&=-257,s=ky(i,s,u)):s.memoizedState!==null?(ro(),s.child=i.child,s.flags|=128,s=null):(ro(),k=p.fallback,b=s.mode,p=vh({mode:"visible",children:p.children},b),k=Ko(k,b,u,null),k.flags|=2,p.return=s,k.return=s,p.sibling=k,s.child=p,ns(s,i.child,null,u),p=s.child,p.memoizedState=My(u),p.childLanes=Py(i,M,u),s.memoizedState=Ny,s=hu(null,p));else if(no(s),mb(k)){if(M=k.nextSibling&&k.nextSibling.dataset,M)var ae=M.dgst;M=ae,p=Error(r(419)),p.stack="",p.digest=M,tu({value:p,source:null,stack:null}),s=ky(i,s,u)}else if(Sn||il(i,s,u,!1),M=(u&i.childLanes)!==0,Sn||M){if(M=Gt,M!==null&&(p=Le(M,u),p!==0&&p!==Y.retryLane))throw Y.retryLane=p,Yo(i,p),gr(M,i,p),Cy;pb(k)||Eh(),s=ky(i,s,u)}else pb(k)?(s.flags|=192,s.child=i.child,s=null):(i=Y.treeContext,Zt=ea(k.nextSibling),Hn=s,bt=!0,Zi=null,Qr=!1,i!==null&&vj(s,i),s=Dy(s,p.children),s.flags|=4096);return s}return b?(ro(),k=p.fallback,b=s.mode,Y=i.child,ae=Y.sibling,p=ci(Y,{mode:"hidden",children:p.children}),p.subtreeFlags=Y.subtreeFlags&65011712,ae!==null?k=ci(ae,k):(k=Ko(k,b,u,null),k.flags|=2),k.return=s,p.return=s,p.sibling=k,s.child=p,hu(null,p),p=s.child,k=i.child.memoizedState,k===null?k=My(u):(b=k.cachePool,b!==null?(Y=xn._currentValue,b=b.parent!==Y?{parent:Y,pool:Y}:b):b=Sj(),k={baseLanes:k.baseLanes|u,cachePool:b}),p.memoizedState=k,p.childLanes=Py(i,M,u),s.memoizedState=Ny,hu(i.child,p)):(no(s),u=i.child,i=u.sibling,u=ci(u,{mode:"visible",children:p.children}),u.return=s,u.sibling=null,i!==null&&(M=s.deletions,M===null?(s.deletions=[i],s.flags|=16):M.push(i)),s.child=u,s.memoizedState=null,u)}function Dy(i,s){return s=vh({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function vh(i,s){return i=_r(22,i,null,s),i.lanes=0,i}function ky(i,s,u){return ns(s,i.child,null,u),i=Dy(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function kT(i,s,u){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Zg(i.return,s,u)}function $y(i,s,u,p,b,_){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:b,treeForkCount:_}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=p,M.tail=u,M.tailMode=b,M.treeForkCount=_)}function $T(i,s,u){var p=s.pendingProps,b=p.revealOrder,_=p.tail;p=p.children;var M=vn.current,k=(M&2)!==0;if(k?(M=M&1|2,s.flags|=128):M&=1,X(vn,M),Vn(i,s,p,u),p=bt?eu:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&kT(i,u,s);else if(i.tag===19)kT(i,u,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(u=s.child,b=null;u!==null;)i=u.alternate,i!==null&&ah(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=s.child,s.child=null):(b=u.sibling,u.sibling=null),$y(s,!1,b,u,_,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&ah(i)===null){s.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}$y(s,!0,u,null,_,p);break;case"together":$y(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function mi(i,s,u){if(i!==null&&(s.dependencies=i.dependencies),oo|=s.lanes,(u&s.childLanes)===0)if(i!==null){if(il(i,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,u=ci(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=ci(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function zy(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Zd(i)))}function fH(i,s,u){switch(s.tag){case 3:we(s,s.stateNode.containerInfo),Qi(s,xn,i.memoizedState.cache),Zo();break;case 27:case 5:_e(s);break;case 4:we(s,s.stateNode.containerInfo);break;case 10:Qi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,ly(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(no(s),s.flags|=128,null):(u&s.child.childLanes)!==0?DT(i,s,u):(no(s),i=mi(i,s,u),i!==null?i.sibling:null);no(s);break;case 19:var b=(i.flags&128)!==0;if(p=(u&s.childLanes)!==0,p||(il(i,s,u,!1),p=(u&s.childLanes)!==0),b){if(p)return $T(i,s,u);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),X(vn,vn.current),p)break;return null;case 22:return s.lanes=0,TT(i,s,u,s.pendingProps);case 24:Qi(s,xn,i.memoizedState.cache)}return mi(i,s,u)}function zT(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps)Sn=!0;else{if(!zy(i,u)&&(s.flags&128)===0)return Sn=!1,fH(i,s,u);Sn=(i.flags&131072)!==0}else Sn=!1,bt&&(s.flags&1048576)!==0&&mj(s,eu,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(i=es(s.elementType),s.type=i,typeof i=="function")qg(i)?(p=as(i,p),s.tag=1,s=MT(null,s,i,p,u)):(s.tag=0,s=Ry(null,s,i,p,u));else{if(i!=null){var b=i.$$typeof;if(b===R){s.tag=11,s=ET(null,s,i,p,u);break e}else if(b===N){s.tag=14,s=OT(null,s,i,p,u);break e}}throw s=q(i)||i,Error(r(306,s,""))}}return s;case 0:return Ry(i,s,s.type,s.pendingProps,u);case 1:return p=s.type,b=as(p,s.pendingProps),MT(i,s,p,b,u);case 3:e:{if(we(s,s.stateNode.containerInfo),i===null)throw Error(r(387));p=s.pendingProps;var _=s.memoizedState;b=_.element,ry(i,s),lu(s,p,null,u);var M=s.memoizedState;if(p=M.cache,Qi(s,xn,p),p!==_.cache&&Xg(s,[xn],u,!0),su(),p=M.element,_.isDehydrated)if(_={element:p,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=PT(i,s,p,u);break e}else if(p!==b){b=Kr(Error(r(424)),s),tu(b),s=PT(i,s,p,u);break e}else{switch(i=s.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Zt=ea(i.firstChild),Hn=s,bt=!0,Zi=null,Qr=!0,u=Tj(s,null,p,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Zo(),p===b){s=mi(i,s,u);break e}Vn(i,s,p,u)}s=s.child}return s;case 26:return mh(i,s),i===null?(u=Y2(s.type,null,s.pendingProps,null))?s.memoizedState=u:bt||(u=s.type,i=s.pendingProps,p=Mh(Ee.current).createElement(u),p[Vt]=s,p[Nn]=i,Gn(p,u,i),zn(p),s.stateNode=p):s.memoizedState=Y2(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return _e(s),i===null&&bt&&(p=s.stateNode=V2(s.type,s.pendingProps,Ee.current),Hn=s,Qr=!0,b=Zt,fo(s.type)?(vb=b,Zt=ea(p.firstChild)):Zt=b),Vn(i,s,s.pendingProps.children,u),mh(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&bt&&((b=p=Zt)&&(p=UH(p,s.type,s.pendingProps,Qr),p!==null?(s.stateNode=p,Hn=s,Zt=ea(p.firstChild),Qr=!1,b=!0):b=!1),b||Xi(s)),_e(s),b=s.type,_=s.pendingProps,M=i!==null?i.memoizedProps:null,p=_.children,fb(b,_)?p=null:M!==null&&fb(b,M)&&(s.flags|=32),s.memoizedState!==null&&(b=uy(i,s,nH,null,null,u),Tu._currentValue=b),mh(i,s),Vn(i,s,p,u),s.child;case 6:return i===null&&bt&&((i=u=Zt)&&(u=qH(u,s.pendingProps,Qr),u!==null?(s.stateNode=u,Hn=s,Zt=null,i=!0):i=!1),i||Xi(s)),null;case 13:return DT(i,s,u);case 4:return we(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=ns(s,null,p,u):Vn(i,s,p,u),s.child;case 11:return ET(i,s,s.type,s.pendingProps,u);case 7:return Vn(i,s,s.pendingProps,u),s.child;case 8:return Vn(i,s,s.pendingProps.children,u),s.child;case 12:return Vn(i,s,s.pendingProps.children,u),s.child;case 10:return p=s.pendingProps,Qi(s,s.type,p.value),Vn(i,s,p.children,u),s.child;case 9:return b=s.type._context,p=s.pendingProps.children,Qo(s),b=Fn(b),p=p(b),s.flags|=1,Vn(i,s,p,u),s.child;case 14:return OT(i,s,s.type,s.pendingProps,u);case 15:return jT(i,s,s.type,s.pendingProps,u);case 19:return $T(i,s,u);case 31:return uH(i,s,u);case 22:return TT(i,s,u,s.pendingProps);case 24:return Qo(s),p=Fn(xn),i===null?(b=ey(),b===null&&(b=Gt,_=Qg(),b.pooledCache=_,_.refCount++,_!==null&&(b.pooledCacheLanes|=u),b=_),s.memoizedState={parent:p,cache:b},ny(s),Qi(s,xn,b)):((i.lanes&u)!==0&&(ry(i,s),lu(s,null,null,u),su()),b=i.memoizedState,_=s.memoizedState,b.parent!==p?(b={parent:p,cache:p},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),Qi(s,xn,p)):(p=_.cache,Qi(s,xn,p),p!==b.cache&&Xg(s,[xn],u,!0))),Vn(i,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function vi(i){i.flags|=4}function Ly(i,s,u,p,b){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(u2())i.flags|=8192;else throw ts=eh,ty}else i.flags&=-16777217}function LT(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!J2(s))if(u2())i.flags|=8192;else throw ts=eh,ty}function gh(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?dt():536870912,i.lanes|=s,gl|=s)}function pu(i,s){if(!bt)switch(i.tailMode){case"hidden":s=i.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Xt(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(s)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=p,i.childLanes=u,s}function dH(i,s,u){var p=s.pendingProps;switch(Gg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(s),null;case 1:return Xt(s),null;case 3:return u=s.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),di(xn),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(al(s)?vi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Yg())),Xt(s),null;case 26:var b=s.type,_=s.memoizedState;return i===null?(vi(s),_!==null?(Xt(s),LT(s,_)):(Xt(s),Ly(s,b,null,p,u))):_?_!==i.memoizedState?(vi(s),Xt(s),LT(s,_)):(Xt(s),s.flags&=-16777217):(i=i.memoizedProps,i!==p&&vi(s),Xt(s),Ly(s,b,i,p,u)),null;case 27:if(Ae(s),u=Ee.current,b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Xt(s),null}i=oe.current,al(s)?gj(s):(i=V2(b,p,u),s.stateNode=i,vi(s))}return Xt(s),null;case 5:if(Ae(s),b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Xt(s),null}if(_=oe.current,al(s))gj(s);else{var M=Mh(Ee.current);switch(_){case 1:_=M.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:_=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":_=M.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":_=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":_=M.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof p.is=="string"?M.createElement("select",{is:p.is}):M.createElement("select"),p.multiple?_.multiple=!0:p.size&&(_.size=p.size);break;default:_=typeof p.is=="string"?M.createElement(b,{is:p.is}):M.createElement(b)}}_[Vt]=s,_[Nn]=p;e:for(M=s.child;M!==null;){if(M.tag===5||M.tag===6)_.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===s)break e;for(;M.sibling===null;){if(M.return===null||M.return===s)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}s.stateNode=_;e:switch(Gn(_,b,p),b){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&vi(s)}}return Xt(s),Ly(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,u),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==p&&vi(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(i=Ee.current,al(s)){if(i=s.stateNode,u=s.memoizedProps,p=null,b=Hn,b!==null)switch(b.tag){case 27:case 5:p=b.memoizedProps}i[Vt]=s,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||D2(i.nodeValue,u)),i||Xi(s,!0)}else i=Mh(i).createTextNode(p),i[Vt]=s,s.stateNode=i}return Xt(s),null;case 31:if(u=s.memoizedState,i===null||i.memoizedState!==null){if(p=al(s),u!==null){if(i===null){if(!p)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Vt]=s}else Zo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Xt(s),i=!1}else u=Yg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return s.flags&256?(Er(s),s):(Er(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Xt(s),null;case 13:if(p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=al(s),p!==null&&p.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[Vt]=s}else Zo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Xt(s),b=!1}else b=Yg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return s.flags&256?(Er(s),s):(Er(s),null)}return Er(s),(s.flags&128)!==0?(s.lanes=u,s):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=s.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool),_=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(_=p.memoizedState.cachePool.pool),_!==b&&(p.flags|=2048)),u!==i&&u&&(s.child.flags|=8192),gh(s,s.updateQueue),Xt(s),null);case 4:return ce(),i===null&&ob(s.stateNode.containerInfo),Xt(s),null;case 10:return di(s.type),Xt(s),null;case 19:if(Z(vn),p=s.memoizedState,p===null)return Xt(s),null;if(b=(s.flags&128)!==0,_=p.rendering,_===null)if(b)pu(p,!1);else{if(hn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=ah(i),_!==null){for(s.flags|=128,pu(p,!1),i=_.updateQueue,s.updateQueue=i,gh(s,i),s.subtreeFlags=0,i=u,u=s.child;u!==null;)dj(u,i),u=u.sibling;return X(vn,vn.current&1|2),bt&&ui(s,p.treeForkCount),s.child}i=i.sibling}p.tail!==null&&H()>Sh&&(s.flags|=128,b=!0,pu(p,!1),s.lanes=4194304)}else{if(!b)if(i=ah(_),i!==null){if(s.flags|=128,b=!0,i=i.updateQueue,s.updateQueue=i,gh(s,i),pu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!_.alternate&&!bt)return Xt(s),null}else 2*H()-p.renderingStartTime>Sh&&u!==536870912&&(s.flags|=128,b=!0,pu(p,!1),s.lanes=4194304);p.isBackwards?(_.sibling=s.child,s.child=_):(i=p.last,i!==null?i.sibling=_:s.child=_,p.last=_)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=H(),i.sibling=null,u=vn.current,X(vn,b?u&1|2:u&1),bt&&ui(s,p.treeForkCount),i):(Xt(s),null);case 22:case 23:return Er(s),sy(),p=s.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(u&536870912)!==0&&(s.flags&128)===0&&(Xt(s),s.subtreeFlags&6&&(s.flags|=8192)):Xt(s),u=s.updateQueue,u!==null&&gh(s,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==u&&(s.flags|=2048),i!==null&&Z(Jo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),di(xn),Xt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function hH(i,s){switch(Gg(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return di(xn),ce(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Ae(s),null;case 31:if(s.memoizedState!==null){if(Er(s),s.alternate===null)throw Error(r(340));Zo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(Er(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Zo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Z(vn),null;case 4:return ce(),null;case 10:return di(s.type),null;case 22:case 23:return Er(s),sy(),i!==null&&Z(Jo),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return di(xn),null;case 25:return null;default:return null}}function IT(i,s){switch(Gg(s),s.tag){case 3:di(xn),ce();break;case 26:case 27:case 5:Ae(s);break;case 4:ce();break;case 31:s.memoizedState!==null&&Er(s);break;case 13:Er(s);break;case 19:Z(vn);break;case 10:di(s.type);break;case 22:case 23:Er(s),sy(),i!==null&&Z(Jo);break;case 24:di(xn)}}function mu(i,s){try{var u=s.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){p=void 0;var _=u.create,M=u.inst;p=_(),M.destroy=p}u=u.next}while(u!==b)}}catch(k){$t(s,s.return,k)}}function ao(i,s,u){try{var p=s.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var _=b.next;p=_;do{if((p.tag&i)===i){var M=p.inst,k=M.destroy;if(k!==void 0){M.destroy=void 0,b=s;var Y=u,ae=k;try{ae()}catch(de){$t(b,Y,de)}}}p=p.next}while(p!==_)}}catch(de){$t(s,s.return,de)}}function BT(i){var s=i.updateQueue;if(s!==null){var u=i.stateNode;try{Rj(s,u)}catch(p){$t(i,i.return,p)}}}function UT(i,s,u){u.props=as(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){$t(i,s,p)}}function vu(i,s){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(b){$t(i,s,b)}}function Ua(i,s){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(b){$t(i,s,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){$t(i,s,b)}else u.current=null}function qT(i){var s=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(b){$t(i,i.return,b)}}function Iy(i,s,u){try{var p=i.stateNode;kH(p,i.type,u,s),p[Nn]=s}catch(b){$t(i,i.return,b)}}function HT(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&fo(i.type)||i.tag===4}function By(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||HT(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&fo(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Uy(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(i),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=si));else if(p!==4&&(p===27&&fo(i.type)&&(u=i.stateNode,s=null),i=i.child,i!==null))for(Uy(i,s,u),i=i.sibling;i!==null;)Uy(i,s,u),i=i.sibling}function yh(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(p!==4&&(p===27&&fo(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(yh(i,s,u),i=i.sibling;i!==null;)yh(i,s,u),i=i.sibling}function FT(i){var s=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);Gn(s,p,u),s[Vt]=i,s[Nn]=u}catch(_){$t(i,i.return,_)}}var gi=!1,_n=!1,qy=!1,VT=typeof WeakSet=="function"?WeakSet:Set,Ln=null;function pH(i,s){if(i=i.containerInfo,cb=Ih,i=rj(i),kg(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var b=p.anchorOffset,_=p.focusNode;p=p.focusOffset;try{u.nodeType,_.nodeType}catch{u=null;break e}var M=0,k=-1,Y=-1,ae=0,de=0,ye=i,le=null;t:for(;;){for(var ue;ye!==u||b!==0&&ye.nodeType!==3||(k=M+b),ye!==_||p!==0&&ye.nodeType!==3||(Y=M+p),ye.nodeType===3&&(M+=ye.nodeValue.length),(ue=ye.firstChild)!==null;)le=ye,ye=ue;for(;;){if(ye===i)break t;if(le===u&&++ae===b&&(k=M),le===_&&++de===p&&(Y=M),(ue=ye.nextSibling)!==null)break;ye=le,le=ye.parentNode}ye=ue}u=k===-1||Y===-1?null:{start:k,end:Y}}else u=null}u=u||{start:0,end:0}}else u=null;for(ub={focusedElem:i,selectionRange:u},Ih=!1,Ln=s;Ln!==null;)if(s=Ln,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ln=i;else for(;Ln!==null;){switch(s=Ln,_=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)b=i[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&_!==null){i=void 0,u=s,b=_.memoizedProps,_=_.memoizedState,p=u.stateNode;try{var Be=as(u.type,b);i=p.getSnapshotBeforeUpdate(Be,_),p.__reactInternalSnapshotBeforeUpdate=i}catch(Ye){$t(u,u.return,Ye)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,u=i.nodeType,u===9)hb(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":hb(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,Ln=i;break}Ln=s.return}}function GT(i,s,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:bi(i,u),p&4&&mu(5,u);break;case 1:if(bi(i,u),p&4)if(i=u.stateNode,s===null)try{i.componentDidMount()}catch(M){$t(u,u.return,M)}else{var b=as(u.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(b,s,i.__reactInternalSnapshotBeforeUpdate)}catch(M){$t(u,u.return,M)}}p&64&&BT(u),p&512&&vu(u,u.return);break;case 3:if(bi(i,u),p&64&&(i=u.updateQueue,i!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{Rj(i,s)}catch(M){$t(u,u.return,M)}}break;case 27:s===null&&p&4&&FT(u);case 26:case 5:bi(i,u),s===null&&p&4&&qT(u),p&512&&vu(u,u.return);break;case 12:bi(i,u);break;case 31:bi(i,u),p&4&&KT(i,u);break;case 13:bi(i,u),p&4&&ZT(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=_H.bind(null,u),HH(i,u))));break;case 22:if(p=u.memoizedState!==null||gi,!p){s=s!==null&&s.memoizedState!==null||_n,b=gi;var _=_n;gi=p,(_n=s)&&!_?xi(i,u,(u.subtreeFlags&8772)!==0):bi(i,u),gi=b,_n=_}break;case 30:break;default:bi(i,u)}}function WT(i){var s=i.alternate;s!==null&&(i.alternate=null,WT(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&yg(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var nn=null,hr=!1;function yi(i,s,u){for(u=u.child;u!==null;)YT(i,s,u),u=u.sibling}function YT(i,s,u){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(St,u)}catch{}switch(u.tag){case 26:_n||Ua(u,s),yi(i,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:_n||Ua(u,s);var p=nn,b=hr;fo(u.type)&&(nn=u.stateNode,hr=!1),yi(i,s,u),Eu(u.stateNode),nn=p,hr=b;break;case 5:_n||Ua(u,s);case 6:if(p=nn,b=hr,nn=null,yi(i,s,u),nn=p,hr=b,nn!==null)if(hr)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(u.stateNode)}catch(_){$t(u,s,_)}else try{nn.removeChild(u.stateNode)}catch(_){$t(u,s,_)}break;case 18:nn!==null&&(hr?(i=nn,B2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),El(i)):B2(nn,u.stateNode));break;case 4:p=nn,b=hr,nn=u.stateNode.containerInfo,hr=!0,yi(i,s,u),nn=p,hr=b;break;case 0:case 11:case 14:case 15:ao(2,u,s),_n||ao(4,u,s),yi(i,s,u);break;case 1:_n||(Ua(u,s),p=u.stateNode,typeof p.componentWillUnmount=="function"&&UT(u,s,p)),yi(i,s,u);break;case 21:yi(i,s,u);break;case 22:_n=(p=_n)||u.memoizedState!==null,yi(i,s,u),_n=p;break;default:yi(i,s,u)}}function KT(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{El(i)}catch(u){$t(s,s.return,u)}}}function ZT(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{El(i)}catch(u){$t(s,s.return,u)}}function mH(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new VT),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new VT),s;default:throw Error(r(435,i.tag))}}function bh(i,s){var u=mH(i);s.forEach(function(p){if(!u.has(p)){u.add(p);var b=AH.bind(null,i,p);p.then(b,b)}})}function pr(i,s){var u=s.deletions;if(u!==null)for(var p=0;p<u.length;p++){var b=u[p],_=i,M=s,k=M;e:for(;k!==null;){switch(k.tag){case 27:if(fo(k.type)){nn=k.stateNode,hr=!1;break e}break;case 5:nn=k.stateNode,hr=!1;break e;case 3:case 4:nn=k.stateNode.containerInfo,hr=!0;break e}k=k.return}if(nn===null)throw Error(r(160));YT(_,M,b),nn=null,hr=!1,_=b.alternate,_!==null&&(_.return=null),b.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)XT(s,i),s=s.sibling}var ba=null;function XT(i,s){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:pr(s,i),mr(i),p&4&&(ao(3,i,i.return),mu(3,i),ao(5,i,i.return));break;case 1:pr(s,i),mr(i),p&512&&(_n||u===null||Ua(u,u.return)),p&64&&gi&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var b=ba;if(pr(s,i),mr(i),p&512&&(_n||u===null||Ua(u,u.return)),p&4){var _=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(p){case"title":_=b.getElementsByTagName("title")[0],(!_||_[Hc]||_[Vt]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=b.createElement(p),b.head.insertBefore(_,b.querySelector("head > title"))),Gn(_,p,u),_[Vt]=i,zn(_),p=_;break e;case"link":var M=X2("link","href",b).get(p+(u.href||""));if(M){for(var k=0;k<M.length;k++)if(_=M[k],_.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&_.getAttribute("rel")===(u.rel==null?null:u.rel)&&_.getAttribute("title")===(u.title==null?null:u.title)&&_.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(k,1);break t}}_=b.createElement(p),Gn(_,p,u),b.head.appendChild(_);break;case"meta":if(M=X2("meta","content",b).get(p+(u.content||""))){for(k=0;k<M.length;k++)if(_=M[k],_.getAttribute("content")===(u.content==null?null:""+u.content)&&_.getAttribute("name")===(u.name==null?null:u.name)&&_.getAttribute("property")===(u.property==null?null:u.property)&&_.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&_.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(k,1);break t}}_=b.createElement(p),Gn(_,p,u),b.head.appendChild(_);break;default:throw Error(r(468,p))}_[Vt]=i,zn(_),p=_}i.stateNode=p}else Q2(b,i.type,i.stateNode);else i.stateNode=Z2(b,p,i.memoizedProps);else _!==p?(_===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):_.count--,p===null?Q2(b,i.type,i.stateNode):Z2(b,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Iy(i,i.memoizedProps,u.memoizedProps)}break;case 27:pr(s,i),mr(i),p&512&&(_n||u===null||Ua(u,u.return)),u!==null&&p&4&&Iy(i,i.memoizedProps,u.memoizedProps);break;case 5:if(pr(s,i),mr(i),p&512&&(_n||u===null||Ua(u,u.return)),i.flags&32){b=i.stateNode;try{Ys(b,"")}catch(Be){$t(i,i.return,Be)}}p&4&&i.stateNode!=null&&(b=i.memoizedProps,Iy(i,b,u!==null?u.memoizedProps:b)),p&1024&&(qy=!0);break;case 6:if(pr(s,i),mr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(Be){$t(i,i.return,Be)}}break;case 3:if(kh=null,b=ba,ba=Ph(s.containerInfo),pr(s,i),ba=b,mr(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{El(s.containerInfo)}catch(Be){$t(i,i.return,Be)}qy&&(qy=!1,QT(i));break;case 4:p=ba,ba=Ph(i.stateNode.containerInfo),pr(s,i),mr(i),ba=p;break;case 12:pr(s,i),mr(i);break;case 31:pr(s,i),mr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,bh(i,p)));break;case 13:pr(s,i),mr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(wh=H()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,bh(i,p)));break;case 22:b=i.memoizedState!==null;var Y=u!==null&&u.memoizedState!==null,ae=gi,de=_n;if(gi=ae||b,_n=de||Y,pr(s,i),_n=de,gi=ae,mr(i),p&8192)e:for(s=i.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(u===null||Y||gi||_n||is(i)),u=null,s=i;;){if(s.tag===5||s.tag===26){if(u===null){Y=u=s;try{if(_=Y.stateNode,b)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{k=Y.stateNode;var ye=Y.memoizedProps.style,le=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;k.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Be){$t(Y,Y.return,Be)}}}else if(s.tag===6){if(u===null){Y=s;try{Y.stateNode.nodeValue=b?"":Y.memoizedProps}catch(Be){$t(Y,Y.return,Be)}}}else if(s.tag===18){if(u===null){Y=s;try{var ue=Y.stateNode;b?U2(ue,!0):U2(Y.stateNode,!1)}catch(Be){$t(Y,Y.return,Be)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,bh(i,u))));break;case 19:pr(s,i),mr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,bh(i,p)));break;case 30:break;case 21:break;default:pr(s,i),mr(i)}}function mr(i){var s=i.flags;if(s&2){try{for(var u,p=i.return;p!==null;){if(HT(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,_=By(i);yh(i,_,b);break;case 5:var M=u.stateNode;u.flags&32&&(Ys(M,""),u.flags&=-33);var k=By(i);yh(i,k,M);break;case 3:case 4:var Y=u.stateNode.containerInfo,ae=By(i);Uy(i,ae,Y);break;default:throw Error(r(161))}}catch(de){$t(i,i.return,de)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function QT(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;QT(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function bi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)GT(i,s.alternate,s),s=s.sibling}function is(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:ao(4,s,s.return),is(s);break;case 1:Ua(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&UT(s,s.return,u),is(s);break;case 27:Eu(s.stateNode);case 26:case 5:Ua(s,s.return),is(s);break;case 22:s.memoizedState===null&&is(s);break;case 30:is(s);break;default:is(s)}i=i.sibling}}function xi(i,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,b=i,_=s,M=_.flags;switch(_.tag){case 0:case 11:case 15:xi(b,_,u),mu(4,_);break;case 1:if(xi(b,_,u),p=_,b=p.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(ae){$t(p,p.return,ae)}if(p=_,b=p.updateQueue,b!==null){var k=p.stateNode;try{var Y=b.shared.hiddenCallbacks;if(Y!==null)for(b.shared.hiddenCallbacks=null,b=0;b<Y.length;b++)Cj(Y[b],k)}catch(ae){$t(p,p.return,ae)}}u&&M&64&&BT(_),vu(_,_.return);break;case 27:FT(_);case 26:case 5:xi(b,_,u),u&&p===null&&M&4&&qT(_),vu(_,_.return);break;case 12:xi(b,_,u);break;case 31:xi(b,_,u),u&&M&4&&KT(b,_);break;case 13:xi(b,_,u),u&&M&4&&ZT(b,_);break;case 22:_.memoizedState===null&&xi(b,_,u),vu(_,_.return);break;case 30:break;default:xi(b,_,u)}s=s.sibling}}function Hy(i,s){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&nu(u))}function Fy(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&nu(i))}function xa(i,s,u,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)JT(i,s,u,p),s=s.sibling}function JT(i,s,u,p){var b=s.flags;switch(s.tag){case 0:case 11:case 15:xa(i,s,u,p),b&2048&&mu(9,s);break;case 1:xa(i,s,u,p);break;case 3:xa(i,s,u,p),b&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&nu(i)));break;case 12:if(b&2048){xa(i,s,u,p),i=s.stateNode;try{var _=s.memoizedProps,M=_.id,k=_.onPostCommit;typeof k=="function"&&k(M,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Y){$t(s,s.return,Y)}}else xa(i,s,u,p);break;case 31:xa(i,s,u,p);break;case 13:xa(i,s,u,p);break;case 23:break;case 22:_=s.stateNode,M=s.alternate,s.memoizedState!==null?_._visibility&2?xa(i,s,u,p):gu(i,s):_._visibility&2?xa(i,s,u,p):(_._visibility|=2,pl(i,s,u,p,(s.subtreeFlags&10256)!==0||!1)),b&2048&&Hy(M,s);break;case 24:xa(i,s,u,p),b&2048&&Fy(s.alternate,s);break;default:xa(i,s,u,p)}}function pl(i,s,u,p,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=i,M=s,k=u,Y=p,ae=M.flags;switch(M.tag){case 0:case 11:case 15:pl(_,M,k,Y,b),mu(8,M);break;case 23:break;case 22:var de=M.stateNode;M.memoizedState!==null?de._visibility&2?pl(_,M,k,Y,b):gu(_,M):(de._visibility|=2,pl(_,M,k,Y,b)),b&&ae&2048&&Hy(M.alternate,M);break;case 24:pl(_,M,k,Y,b),b&&ae&2048&&Fy(M.alternate,M);break;default:pl(_,M,k,Y,b)}s=s.sibling}}function gu(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=i,p=s,b=p.flags;switch(p.tag){case 22:gu(u,p),b&2048&&Hy(p.alternate,p);break;case 24:gu(u,p),b&2048&&Fy(p.alternate,p);break;default:gu(u,p)}s=s.sibling}}var yu=8192;function ml(i,s,u){if(i.subtreeFlags&yu)for(i=i.child;i!==null;)e2(i,s,u),i=i.sibling}function e2(i,s,u){switch(i.tag){case 26:ml(i,s,u),i.flags&yu&&i.memoizedState!==null&&t9(u,ba,i.memoizedState,i.memoizedProps);break;case 5:ml(i,s,u);break;case 3:case 4:var p=ba;ba=Ph(i.stateNode.containerInfo),ml(i,s,u),ba=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=yu,yu=16777216,ml(i,s,u),yu=p):ml(i,s,u));break;default:ml(i,s,u)}}function t2(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function bu(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];Ln=p,r2(p,i)}t2(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)n2(i),i=i.sibling}function n2(i){switch(i.tag){case 0:case 11:case 15:bu(i),i.flags&2048&&ao(9,i,i.return);break;case 3:bu(i);break;case 12:bu(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,xh(i)):bu(i);break;default:bu(i)}}function xh(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];Ln=p,r2(p,i)}t2(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:ao(8,s,s.return),xh(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,xh(s));break;default:xh(s)}i=i.sibling}}function r2(i,s){for(;Ln!==null;){var u=Ln;switch(u.tag){case 0:case 11:case 15:ao(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:nu(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Ln=p;else e:for(u=i;Ln!==null;){p=Ln;var b=p.sibling,_=p.return;if(WT(p),p===u){Ln=null;break e}if(b!==null){b.return=_,Ln=b;break e}Ln=_}}}var vH={getCacheForType:function(i){var s=Fn(xn),u=s.data.get(i);return u===void 0&&(u=i(),s.data.set(i,u)),u},cacheSignal:function(){return Fn(xn).controller.signal}},gH=typeof WeakMap=="function"?WeakMap:Map,jt=0,Gt=null,ht=null,vt=0,kt=0,Or=null,io=!1,vl=!1,Vy=!1,wi=0,hn=0,oo=0,os=0,Gy=0,jr=0,gl=0,xu=null,vr=null,Wy=!1,wh=0,a2=0,Sh=1/0,_h=null,so=null,Mn=0,lo=null,yl=null,Si=0,Yy=0,Ky=null,i2=null,wu=0,Zy=null;function Tr(){return(jt&2)!==0&&vt!==0?vt&-vt:$.T!==null?nb():tt()}function o2(){if(jr===0)if((vt&536870912)===0||bt){var i=Qn;Qn<<=1,(Qn&3932160)===0&&(Qn=262144),jr=i}else jr=536870912;return i=Ar.current,i!==null&&(i.flags|=32),jr}function gr(i,s,u){(i===Gt&&(kt===2||kt===9)||i.cancelPendingCommit!==null)&&(bl(i,0),co(i,vt,jr,!1)),te(i,u),((jt&2)===0||i!==Gt)&&(i===Gt&&((jt&2)===0&&(os|=u),hn===4&&co(i,vt,jr,!1)),qa(i))}function s2(i,s,u){if((jt&6)!==0)throw Error(r(327));var p=!u&&(s&127)===0&&(s&i.expiredLanes)===0||Ve(i,s),b=p?xH(i,s):Qy(i,s,!0),_=p;do{if(b===0){vl&&!p&&co(i,s,0,!1);break}else{if(u=i.current.alternate,_&&!yH(u)){b=Qy(i,s,!1),_=!1;continue}if(b===2){if(_=s,i.errorRecoveryDisabledLanes&_)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){s=M;e:{var k=i;b=xu;var Y=k.current.memoizedState.isDehydrated;if(Y&&(bl(k,M).flags|=256),M=Qy(k,M,!1),M!==2){if(Vy&&!Y){k.errorRecoveryDisabledLanes|=_,os|=_,b=4;break e}_=vr,vr=b,_!==null&&(vr===null?vr=_:vr.push.apply(vr,_))}b=M}if(_=!1,b!==2)continue}}if(b===1){bl(i,0),co(i,s,0,!0);break}e:{switch(p=i,_=b,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:co(p,s,jr,!io);break e;case 2:vr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(b=wh+300-H(),10<b)){if(co(p,s,jr,!io),Se(p,0,!0)!==0)break e;Si=s,p.timeoutHandle=L2(l2.bind(null,p,u,vr,_h,Wy,s,jr,os,gl,io,_,"Throttled",-0,0),b);break e}l2(p,u,vr,_h,Wy,s,jr,os,gl,io,_,null,-0,0)}}break}while(!0);qa(i)}function l2(i,s,u,p,b,_,M,k,Y,ae,de,ye,le,ue){if(i.timeoutHandle=-1,ye=s.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:si},e2(s,_,ye);var Be=(_&62914560)===_?wh-H():(_&4194048)===_?a2-H():0;if(Be=n9(ye,Be),Be!==null){Si=_,i.cancelPendingCommit=Be(v2.bind(null,i,s,_,u,p,b,M,k,Y,de,ye,null,le,ue)),co(i,_,M,!ae);return}}v2(i,s,_,u,p,b,M,k,Y)}function yH(i){for(var s=i;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var b=u[p],_=b.getSnapshot;b=b.value;try{if(!Sr(_(),b))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function co(i,s,u,p){s&=~Gy,s&=~os,i.suspendedLanes|=s,i.pingedLanes&=~s,p&&(i.warmLanes|=s),p=i.expirationTimes;for(var b=s;0<b;){var _=31-Ft(b),M=1<<_;p[_]=-1,b&=~M}u!==0&&fe(i,u,s)}function Ah(){return(jt&6)===0?(Su(0),!1):!0}function Xy(){if(ht!==null){if(kt===0)var i=ht.return;else i=ht,fi=Xo=null,hy(i),cl=null,au=0,i=ht;for(;i!==null;)IT(i.alternate,i),i=i.return;ht=null}}function bl(i,s){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,LH(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Si=0,Xy(),Gt=i,ht=u=ci(i.current,null),vt=s,kt=0,Or=null,io=!1,vl=Ve(i,s),Vy=!1,gl=jr=Gy=os=oo=hn=0,vr=xu=null,Wy=!1,(s&8)!==0&&(s|=s&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=s;0<p;){var b=31-Ft(p),_=1<<b;s|=i[b],p&=~_}return wi=s,Vd(),u}function c2(i,s){it=null,$.H=du,s===ll||s===Jd?(s=Ej(),kt=3):s===ty?(s=Ej(),kt=4):kt=s===Cy?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Or=s,ht===null&&(hn=1,hh(i,Kr(s,i.current)))}function u2(){var i=Ar.current;return i===null?!0:(vt&4194048)===vt?Jr===null:(vt&62914560)===vt||(vt&536870912)!==0?i===Jr:!1}function f2(){var i=$.H;return $.H=du,i===null?du:i}function d2(){var i=$.A;return $.A=vH,i}function Eh(){hn=4,io||(vt&4194048)!==vt&&Ar.current!==null||(vl=!0),(oo&134217727)===0&&(os&134217727)===0||Gt===null||co(Gt,vt,jr,!1)}function Qy(i,s,u){var p=jt;jt|=2;var b=f2(),_=d2();(Gt!==i||vt!==s)&&(_h=null,bl(i,s)),s=!1;var M=hn;e:do try{if(kt!==0&&ht!==null){var k=ht,Y=Or;switch(kt){case 8:Xy(),M=6;break e;case 3:case 2:case 9:case 6:Ar.current===null&&(s=!0);var ae=kt;if(kt=0,Or=null,xl(i,k,Y,ae),u&&vl){M=0;break e}break;default:ae=kt,kt=0,Or=null,xl(i,k,Y,ae)}}bH(),M=hn;break}catch(de){c2(i,de)}while(!0);return s&&i.shellSuspendCounter++,fi=Xo=null,jt=p,$.H=b,$.A=_,ht===null&&(Gt=null,vt=0,Vd()),M}function bH(){for(;ht!==null;)h2(ht)}function xH(i,s){var u=jt;jt|=2;var p=f2(),b=d2();Gt!==i||vt!==s?(_h=null,Sh=H()+500,bl(i,s)):vl=Ve(i,s);e:do try{if(kt!==0&&ht!==null){s=ht;var _=Or;t:switch(kt){case 1:kt=0,Or=null,xl(i,s,_,1);break;case 2:case 9:if(_j(_)){kt=0,Or=null,p2(s);break}s=function(){kt!==2&&kt!==9||Gt!==i||(kt=7),qa(i)},_.then(s,s);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:_j(_)?(kt=0,Or=null,p2(s)):(kt=0,Or=null,xl(i,s,_,7));break;case 5:var M=null;switch(ht.tag){case 26:M=ht.memoizedState;case 5:case 27:var k=ht;if(M?J2(M):k.stateNode.complete){kt=0,Or=null;var Y=k.sibling;if(Y!==null)ht=Y;else{var ae=k.return;ae!==null?(ht=ae,Oh(ae)):ht=null}break t}}kt=0,Or=null,xl(i,s,_,5);break;case 6:kt=0,Or=null,xl(i,s,_,6);break;case 8:Xy(),hn=6;break e;default:throw Error(r(462))}}wH();break}catch(de){c2(i,de)}while(!0);return fi=Xo=null,$.H=p,$.A=b,jt=u,ht!==null?0:(Gt=null,vt=0,Vd(),hn)}function wH(){for(;ht!==null&&!Nt();)h2(ht)}function h2(i){var s=zT(i.alternate,i,wi);i.memoizedProps=i.pendingProps,s===null?Oh(i):ht=s}function p2(i){var s=i,u=s.alternate;switch(s.tag){case 15:case 0:s=NT(u,s,s.pendingProps,s.type,void 0,vt);break;case 11:s=NT(u,s,s.pendingProps,s.type.render,s.ref,vt);break;case 5:hy(s);default:IT(u,s),s=ht=dj(s,wi),s=zT(u,s,wi)}i.memoizedProps=i.pendingProps,s===null?Oh(i):ht=s}function xl(i,s,u,p){fi=Xo=null,hy(s),cl=null,au=0;var b=s.return;try{if(cH(i,b,s,u,vt)){hn=1,hh(i,Kr(u,i.current)),ht=null;return}}catch(_){if(b!==null)throw ht=b,_;hn=1,hh(i,Kr(u,i.current)),ht=null;return}s.flags&32768?(bt||p===1?i=!0:vl||(vt&536870912)!==0?i=!1:(io=i=!0,(p===2||p===9||p===3||p===6)&&(p=Ar.current,p!==null&&p.tag===13&&(p.flags|=16384))),m2(s,i)):Oh(s)}function Oh(i){var s=i;do{if((s.flags&32768)!==0){m2(s,io);return}i=s.return;var u=dH(s.alternate,s,wi);if(u!==null){ht=u;return}if(s=s.sibling,s!==null){ht=s;return}ht=s=i}while(s!==null);hn===0&&(hn=5)}function m2(i,s){do{var u=hH(i.alternate,i);if(u!==null){u.flags&=32767,ht=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(i=i.sibling,i!==null)){ht=i;return}ht=i=u}while(i!==null);hn=6,ht=null}function v2(i,s,u,p,b,_,M,k,Y){i.cancelPendingCommit=null;do jh();while(Mn!==0);if((jt&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Bg,pe(i,u,_,M,k,Y),i===Gt&&(ht=Gt=null,vt=0),yl=s,lo=i,Si=u,Yy=_,Ky=b,i2=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,EH(je,function(){return w2(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=$.T,$.T=null,b=V.p,V.p=2,M=jt,jt|=4;try{pH(i,s,u)}finally{jt=M,V.p=b,$.T=p}}Mn=1,g2(),y2(),b2()}}function g2(){if(Mn===1){Mn=0;var i=lo,s=yl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=$.T,$.T=null;var p=V.p;V.p=2;var b=jt;jt|=4;try{XT(s,i);var _=ub,M=rj(i.containerInfo),k=_.focusedElem,Y=_.selectionRange;if(M!==k&&k&&k.ownerDocument&&nj(k.ownerDocument.documentElement,k)){if(Y!==null&&kg(k)){var ae=Y.start,de=Y.end;if(de===void 0&&(de=ae),"selectionStart"in k)k.selectionStart=ae,k.selectionEnd=Math.min(de,k.value.length);else{var ye=k.ownerDocument||document,le=ye&&ye.defaultView||window;if(le.getSelection){var ue=le.getSelection(),Be=k.textContent.length,Ye=Math.min(Y.start,Be),Bt=Y.end===void 0?Ye:Math.min(Y.end,Be);!ue.extend&&Ye>Bt&&(M=Bt,Bt=Ye,Ye=M);var ee=tj(k,Ye),Q=tj(k,Bt);if(ee&&Q&&(ue.rangeCount!==1||ue.anchorNode!==ee.node||ue.anchorOffset!==ee.offset||ue.focusNode!==Q.node||ue.focusOffset!==Q.offset)){var ne=ye.createRange();ne.setStart(ee.node,ee.offset),ue.removeAllRanges(),Ye>Bt?(ue.addRange(ne),ue.extend(Q.node,Q.offset)):(ne.setEnd(Q.node,Q.offset),ue.addRange(ne))}}}}for(ye=[],ue=k;ue=ue.parentNode;)ue.nodeType===1&&ye.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ye.length;k++){var ve=ye[k];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}Ih=!!cb,ub=cb=null}finally{jt=b,V.p=p,$.T=u}}i.current=s,Mn=2}}function y2(){if(Mn===2){Mn=0;var i=lo,s=yl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=$.T,$.T=null;var p=V.p;V.p=2;var b=jt;jt|=4;try{GT(i,s.alternate,s)}finally{jt=b,V.p=p,$.T=u}}Mn=3}}function b2(){if(Mn===4||Mn===3){Mn=0,ln();var i=lo,s=yl,u=Si,p=i2;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Mn=5:(Mn=0,yl=lo=null,x2(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(so=null),Ue(u),s=s.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(St,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=$.T,b=V.p,V.p=2,$.T=null;try{for(var _=i.onRecoverableError,M=0;M<p.length;M++){var k=p[M];_(k.value,{componentStack:k.stack})}}finally{$.T=s,V.p=b}}(Si&3)!==0&&jh(),qa(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===Zy?wu++:(wu=0,Zy=i):wu=0,Su(0)}}function x2(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,nu(s)))}function jh(){return g2(),y2(),b2(),w2()}function w2(){if(Mn!==5)return!1;var i=lo,s=Yy;Yy=0;var u=Ue(Si),p=$.T,b=V.p;try{V.p=32>u?32:u,$.T=null,u=Ky,Ky=null;var _=lo,M=Si;if(Mn=0,yl=lo=null,Si=0,(jt&6)!==0)throw Error(r(331));var k=jt;if(jt|=4,n2(_.current),JT(_,_.current,M,u),jt=k,Su(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(St,_)}catch{}return!0}finally{V.p=b,$.T=p,x2(i,s)}}function S2(i,s,u){s=Kr(u,s),s=Ty(i.stateNode,s,2),i=to(i,s,2),i!==null&&(te(i,2),qa(i))}function $t(i,s,u){if(i.tag===3)S2(i,i,u);else for(;s!==null;){if(s.tag===3){S2(s,i,u);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(so===null||!so.has(p))){i=Kr(u,i),u=_T(2),p=to(s,u,2),p!==null&&(AT(u,p,s,i),te(p,2),qa(p));break}}s=s.return}}function Jy(i,s,u){var p=i.pingCache;if(p===null){p=i.pingCache=new gH;var b=new Set;p.set(s,b)}else b=p.get(s),b===void 0&&(b=new Set,p.set(s,b));b.has(u)||(Vy=!0,b.add(u),i=SH.bind(null,i,s,u),s.then(i,i))}function SH(i,s,u){var p=i.pingCache;p!==null&&p.delete(s),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Gt===i&&(vt&u)===u&&(hn===4||hn===3&&(vt&62914560)===vt&&300>H()-wh?(jt&2)===0&&bl(i,0):Gy|=u,gl===vt&&(gl=0)),qa(i)}function _2(i,s){s===0&&(s=dt()),i=Yo(i,s),i!==null&&(te(i,s),qa(i))}function _H(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),_2(i,u)}function AH(i,s){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),_2(i,u)}function EH(i,s){return bn(i,s)}var Th=null,wl=null,eb=!1,Ch=!1,tb=!1,uo=0;function qa(i){i!==wl&&i.next===null&&(wl===null?Th=wl=i:wl=wl.next=i),Ch=!0,eb||(eb=!0,jH())}function Su(i,s){if(!tb&&Ch){tb=!0;do for(var u=!1,p=Th;p!==null;){if(i!==0){var b=p.pendingLanes;if(b===0)var _=0;else{var M=p.suspendedLanes,k=p.pingedLanes;_=(1<<31-Ft(42|i)+1)-1,_&=b&~(M&~k),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(u=!0,j2(p,_))}else _=vt,_=Se(p,p===Gt?_:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(_&3)===0||Ve(p,_)||(u=!0,j2(p,_));p=p.next}while(u);tb=!1}}function OH(){A2()}function A2(){Ch=eb=!1;var i=0;uo!==0&&zH()&&(i=uo);for(var s=H(),u=null,p=Th;p!==null;){var b=p.next,_=E2(p,s);_===0?(p.next=null,u===null?Th=b:u.next=b,b===null&&(wl=u)):(u=p,(i!==0||(_&3)!==0)&&(Ch=!0)),p=b}Mn!==0&&Mn!==5||Su(i),uo!==0&&(uo=0)}function E2(i,s){for(var u=i.suspendedLanes,p=i.pingedLanes,b=i.expirationTimes,_=i.pendingLanes&-62914561;0<_;){var M=31-Ft(_),k=1<<M,Y=b[M];Y===-1?((k&u)===0||(k&p)!==0)&&(b[M]=Re(k,s)):Y<=s&&(i.expiredLanes|=k),_&=~k}if(s=Gt,u=vt,u=Se(i,i===s?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===s&&(kt===2||kt===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&tn(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Ve(i,u)){if(s=u&-u,s===i.callbackPriority)return s;switch(p!==null&&tn(p),Ue(u)){case 2:case 8:u=Ce;break;case 32:u=je;break;case 268435456:u=Pe;break;default:u=je}return p=O2.bind(null,i),u=bn(u,p),i.callbackPriority=s,i.callbackNode=u,s}return p!==null&&p!==null&&tn(p),i.callbackPriority=2,i.callbackNode=null,2}function O2(i,s){if(Mn!==0&&Mn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(jh()&&i.callbackNode!==u)return null;var p=vt;return p=Se(i,i===Gt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(s2(i,p,s),E2(i,H()),i.callbackNode!=null&&i.callbackNode===u?O2.bind(null,i):null)}function j2(i,s){if(jh())return null;s2(i,s,!0)}function jH(){IH(function(){(jt&6)!==0?bn(re,OH):A2()})}function nb(){if(uo===0){var i=ol;i===0&&(i=Un,Un<<=1,(Un&261888)===0&&(Un=256)),uo=i}return uo}function T2(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:zd(""+i)}function C2(i,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,i.id&&u.setAttribute("form",i.id),s.parentNode.insertBefore(u,s),i=new FormData(i),u.parentNode.removeChild(u),i}function TH(i,s,u,p,b){if(s==="submit"&&u&&u.stateNode===b){var _=T2((b[Nn]||null).action),M=p.submitter;M&&(s=(s=M[Nn]||null)?T2(s.formAction):M.getAttribute("formAction"),s!==null&&(_=s,M=null));var k=new Ud("action","action",null,p,b);i.push({event:k,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(uo!==0){var Y=M?C2(b,M):new FormData(b);Sy(u,{pending:!0,data:Y,method:b.method,action:_},null,Y)}}else typeof _=="function"&&(k.preventDefault(),Y=M?C2(b,M):new FormData(b),Sy(u,{pending:!0,data:Y,method:b.method,action:_},_,Y))},currentTarget:b}]})}}for(var rb=0;rb<Ig.length;rb++){var ab=Ig[rb],CH=ab.toLowerCase(),RH=ab[0].toUpperCase()+ab.slice(1);ya(CH,"on"+RH)}ya(oj,"onAnimationEnd"),ya(sj,"onAnimationIteration"),ya(lj,"onAnimationStart"),ya("dblclick","onDoubleClick"),ya("focusin","onFocus"),ya("focusout","onBlur"),ya(Gq,"onTransitionRun"),ya(Wq,"onTransitionStart"),ya(Yq,"onTransitionCancel"),ya(cj,"onTransitionEnd"),Gs("onMouseEnter",["mouseout","mouseover"]),Gs("onMouseLeave",["mouseout","mouseover"]),Gs("onPointerEnter",["pointerout","pointerover"]),Gs("onPointerLeave",["pointerout","pointerover"]),Fo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _u="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(" "),NH=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_u));function R2(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],b=p.event;p=p.listeners;e:{var _=void 0;if(s)for(var M=p.length-1;0<=M;M--){var k=p[M],Y=k.instance,ae=k.currentTarget;if(k=k.listener,Y!==_&&b.isPropagationStopped())break e;_=k,b.currentTarget=ae;try{_(b)}catch(de){Fd(de)}b.currentTarget=null,_=Y}else for(M=0;M<p.length;M++){if(k=p[M],Y=k.instance,ae=k.currentTarget,k=k.listener,Y!==_&&b.isPropagationStopped())break e;_=k,b.currentTarget=ae;try{_(b)}catch(de){Fd(de)}b.currentTarget=null,_=Y}}}}function pt(i,s){var u=s[qs];u===void 0&&(u=s[qs]=new Set);var p=i+"__bubble";u.has(p)||(N2(s,i,2,!1),u.add(p))}function ib(i,s,u){var p=0;s&&(p|=4),N2(u,i,p,s)}var Rh="_reactListening"+Math.random().toString(36).slice(2);function ob(i){if(!i[Rh]){i[Rh]=!0,AO.forEach(function(u){u!=="selectionchange"&&(NH.has(u)||ib(u,!1,i),ib(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Rh]||(s[Rh]=!0,ib("selectionchange",!1,s))}}function N2(i,s,u,p){switch(oC(s)){case 2:var b=i9;break;case 8:b=o9;break;default:b=wb}u=b.bind(null,s,u,i),b=void 0,!Og||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),p?b!==void 0?i.addEventListener(s,u,{capture:!0,passive:b}):i.addEventListener(s,u,!0):b!==void 0?i.addEventListener(s,u,{passive:b}):i.addEventListener(s,u,!1)}function sb(i,s,u,p,b){var _=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var M=p.tag;if(M===3||M===4){var k=p.stateNode.containerInfo;if(k===b)break;if(M===4)for(M=p.return;M!==null;){var Y=M.tag;if((Y===3||Y===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;k!==null;){if(M=Hs(k),M===null)return;if(Y=M.tag,Y===5||Y===6||Y===26||Y===27){p=_=M;continue e}k=k.parentNode}}p=p.return}$O(function(){var ae=_,de=Ag(u),ye=[];e:{var le=uj.get(i);if(le!==void 0){var ue=Ud,Be=i;switch(i){case"keypress":if(Id(u)===0)break e;case"keydown":case"keyup":ue=Aq;break;case"focusin":Be="focus",ue=Rg;break;case"focusout":Be="blur",ue=Rg;break;case"beforeblur":case"afterblur":ue=Rg;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=IO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=dq;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=jq;break;case oj:case sj:case lj:ue=mq;break;case cj:ue=Cq;break;case"scroll":case"scrollend":ue=uq;break;case"wheel":ue=Nq;break;case"copy":case"cut":case"paste":ue=gq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=UO;break;case"toggle":case"beforetoggle":ue=Pq}var Ye=(s&4)!==0,Bt=!Ye&&(i==="scroll"||i==="scrollend"),ee=Ye?le!==null?le+"Capture":null:le;Ye=[];for(var Q=ae,ne;Q!==null;){var ve=Q;if(ne=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||ne===null||ee===null||(ve=Vc(Q,ee),ve!=null&&Ye.push(Au(Q,ve,ne))),Bt)break;Q=Q.return}0<Ye.length&&(le=new ue(le,Be,null,u,de),ye.push({event:le,listeners:Ye}))}}if((s&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",ue=i==="mouseout"||i==="pointerout",le&&u!==_g&&(Be=u.relatedTarget||u.fromElement)&&(Hs(Be)||Be[Vr]))break e;if((ue||le)&&(le=de.window===de?de:(le=de.ownerDocument)?le.defaultView||le.parentWindow:window,ue?(Be=u.relatedTarget||u.toElement,ue=ae,Be=Be?Hs(Be):null,Be!==null&&(Bt=o(Be),Ye=Be.tag,Be!==Bt||Ye!==5&&Ye!==27&&Ye!==6)&&(Be=null)):(ue=null,Be=ae),ue!==Be)){if(Ye=IO,ve="onMouseLeave",ee="onMouseEnter",Q="mouse",(i==="pointerout"||i==="pointerover")&&(Ye=UO,ve="onPointerLeave",ee="onPointerEnter",Q="pointer"),Bt=ue==null?le:Fc(ue),ne=Be==null?le:Fc(Be),le=new Ye(ve,Q+"leave",ue,u,de),le.target=Bt,le.relatedTarget=ne,ve=null,Hs(de)===ae&&(Ye=new Ye(ee,Q+"enter",Be,u,de),Ye.target=ne,Ye.relatedTarget=Bt,ve=Ye),Bt=ve,ue&&Be)t:{for(Ye=MH,ee=ue,Q=Be,ne=0,ve=ee;ve;ve=Ye(ve))ne++;ve=0;for(var Ge=Q;Ge;Ge=Ye(Ge))ve++;for(;0<ne-ve;)ee=Ye(ee),ne--;for(;0<ve-ne;)Q=Ye(Q),ve--;for(;ne--;){if(ee===Q||Q!==null&&ee===Q.alternate){Ye=ee;break t}ee=Ye(ee),Q=Ye(Q)}Ye=null}else Ye=null;ue!==null&&M2(ye,le,ue,Ye,!1),Be!==null&&Bt!==null&&M2(ye,Bt,Be,Ye,!0)}}e:{if(le=ae?Fc(ae):window,ue=le.nodeName&&le.nodeName.toLowerCase(),ue==="select"||ue==="input"&&le.type==="file")var _t=KO;else if(WO(le))if(ZO)_t=Hq;else{_t=Uq;var qe=Bq}else ue=le.nodeName,!ue||ue.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ae&&Sg(ae.elementType)&&(_t=KO):_t=qq;if(_t&&(_t=_t(i,ae))){YO(ye,_t,u,de);break e}qe&&qe(i,le,ae),i==="focusout"&&ae&&le.type==="number"&&ae.memoizedProps.value!=null&&wg(le,"number",le.value)}switch(qe=ae?Fc(ae):window,i){case"focusin":(WO(qe)||qe.contentEditable==="true")&&(Qs=qe,$g=ae,Jc=null);break;case"focusout":Jc=$g=Qs=null;break;case"mousedown":zg=!0;break;case"contextmenu":case"mouseup":case"dragend":zg=!1,aj(ye,u,de);break;case"selectionchange":if(Vq)break;case"keydown":case"keyup":aj(ye,u,de)}var ot;if(Mg)e:{switch(i){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else Xs?VO(i,u)&&(gt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(gt="onCompositionStart");gt&&(qO&&u.locale!=="ko"&&(Xs||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&Xs&&(ot=zO()):(Yi=de,jg="value"in Yi?Yi.value:Yi.textContent,Xs=!0)),qe=Nh(ae,gt),0<qe.length&&(gt=new BO(gt,i,null,u,de),ye.push({event:gt,listeners:qe}),ot?gt.data=ot:(ot=GO(u),ot!==null&&(gt.data=ot)))),(ot=kq?$q(i,u):zq(i,u))&&(gt=Nh(ae,"onBeforeInput"),0<gt.length&&(qe=new BO("onBeforeInput","beforeinput",null,u,de),ye.push({event:qe,listeners:gt}),qe.data=ot)),TH(ye,i,ae,u,de)}R2(ye,s)})}function Au(i,s,u){return{instance:i,listener:s,currentTarget:u}}function Nh(i,s){for(var u=s+"Capture",p=[];i!==null;){var b=i,_=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||_===null||(b=Vc(i,u),b!=null&&p.unshift(Au(i,b,_)),b=Vc(i,s),b!=null&&p.push(Au(i,b,_))),i.tag===3)return p;i=i.return}return[]}function MH(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function M2(i,s,u,p,b){for(var _=s._reactName,M=[];u!==null&&u!==p;){var k=u,Y=k.alternate,ae=k.stateNode;if(k=k.tag,Y!==null&&Y===p)break;k!==5&&k!==26&&k!==27||ae===null||(Y=ae,b?(ae=Vc(u,_),ae!=null&&M.unshift(Au(u,ae,Y))):b||(ae=Vc(u,_),ae!=null&&M.push(Au(u,ae,Y)))),u=u.return}M.length!==0&&i.push({event:s,listeners:M})}var PH=/\r\n?/g,DH=/\u0000|\uFFFD/g;function P2(i){return(typeof i=="string"?i:""+i).replace(PH,`
49
- `).replace(DH,"")}function D2(i,s){return s=P2(s),P2(i)===s}function It(i,s,u,p,b,_){switch(u){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Ys(i,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Ys(i,""+p);break;case"className":kd(i,"class",p);break;case"tabIndex":kd(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":kd(i,u,p);break;case"style":DO(i,p,_);break;case"data":if(s!=="object"){kd(i,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=zd(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(u==="formAction"?(s!=="input"&&It(i,s,"name",b.name,b,null),It(i,s,"formEncType",b.formEncType,b,null),It(i,s,"formMethod",b.formMethod,b,null),It(i,s,"formTarget",b.formTarget,b,null)):(It(i,s,"encType",b.encType,b,null),It(i,s,"method",b.method,b,null),It(i,s,"target",b.target,b,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=zd(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=si);break;case"onScroll":p!=null&&pt("scroll",i);break;case"onScrollEnd":p!=null&&pt("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=zd(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):i.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":pt("beforetoggle",i),pt("toggle",i),Dd(i,"popover",p);break;case"xlinkActuate":oi(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":oi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":oi(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":oi(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":oi(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":oi(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":oi(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":oi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":oi(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Dd(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=lq.get(u)||u,Dd(i,u,p))}}function lb(i,s,u,p,b,_){switch(u){case"style":DO(i,p,_);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof p=="string"?Ys(i,p):(typeof p=="number"||typeof p=="bigint")&&Ys(i,""+p);break;case"onScroll":p!=null&&pt("scroll",i);break;case"onScrollEnd":p!=null&&pt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!EO.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),s=u.slice(2,b?u.length-7:void 0),_=i[Nn]||null,_=_!=null?_[u]:null,typeof _=="function"&&i.removeEventListener(s,_,b),typeof p=="function")){typeof _!="function"&&_!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(s,p,b);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):Dd(i,u,p)}}}function Gn(i,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pt("error",i),pt("load",i);var p=!1,b=!1,_;for(_ in u)if(u.hasOwnProperty(_)){var M=u[_];if(M!=null)switch(_){case"src":p=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:It(i,s,_,M,u,null)}}b&&It(i,s,"srcSet",u.srcSet,u,null),p&&It(i,s,"src",u.src,u,null);return;case"input":pt("invalid",i);var k=_=M=b=null,Y=null,ae=null;for(p in u)if(u.hasOwnProperty(p)){var de=u[p];if(de!=null)switch(p){case"name":b=de;break;case"type":M=de;break;case"checked":Y=de;break;case"defaultChecked":ae=de;break;case"value":_=de;break;case"defaultValue":k=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,s));break;default:It(i,s,p,de,u,null)}}RO(i,_,k,Y,ae,M,b,!1);return;case"select":pt("invalid",i),p=M=_=null;for(b in u)if(u.hasOwnProperty(b)&&(k=u[b],k!=null))switch(b){case"value":_=k;break;case"defaultValue":M=k;break;case"multiple":p=k;default:It(i,s,b,k,u,null)}s=_,u=M,i.multiple=!!p,s!=null?Ws(i,!!p,s,!1):u!=null&&Ws(i,!!p,u,!0);return;case"textarea":pt("invalid",i),_=b=p=null;for(M in u)if(u.hasOwnProperty(M)&&(k=u[M],k!=null))switch(M){case"value":p=k;break;case"defaultValue":b=k;break;case"children":_=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:It(i,s,M,k,u,null)}MO(i,p,b,_);return;case"option":for(Y in u)if(u.hasOwnProperty(Y)&&(p=u[Y],p!=null))switch(Y){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:It(i,s,Y,p,u,null)}return;case"dialog":pt("beforetoggle",i),pt("toggle",i),pt("cancel",i),pt("close",i);break;case"iframe":case"object":pt("load",i);break;case"video":case"audio":for(p=0;p<_u.length;p++)pt(_u[p],i);break;case"image":pt("error",i),pt("load",i);break;case"details":pt("toggle",i);break;case"embed":case"source":case"link":pt("error",i),pt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in u)if(u.hasOwnProperty(ae)&&(p=u[ae],p!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:It(i,s,ae,p,u,null)}return;default:if(Sg(s)){for(de in u)u.hasOwnProperty(de)&&(p=u[de],p!==void 0&&lb(i,s,de,p,u,void 0));return}}for(k in u)u.hasOwnProperty(k)&&(p=u[k],p!=null&&It(i,s,k,p,u,null))}function kH(i,s,u,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,_=null,M=null,k=null,Y=null,ae=null,de=null;for(ue in u){var ye=u[ue];if(u.hasOwnProperty(ue)&&ye!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":Y=ye;default:p.hasOwnProperty(ue)||It(i,s,ue,null,p,ye)}}for(var le in p){var ue=p[le];if(ye=u[le],p.hasOwnProperty(le)&&(ue!=null||ye!=null))switch(le){case"type":_=ue;break;case"name":b=ue;break;case"checked":ae=ue;break;case"defaultChecked":de=ue;break;case"value":M=ue;break;case"defaultValue":k=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:ue!==ye&&It(i,s,le,ue,p,ye)}}xg(i,M,k,Y,ae,de,_,b);return;case"select":ue=M=k=le=null;for(_ in u)if(Y=u[_],u.hasOwnProperty(_)&&Y!=null)switch(_){case"value":break;case"multiple":ue=Y;default:p.hasOwnProperty(_)||It(i,s,_,null,p,Y)}for(b in p)if(_=p[b],Y=u[b],p.hasOwnProperty(b)&&(_!=null||Y!=null))switch(b){case"value":le=_;break;case"defaultValue":k=_;break;case"multiple":M=_;default:_!==Y&&It(i,s,b,_,p,Y)}s=k,u=M,p=ue,le!=null?Ws(i,!!u,le,!1):!!p!=!!u&&(s!=null?Ws(i,!!u,s,!0):Ws(i,!!u,u?[]:"",!1));return;case"textarea":ue=le=null;for(k in u)if(b=u[k],u.hasOwnProperty(k)&&b!=null&&!p.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:It(i,s,k,null,p,b)}for(M in p)if(b=p[M],_=u[M],p.hasOwnProperty(M)&&(b!=null||_!=null))switch(M){case"value":le=b;break;case"defaultValue":ue=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==_&&It(i,s,M,b,p,_)}NO(i,le,ue);return;case"option":for(var Be in u)if(le=u[Be],u.hasOwnProperty(Be)&&le!=null&&!p.hasOwnProperty(Be))switch(Be){case"selected":i.selected=!1;break;default:It(i,s,Be,null,p,le)}for(Y in p)if(le=p[Y],ue=u[Y],p.hasOwnProperty(Y)&&le!==ue&&(le!=null||ue!=null))switch(Y){case"selected":i.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:It(i,s,Y,le,p,ue)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ye in u)le=u[Ye],u.hasOwnProperty(Ye)&&le!=null&&!p.hasOwnProperty(Ye)&&It(i,s,Ye,null,p,le);for(ae in p)if(le=p[ae],ue=u[ae],p.hasOwnProperty(ae)&&le!==ue&&(le!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,s));break;default:It(i,s,ae,le,p,ue)}return;default:if(Sg(s)){for(var Bt in u)le=u[Bt],u.hasOwnProperty(Bt)&&le!==void 0&&!p.hasOwnProperty(Bt)&&lb(i,s,Bt,void 0,p,le);for(de in p)le=p[de],ue=u[de],!p.hasOwnProperty(de)||le===ue||le===void 0&&ue===void 0||lb(i,s,de,le,p,ue);return}}for(var ee in u)le=u[ee],u.hasOwnProperty(ee)&&le!=null&&!p.hasOwnProperty(ee)&&It(i,s,ee,null,p,le);for(ye in p)le=p[ye],ue=u[ye],!p.hasOwnProperty(ye)||le===ue||le==null&&ue==null||It(i,s,ye,le,p,ue)}function k2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $H(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var b=u[p],_=b.transferSize,M=b.initiatorType,k=b.duration;if(_&&k&&k2(M)){for(M=0,k=b.responseEnd,p+=1;p<u.length;p++){var Y=u[p],ae=Y.startTime;if(ae>k)break;var de=Y.transferSize,ye=Y.initiatorType;de&&k2(ye)&&(Y=Y.responseEnd,M+=de*(Y<k?1:(k-ae)/(Y-ae)))}if(--p,s+=8*(_+M)/(b.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var cb=null,ub=null;function Mh(i){return i.nodeType===9?i:i.ownerDocument}function $2(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function z2(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function fb(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var db=null;function zH(){var i=window.event;return i&&i.type==="popstate"?i===db?!1:(db=i,!0):(db=null,!1)}var L2=typeof setTimeout=="function"?setTimeout:void 0,LH=typeof clearTimeout=="function"?clearTimeout:void 0,I2=typeof Promise=="function"?Promise:void 0,IH=typeof queueMicrotask=="function"?queueMicrotask:typeof I2<"u"?function(i){return I2.resolve(null).then(i).catch(BH)}:L2;function BH(i){setTimeout(function(){throw i})}function fo(i){return i==="head"}function B2(i,s){var u=s,p=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(b),El(s);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Eu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Eu(u);for(var _=u.firstChild;_;){var M=_.nextSibling,k=_.nodeName;_[Hc]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&_.rel.toLowerCase()==="stylesheet"||u.removeChild(_),_=M}}else u==="body"&&Eu(i.ownerDocument.body);u=b}while(u);El(s)}function U2(i,s){var u=i;i=0;do{var p=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function hb(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":hb(u),yg(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function UH(i,s,u,p){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Hc])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(_=i.getAttribute("rel"),_==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(_!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(_=i.getAttribute("src"),(_!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&_&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var _=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===_)return i}else return i;if(i=ea(i.nextSibling),i===null)break}return null}function qH(i,s,u){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=ea(i.nextSibling),i===null))return null;return i}function q2(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=ea(i.nextSibling),i===null))return null;return i}function pb(i){return i.data==="$?"||i.data==="$~"}function mb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function HH(i,s){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||u.readyState!=="loading")s();else{var p=function(){s(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function ea(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var vb=null;function H2(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(s===0)return ea(i.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}i=i.nextSibling}return null}function F2(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return i;s--}else u!=="/$"&&u!=="/&"||s++}i=i.previousSibling}return null}function V2(i,s,u){switch(s=Mh(u),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Eu(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);yg(i)}var ta=new Map,G2=new Set;function Ph(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var _i=V.d;V.d={f:FH,r:VH,D:GH,C:WH,L:YH,m:KH,X:XH,S:ZH,M:QH};function FH(){var i=_i.f(),s=Ah();return i||s}function VH(i){var s=Fs(i);s!==null&&s.tag===5&&s.type==="form"?cT(s):_i.r(i)}var Sl=typeof document>"u"?null:document;function W2(i,s,u){var p=Sl;if(p&&typeof s=="string"&&s){var b=Wr(s);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),G2.has(b)||(G2.add(b),i={rel:i,crossOrigin:u,href:s},p.querySelector(b)===null&&(s=p.createElement("link"),Gn(s,"link",i),zn(s),p.head.appendChild(s)))}}function GH(i){_i.D(i),W2("dns-prefetch",i,null)}function WH(i,s){_i.C(i,s),W2("preconnect",i,s)}function YH(i,s,u){_i.L(i,s,u);var p=Sl;if(p&&i&&s){var b='link[rel="preload"][as="'+Wr(s)+'"]';s==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+Wr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+Wr(u.imageSizes)+'"]')):b+='[href="'+Wr(i)+'"]';var _=b;switch(s){case"style":_=_l(i);break;case"script":_=Al(i)}ta.has(_)||(i=h({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:i,as:s},u),ta.set(_,i),p.querySelector(b)!==null||s==="style"&&p.querySelector(Ou(_))||s==="script"&&p.querySelector(ju(_))||(s=p.createElement("link"),Gn(s,"link",i),zn(s),p.head.appendChild(s)))}}function KH(i,s){_i.m(i,s);var u=Sl;if(u&&i){var p=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+Wr(p)+'"][href="'+Wr(i)+'"]',_=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Al(i)}if(!ta.has(_)&&(i=h({rel:"modulepreload",href:i},s),ta.set(_,i),u.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(ju(_)))return}p=u.createElement("link"),Gn(p,"link",i),zn(p),u.head.appendChild(p)}}}function ZH(i,s,u){_i.S(i,s,u);var p=Sl;if(p&&i){var b=Vs(p).hoistableStyles,_=_l(i);s=s||"default";var M=b.get(_);if(!M){var k={loading:0,preload:null};if(M=p.querySelector(Ou(_)))k.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":s},u),(u=ta.get(_))&&gb(i,u);var Y=M=p.createElement("link");zn(Y),Gn(Y,"link",i),Y._p=new Promise(function(ae,de){Y.onload=ae,Y.onerror=de}),Y.addEventListener("load",function(){k.loading|=1}),Y.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Dh(M,s,p)}M={type:"stylesheet",instance:M,count:1,state:k},b.set(_,M)}}}function XH(i,s){_i.X(i,s);var u=Sl;if(u&&i){var p=Vs(u).hoistableScripts,b=Al(i),_=p.get(b);_||(_=u.querySelector(ju(b)),_||(i=h({src:i,async:!0},s),(s=ta.get(b))&&yb(i,s),_=u.createElement("script"),zn(_),Gn(_,"link",i),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},p.set(b,_))}}function QH(i,s){_i.M(i,s);var u=Sl;if(u&&i){var p=Vs(u).hoistableScripts,b=Al(i),_=p.get(b);_||(_=u.querySelector(ju(b)),_||(i=h({src:i,async:!0,type:"module"},s),(s=ta.get(b))&&yb(i,s),_=u.createElement("script"),zn(_),Gn(_,"link",i),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},p.set(b,_))}}function Y2(i,s,u,p){var b=(b=Ee.current)?Ph(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=_l(u.href),u=Vs(b).hoistableStyles,p=u.get(s),p||(p={type:"style",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=_l(u.href);var _=Vs(b).hoistableStyles,M=_.get(i);if(M||(b=b.ownerDocument||b,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(i,M),(_=b.querySelector(Ou(i)))&&!_._p&&(M.instance=_,M.state.loading=5),ta.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},ta.set(i,u),_||JH(b,i,u,M.state))),s&&p===null)throw Error(r(528,""));return M}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Al(u),u=Vs(b).hoistableScripts,p=u.get(s),p||(p={type:"script",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function _l(i){return'href="'+Wr(i)+'"'}function Ou(i){return'link[rel="stylesheet"]['+i+"]"}function K2(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function JH(i,s,u,p){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=i.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),Gn(s,"link",u),zn(s),i.head.appendChild(s))}function Al(i){return'[src="'+Wr(i)+'"]'}function ju(i){return"script[async]"+i}function Z2(i,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var p=i.querySelector('style[data-href~="'+Wr(u.href)+'"]');if(p)return s.instance=p,zn(p),p;var b=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),zn(p),Gn(p,"style",b),Dh(p,u.precedence,i),s.instance=p;case"stylesheet":b=_l(u.href);var _=i.querySelector(Ou(b));if(_)return s.state.loading|=4,s.instance=_,zn(_),_;p=K2(u),(b=ta.get(b))&&gb(p,b),_=(i.ownerDocument||i).createElement("link"),zn(_);var M=_;return M._p=new Promise(function(k,Y){M.onload=k,M.onerror=Y}),Gn(_,"link",p),s.state.loading|=4,Dh(_,u.precedence,i),s.instance=_;case"script":return _=Al(u.src),(b=i.querySelector(ju(_)))?(s.instance=b,zn(b),b):(p=u,(b=ta.get(_))&&(p=h({},u),yb(p,b)),i=i.ownerDocument||i,b=i.createElement("script"),zn(b),Gn(b,"link",p),i.head.appendChild(b),s.instance=b);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,Dh(p,u.precedence,i));return s.instance}function Dh(i,s,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,_=b,M=0;M<p.length;M++){var k=p[M];if(k.dataset.precedence===s)_=k;else if(_!==b)break}_?_.parentNode.insertBefore(i,_.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(i,s.firstChild))}function gb(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function yb(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var kh=null;function X2(i,s,u){if(kh===null){var p=new Map,b=kh=new Map;b.set(u,p)}else b=kh,p=b.get(u),p||(p=new Map,b.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var _=u[b];if(!(_[Hc]||_[Vt]||i==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(s)||"";M=i+M;var k=p.get(M);k?k.push(_):p.set(M,[_])}}return p}function Q2(i,s,u){i=i.ownerDocument||i,i.head.insertBefore(u,s==="title"?i.querySelector("head > title"):null)}function e9(i,s,u){if(u===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function J2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function t9(i,s,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=_l(p.href),_=s.querySelector(Ou(b));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=$h.bind(i),s.then(i,i)),u.state.loading|=4,u.instance=_,zn(_);return}_=s.ownerDocument||s,p=K2(p),(b=ta.get(b))&&gb(p,b),_=_.createElement("link"),zn(_);var M=_;M._p=new Promise(function(k,Y){M.onload=k,M.onerror=Y}),Gn(_,"link",p),u.instance=_}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=$h.bind(i),s.addEventListener("load",u),s.addEventListener("error",u))}}var bb=0;function n9(i,s){return i.stylesheets&&i.count===0&&Lh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&Lh(i,i.stylesheets),i.unsuspend){var _=i.unsuspend;i.unsuspend=null,_()}},6e4+s);0<i.imgBytes&&bb===0&&(bb=62500*$H());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Lh(i,i.stylesheets),i.unsuspend)){var _=i.unsuspend;i.unsuspend=null,_()}},(i.imgBytes>bb?50:800)+s);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(b)}}:null}function $h(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var zh=null;function Lh(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,zh=new Map,s.forEach(r9,i),zh=null,$h.call(i))}function r9(i,s){if(!(s.state.loading&4)){var u=zh.get(i);if(u)var p=u.get(null);else{u=new Map,zh.set(i,u);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<b.length;_++){var M=b[_];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),p=M)}p&&u.set(null,p)}b=s.instance,M=b.getAttribute("data-precedence"),_=u.get(M)||p,_===p&&u.set(null,b),u.set(M,b),this.count++,p=$h.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),_?_.parentNode.insertBefore(b,_.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),s.state.loading|=4}}var Tu={$$typeof:j,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function a9(i,s,u,p,b,_,M,k,Y){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ke(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ke(0),this.hiddenUpdates=Ke(null),this.identifierPrefix=p,this.onUncaughtError=b,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function eC(i,s,u,p,b,_,M,k,Y,ae,de,ye){return i=new a9(i,s,u,M,Y,ae,de,ye,k),s=1,_===!0&&(s|=24),_=_r(3,null,null,s),i.current=_,_.stateNode=i,s=Qg(),s.refCount++,i.pooledCache=s,s.refCount++,_.memoizedState={element:p,isDehydrated:u,cache:s},ny(_),i}function tC(i){return i?(i=tl,i):tl}function nC(i,s,u,p,b,_){b=tC(b),p.context===null?p.context=b:p.pendingContext=b,p=eo(s),p.payload={element:u},_=_===void 0?null:_,_!==null&&(p.callback=_),u=to(i,p,s),u!==null&&(gr(u,i,s),ou(u,i,s))}function rC(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<s?u:s}}function xb(i,s){rC(i,s),(i=i.alternate)&&rC(i,s)}function aC(i){if(i.tag===13||i.tag===31){var s=Yo(i,67108864);s!==null&&gr(s,i,67108864),xb(i,67108864)}}function iC(i){if(i.tag===13||i.tag===31){var s=Tr();s=Ne(s);var u=Yo(i,s);u!==null&&gr(u,i,s),xb(i,s)}}var Ih=!0;function i9(i,s,u,p){var b=$.T;$.T=null;var _=V.p;try{V.p=2,wb(i,s,u,p)}finally{V.p=_,$.T=b}}function o9(i,s,u,p){var b=$.T;$.T=null;var _=V.p;try{V.p=8,wb(i,s,u,p)}finally{V.p=_,$.T=b}}function wb(i,s,u,p){if(Ih){var b=Sb(p);if(b===null)sb(i,s,p,Bh,u),sC(i,p);else if(l9(b,i,s,u,p))p.stopPropagation();else if(sC(i,p),s&4&&-1<s9.indexOf(i)){for(;b!==null;){var _=Fs(b);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=Te(_.pendingLanes);if(M!==0){var k=_;for(k.pendingLanes|=2,k.entangledLanes|=2;M;){var Y=1<<31-Ft(M);k.entanglements[1]|=Y,M&=~Y}qa(_),(jt&6)===0&&(Sh=H()+500,Su(0))}}break;case 31:case 13:k=Yo(_,2),k!==null&&gr(k,_,2),Ah(),xb(_,2)}if(_=Sb(p),_===null&&sb(i,s,p,Bh,u),_===b)break;b=_}b!==null&&p.stopPropagation()}else sb(i,s,p,null,u)}}function Sb(i){return i=Ag(i),_b(i)}var Bh=null;function _b(i){if(Bh=null,i=Hs(i),i!==null){var s=o(i);if(s===null)i=null;else{var u=s.tag;if(u===13){if(i=l(s),i!==null)return i;i=null}else if(u===31){if(i=c(s),i!==null)return i;i=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Bh=i,null}function oC(i){switch(i){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(J()){case re:return 2;case Ce:return 8;case je:case Oe:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var Ab=!1,ho=null,po=null,mo=null,Cu=new Map,Ru=new Map,vo=[],s9="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".split(" ");function sC(i,s){switch(i){case"focusin":case"focusout":ho=null;break;case"dragenter":case"dragleave":po=null;break;case"mouseover":case"mouseout":mo=null;break;case"pointerover":case"pointerout":Cu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ru.delete(s.pointerId)}}function Nu(i,s,u,p,b,_){return i===null||i.nativeEvent!==_?(i={blockedOn:s,domEventName:u,eventSystemFlags:p,nativeEvent:_,targetContainers:[b]},s!==null&&(s=Fs(s),s!==null&&aC(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),i)}function l9(i,s,u,p,b){switch(s){case"focusin":return ho=Nu(ho,i,s,u,p,b),!0;case"dragenter":return po=Nu(po,i,s,u,p,b),!0;case"mouseover":return mo=Nu(mo,i,s,u,p,b),!0;case"pointerover":var _=b.pointerId;return Cu.set(_,Nu(Cu.get(_)||null,i,s,u,p,b)),!0;case"gotpointercapture":return _=b.pointerId,Ru.set(_,Nu(Ru.get(_)||null,i,s,u,p,b)),!0}return!1}function lC(i){var s=Hs(i.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){i.blockedOn=s,Yt(i.priority,function(){iC(u)});return}}else if(s===31){if(s=c(u),s!==null){i.blockedOn=s,Yt(i.priority,function(){iC(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Uh(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=Sb(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);_g=p,u.target.dispatchEvent(p),_g=null}else return s=Fs(u),s!==null&&aC(s),i.blockedOn=u,!1;s.shift()}return!0}function cC(i,s,u){Uh(i)&&u.delete(s)}function c9(){Ab=!1,ho!==null&&Uh(ho)&&(ho=null),po!==null&&Uh(po)&&(po=null),mo!==null&&Uh(mo)&&(mo=null),Cu.forEach(cC),Ru.forEach(cC)}function qh(i,s){i.blockedOn===s&&(i.blockedOn=null,Ab||(Ab=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,c9)))}var Hh=null;function uC(i){Hh!==i&&(Hh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hh===i&&(Hh=null);for(var s=0;s<i.length;s+=3){var u=i[s],p=i[s+1],b=i[s+2];if(typeof p!="function"){if(_b(p||u)===null)continue;break}var _=Fs(u);_!==null&&(i.splice(s,3),s-=3,Sy(_,{pending:!0,data:b,method:u.method,action:p},p,b))}}))}function El(i){function s(Y){return qh(Y,i)}ho!==null&&qh(ho,i),po!==null&&qh(po,i),mo!==null&&qh(mo,i),Cu.forEach(s),Ru.forEach(s);for(var u=0;u<vo.length;u++){var p=vo[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<vo.length&&(u=vo[0],u.blockedOn===null);)lC(u),u.blockedOn===null&&vo.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var b=u[p],_=u[p+1],M=b[Nn]||null;if(typeof _=="function")M||uC(u);else if(M){var k=null;if(_&&_.hasAttribute("formAction")){if(b=_,M=_[Nn]||null)k=M.formAction;else if(_b(b)!==null)continue}else k=M.action;typeof k=="function"?u[p+1]=k:(u.splice(p,3),p-=3),uC(u)}}}function fC(){function i(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(M){return b=M})},focusReset:"manual",scroll:"manual"})}function s(){b!==null&&(b(),b=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function Eb(i){this._internalRoot=i}Fh.prototype.render=Eb.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,p=Tr();nC(u,p,i,s,null,null)},Fh.prototype.unmount=Eb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;nC(i.current,2,null,i,null,null),Ah(),s[Vr]=null}};function Fh(i){this._internalRoot=i}Fh.prototype.unstable_scheduleHydration=function(i){if(i){var s=tt();i={blockedOn:null,target:i,priority:s};for(var u=0;u<vo.length&&s!==0&&s<vo[u].priority;u++);vo.splice(u,0,i),u===0&&lC(i)}};var dC=t.version;if(dC!=="19.2.6")throw Error(r(527,dC,"19.2.6"));V.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(s),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var u9={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vh.isDisabled&&Vh.supportsFiber)try{St=Vh.inject(u9),wt=Vh}catch{}}return Pu.createRoot=function(i,s){if(!a(i))throw Error(r(299));var u=!1,p="",b=bT,_=xT,M=wT;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=eC(i,1,!1,null,null,u,p,null,b,_,M,fC),i[Vr]=s.current,ob(i),new Eb(s)},Pu.hydrateRoot=function(i,s,u){if(!a(i))throw Error(r(299));var p=!1,b="",_=bT,M=xT,k=wT,Y=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(_=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(k=u.onRecoverableError),u.formState!==void 0&&(Y=u.formState)),s=eC(i,1,!0,s,u??null,p,b,Y,_,M,k,fC),s.context=tC(null),u=s.current,p=Tr(),p=Ne(p),b=eo(p),b.callback=null,to(u,b,p),u=p,s.current.lanes=u,te(s,u),qa(s),i[Vr]=s.current,ob(i),new Fh(s)},Pu.version="19.2.6",Pu}var SC;function x9(){if(SC)return Tb.exports;SC=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Tb.exports=b9(),Tb.exports}var w9=x9(),S9=(e,t,n,r,a,o,l,c)=>{let f=document.documentElement,d=["light","dark"];function m(x){(Array.isArray(e)?e:[e]).forEach(A=>{let S=A==="class",w=S&&o?a.map(E=>o[E]||E):a;S?(f.classList.remove(...w),f.classList.add(o&&o[x]?o[x]:x)):f.setAttribute(A,x)}),h(x)}function h(x){c&&d.includes(x)&&(f.style.colorScheme=x)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let x=localStorage.getItem(t)||n,A=l&&x==="system"?g():x;m(A)}catch{}},_C=["light","dark"],Uz="(prefers-color-scheme: dark)",_9=typeof window>"u",J_=y.createContext(void 0),A9={setTheme:e=>{},themes:[]},wc=()=>{var e;return(e=y.useContext(J_))!=null?e:A9},E9=e=>y.useContext(J_)?y.createElement(y.Fragment,null,e.children):y.createElement(j9,{...e}),O9=["light","dark"],j9=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:o=O9,defaultTheme:l=n?"system":"light",attribute:c="data-theme",value:f,children:d,nonce:m,scriptProps:h})=>{let[g,x]=y.useState(()=>C9(a,l)),[A,S]=y.useState(()=>g==="system"?Mb():g),w=f?Object.values(f):o,E=y.useCallback(C=>{let T=C;if(!T)return;C==="system"&&n&&(T=Mb());let N=f?f[T]:T,D=t?R9(m):null,z=document.documentElement,G=U=>{U==="class"?(z.classList.remove(...w),N&&z.classList.add(N)):U.startsWith("data-")&&(N?z.setAttribute(U,N):z.removeAttribute(U))};if(Array.isArray(c)?c.forEach(G):G(c),r){let U=_C.includes(l)?l:null,P=_C.includes(T)?T:U;z.style.colorScheme=P}D==null||D()},[m]),O=y.useCallback(C=>{let T=typeof C=="function"?C(g):C;x(T);try{localStorage.setItem(a,T)}catch{}},[g]),j=y.useCallback(C=>{let T=Mb(C);S(T),g==="system"&&n&&!e&&E("system")},[g,e]);y.useEffect(()=>{let C=window.matchMedia(Uz);return C.addListener(j),j(C),()=>C.removeListener(j)},[j]),y.useEffect(()=>{let C=T=>{T.key===a&&(T.newValue?x(T.newValue):O(l))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[O]),y.useEffect(()=>{E(e??g)},[e,g]);let R=y.useMemo(()=>({theme:g,setTheme:O,forcedTheme:e,resolvedTheme:g==="system"?A:g,themes:n?[...o,"system"]:o,systemTheme:n?A:void 0}),[g,O,e,A,n,o]);return y.createElement(J_.Provider,{value:R},y.createElement(T9,{forcedTheme:e,storageKey:a,attribute:c,enableSystem:n,enableColorScheme:r,defaultTheme:l,value:f,themes:o,nonce:m,scriptProps:h}),d)},T9=y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:o,value:l,themes:c,nonce:f,scriptProps:d})=>{let m=JSON.stringify([n,t,o,e,c,l,r,a]).slice(1,-1);return y.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${S9.toString()})(${m})`}})}),C9=(e,t)=>{if(_9)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},R9=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Mb=e=>(e||(e=window.matchMedia(Uz)),e.matches?"dark":"light");/**
50
- * react-router v7.15.1
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var AC="popstate";function EC(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function N9(e={}){function t(r,a){var d;let o=(d=a.state)==null?void 0:d.masked,{pathname:l,search:c,hash:f}=o||r.location;return J1("",{pathname:l,search:c,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:ff(a)}return P9(t,n,null,e)}function on(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function da(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function M9(){return Math.random().toString(36).substring(2,10)}function OC(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function J1(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Sc(t):t,state:n,key:t&&t.key||r||M9(),mask:a}}function ff({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Sc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function P9(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,c="POP",f=null,d=m();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function m(){return(l.state||{idx:null}).idx}function h(){c="POP";let w=m(),E=w==null?null:w-d;d=w,f&&f({action:c,location:S.location,delta:E})}function g(w,E){c="PUSH";let O=EC(w)?w:J1(S.location,w,E);d=m()+1;let j=OC(O,d),R=S.createHref(O.mask||O);try{l.pushState(j,"",R)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(R)}o&&f&&f({action:c,location:S.location,delta:1})}function x(w,E){c="REPLACE";let O=EC(w)?w:J1(S.location,w,E);d=m();let j=OC(O,d),R=S.createHref(O.mask||O);l.replaceState(j,"",R),o&&f&&f({action:c,location:S.location,delta:0})}function A(w){return D9(w)}let S={get action(){return c},get location(){return e(a,l)},listen(w){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(AC,h),f=w,()=>{a.removeEventListener(AC,h),f=null}},createHref(w){return t(a,w)},createURL:A,encodeLocation(w){let E=A(w);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:g,replace:x,go(w){return l.go(w)}};return S}function D9(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),on(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ff(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function qz(e,t,n="/"){return k9(e,t,n,!1)}function k9(e,t,n,r,a){let o=typeof t=="string"?Sc(t):t,l=Di(o.pathname||"/",n);if(l==null)return null;let c=$9(e),f=null,d=Y9(l);for(let m=0;f==null&&m<c.length;++m)f=G9(c[m],d,r);return f}function $9(e){let t=Hz(e);return z9(t),t}function Hz(e,t=[],n=[],r="",a=!1){let o=(l,c,f=a,d)=>{let m={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;on(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let h=Ra([r,m.relativePath]),g=n.concat(m);l.children&&l.children.length>0&&(on(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Hz(l.children,t,g,h,f)),!(l.path==null&&!l.index)&&t.push({path:h,score:F9(h,l.index),routesMeta:g})};return e.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,c);else for(let d of Fz(l.path))o(l,c,!0,d)}),t}function Fz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=Fz(r.join("/")),c=[];return c.push(...l.map(f=>f===""?o:[o,f].join("/"))),a&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function z9(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:V9(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var L9=/^:[\w-]+$/,I9=3,B9=2,U9=1,q9=10,H9=-2,jC=e=>e==="*";function F9(e,t){let n=e.split("/"),r=n.length;return n.some(jC)&&(r+=H9),t&&(r+=B9),n.filter(a=>!jC(a)).reduce((a,o)=>a+(L9.test(o)?I9:o===""?U9:q9),r)}function V9(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function G9(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let c=0;c<r.length;++c){let f=r[c],d=c===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",h=Np({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},m),g=f.route;if(!h&&d&&n&&!r[r.length-1].route.index&&(h=Np({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!h)return null;Object.assign(a,h.params),l.push({params:a,pathname:Ra([o,h.pathname]),pathnameBase:Q9(Ra([o,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(o=Ra([o,h.pathnameBase]))}return l}function Np(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=W9(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:r.reduce((d,{paramName:m,isOptional:h},g)=>{if(m==="*"){let A=c[g]||"";l=o.slice(0,o.length-A.length).replace(/(.)\/+$/,"$1")}const x=c[g];return h&&!x?d[m]=void 0:d[m]=(x||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function W9(e,t=!1,n=!0){da(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,f,d,m)=>{if(r.push({paramName:c,isOptional:f!=null}),f){let h=m.charAt(d+l.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Y9(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return da(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Di(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var K9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Z9(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Sc(e):e,o;return n?(n=Vz(n),n.startsWith("/")?o=TC(n.substring(1),"/"):o=TC(n,t)):o=t,{pathname:o,search:J9(r),hash:eF(a)}}function TC(e,t){let n=Mp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Pb(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function X9(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function eA(e){let t=X9(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ev(e,t,n,r=!1){let a;typeof e=="string"?a=Sc(e):(a={...e},on(!a.pathname||!a.pathname.includes("?"),Pb("?","pathname","search",a)),on(!a.pathname||!a.pathname.includes("#"),Pb("#","pathname","hash",a)),on(!a.search||!a.search.includes("#"),Pb("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,c;if(l==null)c=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),h-=1;a.pathname=g.join("/")}c=h>=0?t[h]:"/"}let f=Z9(a,c),d=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||m)&&(f.pathname+="/"),f}var Vz=e=>e.replace(/\/\/+/g,"/"),Ra=e=>Vz(e.join("/")),Mp=e=>e.replace(/\/+$/,""),Q9=e=>Mp(e).replace(/^\/*/,"/"),J9=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,eF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,tF=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function nF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function rF(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ra(t)||"/"}var Gz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wz(e,t){let n=e;if(typeof n!="string"||!K9.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Gz)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=Di(l.pathname,t);l.origin===o.origin&&c!=null?n=c+l.search+l.hash:a=!0}catch{da(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Yz=["POST","PUT","PATCH","DELETE"];new Set(Yz);var aF=["GET",...Yz];new Set(aF);var _c=y.createContext(null);_c.displayName="DataRouter";var tv=y.createContext(null);tv.displayName="DataRouterState";var Kz=y.createContext(!1);function iF(){return y.useContext(Kz)}var Zz=y.createContext({isTransitioning:!1});Zz.displayName="ViewTransition";var oF=y.createContext(new Map);oF.displayName="Fetchers";var sF=y.createContext(null);sF.displayName="Await";var Ur=y.createContext(null);Ur.displayName="Navigation";var ed=y.createContext(null);ed.displayName="Location";var ka=y.createContext({outlet:null,matches:[],isDataRoute:!1});ka.displayName="Route";var tA=y.createContext(null);tA.displayName="RouteError";var Xz="REACT_ROUTER_ERROR",lF="REDIRECT",cF="ROUTE_ERROR_RESPONSE";function uF(e){if(e.startsWith(`${Xz}:${lF}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function fF(e){if(e.startsWith(`${Xz}:${cF}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new tF(t.status,t.statusText,t.data)}catch{}}function dF(e,{relative:t}={}){on(Ac(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Ur),{hash:a,pathname:o,search:l}=td(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:Ra([n,o])),r.createHref({pathname:c,search:l,hash:a})}function Ac(){return y.useContext(ed)!=null}function qr(){return on(Ac(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ed).location}var Qz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jz(e){y.useContext(Ur).static||y.useLayoutEffect(e)}function $a(){let{isDataRoute:e}=y.useContext(ka);return e?jF():hF()}function hF(){on(Ac(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(_c),{basename:t,navigator:n}=y.useContext(Ur),{matches:r}=y.useContext(ka),{pathname:a}=qr(),o=JSON.stringify(eA(r)),l=y.useRef(!1);return Jz(()=>{l.current=!0}),y.useCallback((f,d={})=>{if(da(l.current,Qz),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=ev(f,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Ra([t,m.pathname])),(d.replace?n.replace:n.push)(m,d.state,d)},[t,n,o,a,e])}var pF=y.createContext(null);function mF(e){let t=y.useContext(ka).outlet;return y.useMemo(()=>t&&y.createElement(pF.Provider,{value:e},t),[t,e])}function td(e,{relative:t}={}){let{matches:n}=y.useContext(ka),{pathname:r}=qr(),a=JSON.stringify(eA(n));return y.useMemo(()=>ev(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function vF(e,t){return e5(e,t)}function e5(e,t,n){var w;on(Ac(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Ur),{matches:a}=y.useContext(ka),o=a[a.length-1],l=o?o.params:{},c=o?o.pathname:"/",f=o?o.pathnameBase:"/",d=o&&o.route;{let E=d&&d.path||"";n5(c,!d||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
-
60
- Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=qr(),h;if(t){let E=typeof t=="string"?Sc(t):t;on(f==="/"||((w=E.pathname)==null?void 0:w.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${E.pathname}" was given in the \`location\` prop.`),h=E}else h=m;let g=h.pathname||"/",x=g;if(f!=="/"){let E=f.replace(/^\//,"").split("/");x="/"+g.replace(/^\//,"").split("/").slice(E.length).join("/")}let A=n&&n.state.matches.length?n.state.matches.map(E=>Object.assign(E,{route:n.manifest[E.route.id]||E.route})):qz(e,{pathname:x});da(d||A!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),da(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let S=wF(A&&A.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:Ra([f,r.encodeLocation?r.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:Ra([f,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),a,n);return t&&S?y.createElement(ed.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},S):S}function gF(){let e=OF(),t=nF(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:o},"ErrorBoundary")," or"," ",y.createElement("code",{style:o},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:a},n):null,l)}var yF=y.createElement(gF,null),t5=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=fF(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(ka.Provider,{value:this.props.routeContext},y.createElement(tA.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(bF,{error:e},t):t}};t5.contextType=Kz;var Db=new WeakMap;function bF({children:e,error:t}){let{basename:n}=y.useContext(Ur);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=uF(t.digest);if(r){let a=Db.get(t);if(a)throw a;let o=Wz(r.location,n);if(Gz&&!Db.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw Db.set(t,l),l}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function xF({routeContext:e,match:t,children:n}){let r=y.useContext(_c);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(ka.Provider,{value:e},n)}function wF(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,o=r==null?void 0:r.errors;if(o!=null){let m=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);on(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let l=!1,c=-1;if(n&&r){l=r.renderFallback;for(let m=0;m<a.length;m++){let h=a[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=m),h.route.id){let{loaderData:g,errors:x}=r,A=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||A){n.isStatic&&(l=!0),c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,d=r&&f?(m,h)=>{var g,x;f(m,{location:r.location,params:((x=(g=r.matches)==null?void 0:g[0])==null?void 0:x.params)??{},pattern:rF(r.matches),errorInfo:h})}:void 0;return a.reduceRight((m,h,g)=>{let x,A=!1,S=null,w=null;r&&(x=o&&h.route.id?o[h.route.id]:void 0,S=h.route.errorElement||yF,l&&(c<0&&g===0?(n5("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,w=null):c===g&&(A=!0,w=h.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,g+1)),O=()=>{let j;return x?j=S:A?j=w:h.route.Component?j=y.createElement(h.route.Component,null):h.route.element?j=h.route.element:j=m,y.createElement(xF,{match:h,routeContext:{outlet:m,matches:E,isDataRoute:r!=null},children:j})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?y.createElement(t5,{location:r.location,revalidation:r.revalidation,component:S,error:x,children:O(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:d}):O()},null)}function nA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SF(e){let t=y.useContext(_c);return on(t,nA(e)),t}function _F(e){let t=y.useContext(tv);return on(t,nA(e)),t}function AF(e){let t=y.useContext(ka);return on(t,nA(e)),t}function rA(e){let t=AF(e),n=t.matches[t.matches.length-1];return on(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function EF(){return rA("useRouteId")}function OF(){var r;let e=y.useContext(tA),t=_F("useRouteError"),n=rA("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function jF(){let{router:e}=SF("useNavigate"),t=rA("useNavigate"),n=y.useRef(!1);return Jz(()=>{n.current=!0}),y.useCallback(async(a,o={})=>{da(n.current,Qz),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var CC={};function n5(e,t,n){!t&&!CC[e]&&(CC[e]=!0,da(!1,n))}y.memo(TF);function TF({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:o}){return e5(e,void 0,{manifest:t,state:r,isStatic:a,onError:o})}function r5({to:e,replace:t,state:n,relative:r}){on(Ac(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=y.useContext(Ur);da(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=y.useContext(ka),{pathname:l}=qr(),c=$a(),f=ev(e,eA(o),l,r==="path"),d=JSON.stringify(f);return y.useEffect(()=>{c(JSON.parse(d),{replace:t,state:n,relative:r})},[c,d,r,t,n]),null}function CF(e){return mF(e.context)}function yr(e){on(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function RF({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1,useTransitions:l}){on(!Ac(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=y.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:l,future:{}}),[c,a,o,l]);typeof n=="string"&&(n=Sc(n));let{pathname:d="/",search:m="",hash:h="",state:g=null,key:x="default",mask:A}=n,S=y.useMemo(()=>{let w=Di(d,c);return w==null?null:{location:{pathname:w,search:m,hash:h,state:g,key:x,mask:A},navigationType:r}},[c,d,m,h,g,x,r,A]);return da(S!=null,`<Router basename="${c}"> is not able to match the URL "${d}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Ur.Provider,{value:f},y.createElement(ed.Provider,{children:t,value:S}))}function NF({children:e,location:t}){return vF(eS(e),t)}function eS(e,t=[]){let n=[];return y.Children.forEach(e,(r,a)=>{if(!y.isValidElement(r))return;let o=[...t,a];if(r.type===y.Fragment){n.push.apply(n,eS(r.props.children,o));return}on(r.type===yr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),on(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=eS(r.props.children,o)),n.push(l)}),n}var yp="get",bp="application/x-www-form-urlencoded";function nv(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function MF(e){return nv(e)&&e.tagName.toLowerCase()==="button"}function PF(e){return nv(e)&&e.tagName.toLowerCase()==="form"}function DF(e){return nv(e)&&e.tagName.toLowerCase()==="input"}function kF(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $F(e,t){return e.button===0&&(!t||t==="_self")&&!kF(e)}function tS(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function zF(e,t){let n=tS(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(o=>{n.append(a,o)})}),n}var Wh=null;function LF(){if(Wh===null)try{new FormData(document.createElement("form"),0),Wh=!1}catch{Wh=!0}return Wh}var IF=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kb(e){return e!=null&&!IF.has(e)?(da(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bp}"`),null):e}function BF(e,t){let n,r,a,o,l;if(PF(e)){let c=e.getAttribute("action");r=c?Di(c,t):null,n=e.getAttribute("method")||yp,a=kb(e.getAttribute("enctype"))||bp,o=new FormData(e)}else if(MF(e)||DF(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(r=f?Di(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||yp,a=kb(e.getAttribute("formenctype"))||kb(c.getAttribute("enctype"))||bp,o=new FormData(c,e),!LF()){let{name:d,type:m,value:h}=e;if(m==="image"){let g=d?`${d}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else d&&o.append(d,h)}}else{if(nv(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=yp,r=null,a=bp,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function aA(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function a5(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Di(a.pathname,t)==="/"?a.pathname=`${Mp(t)}/_root.${r}`:a.pathname=`${Mp(a.pathname)}.${r}`,a}async function UF(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function qF(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function HF(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await UF(o,n);return l.links?l.links():[]}return[]}));return WF(r.flat(1).filter(qF).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function RC(e,t,n,r,a,o){let l=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(f,d)=>{var m;return n[d].pathname!==f.pathname||((m=n[d].route.path)==null?void 0:m.endsWith("*"))&&n[d].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,d)=>l(f,d)||c(f,d)):o==="data"?t.filter((f,d)=>{var h;let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,d)||c(f,d))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((h=n[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function FF(e,t,{includeHydrateFallback:n}={}){return VF(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function VF(e){return[...new Set(e)]}function GF(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function WF(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(GF(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function iA(){let e=y.useContext(_c);return aA(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function YF(){let e=y.useContext(tv);return aA(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var oA=y.createContext(void 0);oA.displayName="FrameworkContext";function sA(){let e=y.useContext(oA);return aA(e,"You must render this element inside a <HydratedRouter> element"),e}function KF(e,t){let n=y.useContext(oA),[r,a]=y.useState(!1),[o,l]=y.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:m,onTouchStart:h}=t,g=y.useRef(null);y.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=E=>{E.forEach(O=>{l(O.isIntersecting)})},w=new IntersectionObserver(S,{threshold:.5});return g.current&&w.observe(g.current),()=>{w.disconnect()}}},[e]),y.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let x=()=>{a(!0)},A=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:Du(c,x),onBlur:Du(f,A),onMouseEnter:Du(d,x),onMouseLeave:Du(m,A),onTouchStart:Du(h,x)}]:[!1,g,{}]}function Du(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ZF({page:e,...t}){let n=iF(),{router:r}=iA(),a=y.useMemo(()=>qz(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?y.createElement(QF,{page:e,matches:a,...t}):y.createElement(JF,{page:e,matches:a,...t}):null}function XF(e){let{manifest:t,routeModules:n}=sA(),[r,a]=y.useState([]);return y.useEffect(()=>{let o=!1;return HF(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function QF({page:e,matches:t,...n}){let r=qr(),{future:a}=sA(),{basename:o}=iA(),l=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let c=a5(e,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,d=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?f=!0:d.push(m.route.id);return f&&d.length>0&&c.searchParams.set("_routes",d.join(",")),[c.pathname+c.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,r,t]);return y.createElement(y.Fragment,null,l.map(c=>y.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...n})))}function JF({page:e,matches:t,...n}){let r=qr(),{future:a,manifest:o,routeModules:l}=sA(),{basename:c}=iA(),{loaderData:f,matches:d}=YF(),m=y.useMemo(()=>RC(e,t,d,o,r,"data"),[e,t,d,o,r]),h=y.useMemo(()=>RC(e,t,d,o,r,"assets"),[e,t,d,o,r]),g=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,w=!1;if(t.forEach(O=>{var R;let j=o.routes[O.route.id];!j||!j.hasLoader||(!m.some(C=>C.route.id===O.route.id)&&O.route.id in f&&((R=l[O.route.id])!=null&&R.shouldRevalidate)||j.hasClientLoader?w=!0:S.add(O.route.id))}),S.size===0)return[];let E=a5(e,c,a.unstable_trailingSlashAwareDataRequests,"data");return w&&S.size>0&&E.searchParams.set("_routes",t.filter(O=>S.has(O.route.id)).map(O=>O.route.id).join(",")),[E.pathname+E.search]},[c,a.unstable_trailingSlashAwareDataRequests,f,r,o,m,t,e,l]),x=y.useMemo(()=>FF(h,o),[h,o]),A=XF(h);return y.createElement(y.Fragment,null,g.map(S=>y.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),x.map(S=>y.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),A.map(({key:S,link:w})=>y.createElement("link",{key:S,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function e7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var t7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{t7&&(window.__reactRouterVersion="7.15.1")}catch{}function n7({basename:e,children:t,useTransitions:n,window:r}){let a=y.useRef();a.current==null&&(a.current=N9({window:r,v5Compat:!0}));let o=a.current,[l,c]=y.useState({action:o.action,location:o.location}),f=y.useCallback(d=>{n===!1?c(d):y.startTransition(()=>c(d))},[n]);return y.useLayoutEffect(()=>o.listen(f),[o,f]),y.createElement(RF,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var i5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pl=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,mask:c,state:f,target:d,to:m,preventScrollReset:h,viewTransition:g,defaultShouldRevalidate:x,...A},S){let{basename:w,navigator:E,useTransitions:O}=y.useContext(Ur),j=typeof m=="string"&&i5.test(m),R=Wz(m,w);m=R.to;let C=dF(m,{relative:a}),T=qr(),N=null;if(c){let W=ev(c,[],T.mask?T.mask.pathname:"/",!0);w!=="/"&&(W.pathname=W.pathname==="/"?w:Ra([w,W.pathname])),N=E.createHref(W)}let[D,z,G]=KF(r,A),U=o7(m,{replace:l,mask:c,state:f,target:d,preventScrollReset:h,relative:a,viewTransition:g,defaultShouldRevalidate:x,useTransitions:O});function P(W){t&&t(W),W.defaultPrevented||U(W)}let B=!(R.isExternal||o),q=y.createElement("a",{...A,...G,href:(B?N:void 0)||R.absoluteURL||C,onClick:B?P:t,ref:e7(S,z),target:d,"data-discover":!j&&n==="render"?"true":void 0});return D&&!j?y.createElement(y.Fragment,null,q,y.createElement(ZF,{page:C})):q});Pl.displayName="Link";var r7=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:c,children:f,...d},m){let h=td(l,{relative:d.relative}),g=qr(),x=y.useContext(tv),{navigator:A,basename:S}=y.useContext(Ur),w=x!=null&&f7(h)&&c===!0,E=A.encodeLocation?A.encodeLocation(h).pathname:h.pathname,O=g.pathname,j=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(O=O.toLowerCase(),j=j?j.toLowerCase():null,E=E.toLowerCase()),j&&S&&(j=Di(j,S)||j);const R=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let C=O===E||!a&&O.startsWith(E)&&O.charAt(R)==="/",T=j!=null&&(j===E||!a&&j.startsWith(E)&&j.charAt(E.length)==="/"),N={isActive:C,isPending:T,isTransitioning:w},D=C?t:void 0,z;typeof r=="function"?z=r(N):z=[r,C?"active":null,T?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let G=typeof o=="function"?o(N):o;return y.createElement(Pl,{...d,"aria-current":D,className:z,ref:m,style:G,to:l,viewTransition:c},typeof f=="function"?f(N):f)});r7.displayName="NavLink";var a7=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=yp,action:c,onSubmit:f,relative:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:g,...x},A)=>{let{useTransitions:S}=y.useContext(Ur),w=c7(),E=u7(c,{relative:d}),O=l.toLowerCase()==="get"?"get":"post",j=typeof c=="string"&&i5.test(c),R=C=>{if(f&&f(C),C.defaultPrevented)return;C.preventDefault();let T=C.nativeEvent.submitter,N=(T==null?void 0:T.getAttribute("formmethod"))||l,D=()=>w(T||C.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:g});S&&n!==!1?y.startTransition(()=>D()):D()};return y.createElement("form",{ref:A,method:O,action:E,onSubmit:r?f:R,...x,"data-discover":!j&&e==="render"?"true":void 0})});a7.displayName="Form";function i7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function o5(e){let t=y.useContext(_c);return on(t,i7(e)),t}function o7(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:c,defaultShouldRevalidate:f,useTransitions:d}={}){let m=$a(),h=qr(),g=td(e,{relative:l});return y.useCallback(x=>{if($F(x,t)){x.preventDefault();let A=n!==void 0?n:ff(h)===ff(g),S=()=>m(e,{replace:A,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:c,defaultShouldRevalidate:f});d?y.startTransition(()=>S()):S()}},[h,m,g,n,r,a,t,e,o,l,c,f,d])}function nd(e){da(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(tS(e)),n=y.useRef(!1),r=qr(),a=y.useMemo(()=>zF(r.search,n.current?null:t.current),[r.search]),o=$a(),l=y.useCallback((c,f)=>{const d=tS(typeof c=="function"?c(new URLSearchParams(a)):c);n.current=!0,o("?"+d,f)},[o,a]);return[a,l]}var s7=0,l7=()=>`__${String(++s7)}__`;function c7(){let{router:e}=o5("useSubmit"),{basename:t}=y.useContext(Ur),n=EF(),r=e.fetch,a=e.navigate;return y.useCallback(async(o,l={})=>{let{action:c,method:f,encType:d,formData:m,body:h}=BF(o,t);if(l.navigate===!1){let g=l.fetcherKey||l7();await r(g,n,l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||f,formEncType:l.encType||d,flushSync:l.flushSync})}else await a(l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||f,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function u7(e,{relative:t}={}){let{basename:n}=y.useContext(Ur),r=y.useContext(ka);on(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...td(e||".",{relative:t})},l=qr();if(e==null){o.search=l.search;let c=new URLSearchParams(o.search),f=c.getAll("index");if(f.some(m=>m==="")){c.delete("index"),f.filter(h=>h).forEach(h=>c.append("index",h));let m=c.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ra([n,o.pathname])),ff(o)}function f7(e,{relative:t}={}){let n=y.useContext(Zz);on(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=o5("useViewTransitionState"),a=td(e,{relative:t});if(!n.isTransitioning)return!1;let o=Di(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Di(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Np(a.pathname,l)!=null||Np(a.pathname,o)!=null}var rd=Bz();const s5=Ht(rd);function d7(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const h7=e=>{switch(e){case"success":return v7;case"info":return y7;case"warning":return g7;case"error":return b7;default:return null}},p7=Array(12).fill(0),m7=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},p7.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),v7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),g7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),y7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),b7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),x7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),w7=()=>{const[e,t]=L.useState(document.hidden);return L.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let nS=1;class S7{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:nS++,l=this.toasts.find(f=>f.id===o),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(f=>f.id===o?(this.publish({...f,...t,id:o,title:r}),{...f,...t,id:o,dismissible:c,title:r}):f):this.addToast({title:r,...a,dismissible:c,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,l;const c=a.then(async d=>{if(l=["resolve",d],L.isValidElement(d))o=!1,this.create({id:r,type:"default",message:d});else if(A7(d)&&!d.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,...A})}else if(d instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(d):n.error,g=typeof n.description=="function"?await n.description(d):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,...A})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(d):n.success,g=typeof n.description=="function"?await n.description(d):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:g,...A})}}).catch(async d=>{if(l=["reject",d],n.error!==void 0){o=!1;const m=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,x=typeof m=="object"&&!L.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...x})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((d,m)=>c.then(()=>l[0]==="reject"?m(l[1]):d(l[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:f}:Object.assign(r,{unwrap:f})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||nS++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const br=new S7,_7=(e,t)=>{const n=(t==null?void 0:t.id)||nS++;return br.addToast({title:e,...t,id:n}),n},A7=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",E7=_7,O7=()=>br.toasts,j7=()=>br.getActiveToasts(),Et=Object.assign(E7,{success:br.success,info:br.info,warning:br.warning,error:br.error,custom:br.custom,message:br.message,promise:br.promise,dismiss:br.dismiss,loading:br.loading},{getHistory:O7,getToasts:j7});d7("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Yh(e){return e.label!==void 0}const T7=3,C7="24px",R7="16px",NC=4e3,N7=356,M7=14,P7=45,D7=200;function Ha(...e){return e.filter(Boolean).join(" ")}function k7(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const $7=e=>{var t,n,r,a,o,l,c,f,d;const{invert:m,toast:h,unstyled:g,interacting:x,setHeights:A,visibleToasts:S,heights:w,index:E,toasts:O,expanded:j,removeToast:R,defaultRichColors:C,closeButton:T,style:N,cancelButtonStyle:D,actionButtonStyle:z,className:G="",descriptionClassName:U="",duration:P,position:B,gap:q,expandByDefault:W,classNames:$,icons:V,closeButtonAriaLabel:F="Close toast"}=e,[K,ie]=L.useState(null),[I,Z]=L.useState(null),[X,oe]=L.useState(!1),[ge,Ee]=L.useState(!1),[me,we]=L.useState(!1),[ce,_e]=L.useState(!1),[Ae,se]=L.useState(!1),[He,$e]=L.useState(0),[Je,We]=L.useState(0),at=L.useRef(h.duration||P||NC),Rt=L.useRef(null),ft=L.useRef(null),bn=E===0,tn=E+1<=S,Nt=h.type,ln=h.dismissible!==!1,H=h.className||"",J=h.descriptionClassName||"",re=L.useMemo(()=>w.findIndex(Se=>Se.toastId===h.id)||0,[w,h.id]),Ce=L.useMemo(()=>{var Se;return(Se=h.closeButton)!=null?Se:T},[h.closeButton,T]),je=L.useMemo(()=>h.duration||P||NC,[h.duration,P]),Oe=L.useRef(0),Pe=L.useRef(0),Fe=L.useRef(0),Xe=L.useRef(null),[St,wt]=B.split("-"),Mt=L.useMemo(()=>w.reduce((Se,Ve,Re)=>Re>=re?Se:Se+Ve.height,0),[w,re]),Ft=w7(),Hr=h.invert||m,Fr=Nt==="loading";Pe.current=L.useMemo(()=>re*q+Mt,[re,Mt]),L.useEffect(()=>{at.current=je},[je]),L.useEffect(()=>{oe(!0)},[]),L.useEffect(()=>{const Se=ft.current;if(Se){const Ve=Se.getBoundingClientRect().height;return We(Ve),A(Re=>[{toastId:h.id,height:Ve,position:h.position},...Re]),()=>A(Re=>Re.filter(dt=>dt.toastId!==h.id))}},[A,h.id]),L.useLayoutEffect(()=>{if(!X)return;const Se=ft.current,Ve=Se.style.height;Se.style.height="auto";const Re=Se.getBoundingClientRect().height;Se.style.height=Ve,We(Re),A(dt=>dt.find(te=>te.toastId===h.id)?dt.map(te=>te.toastId===h.id?{...te,height:Re}:te):[{toastId:h.id,height:Re,position:h.position},...dt])},[X,h.title,h.description,A,h.id,h.jsx,h.action,h.cancel]);const Rn=L.useCallback(()=>{Ee(!0),$e(Pe.current),A(Se=>Se.filter(Ve=>Ve.toastId!==h.id)),setTimeout(()=>{R(h)},D7)},[h,R,A,Pe]);L.useEffect(()=>{if(h.promise&&Nt==="loading"||h.duration===1/0||h.type==="loading")return;let Se;return j||x||Ft?(()=>{if(Fe.current<Oe.current){const dt=new Date().getTime()-Oe.current;at.current=at.current-dt}Fe.current=new Date().getTime()})():(()=>{at.current!==1/0&&(Oe.current=new Date().getTime(),Se=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Rn()},at.current))})(),()=>clearTimeout(Se)},[j,x,h,Nt,Ft,Rn]),L.useEffect(()=>{h.delete&&(Rn(),h.onDismiss==null||h.onDismiss.call(h,h))},[Rn,h.delete]);function Un(){var Se;if(V!=null&&V.loading){var Ve;return L.createElement("div",{className:Ha($==null?void 0:$.loader,h==null||(Ve=h.classNames)==null?void 0:Ve.loader,"sonner-loader"),"data-visible":Nt==="loading"},V.loading)}return L.createElement(m7,{className:Ha($==null?void 0:$.loader,h==null||(Se=h.classNames)==null?void 0:Se.loader),visible:Nt==="loading"})}const Qn=h.icon||(V==null?void 0:V[Nt])||h7(Nt);var qn,Te;return L.createElement("li",{tabIndex:0,ref:ft,className:Ha(G,H,$==null?void 0:$.toast,h==null||(t=h.classNames)==null?void 0:t.toast,$==null?void 0:$.default,$==null?void 0:$[Nt],h==null||(n=h.classNames)==null?void 0:n[Nt]),"data-sonner-toast":"","data-rich-colors":(qn=h.richColors)!=null?qn:C,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":X,"data-promise":!!h.promise,"data-swiped":Ae,"data-removed":ge,"data-visible":tn,"data-y-position":St,"data-x-position":wt,"data-index":E,"data-front":bn,"data-swiping":me,"data-dismissible":ln,"data-type":Nt,"data-invert":Hr,"data-swipe-out":ce,"data-swipe-direction":I,"data-expanded":!!(j||W&&X),"data-testid":h.testId,style:{"--index":E,"--toasts-before":E,"--z-index":O.length-E,"--offset":`${ge?He:Pe.current}px`,"--initial-height":W?"auto":`${Je}px`,...N,...h.style},onDragEnd:()=>{we(!1),ie(null),Xe.current=null},onPointerDown:Se=>{Se.button!==2&&(Fr||!ln||(Rt.current=new Date,$e(Pe.current),Se.target.setPointerCapture(Se.pointerId),Se.target.tagName!=="BUTTON"&&(we(!0),Xe.current={x:Se.clientX,y:Se.clientY})))},onPointerUp:()=>{var Se,Ve,Re;if(ce||!ln)return;Xe.current=null;const dt=Number(((Se=ft.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ke=Number(((Ve=ft.current)==null?void 0:Ve.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),te=new Date().getTime()-((Re=Rt.current)==null?void 0:Re.getTime()),pe=K==="x"?dt:Ke,fe=Math.abs(pe)/te;if(Math.abs(pe)>=P7||fe>.11){$e(Pe.current),h.onDismiss==null||h.onDismiss.call(h,h),Z(K==="x"?dt>0?"right":"left":Ke>0?"down":"up"),Rn(),_e(!0);return}else{var ke,Le;(ke=ft.current)==null||ke.style.setProperty("--swipe-amount-x","0px"),(Le=ft.current)==null||Le.style.setProperty("--swipe-amount-y","0px")}se(!1),we(!1),ie(null)},onPointerMove:Se=>{var Ve,Re,dt;if(!Xe.current||!ln||((Ve=window.getSelection())==null?void 0:Ve.toString().length)>0)return;const te=Se.clientY-Xe.current.y,pe=Se.clientX-Xe.current.x;var fe;const ke=(fe=e.swipeDirections)!=null?fe:k7(B);!K&&(Math.abs(pe)>1||Math.abs(te)>1)&&ie(Math.abs(pe)>Math.abs(te)?"x":"y");let Le={x:0,y:0};const Ne=Ue=>1/(1.5+Math.abs(Ue)/20);if(K==="y"){if(ke.includes("top")||ke.includes("bottom"))if(ke.includes("top")&&te<0||ke.includes("bottom")&&te>0)Le.y=te;else{const Ue=te*Ne(te);Le.y=Math.abs(Ue)<Math.abs(te)?Ue:te}}else if(K==="x"&&(ke.includes("left")||ke.includes("right")))if(ke.includes("left")&&pe<0||ke.includes("right")&&pe>0)Le.x=pe;else{const Ue=pe*Ne(pe);Le.x=Math.abs(Ue)<Math.abs(pe)?Ue:pe}(Math.abs(Le.x)>0||Math.abs(Le.y)>0)&&se(!0),(Re=ft.current)==null||Re.style.setProperty("--swipe-amount-x",`${Le.x}px`),(dt=ft.current)==null||dt.style.setProperty("--swipe-amount-y",`${Le.y}px`)}},Ce&&!h.jsx&&Nt!=="loading"?L.createElement("button",{"aria-label":F,"data-disabled":Fr,"data-close-button":!0,onClick:Fr||!ln?()=>{}:()=>{Rn(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Ha($==null?void 0:$.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Te=V==null?void 0:V.close)!=null?Te:x7):null,(Nt||h.icon||h.promise)&&h.icon!==null&&((V==null?void 0:V[Nt])!==null||h.icon)?L.createElement("div",{"data-icon":"",className:Ha($==null?void 0:$.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Un():null,h.type!=="loading"?Qn:null):null,L.createElement("div",{"data-content":"",className:Ha($==null?void 0:$.content,h==null||(o=h.classNames)==null?void 0:o.content)},L.createElement("div",{"data-title":"",className:Ha($==null?void 0:$.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?L.createElement("div",{"data-description":"",className:Ha(U,J,$==null?void 0:$.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),L.isValidElement(h.cancel)?h.cancel:h.cancel&&Yh(h.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:Se=>{Yh(h.cancel)&&ln&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Se),Rn())},className:Ha($==null?void 0:$.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,L.isValidElement(h.action)?h.action:h.action&&Yh(h.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:Se=>{Yh(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Se),!Se.defaultPrevented&&Rn())},className:Ha($==null?void 0:$.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function MC(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function z7(e,t){const n={};return[e,t].forEach((r,a)=>{const o=a===1,l=o?"--mobile-offset":"--offset",c=o?R7:C7;function f(d){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${l}-${d}`]=c:n[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):f(c)}),n}const L7=L.forwardRef(function(t,n){const{id:r,invert:a,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:f,className:d,offset:m,mobileOffset:h,theme:g="light",richColors:x,duration:A,style:S,visibleToasts:w=T7,toastOptions:E,dir:O=MC(),gap:j=M7,icons:R,containerAriaLabel:C="Notifications"}=t,[T,N]=L.useState([]),D=L.useMemo(()=>r?T.filter(X=>X.toasterId===r):T.filter(X=>!X.toasterId),[T,r]),z=L.useMemo(()=>Array.from(new Set([o].concat(D.filter(X=>X.position).map(X=>X.position)))),[D,o]),[G,U]=L.useState([]),[P,B]=L.useState(!1),[q,W]=L.useState(!1),[$,V]=L.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=L.useRef(null),K=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ie=L.useRef(null),I=L.useRef(!1),Z=L.useCallback(X=>{N(oe=>{var ge;return(ge=oe.find(Ee=>Ee.id===X.id))!=null&&ge.delete||br.dismiss(X.id),oe.filter(({id:Ee})=>Ee!==X.id)})},[]);return L.useEffect(()=>br.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{N(oe=>oe.map(ge=>ge.id===X.id?{...ge,delete:!0}:ge))});return}setTimeout(()=>{s5.flushSync(()=>{N(oe=>{const ge=oe.findIndex(Ee=>Ee.id===X.id);return ge!==-1?[...oe.slice(0,ge),{...oe[ge],...X},...oe.slice(ge+1)]:[X,...oe]})})})}),[T]),L.useEffect(()=>{if(g!=="system"){V(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:oe})=>{V(oe?"dark":"light")})}catch{X.addListener(({matches:ge})=>{try{V(ge?"dark":"light")}catch(Ee){console.error(Ee)}})}},[g]),L.useEffect(()=>{T.length<=1&&B(!1)},[T]),L.useEffect(()=>{const X=oe=>{var ge;if(l.every(we=>oe[we]||oe.code===we)){var me;B(!0),(me=F.current)==null||me.focus()}oe.code==="Escape"&&(document.activeElement===F.current||(ge=F.current)!=null&&ge.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[l]),L.useEffect(()=>{if(F.current)return()=>{ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null,I.current=!1)}},[F.current]),L.createElement("section",{ref:n,"aria-label":`${C} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((X,oe)=>{var ge;const[Ee,me]=X.split("-");return D.length?L.createElement("ol",{key:X,dir:O==="auto"?MC():O,tabIndex:-1,ref:F,className:d,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":Ee,"data-x-position":me,style:{"--front-toast-height":`${((ge=G[0])==null?void 0:ge.height)||0}px`,"--width":`${N7}px`,"--gap":`${j}px`,...S,...z7(m,h)},onBlur:we=>{I.current&&!we.currentTarget.contains(we.relatedTarget)&&(I.current=!1,ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null))},onFocus:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||I.current||(I.current=!0,ie.current=we.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{q||B(!1)},onDragEnd:()=>B(!1),onPointerDown:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},D.filter(we=>!we.position&&oe===0||we.position===X).map((we,ce)=>{var _e,Ae;return L.createElement($7,{key:we.id,icons:R,index:ce,toast:we,defaultRichColors:x,duration:(_e=E==null?void 0:E.duration)!=null?_e:A,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:a,visibleToasts:w,closeButton:(Ae=E==null?void 0:E.closeButton)!=null?Ae:f,interacting:q,position:X,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:Z,toasts:D.filter(se=>se.position==we.position),heights:G.filter(se=>se.position==we.position),setHeights:U,expandByDefault:c,gap:j,expanded:P,swipeDirections:t.swipeDirections})})):null}))});function PC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ad(...e){return t=>{let n=!1;const r=e.map(a=>{const o=PC(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():PC(e[a],null)}}}}function ut(...e){return y.useCallback(ad(...e),e)}var I7=Symbol.for("react.lazy"),Pp=Q_[" use ".trim().toString()];function B7(e){return typeof e=="object"&&e!==null&&"then"in e}function l5(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===I7&&"_payload"in e&&B7(e._payload)}function c5(e){const t=U7(e),n=y.forwardRef((r,a)=>{let{children:o,...l}=r;l5(o)&&typeof Pp=="function"&&(o=Pp(o._payload));const c=y.Children.toArray(o),f=c.find(H7);if(f){const d=f.props.children,m=c.map(h=>h===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:h);return v.jsx(t,{...l,ref:a,children:y.isValidElement(d)?y.cloneElement(d,void 0,m):null})}return v.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var Ds=c5("Slot");function U7(e){const t=y.forwardRef((n,r)=>{let{children:a,...o}=n;if(l5(a)&&typeof Pp=="function"&&(a=Pp(a._payload)),y.isValidElement(a)){const l=V7(a),c=F7(o,a.props);return a.type!==y.Fragment&&(c.ref=r?ad(r,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var q7=Symbol("radix.slottable");function H7(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q7}function F7(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function V7(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function u5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=u5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=u5(e))&&(r&&(r+=" "),r+=t);return r}const DC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kC=xt,Ec=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return kC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(d=>{const m=n==null?void 0:n[d],h=o==null?void 0:o[d];if(m===null)return null;const g=DC(m)||DC(h);return a[d][g]}),c=n&&Object.entries(n).reduce((d,m)=>{let[h,g]=m;return g===void 0||(d[h]=g),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:h,className:g,...x}=m;return Object.entries(x).every(A=>{let[S,w]=A;return Array.isArray(w)?w.includes({...o,...c}[S]):{...o,...c}[S]===w})?[...d,h,g]:d},[]);return kC(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)};/**
61
- * @license lucide-react v0.468.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const G7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),f5=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
66
- * @license lucide-react v0.468.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */var W7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
71
- * @license lucide-react v0.468.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const Y7=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...c},f)=>y.createElement("svg",{ref:f,...W7,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:f5("lucide",a),...c},[...l.map(([d,m])=>y.createElement(d,m)),...Array.isArray(o)?o:[o]]));/**
76
- * @license lucide-react v0.468.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const rt=(e,t)=>{const n=y.forwardRef(({className:r,...a},o)=>y.createElement(Y7,{ref:o,iconNode:t,className:f5(`lucide-${G7(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
81
- * @license lucide-react v0.468.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const K7=rt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
86
- * @license lucide-react v0.468.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const Z7=rt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
91
- * @license lucide-react v0.468.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const X7=rt("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
96
- * @license lucide-react v0.468.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const Q7=rt("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
101
- * @license lucide-react v0.468.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const d5=rt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
106
- * @license lucide-react v0.468.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const lA=rt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
111
- * @license lucide-react v0.468.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const cA=rt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
116
- * @license lucide-react v0.468.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const J7=rt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
121
- * @license lucide-react v0.468.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const eV=rt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
126
- * @license lucide-react v0.468.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const tV=rt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
131
- * @license lucide-react v0.468.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const nV=rt("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
136
- * @license lucide-react v0.468.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const h5=rt("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
141
- * @license lucide-react v0.468.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const rV=rt("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
146
- * @license lucide-react v0.468.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const aV=rt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
151
- * @license lucide-react v0.468.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const iV=rt("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
156
- * @license lucide-react v0.468.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const oV=rt("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
161
- * @license lucide-react v0.468.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const sV=rt("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
166
- * @license lucide-react v0.468.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const p5=rt("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
171
- * @license lucide-react v0.468.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const m5=rt("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
176
- * @license lucide-react v0.468.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const Dp=rt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
181
- * @license lucide-react v0.468.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const lV=rt("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
186
- * @license lucide-react v0.468.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const cV=rt("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
191
- * @license lucide-react v0.468.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const v5=rt("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
196
- * @license lucide-react v0.468.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const uV=rt("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
201
- * @license lucide-react v0.468.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const fV=rt("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
206
- * @license lucide-react v0.468.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const dV=rt("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
211
- * @license lucide-react v0.468.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const rS=rt("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
216
- * @license lucide-react v0.468.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const uA=rt("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
221
- * @license lucide-react v0.468.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const g5=rt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
226
- * @license lucide-react v0.468.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const hV=rt("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
231
- * @license lucide-react v0.468.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const pV=rt("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
236
- * @license lucide-react v0.468.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const mV=rt("ScanLine",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]]);/**
241
- * @license lucide-react v0.468.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const y5=rt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
246
- * @license lucide-react v0.468.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const b5=rt("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
251
- * @license lucide-react v0.468.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const vV=rt("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
256
- * @license lucide-react v0.468.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const gV=rt("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
261
- * @license lucide-react v0.468.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const yV=rt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
266
- * @license lucide-react v0.468.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const bV=rt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
271
- * @license lucide-react v0.468.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const xV=rt("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
276
- * @license lucide-react v0.468.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const wV=rt("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
281
- * @license lucide-react v0.468.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const SV=rt("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
286
- * @license lucide-react v0.468.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const _V=rt("Volume1",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}]]);/**
291
- * @license lucide-react v0.468.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const AV=rt("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
296
- * @license lucide-react v0.468.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const x5=rt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),$b=768;function EV(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${$b-1}px)`),r=()=>{t(window.innerWidth<$b)};return n.addEventListener("change",r),t(window.innerWidth<$b),()=>n.removeEventListener("change",r)},[]),!!e}const fA="-",OV=e=>{const t=TV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(fA);return c[0]===""&&c.length!==1&&c.shift(),w5(c,t)||jV(l)},getConflictingClassGroupIds:(l,c)=>{const f=n[l]||[];return c&&r[l]?[...f,...r[l]]:f}}},w5=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?w5(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(fA);return(l=t.validators.find(({validator:c})=>c(o)))==null?void 0:l.classGroupId},$C=/^\[(.+)\]$/,jV=e=>{if($C.test(e)){const t=$C.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},TV=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return RV(Object.entries(e.classGroups),n).forEach(([o,l])=>{aS(l,r,o,t)}),r},aS=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:zC(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(CV(a)){aS(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{aS(l,zC(t,o),n,r)})})},zC=(e,t)=>{let n=e;return t.split(fA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},CV=e=>e.isThemeGetter,RV=(e,t)=>t?e.map(([n,r])=>{const a=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,c])=>[t+l,c])):o);return[n,a]}):e,NV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return a(o,l),l},set(o,l){n.has(o)?n.set(o,l):a(o,l)}}},S5="!",MV=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],o=t.length,l=c=>{const f=[];let d=0,m=0,h;for(let w=0;w<c.length;w++){let E=c[w];if(d===0){if(E===a&&(r||c.slice(w,w+o)===t)){f.push(c.slice(m,w)),m=w+o;continue}if(E==="/"){h=w;continue}}E==="["?d++:E==="]"&&d--}const g=f.length===0?c:c.substring(m),x=g.startsWith(S5),A=x?g.substring(1):g,S=h&&h>m?h-m:void 0;return{modifiers:f,hasImportantModifier:x,baseClassName:A,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:l}):l},PV=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},DV=e=>({cache:NV(e.cacheSize),parseClassName:MV(e),...OV(e)}),kV=/\s+/,$V=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],l=e.trim().split(kV);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:m,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:x}=n(d);let A=!!x,S=r(A?g.substring(0,x):g);if(!S){if(!A){c=d+(c.length>0?" "+c:c);continue}if(S=r(g),!S){c=d+(c.length>0?" "+c:c);continue}A=!1}const w=PV(m).join(":"),E=h?w+S5:w,O=E+S;if(o.includes(O))continue;o.push(O);const j=a(S,A);for(let R=0;R<j.length;++R){const C=j[R];o.push(E+C)}c=d+(c.length>0?" "+c:c)}return c};function zV(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=_5(t))&&(r&&(r+=" "),r+=n);return r}const _5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_5(e[r]))&&(n&&(n+=" "),n+=t);return n};function LV(e,...t){let n,r,a,o=l;function l(f){const d=t.reduce((m,h)=>h(m),e());return n=DV(d),r=n.cache.get,a=n.cache.set,o=c,c(f)}function c(f){const d=r(f);if(d)return d;const m=$V(f,n);return a(f,m),m}return function(){return o(zV.apply(null,arguments))}}const Qt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},A5=/^\[(?:([a-z-]+):)?(.+)\]$/i,IV=/^\d+\/\d+$/,BV=new Set(["px","full","screen"]),UV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,FV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ai=e=>Ll(e)||BV.has(e)||IV.test(e),yo=e=>Oc(e,"length",JV),Ll=e=>!!e&&!Number.isNaN(Number(e)),zb=e=>Oc(e,"number",Ll),ku=e=>!!e&&Number.isInteger(Number(e)),GV=e=>e.endsWith("%")&&Ll(e.slice(0,-1)),st=e=>A5.test(e),bo=e=>UV.test(e),WV=new Set(["length","size","percentage"]),YV=e=>Oc(e,WV,E5),KV=e=>Oc(e,"position",E5),ZV=new Set(["image","url"]),XV=e=>Oc(e,ZV,tG),QV=e=>Oc(e,"",eG),$u=()=>!0,Oc=(e,t,n)=>{const r=A5.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},JV=e=>qV.test(e)&&!HV.test(e),E5=()=>!1,eG=e=>FV.test(e),tG=e=>VV.test(e),nG=()=>{const e=Qt("colors"),t=Qt("spacing"),n=Qt("blur"),r=Qt("brightness"),a=Qt("borderColor"),o=Qt("borderRadius"),l=Qt("borderSpacing"),c=Qt("borderWidth"),f=Qt("contrast"),d=Qt("grayscale"),m=Qt("hueRotate"),h=Qt("invert"),g=Qt("gap"),x=Qt("gradientColorStops"),A=Qt("gradientColorStopPositions"),S=Qt("inset"),w=Qt("margin"),E=Qt("opacity"),O=Qt("padding"),j=Qt("saturate"),R=Qt("scale"),C=Qt("sepia"),T=Qt("skew"),N=Qt("space"),D=Qt("translate"),z=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",st,t],P=()=>[st,t],B=()=>["",Ai,yo],q=()=>["auto",Ll,st],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",st],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[Ll,st];return{cacheSize:500,separator:":",theme:{colors:[$u],spacing:[Ai,yo],blur:["none","",bo,st],brightness:I(),borderColor:[e],borderRadius:["none","","full",bo,st],borderSpacing:P(),borderWidth:B(),contrast:I(),grayscale:K(),hueRotate:I(),invert:K(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[GV,yo],inset:U(),margin:U(),opacity:I(),padding:P(),saturate:I(),scale:I(),sepia:K(),skew:I(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",st]}],container:["container"],columns:[{columns:[bo]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),st]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ku,st]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",st]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",ku,st]}],"grid-cols":[{"grid-cols":[$u]}],"col-start-end":[{col:["auto",{span:["full",ku,st]},st]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[$u]}],"row-start-end":[{row:["auto",{span:[ku,st]},st]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",st]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",st]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",st,t]}],"min-w":[{"min-w":[st,t,"min","max","fit"]}],"max-w":[{"max-w":[st,t,"none","full","min","max","fit","prose",{screen:[bo]},bo]}],h:[{h:[st,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[st,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[st,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[st,t,"auto","min","max","fit"]}],"font-size":[{text:["base",bo,yo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zb]}],"font-family":[{font:[$u]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",st]}],"line-clamp":[{"line-clamp":["none",Ll,zb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ai,st]}],"list-image":[{"list-image":["none",st]}],"list-style-type":[{list:["none","disc","decimal",st]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ai,yo]}],"underline-offset":[{"underline-offset":["auto",Ai,st]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",st]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",st]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),KV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",YV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},XV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:$()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Ai,st]}],"outline-w":[{outline:[Ai,yo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Ai,yo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",bo,QV]}],"shadow-color":[{shadow:[$u]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",bo,st]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[h]}],saturate:[{saturate:[j]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",st]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",st]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",st]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[ku,st]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",st]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",st]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",st]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ai,yo,zb]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},rG=LV(nG);function be(...e){return rG(xt(e))}const rv=Ec("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",pill:"h-12 px-6 rounded-pill",nav:"h-7 px-3 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),ct=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const l=r?Ds:"button";return v.jsx(l,{className:be(rv({variant:t,size:n,className:e})),ref:o,...a})});ct.displayName="Button";const rn=y.forwardRef(({className:e,type:t,...n},r)=>v.jsx("input",{type:t,className:be("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));rn.displayName="Input";var aG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O5=aG.reduce((e,t)=>{const n=c5(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...c}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),iG="Separator",LC="horizontal",oG=["horizontal","vertical"],j5=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=LC,...a}=e,o=sG(r)?r:LC,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return v.jsx(O5.div,{"data-orientation":o,...c,...a,ref:t})});j5.displayName=iG;function sG(e){return oG.includes(e)}var T5=j5;const Ja=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>v.jsx(T5,{ref:a,decorative:n,orientation:t,className:be("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ja.displayName=T5.displayName;function ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function lG(e,t){const n=y.createContext(t),r=o=>{const{children:l,...c}=o,f=y.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function a(o){const l=y.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function pa(e,t=[]){let n=[];function r(o,l){const c=y.createContext(l),f=n.length;n=[...n,l];const d=h=>{var E;const{scope:g,children:x,...A}=h,S=((E=g==null?void 0:g[e])==null?void 0:E[f])||c,w=y.useMemo(()=>A,Object.values(A));return v.jsx(S.Provider,{value:w,children:x})};d.displayName=o+"Provider";function m(h,g){var S;const x=((S=g==null?void 0:g[e])==null?void 0:S[f])||c,A=y.useContext(x);if(A)return A;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,m]}const a=()=>{const o=n.map(l=>y.createContext(l));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return a.scopeName=e,[r,cG(a,...t)]}function cG(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=r.reduce((c,{useScope:f,scopeName:d})=>{const h=f(o)[`__scope${d}`];return{...c,...h}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Zn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},uG=Q_[" useId ".trim().toString()]||(()=>{}),fG=0;function Na(e){const[t,n]=y.useState(uG());return Zn(()=>{n(r=>r??String(fG++))},[e]),e||(t?`radix-${t}`:"")}var dG=Q_[" useInsertionEffect ".trim().toString()]||Zn;function Co({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=hG({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const d=y.useCallback(m=>{var h;if(c){const g=pG(m)?m(e):m;g!==e&&((h=l.current)==null||h.call(l,g))}else o(m)},[c,e,o,l]);return[f,d]}function hG({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),a=y.useRef(n),o=y.useRef(t);return dG(()=>{o.current=t},[t]),y.useEffect(()=>{var l;a.current!==n&&((l=o.current)==null||l.call(o,n),a.current=n)},[n,a]),[n,r,o]}function pG(e){return typeof e=="function"}function Yl(e){const t=mG(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,c=y.Children.toArray(o),f=c.find(vG);if(f){const d=f.props.children,m=c.map(h=>h===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:h);return v.jsx(t,{...l,ref:a,children:y.isValidElement(d)?y.cloneElement(d,void 0,m):null})}return v.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function mG(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=yG(a),c=gG(o,a.props);return a.type!==y.Fragment&&(c.ref=r?ad(r,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var C5=Symbol("radix.slottable");function R5(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=C5,t}function vG(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===C5}function gG(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function yG(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],et=bG.reduce((e,t)=>{const n=Yl(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...c}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function N5(e,t){e&&rd.flushSync(()=>e.dispatchEvent(t))}function Yn(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function xG(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e);y.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var wG="DismissableLayer",iS="dismissableLayer.update",SG="dismissableLayer.pointerDownOutside",_G="dismissableLayer.focusOutside",IC,M5=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),id=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...f}=e,d=y.useContext(M5),[m,h]=y.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=y.useState({}),A=ut(t,N=>h(N)),S=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(w),O=m?S.indexOf(m):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,R=O>=E,C=OG(N=>{const D=N.target,z=[...d.branches].some(G=>G.contains(D));!R||z||(a==null||a(N),l==null||l(N),N.defaultPrevented||c==null||c())},g),T=jG(N=>{const D=N.target;[...d.branches].some(G=>G.contains(D))||(o==null||o(N),l==null||l(N),N.defaultPrevented||c==null||c())},g);return xG(N=>{O===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},g),y.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(IC=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),BC(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=IC)}},[m,g,n,d]),y.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),BC())},[m,d]),y.useEffect(()=>{const N=()=>x({});return document.addEventListener(iS,N),()=>document.removeEventListener(iS,N)},[]),v.jsx(et.div,{...f,ref:A,style:{pointerEvents:j?R?"auto":"none":void 0,...e.style},onFocusCapture:ze(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ze(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ze(e.onPointerDownCapture,C.onPointerDownCapture)})});id.displayName=wG;var AG="DismissableLayerBranch",EG=y.forwardRef((e,t)=>{const n=y.useContext(M5),r=y.useRef(null),a=ut(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),v.jsx(et.div,{...e,ref:a})});EG.displayName=AG;function OG(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let f=function(){P5(SG,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jG(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!r.current&&P5(_G,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function BC(){const e=new CustomEvent(iS);document.dispatchEvent(e)}function P5(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?N5(a,o):a.dispatchEvent(o)}var Lb="focusScope.autoFocusOnMount",Ib="focusScope.autoFocusOnUnmount",UC={bubbles:!1,cancelable:!0},TG="FocusScope",av=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[c,f]=y.useState(null),d=Yn(a),m=Yn(o),h=y.useRef(null),g=ut(t,S=>f(S)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let S=function(j){if(x.paused||!c)return;const R=j.target;c.contains(R)?h.current=R:xo(h.current,{select:!0})},w=function(j){if(x.paused||!c)return;const R=j.relatedTarget;R!==null&&(c.contains(R)||xo(h.current,{select:!0}))},E=function(j){if(document.activeElement===document.body)for(const C of j)C.removedNodes.length>0&&xo(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const O=new MutationObserver(E);return c&&O.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),O.disconnect()}}},[r,c,x.paused]),y.useEffect(()=>{if(c){HC.add(x);const S=document.activeElement;if(!c.contains(S)){const E=new CustomEvent(Lb,UC);c.addEventListener(Lb,d),c.dispatchEvent(E),E.defaultPrevented||(CG(DG(D5(c)),{select:!0}),document.activeElement===S&&xo(c))}return()=>{c.removeEventListener(Lb,d),setTimeout(()=>{const E=new CustomEvent(Ib,UC);c.addEventListener(Ib,m),c.dispatchEvent(E),E.defaultPrevented||xo(S??document.body,{select:!0}),c.removeEventListener(Ib,m),HC.remove(x)},0)}}},[c,d,m,x]);const A=y.useCallback(S=>{if(!n&&!r||x.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(w&&E){const O=S.currentTarget,[j,R]=RG(O);j&&R?!S.shiftKey&&E===R?(S.preventDefault(),n&&xo(j,{select:!0})):S.shiftKey&&E===j&&(S.preventDefault(),n&&xo(R,{select:!0})):E===O&&S.preventDefault()}},[n,r,x.paused]);return v.jsx(et.div,{tabIndex:-1,...l,ref:g,onKeyDown:A})});av.displayName=TG;function CG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xo(r,{select:t}),document.activeElement!==n)return}function RG(e){const t=D5(e),n=qC(t,e),r=qC(t.reverse(),e);return[n,r]}function D5(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qC(e,t){for(const n of e)if(!NG(n,{upTo:t}))return n}function NG(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function MG(e){return e instanceof HTMLInputElement&&"select"in e}function xo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&MG(e)&&t&&e.select()}}var HC=PG();function PG(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=FC(e,t),e.unshift(t)},remove(t){var n;e=FC(e,t),(n=e[0])==null||n.resume()}}}function FC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function DG(e){return e.filter(t=>t.tagName!=="A")}var kG="Portal",od=y.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,o]=y.useState(!1);Zn(()=>o(!0),[]);const l=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?s5.createPortal(v.jsx(et.div,{...r,ref:t}),l):null});od.displayName=kG;function $G(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var ur=e=>{const{present:t,children:n}=e,r=zG(t),a=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=ut(r.ref,LG(a));return typeof n=="function"||r.isPresent?y.cloneElement(a,{ref:o}):null};ur.displayName="Presence";function zG(e){const[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),l=e?"mounted":"unmounted",[c,f]=$G(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const d=Kh(r.current);o.current=c==="mounted"?d:"none"},[c]),Zn(()=>{const d=r.current,m=a.current;if(m!==e){const g=o.current,x=Kh(d);e?f("MOUNT"):x==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(m&&g!==x?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Zn(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,h=x=>{const S=Kh(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&S&&(f("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=x=>{x.target===t&&(o.current=Kh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Kh(e){return(e==null?void 0:e.animationName)||"none"}function LG(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bb=0;function dA(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??VC()),document.body.insertAdjacentElement("beforeend",e[1]??VC()),Bb++,()=>{Bb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bb--}},[])}function VC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ga=function(){return Ga=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ga.apply(this,arguments)};function k5(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function IG(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var xp="right-scroll-bar-position",wp="width-before-scroll-bar",BG="with-scroll-bars-hidden",UG="--removed-body-scroll-bar-size";function Ub(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qG(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var HG=typeof window<"u"?y.useLayoutEffect:y.useEffect,GC=new WeakMap;function FG(e,t){var n=qG(null,function(r){return e.forEach(function(a){return Ub(a,r)})});return HG(function(){var r=GC.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(c){o.has(c)||Ub(c,null)}),o.forEach(function(c){a.has(c)||Ub(c,l)})}GC.set(n,e)},[e]),n}function VG(e){return e}function GG(e,t){t===void 0&&(t=VG);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var f=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return a}function WG(e){e===void 0&&(e={});var t=GG(null);return t.options=Ga({async:!0,ssr:!1},e),t}var $5=function(e){var t=e.sideCar,n=k5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Ga({},n))};$5.isSideCarExport=!0;function YG(e,t){return e.useMedium(t),$5}var z5=WG(),qb=function(){},iv=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:qb,onWheelCapture:qb,onTouchMoveCapture:qb}),a=r[0],o=r[1],l=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,h=e.shards,g=e.sideCar,x=e.noRelative,A=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,O=E===void 0?"div":E,j=e.gapMode,R=k5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,T=FG([n,t]),N=Ga(Ga({},R),a);return y.createElement(y.Fragment,null,m&&y.createElement(C,{sideCar:z5,removeScrollBar:d,shards:h,noRelative:x,noIsolation:A,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:j}),l?y.cloneElement(y.Children.only(c),Ga(Ga({},N),{ref:T})):y.createElement(O,Ga({},N,{className:f,ref:T}),c))});iv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};iv.classNames={fullWidth:wp,zeroRight:xp};var KG=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=KG();return t&&e.setAttribute("nonce",t),e}function XG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function QG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ZG())&&(XG(t,n),QG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eW=function(){var e=JG();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},L5=function(){var e=eW(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},tW={left:0,top:0,right:0,gap:0},Hb=function(e){return parseInt(e||"",10)||0},nW=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Hb(n),Hb(r),Hb(a)]},rW=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tW;var t=nW(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aW=L5(),Il="data-scroll-locked",iW=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
301
- .`.concat(BG,` {
302
- overflow: hidden `).concat(r,`;
303
- padding-right: `).concat(c,"px ").concat(r,`;
304
- }
305
- body[`).concat(Il,`] {
306
- overflow: hidden `).concat(r,`;
307
- overscroll-behavior: contain;
308
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
309
- padding-left: `.concat(a,`px;
310
- padding-top: `).concat(o,`px;
311
- padding-right: `).concat(l,`px;
312
- margin-left:0;
313
- margin-top:0;
314
- margin-right: `).concat(c,"px ").concat(r,`;
315
- `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
316
- }
317
-
318
- .`).concat(xp,` {
319
- right: `).concat(c,"px ").concat(r,`;
320
- }
321
-
322
- .`).concat(wp,` {
323
- margin-right: `).concat(c,"px ").concat(r,`;
324
- }
325
-
326
- .`).concat(xp," .").concat(xp,` {
327
- right: 0 `).concat(r,`;
328
- }
329
-
330
- .`).concat(wp," .").concat(wp,` {
331
- margin-right: 0 `).concat(r,`;
332
- }
333
-
334
- body[`).concat(Il,`] {
335
- `).concat(UG,": ").concat(c,`px;
336
- }
337
- `)},WC=function(){var e=parseInt(document.body.getAttribute(Il)||"0",10);return isFinite(e)?e:0},oW=function(){y.useEffect(function(){return document.body.setAttribute(Il,(WC()+1).toString()),function(){var e=WC()-1;e<=0?document.body.removeAttribute(Il):document.body.setAttribute(Il,e.toString())}},[])},sW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;oW();var o=y.useMemo(function(){return rW(a)},[a]);return y.createElement(aW,{styles:iW(o,!t,a,n?"":"!important")})},oS=!1;if(typeof window<"u")try{var Zh=Object.defineProperty({},"passive",{get:function(){return oS=!0,!0}});window.addEventListener("test",Zh,Zh),window.removeEventListener("test",Zh,Zh)}catch{oS=!1}var Ol=oS?{passive:!1}:!1,lW=function(e){return e.tagName==="TEXTAREA"},I5=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lW(e)&&n[t]==="visible")},cW=function(e){return I5(e,"overflowY")},uW=function(e){return I5(e,"overflowX")},YC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=B5(e,r);if(a){var o=U5(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dW=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},B5=function(e,t){return e==="v"?cW(t):uW(t)},U5=function(e,t){return e==="v"?fW(t):dW(t)},hW=function(e,t){return e==="h"&&t==="rtl"?-1:1},pW=function(e,t,n,r,a){var o=hW(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,f=t.contains(c),d=!1,m=l>0,h=0,g=0;do{if(!c)break;var x=U5(e,c),A=x[0],S=x[1],w=x[2],E=S-w-o*A;(A||E)&&B5(e,c)&&(h+=E,g+=A);var O=c.parentNode;c=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(h)<1||!m&&Math.abs(g)<1)&&(d=!0),d},Xh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},KC=function(e){return[e.deltaX,e.deltaY]},ZC=function(e){return e&&"current"in e?e.current:e},mW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vW=function(e){return`
338
- .block-interactivity-`.concat(e,` {pointer-events: none;}
339
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
340
- `)},gW=0,jl=[];function yW(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(gW++)[0],o=y.useState(L5)[0],l=y.useRef(e);y.useEffect(function(){l.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=IG([e.lockRef.current],(e.shards||[]).map(ZC),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var E=Xh(S),O=n.current,j="deltaX"in S?S.deltaX:O[0]-E[0],R="deltaY"in S?S.deltaY:O[1]-E[1],C,T=S.target,N=Math.abs(j)>Math.abs(R)?"h":"v";if("touches"in S&&N==="h"&&T.type==="range")return!1;var D=window.getSelection(),z=D&&D.anchorNode,G=z?z===T||z.contains(T):!1;if(G)return!1;var U=YC(N,T);if(!U)return!0;if(U?C=N:(C=N==="v"?"h":"v",U=YC(N,T)),!U)return!1;if(!r.current&&"changedTouches"in S&&(j||R)&&(r.current=C),!C)return!0;var P=r.current||C;return pW(P,w,S,P==="h"?j:R)},[]),f=y.useCallback(function(S){var w=S;if(!(!jl.length||jl[jl.length-1]!==o)){var E="deltaY"in w?KC(w):Xh(w),O=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&mW(C.delta,E)})[0];if(O&&O.should){w.cancelable&&w.preventDefault();return}if(!O){var j=(l.current.shards||[]).map(ZC).filter(Boolean).filter(function(C){return C.contains(w.target)}),R=j.length>0?c(w,j[0]):!l.current.noIsolation;R&&w.cancelable&&w.preventDefault()}}},[]),d=y.useCallback(function(S,w,E,O){var j={name:S,delta:w,target:E,should:O,shadowParent:bW(E)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(R){return R!==j})},1)},[]),m=y.useCallback(function(S){n.current=Xh(S),r.current=void 0},[]),h=y.useCallback(function(S){d(S.type,KC(S),S.target,c(S,e.lockRef.current))},[]),g=y.useCallback(function(S){d(S.type,Xh(S),S.target,c(S,e.lockRef.current))},[]);y.useEffect(function(){return jl.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",f,Ol),document.addEventListener("touchmove",f,Ol),document.addEventListener("touchstart",m,Ol),function(){jl=jl.filter(function(S){return S!==o}),document.removeEventListener("wheel",f,Ol),document.removeEventListener("touchmove",f,Ol),document.removeEventListener("touchstart",m,Ol)}},[]);var x=e.removeScrollBar,A=e.inert;return y.createElement(y.Fragment,null,A?y.createElement(o,{styles:vW(a)}):null,x?y.createElement(sW,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bW(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xW=YG(z5,yW);var ov=y.forwardRef(function(e,t){return y.createElement(iv,Ga({},e,{ref:t,sideCar:xW}))});ov.classNames=iv.classNames;var wW=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tl=new WeakMap,Qh=new WeakMap,Jh={},Fb=0,q5=function(e){return e&&(e.host||q5(e.parentNode))},SW=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=q5(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_W=function(e,t,n,r){var a=SW(t,Array.isArray(e)?e:[e]);Jh[n]||(Jh[n]=new WeakMap);var o=Jh[n],l=[],c=new Set,f=new Set(a),d=function(h){!h||c.has(h)||(c.add(h),d(h.parentNode))};a.forEach(d);var m=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(g){if(c.has(g))m(g);else try{var x=g.getAttribute(r),A=x!==null&&x!=="false",S=(Tl.get(g)||0)+1,w=(o.get(g)||0)+1;Tl.set(g,S),o.set(g,w),l.push(g),S===1&&A&&Qh.set(g,!0),w===1&&g.setAttribute(n,"true"),A||g.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",g,E)}})};return m(t),c.clear(),Fb++,function(){l.forEach(function(h){var g=Tl.get(h)-1,x=o.get(h)-1;Tl.set(h,g),o.set(h,x),g||(Qh.has(h)||h.removeAttribute(r),Qh.delete(h)),x||h.removeAttribute(n)}),Fb--,Fb||(Tl=new WeakMap,Tl=new WeakMap,Qh=new WeakMap,Jh={})}},hA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=wW(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),_W(r,a,n,"aria-hidden")):function(){return null}},sv="Dialog",[H5,F5]=pa(sv),[AW,za]=H5(sv),V5=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=y.useRef(null),f=y.useRef(null),[d,m]=Co({prop:r,defaultProp:a??!1,onChange:o,caller:sv});return v.jsx(AW,{scope:t,triggerRef:c,contentRef:f,contentId:Na(),titleId:Na(),descriptionId:Na(),open:d,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(h=>!h),[m]),modal:l,children:n})};V5.displayName=sv;var G5="DialogTrigger",W5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=za(G5,n),o=ut(t,a.triggerRef);return v.jsx(et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":vA(a.open),...r,ref:o,onClick:ze(e.onClick,a.onOpenToggle)})});W5.displayName=G5;var pA="DialogPortal",[EW,Y5]=H5(pA,{forceMount:void 0}),K5=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=za(pA,t);return v.jsx(EW,{scope:t,forceMount:n,children:y.Children.map(r,l=>v.jsx(ur,{present:n||o.open,children:v.jsx(od,{asChild:!0,container:a,children:l})}))})};K5.displayName=pA;var kp="DialogOverlay",Z5=y.forwardRef((e,t)=>{const n=Y5(kp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=za(kp,e.__scopeDialog);return o.modal?v.jsx(ur,{present:r||o.open,children:v.jsx(jW,{...a,ref:t})}):null});Z5.displayName=kp;var OW=Yl("DialogOverlay.RemoveScroll"),jW=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=za(kp,n);return v.jsx(ov,{as:OW,allowPinchZoom:!0,shards:[a.contentRef],children:v.jsx(et.div,{"data-state":vA(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ss="DialogContent",X5=y.forwardRef((e,t)=>{const n=Y5(Ss,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=za(Ss,e.__scopeDialog);return v.jsx(ur,{present:r||o.open,children:o.modal?v.jsx(TW,{...a,ref:t}):v.jsx(CW,{...a,ref:t})})});X5.displayName=Ss;var TW=y.forwardRef((e,t)=>{const n=za(Ss,e.__scopeDialog),r=y.useRef(null),a=ut(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return hA(o)},[]),v.jsx(Q5,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ze(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ze(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:ze(e.onFocusOutside,o=>o.preventDefault())})}),CW=y.forwardRef((e,t)=>{const n=za(Ss,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return v.jsx(Q5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Q5=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,c=za(Ss,n),f=y.useRef(null),d=ut(t,f);return dA(),v.jsxs(v.Fragment,{children:[v.jsx(av,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:v.jsx(id,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":vA(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(NW,{titleId:c.titleId}),v.jsx(PW,{contentRef:f,descriptionId:c.descriptionId})]})]})}),mA="DialogTitle",J5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=za(mA,n);return v.jsx(et.h2,{id:a.titleId,...r,ref:t})});J5.displayName=mA;var eL="DialogDescription",tL=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=za(eL,n);return v.jsx(et.p,{id:a.descriptionId,...r,ref:t})});tL.displayName=eL;var nL="DialogClose",rL=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=za(nL,n);return v.jsx(et.button,{type:"button",...r,ref:t,onClick:ze(e.onClick,()=>a.onOpenChange(!1))})});rL.displayName=nL;function vA(e){return e?"open":"closed"}var aL="DialogTitleWarning",[RW,iL]=lG(aL,{contentName:Ss,titleName:mA,docsSlug:"dialog"}),NW=({titleId:e})=>{const t=iL(aL),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
341
-
342
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
343
-
344
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},MW="DialogDescriptionWarning",PW=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${iL(MW).contentName}}.`;return y.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gA=V5,oL=W5,yA=K5,sd=Z5,ld=X5,cd=J5,ud=tL,lv=rL;const DW=gA,kW=yA,sL=y.forwardRef(({className:e,...t},n)=>v.jsx(sd,{className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));sL.displayName=sd.displayName;const $W=Ec("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),lL=y.forwardRef(({side:e="right",className:t,children:n,...r},a)=>v.jsxs(kW,{children:[v.jsx(sL,{}),v.jsxs(ld,{ref:a,className:be($W({side:e}),t),...r,children:[n,v.jsxs(lv,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[v.jsx(x5,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));lL.displayName=ld.displayName;const cL=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-2 text-center sm:text-left",e),...t});cL.displayName="SheetHeader";const uL=y.forwardRef(({className:e,...t},n)=>v.jsx(cd,{ref:n,className:be("text-lg font-semibold text-foreground",e),...t}));uL.displayName=cd.displayName;const fL=y.forwardRef(({className:e,...t},n)=>v.jsx(ud,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));fL.displayName=ud.displayName;function XC({className:e,...t}){return v.jsx("div",{className:be("animate-pulse rounded-md bg-muted",e),...t})}const zW=["top","right","bottom","left"],Ro=Math.min,Pr=Math.max,$p=Math.round,ep=Math.floor,Za=e=>({x:e,y:e}),LW={left:"right",right:"left",bottom:"top",top:"bottom"};function sS(e,t,n){return Pr(e,Ro(t,n))}function ki(e,t){return typeof e=="function"?e(t):e}function $i(e){return e.split("-")[0]}function jc(e){return e.split("-")[1]}function bA(e){return e==="x"?"y":"x"}function xA(e){return e==="y"?"height":"width"}function Wa(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function wA(e){return bA(Wa(e))}function IW(e,t,n){n===void 0&&(n=!1);const r=jc(e),a=wA(e),o=xA(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=zp(l)),[l,zp(l)]}function BW(e){const t=zp(e);return[lS(e),t,lS(t)]}function lS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const QC=["left","right"],JC=["right","left"],UW=["top","bottom"],qW=["bottom","top"];function HW(e,t,n){switch(e){case"top":case"bottom":return n?t?JC:QC:t?QC:JC;case"left":case"right":return t?UW:qW;default:return[]}}function FW(e,t,n,r){const a=jc(e);let o=HW($i(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(lS)))),o}function zp(e){const t=$i(e);return LW[t]+e.slice(t.length)}function VW(e){return{top:0,right:0,bottom:0,left:0,...e}}function dL(e){return typeof e!="number"?VW(e):{top:e,right:e,bottom:e,left:e}}function Lp(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function eR(e,t,n){let{reference:r,floating:a}=e;const o=Wa(t),l=wA(t),c=xA(l),f=$i(t),d=o==="y",m=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,g=r[c]/2-a[c]/2;let x;switch(f){case"top":x={x:m,y:r.y-a.height};break;case"bottom":x={x:m,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:h};break;case"left":x={x:r.x-a.width,y:h};break;default:x={x:r.x,y:r.y}}switch(jc(t)){case"start":x[l]-=g*(n&&d?-1:1);break;case"end":x[l]+=g*(n&&d?-1:1);break}return x}async function GW(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:g=!1,padding:x=0}=ki(t,e),A=dL(x),w=c[g?h==="floating"?"reference":"floating":h],E=Lp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:m,strategy:f})),O=h==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),R=await(o.isElement==null?void 0:o.isElement(j))?await(o.getScale==null?void 0:o.getScale(j))||{x:1,y:1}:{x:1,y:1},C=Lp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:j,strategy:f}):O);return{top:(E.top-C.top+A.top)/R.y,bottom:(C.bottom-E.bottom+A.bottom)/R.y,left:(E.left-C.left+A.left)/R.x,right:(C.right-E.right+A.right)/R.x}}const WW=50,YW=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:GW},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:h}=eR(d,r,f),g=r,x=0;const A={};for(let S=0;S<o.length;S++){const w=o[S];if(!w)continue;const{name:E,fn:O}=w,{x:j,y:R,data:C,reset:T}=await O({x:m,y:h,initialPlacement:r,placement:g,strategy:a,middlewareData:A,rects:d,platform:c,elements:{reference:e,floating:t}});m=j??m,h=R??h,A[E]={...A[E],...C},T&&x<WW&&(x++,typeof T=="object"&&(T.placement&&(g=T.placement),T.rects&&(d=T.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):T.rects),{x:m,y:h}=eR(d,g,f)),S=-1)}return{x:m,y:h,placement:g,strategy:a,middlewareData:A}},KW=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:m=0}=ki(e,t)||{};if(d==null)return{};const h=dL(m),g={x:n,y:r},x=wA(a),A=xA(x),S=await l.getDimensions(d),w=x==="y",E=w?"top":"left",O=w?"bottom":"right",j=w?"clientHeight":"clientWidth",R=o.reference[A]+o.reference[x]-g[x]-o.floating[A],C=g[x]-o.reference[x],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let N=T?T[j]:0;(!N||!await(l.isElement==null?void 0:l.isElement(T)))&&(N=c.floating[j]||o.floating[A]);const D=R/2-C/2,z=N/2-S[A]/2-1,G=Ro(h[E],z),U=Ro(h[O],z),P=G,B=N-S[A]-U,q=N/2-S[A]/2+D,W=sS(P,q,B),$=!f.arrow&&jc(a)!=null&&q!==W&&o.reference[A]/2-(q<P?G:U)-S[A]/2<0,V=$?q<P?q-P:q-B:0;return{[x]:g[x]+V,data:{[x]:W,centerOffset:q-W-V,...$&&{alignmentOffset:V}},reset:$}}}),ZW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:S=!0,...w}=ki(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const E=$i(a),O=Wa(c),j=$i(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(d.floating)),C=g||(j||!S?[zp(c)]:BW(c)),T=A!=="none";!g&&T&&C.push(...FW(c,S,A,R));const N=[c,...C],D=await f.detectOverflow(t,w),z=[];let G=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&z.push(D[E]),h){const q=IW(a,l,R);z.push(D[q[0]],D[q[1]])}if(G=[...G,{placement:a,overflows:z}],!z.every(q=>q<=0)){var U,P;const q=(((U=o.flip)==null?void 0:U.index)||0)+1,W=N[q];if(W&&(!(h==="alignment"?O!==Wa(W):!1)||G.every(F=>Wa(F.placement)===O?F.overflows[0]>0:!0)))return{data:{index:q,overflows:G},reset:{placement:W}};let $=(P=G.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:P.placement;if(!$)switch(x){case"bestFit":{var B;const V=(B=G.filter(F=>{if(T){const K=Wa(F.placement);return K===O||K==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(K=>K>0).reduce((K,ie)=>K+ie,0)]).sort((F,K)=>F[1]-K[1])[0])==null?void 0:B[0];V&&($=V);break}case"initialPlacement":$=c;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function tR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nR(e){return zW.some(t=>e[t]>=0)}const XW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=ki(e,t);switch(a){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=tR(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:nR(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=tR(l,n.floating);return{data:{escapedOffsets:c,escaped:nR(c)}}}default:return{}}}}},hL=new Set(["left","top"]);async function QW(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=$i(n),c=jc(n),f=Wa(n)==="y",d=hL.has(l)?-1:1,m=o&&f?-1:1,h=ki(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:A}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof A=="number"&&(x=c==="end"?A*-1:A),f?{x:x*m,y:g*d}:{x:g*d,y:x*m}}const JW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:c}=t,f=await QW(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:a+f.x,y:o+f.y,data:{...f,placement:l}}}}},eY=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:E=>{let{x:O,y:j}=E;return{x:O,y:j}}},...d}=ki(e,t),m={x:n,y:r},h=await o.detectOverflow(t,d),g=Wa($i(a)),x=bA(g);let A=m[x],S=m[g];if(l){const E=x==="y"?"top":"left",O=x==="y"?"bottom":"right",j=A+h[E],R=A-h[O];A=sS(j,A,R)}if(c){const E=g==="y"?"top":"left",O=g==="y"?"bottom":"right",j=S+h[E],R=S-h[O];S=sS(j,S,R)}const w=f.fn({...t,[x]:A,[g]:S});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[x]:l,[g]:c}}}}}},tY=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=ki(e,t),m={x:n,y:r},h=Wa(a),g=bA(h);let x=m[g],A=m[h];const S=ki(c,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const j=g==="y"?"height":"width",R=o.reference[g]-o.floating[j]+w.mainAxis,C=o.reference[g]+o.reference[j]-w.mainAxis;x<R?x=R:x>C&&(x=C)}if(d){var E,O;const j=g==="y"?"width":"height",R=hL.has($i(a)),C=o.reference[h]-o.floating[j]+(R&&((E=l.offset)==null?void 0:E[h])||0)+(R?0:w.crossAxis),T=o.reference[h]+o.reference[j]+(R?0:((O=l.offset)==null?void 0:O[h])||0)-(R?w.crossAxis:0);A<C?A=C:A>T&&(A=T)}return{[g]:x,[h]:A}}}},nY=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:c}=t,{apply:f=()=>{},...d}=ki(e,t),m=await l.detectOverflow(t,d),h=$i(a),g=jc(a),x=Wa(a)==="y",{width:A,height:S}=o.floating;let w,E;h==="top"||h==="bottom"?(w=h,E=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(E=h,w=g==="end"?"top":"bottom");const O=S-m.top-m.bottom,j=A-m.left-m.right,R=Ro(S-m[w],O),C=Ro(A-m[E],j),T=!t.middlewareData.shift;let N=R,D=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=j),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=O),T&&!g){const G=Pr(m.left,0),U=Pr(m.right,0),P=Pr(m.top,0),B=Pr(m.bottom,0);x?D=A-2*(G!==0||U!==0?G+U:Pr(m.left,m.right)):N=S-2*(P!==0||B!==0?P+B:Pr(m.top,m.bottom))}await f({...t,availableWidth:D,availableHeight:N});const z=await l.getDimensions(c.floating);return A!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function cv(){return typeof window<"u"}function Tc(e){return pL(e)?(e.nodeName||"").toLowerCase():"#document"}function Ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ti(e){var t;return(t=(pL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pL(e){return cv()?e instanceof Node||e instanceof Ir(e).Node:!1}function Pa(e){return cv()?e instanceof Element||e instanceof Ir(e).Element:!1}function Hi(e){return cv()?e instanceof HTMLElement||e instanceof Ir(e).HTMLElement:!1}function rR(e){return!cv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ir(e).ShadowRoot}function fd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Da(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function rY(e){return/^(table|td|th)$/.test(Tc(e))}function uv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const aY=/transform|translate|scale|rotate|perspective|filter/,iY=/paint|layout|strict|content/,ss=e=>!!e&&e!=="none";let Vb;function SA(e){const t=Pa(e)?Da(e):e;return ss(t.transform)||ss(t.translate)||ss(t.scale)||ss(t.rotate)||ss(t.perspective)||!_A()&&(ss(t.backdropFilter)||ss(t.filter))||aY.test(t.willChange||"")||iY.test(t.contain||"")}function oY(e){let t=No(e);for(;Hi(t)&&!Kl(t);){if(SA(t))return t;if(uv(t))return null;t=No(t)}return null}function _A(){return Vb==null&&(Vb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vb}function Kl(e){return/^(html|body|#document)$/.test(Tc(e))}function Da(e){return Ir(e).getComputedStyle(e)}function fv(e){return Pa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function No(e){if(Tc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rR(e)&&e.host||ti(e);return rR(t)?t.host:t}function mL(e){const t=No(e);return Kl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hi(t)&&fd(t)?t:mL(t)}function df(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=mL(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=Ir(a);if(o){const c=cS(l);return t.concat(l,l.visualViewport||[],fd(a)?a:[],c&&n?df(c):[])}else return t.concat(a,df(a,[],n))}function cS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vL(e){const t=Da(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Hi(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,c=$p(n)!==o||$p(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function AA(e){return Pa(e)?e:e.contextElement}function Bl(e){const t=AA(e);if(!Hi(t))return Za(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=vL(t);let l=(o?$p(n.width):n.width)/r,c=(o?$p(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const sY=Za(0);function gL(e){const t=Ir(e);return!_A()||!t.visualViewport?sY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lY(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ir(e)?!1:t}function _s(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=AA(e);let l=Za(1);t&&(r?Pa(r)&&(l=Bl(r)):l=Bl(e));const c=lY(o,n,r)?gL(o):Za(0);let f=(a.left+c.x)/l.x,d=(a.top+c.y)/l.y,m=a.width/l.x,h=a.height/l.y;if(o){const g=Ir(o),x=r&&Pa(r)?Ir(r):r;let A=g,S=cS(A);for(;S&&r&&x!==A;){const w=Bl(S),E=S.getBoundingClientRect(),O=Da(S),j=E.left+(S.clientLeft+parseFloat(O.paddingLeft))*w.x,R=E.top+(S.clientTop+parseFloat(O.paddingTop))*w.y;f*=w.x,d*=w.y,m*=w.x,h*=w.y,f+=j,d+=R,A=Ir(S),S=cS(A)}}return Lp({width:m,height:h,x:f,y:d})}function dv(e,t){const n=fv(e).scrollLeft;return t?t.left+n:_s(ti(e)).left+n}function yL(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-dv(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function cY(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=ti(r),c=t?uv(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},d=Za(1);const m=Za(0),h=Hi(r);if((h||!h&&!o)&&((Tc(r)!=="body"||fd(l))&&(f=fv(r)),h)){const x=_s(r);d=Bl(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const g=l&&!h&&!o?yL(l,f):Za(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+m.x+g.x,y:n.y*d.y-f.scrollTop*d.y+m.y+g.y}}function uY(e){return Array.from(e.getClientRects())}function fY(e){const t=ti(e),n=fv(e),r=e.ownerDocument.body,a=Pr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Pr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+dv(e);const c=-n.scrollTop;return Da(r).direction==="rtl"&&(l+=Pr(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:c}}const aR=25;function dY(e,t){const n=Ir(e),r=ti(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(a){o=a.width,l=a.height;const m=_A();(!m||m&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}const d=dv(r);if(d<=0){const m=r.ownerDocument,h=m.body,g=getComputedStyle(h),x=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,A=Math.abs(r.clientWidth-h.clientWidth-x);A<=aR&&(o-=A)}else d<=aR&&(o+=d);return{width:o,height:l,x:c,y:f}}function hY(e,t){const n=_s(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Hi(e)?Bl(e):Za(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=a*o.x,d=r*o.y;return{width:l,height:c,x:f,y:d}}function iR(e,t,n){let r;if(t==="viewport")r=dY(e,n);else if(t==="document")r=fY(ti(e));else if(Pa(t))r=hY(t,n);else{const a=gL(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Lp(r)}function bL(e,t){const n=No(e);return n===t||!Pa(n)||Kl(n)?!1:Da(n).position==="fixed"||bL(n,t)}function pY(e,t){const n=t.get(e);if(n)return n;let r=df(e,[],!1).filter(c=>Pa(c)&&Tc(c)!=="body"),a=null;const o=Da(e).position==="fixed";let l=o?No(e):e;for(;Pa(l)&&!Kl(l);){const c=Da(l),f=SA(l);!f&&c.position==="fixed"&&(a=null),(o?!f&&!a:!f&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||fd(l)&&!f&&bL(e,l))?r=r.filter(m=>m!==l):a=c,l=No(l)}return t.set(e,r),r}function mY(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?uv(t)?[]:pY(t,this._c):[].concat(n),r],c=iR(t,l[0],a);let f=c.top,d=c.right,m=c.bottom,h=c.left;for(let g=1;g<l.length;g++){const x=iR(t,l[g],a);f=Pr(x.top,f),d=Ro(x.right,d),m=Ro(x.bottom,m),h=Pr(x.left,h)}return{width:d-h,height:m-f,x:h,y:f}}function vY(e){const{width:t,height:n}=vL(e);return{width:t,height:n}}function gY(e,t,n){const r=Hi(t),a=ti(t),o=n==="fixed",l=_s(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=Za(0);function d(){f.x=dv(a)}if(r||!r&&!o)if((Tc(t)!=="body"||fd(a))&&(c=fv(t)),r){const x=_s(t,!0,o,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else a&&d();o&&!r&&a&&d();const m=a&&!r&&!o?yL(a,c):Za(0),h=l.left+c.scrollLeft-f.x-m.x,g=l.top+c.scrollTop-f.y-m.y;return{x:h,y:g,width:l.width,height:l.height}}function Gb(e){return Da(e).position==="static"}function oR(e,t){if(!Hi(e)||Da(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function xL(e,t){const n=Ir(e);if(uv(e))return n;if(!Hi(e)){let a=No(e);for(;a&&!Kl(a);){if(Pa(a)&&!Gb(a))return a;a=No(a)}return n}let r=oR(e,t);for(;r&&rY(r)&&Gb(r);)r=oR(r,t);return r&&Kl(r)&&Gb(r)&&!SA(r)?n:r||oY(e)||n}const yY=async function(e){const t=this.getOffsetParent||xL,n=this.getDimensions,r=await n(e.floating);return{reference:gY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bY(e){return Da(e).direction==="rtl"}const xY={convertOffsetParentRelativeRectToViewportRelativeRect:cY,getDocumentElement:ti,getClippingRect:mY,getOffsetParent:xL,getElementRects:yY,getClientRects:uY,getDimensions:vY,getScale:Bl,isElement:Pa,isRTL:bY};function wL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wY(e,t){let n=null,r;const a=ti(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const d=e.getBoundingClientRect(),{left:m,top:h,width:g,height:x}=d;if(c||t(),!g||!x)return;const A=ep(h),S=ep(a.clientWidth-(m+g)),w=ep(a.clientHeight-(h+x)),E=ep(m),j={rootMargin:-A+"px "+-S+"px "+-w+"px "+-E+"px",threshold:Pr(0,Ro(1,f))||1};let R=!0;function C(T){const N=T[0].intersectionRatio;if(N!==f){if(!R)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!wL(d,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(C,{...j,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,j)}n.observe(e)}return l(!0),o}function SY(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=AA(e),m=a||o?[...d?df(d):[],...t?df(t):[]]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const h=d&&c?wY(d,n):null;let g=-1,x=null;l&&(x=new ResizeObserver(E=>{let[O]=E;O&&O.target===d&&x&&t&&(x.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var j;(j=x)==null||j.observe(t)})),n()}),d&&!f&&x.observe(d),t&&x.observe(t));let A,S=f?_s(e):null;f&&w();function w(){const E=_s(e);S&&!wL(S,E)&&n(),S=E,A=requestAnimationFrame(w)}return n(),()=>{var E;m.forEach(O=>{a&&O.removeEventListener("scroll",n),o&&O.removeEventListener("resize",n)}),h==null||h(),(E=x)==null||E.disconnect(),x=null,f&&cancelAnimationFrame(A)}}const _Y=JW,AY=eY,EY=ZW,OY=nY,jY=XW,sR=KW,TY=tY,CY=(e,t,n)=>{const r=new Map,a={platform:xY,...n},o={...a.platform,_c:r};return YW(e,t,{...a,platform:o})};var RY=typeof document<"u",NY=function(){},Sp=RY?y.useLayoutEffect:NY;function Ip(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ip(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Ip(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function SL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lR(e,t){const n=SL(e);return Math.round(t*n)/n}function Wb(e){const t=y.useRef(e);return Sp(()=>{t.current=e}),t}function MY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[m,h]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=y.useState(r);Ip(g,r)||x(r);const[A,S]=y.useState(null),[w,E]=y.useState(null),O=y.useCallback(F=>{F!==T.current&&(T.current=F,S(F))},[]),j=y.useCallback(F=>{F!==N.current&&(N.current=F,E(F))},[]),R=o||A,C=l||w,T=y.useRef(null),N=y.useRef(null),D=y.useRef(m),z=f!=null,G=Wb(f),U=Wb(a),P=Wb(d),B=y.useCallback(()=>{if(!T.current||!N.current)return;const F={placement:t,strategy:n,middleware:g};U.current&&(F.platform=U.current),CY(T.current,N.current,F).then(K=>{const ie={...K,isPositioned:P.current!==!1};q.current&&!Ip(D.current,ie)&&(D.current=ie,rd.flushSync(()=>{h(ie)}))})},[g,t,n,U,P]);Sp(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(F=>({...F,isPositioned:!1})))},[d]);const q=y.useRef(!1);Sp(()=>(q.current=!0,()=>{q.current=!1}),[]),Sp(()=>{if(R&&(T.current=R),C&&(N.current=C),R&&C){if(G.current)return G.current(R,C,B);B()}},[R,C,B,G,z]);const W=y.useMemo(()=>({reference:T,floating:N,setReference:O,setFloating:j}),[O,j]),$=y.useMemo(()=>({reference:R,floating:C}),[R,C]),V=y.useMemo(()=>{const F={position:n,left:0,top:0};if(!$.floating)return F;const K=lR($.floating,m.x),ie=lR($.floating,m.y);return c?{...F,transform:"translate("+K+"px, "+ie+"px)",...SL($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:ie}},[n,c,$.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:B,refs:W,elements:$,floatingStyles:V}),[m,B,W,$,V])}const PY=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?sR({element:r.current,padding:a}).fn(n):{}:r?sR({element:r,padding:a}).fn(n):{}}}},DY=(e,t)=>{const n=_Y(e);return{name:n.name,fn:n.fn,options:[e,t]}},kY=(e,t)=>{const n=AY(e);return{name:n.name,fn:n.fn,options:[e,t]}},$Y=(e,t)=>({fn:TY(e).fn,options:[e,t]}),zY=(e,t)=>{const n=EY(e);return{name:n.name,fn:n.fn,options:[e,t]}},LY=(e,t)=>{const n=OY(e);return{name:n.name,fn:n.fn,options:[e,t]}},IY=(e,t)=>{const n=jY(e);return{name:n.name,fn:n.fn,options:[e,t]}},BY=(e,t)=>{const n=PY(e);return{name:n.name,fn:n.fn,options:[e,t]}};var UY="Arrow",_L=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return v.jsx(et.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});_L.displayName=UY;var qY=_L;function AL(e){const[t,n]=y.useState(void 0);return Zn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,c;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var EA="Popper",[EL,Cc]=pa(EA),[HY,OL]=EL(EA),jL=e=>{const{__scopePopper:t,children:n}=e,[r,a]=y.useState(null);return v.jsx(HY,{scope:t,anchor:r,onAnchorChange:a,children:n})};jL.displayName=EA;var TL="PopperAnchor",CL=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=OL(TL,n),l=y.useRef(null),c=ut(t,l),f=y.useRef(null);return y.useEffect(()=>{const d=f.current;f.current=(r==null?void 0:r.current)||l.current,d!==f.current&&o.onAnchorChange(f.current)}),r?null:v.jsx(et.div,{...a,ref:c})});CL.displayName=TL;var OA="PopperContent",[FY,VY]=EL(OA),RL=y.forwardRef((e,t)=>{var me,we,ce,_e,Ae,se;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:x="optimized",onPlaced:A,...S}=e,w=OL(OA,n),[E,O]=y.useState(null),j=ut(t,He=>O(He)),[R,C]=y.useState(null),T=AL(R),N=(T==null?void 0:T.width)??0,D=(T==null?void 0:T.height)??0,z=r+(o!=="center"?"-"+o:""),G=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(d)?d:[d],P=U.length>0,B={padding:G,boundary:U.filter(WY),altBoundary:P},{refs:q,floatingStyles:W,placement:$,isPositioned:V,middlewareData:F}=MY({strategy:"fixed",placement:z,whileElementsMounted:(...He)=>SY(...He,{animationFrame:x==="always"}),elements:{reference:w.anchor},middleware:[DY({mainAxis:a+D,alignmentAxis:l}),f&&kY({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?$Y():void 0,...B}),f&&zY({...B}),LY({...B,apply:({elements:He,rects:$e,availableWidth:Je,availableHeight:We})=>{const{width:at,height:Rt}=$e.reference,ft=He.floating.style;ft.setProperty("--radix-popper-available-width",`${Je}px`),ft.setProperty("--radix-popper-available-height",`${We}px`),ft.setProperty("--radix-popper-anchor-width",`${at}px`),ft.setProperty("--radix-popper-anchor-height",`${Rt}px`)}}),R&&BY({element:R,padding:c}),YY({arrowWidth:N,arrowHeight:D}),g&&IY({strategy:"referenceHidden",...B})]}),[K,ie]=PL($),I=Yn(A);Zn(()=>{V&&(I==null||I())},[V,I]);const Z=(me=F.arrow)==null?void 0:me.x,X=(we=F.arrow)==null?void 0:we.y,oe=((ce=F.arrow)==null?void 0:ce.centerOffset)!==0,[ge,Ee]=y.useState();return Zn(()=>{E&&Ee(window.getComputedStyle(E).zIndex)},[E]),v.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:V?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(_e=F.transformOrigin)==null?void 0:_e.x,(Ae=F.transformOrigin)==null?void 0:Ae.y].join(" "),...((se=F.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(FY,{scope:n,placedSide:K,onArrowChange:C,arrowX:Z,arrowY:X,shouldHideArrow:oe,children:v.jsx(et.div,{"data-side":K,"data-align":ie,...S,ref:j,style:{...S.style,animation:V?void 0:"none"}})})})});RL.displayName=OA;var NL="PopperArrow",GY={top:"bottom",right:"left",bottom:"top",left:"right"},ML=y.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=VY(NL,r),l=GY[o.placedSide];return v.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:v.jsx(qY,{...a,ref:n,style:{...a.style,display:"block"}})})});ML.displayName=NL;function WY(e){return e!==null}var YY=e=>({name:"transformOrigin",options:e,fn(t){var w,E,O;const{placement:n,rects:r,middlewareData:a}=t,l=((w=a.arrow)==null?void 0:w.centerOffset)!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,m]=PL(n),h={start:"0%",center:"50%",end:"100%"}[m],g=(((E=a.arrow)==null?void 0:E.x)??0)+c/2,x=(((O=a.arrow)==null?void 0:O.y)??0)+f/2;let A="",S="";return d==="bottom"?(A=l?h:`${g}px`,S=`${-f}px`):d==="top"?(A=l?h:`${g}px`,S=`${r.floating.height+f}px`):d==="right"?(A=`${-f}px`,S=l?h:`${x}px`):d==="left"&&(A=`${r.floating.width+f}px`,S=l?h:`${x}px`),{data:{x:A,y:S}}}});function PL(e){const[t,n="center"]=e.split("-");return[t,n]}var jA=jL,TA=CL,CA=RL,RA=ML,DL=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),KY="VisuallyHidden",kL=y.forwardRef((e,t)=>v.jsx(et.span,{...e,ref:t,style:{...DL,...e.style}}));kL.displayName=KY;var ZY=kL,[hv]=pa("Tooltip",[Cc]),pv=Cc(),$L="TooltipProvider",XY=700,uS="tooltip.open",[QY,NA]=hv($L),zL=e=>{const{__scopeTooltip:t,delayDuration:n=XY,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,l=y.useRef(!0),c=y.useRef(!1),f=y.useRef(0);return y.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),v.jsx(QY,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(f.current),l.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(d=>{c.current=d},[]),disableHoverableContent:a,children:o})};zL.displayName=$L;var hf="Tooltip",[JY,dd]=hv(hf),LL=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:l,delayDuration:c}=e,f=NA(hf,e.__scopeTooltip),d=pv(t),[m,h]=y.useState(null),g=Na(),x=y.useRef(0),A=l??f.disableHoverableContent,S=c??f.delayDuration,w=y.useRef(!1),[E,O]=Co({prop:r,defaultProp:a??!1,onChange:N=>{N?(f.onOpen(),document.dispatchEvent(new CustomEvent(uS))):f.onClose(),o==null||o(N)},caller:hf}),j=y.useMemo(()=>E?w.current?"delayed-open":"instant-open":"closed",[E]),R=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,w.current=!1,O(!0)},[O]),C=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,O(!1)},[O]),T=y.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{w.current=!0,O(!0),x.current=0},S)},[S,O]);return y.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),v.jsx(jA,{...d,children:v.jsx(JY,{scope:t,contentId:g,open:E,stateAttribute:j,trigger:m,onTriggerChange:h,onTriggerEnter:y.useCallback(()=>{f.isOpenDelayedRef.current?T():R()},[f.isOpenDelayedRef,T,R]),onTriggerLeave:y.useCallback(()=>{A?C():(window.clearTimeout(x.current),x.current=0)},[C,A]),onOpen:R,onClose:C,disableHoverableContent:A,children:n})})};LL.displayName=hf;var fS="TooltipTrigger",IL=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=dd(fS,n),o=NA(fS,n),l=pv(n),c=y.useRef(null),f=ut(t,c,a.onTriggerChange),d=y.useRef(!1),m=y.useRef(!1),h=y.useCallback(()=>d.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),v.jsx(TA,{asChild:!0,...l,children:v.jsx(et.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:f,onPointerMove:ze(e.onPointerMove,g=>{g.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:ze(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:ze(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ze(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:ze(e.onBlur,a.onClose),onClick:ze(e.onClick,a.onClose)})})});IL.displayName=fS;var MA="TooltipPortal",[eK,tK]=hv(MA,{forceMount:void 0}),BL=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,o=dd(MA,t);return v.jsx(eK,{scope:t,forceMount:n,children:v.jsx(ur,{present:n||o.open,children:v.jsx(od,{asChild:!0,container:a,children:r})})})};BL.displayName=MA;var Zl="TooltipContent",UL=y.forwardRef((e,t)=>{const n=tK(Zl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,l=dd(Zl,e.__scopeTooltip);return v.jsx(ur,{present:r||l.open,children:l.disableHoverableContent?v.jsx(qL,{side:a,...o,ref:t}):v.jsx(nK,{side:a,...o,ref:t})})}),nK=y.forwardRef((e,t)=>{const n=dd(Zl,e.__scopeTooltip),r=NA(Zl,e.__scopeTooltip),a=y.useRef(null),o=ut(t,a),[l,c]=y.useState(null),{trigger:f,onClose:d}=n,m=a.current,{onPointerInTransitChange:h}=r,g=y.useCallback(()=>{c(null),h(!1)},[h]),x=y.useCallback((A,S)=>{const w=A.currentTarget,E={x:A.clientX,y:A.clientY},O=sK(E,w.getBoundingClientRect()),j=lK(E,O),R=cK(S.getBoundingClientRect()),C=fK([...j,...R]);c(C),h(!0)},[h]);return y.useEffect(()=>()=>g(),[g]),y.useEffect(()=>{if(f&&m){const A=w=>x(w,m),S=w=>x(w,f);return f.addEventListener("pointerleave",A),m.addEventListener("pointerleave",S),()=>{f.removeEventListener("pointerleave",A),m.removeEventListener("pointerleave",S)}}},[f,m,x,g]),y.useEffect(()=>{if(l){const A=S=>{const w=S.target,E={x:S.clientX,y:S.clientY},O=(f==null?void 0:f.contains(w))||(m==null?void 0:m.contains(w)),j=!uK(E,l);O?g():j&&(g(),d())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[f,m,l,d,g]),v.jsx(qL,{...e,ref:o})}),[rK,aK]=hv(hf,{isInside:!1}),iK=R5("TooltipContent"),qL=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...c}=e,f=dd(Zl,n),d=pv(n),{onClose:m}=f;return y.useEffect(()=>(document.addEventListener(uS,m),()=>document.removeEventListener(uS,m)),[m]),y.useEffect(()=>{if(f.trigger){const h=g=>{const x=g.target;x!=null&&x.contains(f.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[f.trigger,m]),v.jsx(id,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:v.jsxs(CA,{"data-state":f.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(iK,{children:r}),v.jsx(rK,{scope:n,isInside:!0,children:v.jsx(ZY,{id:f.contentId,role:"tooltip",children:a||r})})]})})});UL.displayName=Zl;var HL="TooltipArrow",oK=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=pv(n);return aK(HL,n).isInside?null:v.jsx(RA,{...a,...r,ref:t})});oK.displayName=HL;function sK(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function lK(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cK(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function uK(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],f=t[l],d=c.x,m=c.y,h=f.x,g=f.y;m>r!=g>r&&n<(h-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function fK(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),dK(t)}function dK(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var hK=zL,pK=LL,mK=IL,vK=BL,FL=UL;const Bp=hK,sa=pK,la=mK,kr=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(vK,{children:v.jsx(FL,{ref:r,sideOffset:t,"data-slot":"tooltip-content",className:be("z-[50] overflow-hidden rounded-lg bg-foreground/85 px-[7px] py-1.5 text-[11px] text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));kr.displayName=FL.displayName;const gK="sidebar_state",yK=3600*24*7,bK="16rem",xK="18rem",wK="3rem",SK="b",VL=y.createContext(null);function mv(){const e=y.useContext(VL);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const GL=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...l},c)=>{const f=EV(),[d,m]=y.useState(!1),[h,g]=y.useState(e),x=t??h,A=y.useCallback(O=>{const j=typeof O=="function"?O(x):O;n?n(j):g(j),document.cookie=`${gK}=${j}; path=/; max-age=${yK}`},[n,x]),S=y.useCallback(()=>f?m(O=>!O):A(O=>!O),[f,A,m]);y.useEffect(()=>{const O=j=>{j.key===SK&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),S())};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[S]);const w=x?"expanded":"collapsed",E=y.useMemo(()=>({state:w,open:x,setOpen:A,isMobile:f,openMobile:d,setOpenMobile:m,toggleSidebar:S}),[w,x,A,f,d,m,S]);return v.jsx(VL.Provider,{value:E,children:v.jsx(Bp,{delayDuration:0,children:v.jsx("div",{style:{"--sidebar-width":bK,"--sidebar-width-icon":wK,...a},className:be("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:c,...l,children:o})})})});GL.displayName="SidebarProvider";const WL=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o},l)=>{const{isMobile:c,state:f,openMobile:d,setOpenMobile:m}=mv();return n==="none"?v.jsx("div",{className:be("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:l,...o,children:a}):c?v.jsx(DW,{open:d,onOpenChange:m,...o,children:v.jsxs(lL,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":xK},side:e,children:[v.jsxs(cL,{className:"sr-only",children:[v.jsx(uL,{children:"Sidebar"}),v.jsx(fL,{children:"Displays the mobile sidebar."})]}),v.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):v.jsxs("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[v.jsx("div",{className:be("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),v.jsx("div",{className:be("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:v.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});WL.displayName="Sidebar";const YL=y.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:a}=mv();return v.jsxs(ct,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:be("h-7 w-7",e),onClick:o=>{t==null||t(o),a()},...n,children:[v.jsx(dV,{}),v.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});YL.displayName="SidebarTrigger";const _K=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=mv();return v.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:be("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});_K.displayName="SidebarRail";const KL=y.forwardRef(({className:e,...t},n)=>v.jsx("main",{ref:n,className:be("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));KL.displayName="SidebarInset";const AK=y.forwardRef(({className:e,...t},n)=>v.jsx(rn,{ref:n,"data-sidebar":"input",className:be("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));AK.displayName="SidebarInput";const ZL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"header",className:be("flex flex-col gap-2 p-2",e),...t}));ZL.displayName="SidebarHeader";const XL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"footer",className:be("flex flex-col gap-2 p-2",e),...t}));XL.displayName="SidebarFooter";const EK=y.forwardRef(({className:e,...t},n)=>v.jsx(Ja,{ref:n,"data-sidebar":"separator",className:be("mx-2 w-auto bg-sidebar-border",e),...t}));EK.displayName="SidebarSeparator";const QL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"content",className:be("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));QL.displayName="SidebarContent";const _p=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group",className:be("relative flex w-full min-w-0 flex-col p-2",e),...t}));_p.displayName="SidebarGroup";const dS=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ds:"div";return v.jsx(a,{ref:r,"data-sidebar":"group-label",className:be("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});dS.displayName="SidebarGroupLabel";const OK=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ds:"button";return v.jsx(a,{ref:r,"data-sidebar":"group-action",className:be("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});OK.displayName="SidebarGroupAction";const Ap=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group-content",className:be("w-full text-sm",e),...t}));Ap.displayName="SidebarGroupContent";const Ep=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu",className:be("flex w-full min-w-0 flex-col gap-1",e),...t}));Ep.displayName="SidebarMenu";const Op=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,"data-sidebar":"menu-item",className:be("group/menu-item relative",e),...t}));Op.displayName="SidebarMenuItem";const jK=Ec("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),jp=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...l},c)=>{const f=e?Ds:"button",{isMobile:d,state:m}=mv(),h=v.jsx(f,{ref:c,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:be(jK({variant:n,size:r}),o),...l});return a?(typeof a=="string"&&(a={children:a}),v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:h}),v.jsx(kr,{side:"right",align:"center",hidden:m!=="collapsed"||d,...a})]})):h});jp.displayName="SidebarMenuButton";const TK=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},a)=>{const o=t?Ds:"button";return v.jsx(o,{ref:a,"data-sidebar":"menu-action",className:be("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});TK.displayName="SidebarMenuAction";const CK=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:be("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));CK.displayName="SidebarMenuBadge";const RK=y.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const a=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return v.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:be("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&v.jsx(XC,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),v.jsx(XC,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});RK.displayName="SidebarMenuSkeleton";const NK=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:be("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));NK.displayName="SidebarMenuSub";const MK=y.forwardRef(({...e},t)=>v.jsx("li",{ref:t,...e}));MK.displayName="SidebarMenuSubItem";const PK=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...a},o)=>{const l=e?Ds:"a";return v.jsx(l,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:be("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...a})});PK.displayName="SidebarMenuSubButton";function PA(e){const t=e+"CollectionProvider",[n,r]=pa(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:w,children:E}=S,O=L.useRef(null),j=L.useRef(new Map).current;return v.jsx(a,{scope:w,itemMap:j,collectionRef:O,children:E})};l.displayName=t;const c=e+"CollectionSlot",f=Yl(c),d=L.forwardRef((S,w)=>{const{scope:E,children:O}=S,j=o(c,E),R=ut(w,j.collectionRef);return v.jsx(f,{ref:R,children:O})});d.displayName=c;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=Yl(m),x=L.forwardRef((S,w)=>{const{scope:E,children:O,...j}=S,R=L.useRef(null),C=ut(w,R),T=o(m,E);return L.useEffect(()=>(T.itemMap.set(R,{ref:R,...j}),()=>void T.itemMap.delete(R))),v.jsx(g,{[h]:"",ref:C,children:O})});x.displayName=m;function A(S){const w=o(e+"CollectionConsumer",S);return L.useCallback(()=>{const O=w.collectionRef.current;if(!O)return[];const j=Array.from(O.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((T,N)=>j.indexOf(T.ref.current)-j.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:x},A,r]}var DK=y.createContext(void 0);function hd(e){const t=y.useContext(DK);return e||t||"ltr"}var Yb="rovingFocusGroup.onEntryFocus",kK={bubbles:!1,cancelable:!0},pd="RovingFocusGroup",[hS,JL,$K]=PA(pd),[zK,vv]=pa(pd,[$K]),[LK,IK]=zK(pd),eI=y.forwardRef((e,t)=>v.jsx(hS.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(hS.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(BK,{...e,ref:t})})}));eI.displayName=pd;var BK=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...h}=e,g=y.useRef(null),x=ut(t,g),A=hd(o),[S,w]=Co({prop:l,defaultProp:c??null,onChange:f,caller:pd}),[E,O]=y.useState(!1),j=Yn(d),R=JL(n),C=y.useRef(!1),[T,N]=y.useState(0);return y.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(Yb,j),()=>D.removeEventListener(Yb,j)},[j]),v.jsx(LK,{scope:n,orientation:r,dir:A,loop:a,currentTabStopId:S,onItemFocus:y.useCallback(D=>w(D),[w]),onItemShiftTab:y.useCallback(()=>O(!0),[]),onFocusableItemAdd:y.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:y.useCallback(()=>N(D=>D-1),[]),children:v.jsx(et.div,{tabIndex:E||T===0?-1:0,"data-orientation":r,...h,ref:x,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,()=>{C.current=!0}),onFocus:ze(e.onFocus,D=>{const z=!C.current;if(D.target===D.currentTarget&&z&&!E){const G=new CustomEvent(Yb,kK);if(D.currentTarget.dispatchEvent(G),!G.defaultPrevented){const U=R().filter($=>$.focusable),P=U.find($=>$.active),B=U.find($=>$.id===S),W=[P,B,...U].filter(Boolean).map($=>$.ref.current);rI(W,m)}}C.current=!1}),onBlur:ze(e.onBlur,()=>O(!1))})})}),tI="RovingFocusGroupItem",nI=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:l,...c}=e,f=Na(),d=o||f,m=IK(tI,n),h=m.currentTabStopId===d,g=JL(n),{onFocusableItemAdd:x,onFocusableItemRemove:A,currentTabStopId:S}=m;return y.useEffect(()=>{if(r)return x(),()=>A()},[r,x,A]),v.jsx(hS.ItemSlot,{scope:n,id:d,focusable:r,active:a,children:v.jsx(et.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:ze(e.onMouseDown,w=>{r?m.onItemFocus(d):w.preventDefault()}),onFocus:ze(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:ze(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const E=HK(w,m.orientation,m.dir);if(E!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let j=g().filter(R=>R.focusable).map(R=>R.ref.current);if(E==="last")j.reverse();else if(E==="prev"||E==="next"){E==="prev"&&j.reverse();const R=j.indexOf(w.currentTarget);j=m.loop?FK(j,R+1):j.slice(R+1)}setTimeout(()=>rI(j))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:S!=null}):l})})});nI.displayName=tI;var UK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qK(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function HK(e,t,n){const r=qK(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return UK[r]}function rI(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FK(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var aI=eI,iI=nI,pS=["Enter"," "],VK=["ArrowDown","PageUp","Home"],oI=["ArrowUp","PageDown","End"],GK=[...VK,...oI],WK={ltr:[...pS,"ArrowRight"],rtl:[...pS,"ArrowLeft"]},YK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},md="Menu",[pf,KK,ZK]=PA(md),[ks,sI]=pa(md,[ZK,Cc,vv]),gv=Cc(),lI=vv(),[XK,$s]=ks(md),[QK,vd]=ks(md),cI=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:l=!0}=e,c=gv(t),[f,d]=y.useState(null),m=y.useRef(!1),h=Yn(o),g=hd(a);return y.useEffect(()=>{const x=()=>{m.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>m.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),v.jsx(jA,{...c,children:v.jsx(XK,{scope:t,open:n,onOpenChange:h,content:f,onContentChange:d,children:v.jsx(QK,{scope:t,onClose:y.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};cI.displayName=md;var JK="MenuAnchor",DA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=gv(n);return v.jsx(TA,{...a,...r,ref:t})});DA.displayName=JK;var kA="MenuPortal",[eZ,uI]=ks(kA,{forceMount:void 0}),fI=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=$s(kA,t);return v.jsx(eZ,{scope:t,forceMount:n,children:v.jsx(ur,{present:n||o.open,children:v.jsx(od,{asChild:!0,container:a,children:r})})})};fI.displayName=kA;var ua="MenuContent",[tZ,$A]=ks(ua),dI=y.forwardRef((e,t)=>{const n=uI(ua,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=$s(ua,e.__scopeMenu),l=vd(ua,e.__scopeMenu);return v.jsx(pf.Provider,{scope:e.__scopeMenu,children:v.jsx(ur,{present:r||o.open,children:v.jsx(pf.Slot,{scope:e.__scopeMenu,children:l.modal?v.jsx(nZ,{...a,ref:t}):v.jsx(rZ,{...a,ref:t})})})})}),nZ=y.forwardRef((e,t)=>{const n=$s(ua,e.__scopeMenu),r=y.useRef(null),a=ut(t,r);return y.useEffect(()=>{const o=r.current;if(o)return hA(o)},[]),v.jsx(zA,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ze(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),rZ=y.forwardRef((e,t)=>{const n=$s(ua,e.__scopeMenu);return v.jsx(zA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),aZ=Yl("MenuContent.ScrollLock"),zA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:x,disableOutsideScroll:A,...S}=e,w=$s(ua,n),E=vd(ua,n),O=gv(n),j=lI(n),R=KK(n),[C,T]=y.useState(null),N=y.useRef(null),D=ut(t,N,w.onContentChange),z=y.useRef(0),G=y.useRef(""),U=y.useRef(0),P=y.useRef(null),B=y.useRef("right"),q=y.useRef(0),W=A?ov:y.Fragment,$=A?{as:aZ,allowPinchZoom:!0}:void 0,V=K=>{var me,we;const ie=G.current+K,I=R().filter(ce=>!ce.disabled),Z=document.activeElement,X=(me=I.find(ce=>ce.ref.current===Z))==null?void 0:me.textValue,oe=I.map(ce=>ce.textValue),ge=vZ(oe,ie,X),Ee=(we=I.find(ce=>ce.textValue===ge))==null?void 0:we.ref.current;(function ce(_e){G.current=_e,window.clearTimeout(z.current),_e!==""&&(z.current=window.setTimeout(()=>ce(""),1e3))})(ie),Ee&&setTimeout(()=>Ee.focus())};y.useEffect(()=>()=>window.clearTimeout(z.current),[]),dA();const F=y.useCallback(K=>{var I,Z;return B.current===((I=P.current)==null?void 0:I.side)&&yZ(K,(Z=P.current)==null?void 0:Z.area)},[]);return v.jsx(tZ,{scope:n,searchRef:G,onItemEnter:y.useCallback(K=>{F(K)&&K.preventDefault()},[F]),onItemLeave:y.useCallback(K=>{var ie;F(K)||((ie=N.current)==null||ie.focus(),T(null))},[F]),onTriggerLeave:y.useCallback(K=>{F(K)&&K.preventDefault()},[F]),pointerGraceTimerRef:U,onPointerGraceIntentChange:y.useCallback(K=>{P.current=K},[]),children:v.jsx(W,{...$,children:v.jsx(av,{asChild:!0,trapped:a,onMountAutoFocus:ze(o,K=>{var ie;K.preventDefault(),(ie=N.current)==null||ie.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:v.jsx(id,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:x,children:v.jsx(aI,{asChild:!0,...j,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:T,onEntryFocus:ze(f,K=>{E.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(CA,{role:"menu","aria-orientation":"vertical","data-state":TI(w.open),"data-radix-menu-content":"",dir:E.dir,...O,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:ze(S.onKeyDown,K=>{const I=K.target.closest("[data-radix-menu-content]")===K.currentTarget,Z=K.ctrlKey||K.altKey||K.metaKey,X=K.key.length===1;I&&(K.key==="Tab"&&K.preventDefault(),!Z&&X&&V(K.key));const oe=N.current;if(K.target!==oe||!GK.includes(K.key))return;K.preventDefault();const Ee=R().filter(me=>!me.disabled).map(me=>me.ref.current);oI.includes(K.key)&&Ee.reverse(),pZ(Ee)}),onBlur:ze(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(z.current),G.current="")}),onPointerMove:ze(e.onPointerMove,mf(K=>{const ie=K.target,I=q.current!==K.clientX;if(K.currentTarget.contains(ie)&&I){const Z=K.clientX>q.current?"right":"left";B.current=Z,q.current=K.clientX}}))})})})})})})});dI.displayName=ua;var iZ="MenuGroup",LA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(et.div,{role:"group",...r,ref:t})});LA.displayName=iZ;var oZ="MenuLabel",hI=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(et.div,{...r,ref:t})});hI.displayName=oZ;var Up="MenuItem",cR="menu.itemSelect",yv=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=y.useRef(null),l=vd(Up,e.__scopeMenu),c=$A(Up,e.__scopeMenu),f=ut(t,o),d=y.useRef(!1),m=()=>{const h=o.current;if(!n&&h){const g=new CustomEvent(cR,{bubbles:!0,cancelable:!0});h.addEventListener(cR,x=>r==null?void 0:r(x),{once:!0}),N5(h,g),g.defaultPrevented?d.current=!1:l.onClose()}};return v.jsx(pI,{...a,ref:f,disabled:n,onClick:ze(e.onClick,m),onPointerDown:h=>{var g;(g=e.onPointerDown)==null||g.call(e,h),d.current=!0},onPointerUp:ze(e.onPointerUp,h=>{var g;d.current||(g=h.currentTarget)==null||g.click()}),onKeyDown:ze(e.onKeyDown,h=>{const g=c.searchRef.current!=="";n||g&&h.key===" "||pS.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});yv.displayName=Up;var pI=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,l=$A(Up,n),c=lI(n),f=y.useRef(null),d=ut(t,f),[m,h]=y.useState(!1),[g,x]=y.useState("");return y.useEffect(()=>{const A=f.current;A&&x((A.textContent??"").trim())},[o.children]),v.jsx(pf.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:v.jsx(iI,{asChild:!0,...c,focusable:!r,children:v.jsx(et.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:ze(e.onPointerMove,mf(A=>{r?l.onItemLeave(A):(l.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ze(e.onPointerLeave,mf(A=>l.onItemLeave(A))),onFocus:ze(e.onFocus,()=>h(!0)),onBlur:ze(e.onBlur,()=>h(!1))})})})}),sZ="MenuCheckboxItem",mI=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.jsx(xI,{scope:e.__scopeMenu,checked:n,children:v.jsx(yv,{role:"menuitemcheckbox","aria-checked":qp(n)?"mixed":n,...a,ref:t,"data-state":BA(n),onSelect:ze(a.onSelect,()=>r==null?void 0:r(qp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});mI.displayName=sZ;var vI="MenuRadioGroup",[lZ,cZ]=ks(vI,{value:void 0,onValueChange:()=>{}}),gI=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=Yn(r);return v.jsx(lZ,{scope:e.__scopeMenu,value:n,onValueChange:o,children:v.jsx(LA,{...a,ref:t})})});gI.displayName=vI;var yI="MenuRadioItem",bI=y.forwardRef((e,t)=>{const{value:n,...r}=e,a=cZ(yI,e.__scopeMenu),o=n===a.value;return v.jsx(xI,{scope:e.__scopeMenu,checked:o,children:v.jsx(yv,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":BA(o),onSelect:ze(r.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,n)},{checkForDefaultPrevented:!1})})})});bI.displayName=yI;var IA="MenuItemIndicator",[xI,uZ]=ks(IA,{checked:!1}),wI=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=uZ(IA,n);return v.jsx(ur,{present:r||qp(o.checked)||o.checked===!0,children:v.jsx(et.span,{...a,ref:t,"data-state":BA(o.checked)})})});wI.displayName=IA;var fZ="MenuSeparator",SI=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(et.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});SI.displayName=fZ;var dZ="MenuArrow",_I=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=gv(n);return v.jsx(RA,{...a,...r,ref:t})});_I.displayName=dZ;var hZ="MenuSub",[vwe,AI]=ks(hZ),Ku="MenuSubTrigger",EI=y.forwardRef((e,t)=>{const n=$s(Ku,e.__scopeMenu),r=vd(Ku,e.__scopeMenu),a=AI(Ku,e.__scopeMenu),o=$A(Ku,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=o,d={__scopeMenu:e.__scopeMenu},m=y.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return y.useEffect(()=>m,[m]),y.useEffect(()=>{const h=c.current;return()=>{window.clearTimeout(h),f(null)}},[c,f]),v.jsx(DA,{asChild:!0,...d,children:v.jsx(pI,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":TI(n.open),...e,ref:ad(t,a.onTriggerChange),onClick:h=>{var g;(g=e.onClick)==null||g.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ze(e.onPointerMove,mf(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:ze(e.onPointerLeave,mf(h=>{var x,A;m();const g=(x=n.content)==null?void 0:x.getBoundingClientRect();if(g){const S=(A=n.content)==null?void 0:A.dataset.side,w=S==="right",E=w?-5:5,O=g[w?"left":"right"],j=g[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+E,y:h.clientY},{x:O,y:g.top},{x:j,y:g.top},{x:j,y:g.bottom},{x:O,y:g.bottom}],side:S}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ze(e.onKeyDown,h=>{var x;const g=o.searchRef.current!=="";e.disabled||g&&h.key===" "||WK[r.dir].includes(h.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),h.preventDefault())})})})});EI.displayName=Ku;var OI="MenuSubContent",jI=y.forwardRef((e,t)=>{const n=uI(ua,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=$s(ua,e.__scopeMenu),l=vd(ua,e.__scopeMenu),c=AI(OI,e.__scopeMenu),f=y.useRef(null),d=ut(t,f);return v.jsx(pf.Provider,{scope:e.__scopeMenu,children:v.jsx(ur,{present:r||o.open,children:v.jsx(pf.Slot,{scope:e.__scopeMenu,children:v.jsx(zA,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var h;l.isUsingKeyboardRef.current&&((h=f.current)==null||h.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:ze(e.onFocusOutside,m=>{m.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ze(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:ze(e.onKeyDown,m=>{var x;const h=m.currentTarget.contains(m.target),g=YK[l.dir].includes(m.key);h&&g&&(o.onOpenChange(!1),(x=c.trigger)==null||x.focus(),m.preventDefault())})})})})})});jI.displayName=OI;function TI(e){return e?"open":"closed"}function qp(e){return e==="indeterminate"}function BA(e){return qp(e)?"indeterminate":e?"checked":"unchecked"}function pZ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function mZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function vZ(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=mZ(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function gZ(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],f=t[l],d=c.x,m=c.y,h=f.x,g=f.y;m>r!=g>r&&n<(h-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function yZ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return gZ(n,t)}function mf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var bZ=cI,xZ=DA,wZ=fI,SZ=dI,_Z=LA,AZ=hI,EZ=yv,OZ=mI,jZ=gI,TZ=bI,CZ=wI,RZ=SI,NZ=_I,MZ=EI,PZ=jI,bv="DropdownMenu",[DZ]=pa(bv,[sI]),fr=sI(),[kZ,CI]=DZ(bv),RI=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=fr(t),d=y.useRef(null),[m,h]=Co({prop:a,defaultProp:o??!1,onChange:l,caller:bv});return v.jsx(kZ,{scope:t,triggerId:Na(),triggerRef:d,contentId:Na(),open:m,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(g=>!g),[h]),modal:c,children:v.jsx(bZ,{...f,open:m,onOpenChange:h,dir:r,modal:c,children:n})})};RI.displayName=bv;var NI="DropdownMenuTrigger",MI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=CI(NI,n),l=fr(n);return v.jsx(xZ,{asChild:!0,...l,children:v.jsx(et.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:ad(t,o.triggerRef),onPointerDown:ze(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:ze(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});MI.displayName=NI;var $Z="DropdownMenuPortal",PI=e=>{const{__scopeDropdownMenu:t,...n}=e,r=fr(t);return v.jsx(wZ,{...r,...n})};PI.displayName=$Z;var DI="DropdownMenuContent",kI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=CI(DI,n),o=fr(n),l=y.useRef(!1);return v.jsx(SZ,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:ze(e.onCloseAutoFocus,c=>{var f;l.current||(f=a.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:ze(e.onInteractOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,m=f.button===2||d;(!a.modal||m)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kI.displayName=DI;var zZ="DropdownMenuGroup",LZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(_Z,{...a,...r,ref:t})});LZ.displayName=zZ;var IZ="DropdownMenuLabel",$I=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(AZ,{...a,...r,ref:t})});$I.displayName=IZ;var BZ="DropdownMenuItem",zI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(EZ,{...a,...r,ref:t})});zI.displayName=BZ;var UZ="DropdownMenuCheckboxItem",LI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(OZ,{...a,...r,ref:t})});LI.displayName=UZ;var qZ="DropdownMenuRadioGroup",HZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(jZ,{...a,...r,ref:t})});HZ.displayName=qZ;var FZ="DropdownMenuRadioItem",II=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(TZ,{...a,...r,ref:t})});II.displayName=FZ;var VZ="DropdownMenuItemIndicator",BI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(CZ,{...a,...r,ref:t})});BI.displayName=VZ;var GZ="DropdownMenuSeparator",UI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(RZ,{...a,...r,ref:t})});UI.displayName=GZ;var WZ="DropdownMenuArrow",YZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(NZ,{...a,...r,ref:t})});YZ.displayName=WZ;var KZ="DropdownMenuSubTrigger",qI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(MZ,{...a,...r,ref:t})});qI.displayName=KZ;var ZZ="DropdownMenuSubContent",HI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fr(n);return v.jsx(PZ,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});HI.displayName=ZZ;var XZ=RI,QZ=MI,JZ=PI,FI=kI,VI=$I,GI=zI,WI=LI,YI=II,KI=BI,ZI=UI,XI=qI,QI=HI;const eX=XZ,tX=QZ,nX=y.forwardRef(({className:e,inset:t,children:n,...r},a)=>v.jsxs(XI,{ref:a,className:be("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,v.jsx(cA,{className:"ml-auto"})]}));nX.displayName=XI.displayName;const rX=y.forwardRef(({className:e,...t},n)=>v.jsx(QI,{ref:n,className:be("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));rX.displayName=QI.displayName;const JI=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(JZ,{children:v.jsx(FI,{ref:r,sideOffset:t,className:be("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));JI.displayName=FI.displayName;const mS=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(GI,{ref:r,className:be("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));mS.displayName=GI.displayName;const aX=y.forwardRef(({className:e,children:t,checked:n,...r},a)=>v.jsxs(WI,{ref:a,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(KI,{children:v.jsx(d5,{className:"h-4 w-4"})})}),t]}));aX.displayName=WI.displayName;const iX=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(YI,{ref:r,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(KI,{children:v.jsx(eV,{className:"h-2 w-2 fill-current"})})}),t]}));iX.displayName=YI.displayName;const oX=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(VI,{ref:r,className:be("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));oX.displayName=VI.displayName;const e3=y.forwardRef(({className:e,...t},n)=>v.jsx(ZI,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));e3.displayName=ZI.displayName;const vS="";async function tp(e,t,n,r){const a=await fetch(`${vS}${t}`,{method:e,credentials:"include",headers:{"Content-Type":"application/json",...r},body:n!=null?JSON.stringify(n):void 0});if(a.status===204)return{data:null,status:204};const o=await a.json().catch(()=>null);return a.ok?{data:o,status:a.status}:{data:null,status:a.status,error:(o==null?void 0:o.error)??"Request failed"}}const t3={get:e=>tp("GET",e),post:(e,t)=>tp("POST",e,t),patch:(e,t)=>tp("PATCH",e,t),delete:e=>tp("DELETE",e),upload:async(e,t)=>{const n=await fetch(`${vS}${e}`,{method:"POST",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}},uploadPatch:async(e,t)=>{const n=await fetch(`${vS}${e}`,{method:"PATCH",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}}};function UA(){const[e,t]=y.useState({user:null,loading:!0}),n=$a();return y.useEffect(()=>{let r=!1;return t3.get("/api/v1/auth/me").then(({data:a,status:o})=>{r||(o===401||!a?(t({user:null,loading:!1}),n("/login",{replace:!0})):t({user:a,loading:!1}))}),()=>{r=!0}},[n]),e}const sX=6;function lX(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)&4294967295;return Math.abs(t)}function qA(e){const t=lX(e)%sX+1;return{bg:`hsl(var(--avatar-${t}-bg))`,fg:`hsl(var(--avatar-${t}-fg))`}}function n3({name:e,avatarUrl:t,size:n=28}){const r=((e==null?void 0:e[0])??"?").toUpperCase(),a={width:n,height:n,borderRadius:"50%",flexShrink:0};if(t)return v.jsx("img",{src:t,alt:e,style:{...a,objectFit:"cover"}});const{bg:o,fg:l}=qA(e);return v.jsx("span",{style:{...a,background:o,display:"inline-flex",alignItems:"center",justifyContent:"center",color:l,fontSize:n*.42,fontWeight:600,userSelect:"none"},children:r})}const cX=[{label:"App Center",href:"/app-center",icon:p5},{label:"Mac Resources",href:"/mac-resources",icon:v5}],uX=[{label:"Default",href:"/settings/default",icon:b5,adminOnly:!1},{label:"Team",href:"/settings/team",icon:wV,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:iV,adminOnly:!0}],fX=[{label:"Docs",href:"https://www.tapflow.dev",icon:X7}];function dX(){const{pathname:e}=qr(),t=$a(),{user:n}=UA(),r=(n==null?void 0:n.role)==="Admin",{resolvedTheme:a}=wc(),o=a==="dark"?"/logo-dark.svg":"/logo.svg",[l,c]=y.useState(null),[f,d]=y.useState("tapflow");y.useEffect(()=>{fetch("/api/v1/settings",{credentials:"include"}).then(h=>h.ok?h.json():null).then(h=>{h!=null&&h.logo_url&&c(h.logo_url),h!=null&&h.team_name&&d(h.team_name)})},[]);async function m(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),t("/login",{replace:!0})}return v.jsxs(WL,{collapsible:"icon",children:[v.jsx(ZL,{className:"p-2",children:v.jsxs(Pl,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[v.jsx("img",{src:l??o,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),v.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:f})]})}),v.jsxs(QL,{children:[v.jsx(_p,{children:v.jsx(Ap,{children:v.jsx(Ep,{children:cX.map(h=>v.jsx(Op,{children:v.jsx(jp,{asChild:!0,isActive:e.startsWith(h.href),tooltip:h.label,children:v.jsxs(Pl,{to:h.href,children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})}),v.jsxs(_p,{children:[v.jsx(dS,{children:"Settings"}),v.jsx(Ap,{children:v.jsx(Ep,{children:uX.filter(h=>!h.adminOnly||r).map(h=>v.jsx(Op,{children:v.jsx(jp,{asChild:!0,isActive:e===h.href,tooltip:h.label,children:v.jsxs(Pl,{to:h.href,children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})]}),v.jsxs(_p,{children:[v.jsx(dS,{children:"Reference"}),v.jsx(Ap,{children:v.jsx(Ep,{children:fX.map(h=>v.jsx(Op,{children:v.jsx(jp,{asChild:!0,tooltip:h.label,children:v.jsxs("a",{href:h.href,target:"_blank",rel:"noopener noreferrer",children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})]})]}),n&&v.jsx(XL,{className:"px-3 py-3",children:v.jsxs(eX,{children:[v.jsx(tX,{asChild:!0,children:v.jsxs("button",{className:"flex w-full items-center gap-2.5 rounded-md px-1 py-1 text-left hover:bg-sidebar-accent transition-colors group-data-[collapsible=icon]:justify-center",children:[v.jsx(n3,{name:n.displayName??"",avatarUrl:n.avatarUrl,size:28}),v.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[v.jsx("span",{className:"text-sm font-medium truncate",children:n.displayName}),v.jsx("span",{className:"text-xs text-muted-foreground truncate",children:n.email})]})]})}),v.jsxs(JI,{side:"top",align:"start",className:"w-56",children:[v.jsx(mS,{asChild:!0,children:v.jsxs(Pl,{to:"/settings/default",children:[v.jsx(b5,{className:"mr-2 h-4 w-4"}),"Settings"]})}),v.jsx(e3,{}),v.jsxs(mS,{onClick:m,className:"text-destructive focus:text-destructive",children:[v.jsx(lV,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})]})}function hX(){const{theme:e,setTheme:t}=wc();return v.jsxs(ct,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:[v.jsx(gV,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),v.jsx(uV,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})}const r3=y.createContext({node:null,setNode:()=>{}});function pX({children:e}){const[t,n]=y.useState(null),r=y.useMemo(()=>({node:t,setNode:n}),[t]);return v.jsx(r3.Provider,{value:r,children:e})}function HA(){return y.useContext(r3)}function mX(){const{node:e}=HA();return v.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[v.jsx(YL,{className:"-ml-1"}),v.jsx(Ja,{orientation:"vertical",className:"h-4"}),e,v.jsx("div",{className:"flex-1"}),v.jsx(hX,{}),v.jsx(Ja,{orientation:"vertical",className:"h-4"}),v.jsx("a",{href:"https://github.com/jo-duchan/tapflow",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent transition-colors","aria-label":"GitHub",children:v.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:v.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})})]})}function vX(){const{user:e,loading:t}=UA(),n=qr();return t?null:e?["/settings/team","/settings/tokens"].some(a=>n.pathname.startsWith(a))&&e.role!=="Admin"?v.jsx("div",{className:"flex h-screen items-center justify-center",children:v.jsxs("div",{className:"text-center space-y-2",children:[v.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"This page is only accessible to Admins."})]})}):v.jsx(pX,{children:v.jsxs(GL,{children:[v.jsx(dX,{}),v.jsxs(KL,{children:[v.jsx(mX,{}),v.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:v.jsx(CF,{})})]})]})}):v.jsx(r5,{to:"/login",replace:!0})}var gd=e=>e.type==="checkbox",ps=e=>e instanceof Date,lr=e=>e==null;const a3=e=>typeof e=="object";var mn=e=>!lr(e)&&!Array.isArray(e)&&a3(e)&&!ps(e),i3=e=>mn(e)&&e.target?gd(e.target)?e.target.checked:e.target.value:e,o3=(e,t)=>t.split(".").some((n,r,a)=>!isNaN(Number(n))&&e.has(a.slice(0,r).join("."))),gX=e=>{const t=e.constructor&&e.constructor.prototype;return mn(t)&&t.hasOwnProperty("isPrototypeOf")},FA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function yn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(FA&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(mn(e)&&gX(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=yn(e[a]));return r}var xv=e=>/^\w*$/.test(e),Jt=e=>e===void 0,VA=e=>Array.isArray(e)?e.filter(Boolean):[],GA=e=>VA(e.replace(/["|']|\]/g,"").split(/\.|\[/)),De=(e,t,n)=>{if(!t||!mn(e))return n;const a=(xv(t)?[t]:GA(t)).reduce((o,l)=>lr(o)?void 0:o[l],e);return Jt(a)||a===e?Jt(e[t])?n:e[t]:a},Nr=e=>typeof e=="boolean",nr=e=>typeof e=="function",zt=(e,t,n)=>{let r=-1;const a=xv(t)?[t]:GA(t),o=a.length,l=o-1;for(;++r<o;){const c=a[r];let f=n;if(r!==l){const d=e[c];f=mn(d)||Array.isArray(d)?d:isNaN(+a[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=f,e=e[c]}};const So={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Ea={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Sa={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Kb="form",s3="root",l3=L.createContext(null);l3.displayName="HookFormControlContext";const WA=()=>L.useContext(l3);var c3=(e,t,n,r=!0)=>{const a={};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return t._proxyFormState[l]!==Ea.all&&(t._proxyFormState[l]=!r||Ea.all),n&&(n[l]=!0),e[l]}});return a};const YA=typeof window<"u"?L.useLayoutEffect:L.useEffect;function yX(e){const t=WA(),{control:n=t,disabled:r,name:a,exact:o}=e||{},[l,c]=L.useState(()=>({...n._formState,defaultValues:n._defaultValues})),f=L.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return YA(()=>n._subscribe({name:a,formState:f.current,exact:o,callback:d=>{!r&&c({...n._formState,...d,defaultValues:n._defaultValues})}}),[a,r,o]),L.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),L.useMemo(()=>c3(l,n,f.current,!1),[l,n])}var ir=e=>typeof e=="string",gS=(e,t,n,r,a)=>ir(e)?(r&&t.watch.add(e),De(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),De(n,o))):(r&&(t.watchAll=!0),n),yS=e=>lr(e)||!a3(e);function Mr(e,t,n=new WeakSet){if(e===t)return!0;if(yS(e)||yS(t))return Object.is(e,t);if(ps(e)&&ps(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const o of r){const l=e[o];if(!(o in t))return!1;if(o!=="ref"){const c=t[o];if(ps(l)&&ps(c)||(mn(l)||Array.isArray(l))&&(mn(c)||Array.isArray(c))?!Mr(l,c,n):!Object.is(l,c))return!1}}return!0}function KA(e){const t=WA(),{control:n=t,name:r,defaultValue:a,disabled:o,exact:l,compute:c}=e||{},f=L.useRef(a),d=L.useRef(c),m=L.useRef(void 0),h=L.useRef(n),g=L.useRef(r);d.current=c;const[x,A]=L.useState(()=>{const R=n._getWatch(r,f.current);return d.current?d.current(R):R}),S=L.useCallback(R=>{const C=gS(r,n._names,R||n._formValues,!1,f.current);return d.current?d.current(C):C},[n._formValues,n._names,r]),w=L.useCallback(R=>{if(!o){const C=gS(r,n._names,R||n._formValues,!1,f.current);if(d.current){const T=d.current(C);Mr(T,m.current)||(A(T),m.current=T)}else A(C)}},[n._formValues,n._names,o,r]);YA(()=>((h.current!==n||!Mr(g.current,r))&&(h.current=n,g.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:R=>{w(R.values)}})),[n,l,r,w]),L.useEffect(()=>n._removeUnmounted());const E=h.current!==n,O=g.current,j=L.useMemo(()=>{if(o)return null;const R=!E&&!Mr(O,r);return E||R?S():null},[o,E,r,O,S]);return j!==null?j:x}function bX(e){const t=WA(),{name:n,disabled:r,control:a=t,shouldUnregister:o,defaultValue:l,exact:c=!0}=e,f=o3(a._names.array,n),d=L.useMemo(()=>De(a._formValues,n,De(a._defaultValues,n,l)),[a,n,l]),m=KA({control:a,name:n,defaultValue:d,exact:c}),h=yX({control:a,name:n,exact:c}),g=L.useRef(e),x=L.useRef(a.register(n,{...e.rules,value:m,...Nr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const A=L.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!De(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!De(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!De(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!De(h.validatingFields,n)},error:{enumerable:!0,get:()=>De(h.errors,n)}}),[h,n]),S=L.useCallback(j=>x.current.onChange({target:{value:i3(j),name:n},type:So.CHANGE}),[n]),w=L.useCallback(()=>x.current.onBlur({target:{value:De(a._formValues,n),name:n},type:So.BLUR}),[n,a._formValues]),E=L.useCallback(j=>{const R=De(a._fields,n);R&&R._f&&j&&(R._f.ref={focus:()=>nr(j.focus)&&j.focus(),select:()=>nr(j.select)&&j.select(),setCustomValidity:C=>nr(j.setCustomValidity)&&j.setCustomValidity(C),reportValidity:()=>nr(j.reportValidity)&&j.reportValidity()})},[a._fields,n]),O=L.useMemo(()=>({name:n,value:m,...Nr(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:S,onBlur:w,ref:E}),[n,r,h.disabled,S,w,E,m]);return L.useEffect(()=>{const j=a._options.shouldUnregister||o;a.register(n,{...g.current.rules,...Nr(g.current.disabled)?{disabled:g.current.disabled}:{}});const R=(C,T)=>{const N=De(a._fields,C);N&&N._f&&(N._f.mount=T)};if(R(n,!0),j){const C=yn(De(a._options.defaultValues,n,g.current.defaultValue));zt(a._defaultValues,n,C),Jt(De(a._formValues,n))&&zt(a._formValues,n,C)}return!f&&a.register(n),()=>{(f?j&&!a._state.action:j)?a.unregister(n):R(n,!1)}},[n,a,f,o]),L.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),L.useMemo(()=>({field:O,formState:h,fieldState:A}),[O,h,A])}const Hp=e=>e.render(bX(e)),xX=L.createContext(null);xX.displayName="HookFormContext";var ZA=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},rf=e=>Array.isArray(e)?e:[e],uR=()=>{let e=[];return{get observers(){return e},next:a=>{for(const o of e)o.next&&o.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(o=>o!==a)}}),unsubscribe:()=>{e=[]}}};function u3(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],o=t[r];if(a&&mn(a)&&o){const l=u3(a,o);mn(l)&&(n[r]=l)}else e[r]&&(n[r]=o)}return n}var er=e=>mn(e)&&!Object.keys(e).length,XA=e=>e.type==="file",Fp=e=>{if(!FA)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},f3=e=>e.type==="select-multiple",QA=e=>e.type==="radio",wX=e=>QA(e)||gd(e),Zb=e=>Fp(e)&&e.isConnected;function SX(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(lr(e)){e=void 0;break}e=e[t[r]],r++}return e}function _X(e){for(const t in e)if(e.hasOwnProperty(t)&&!Jt(e[t]))return!1;return!0}function An(e,t){if(ir(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:xv(t)?[t]:GA(t),r=n.length===1?e:SX(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(mn(r)&&er(r)||Array.isArray(r)&&_X(r))&&An(e,n.slice(0,-1)),e}var AX=e=>{for(const t in e)if(nr(e[t]))return!0;return!1};function d3(e){return Array.isArray(e)||mn(e)&&!AX(e)}function bS(e,t={}){for(const n in e){const r=e[n];d3(r)?(t[n]=Array.isArray(r)?[]:{},bS(r,t[n])):Jt(r)||(t[n]=!0)}return t}function xS(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>xS(n));return t.some(n=>n!==void 0)?t:void 0}if(mn(e)){const t={};for(const n in e){const r=xS(e[n]);Jt(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function Zu(e,t,n){n||(n=bS(t));for(const r in e){const a=e[r];if(d3(a))Jt(t)||yS(n[r])?n[r]=bS(a,Array.isArray(a)?[]:{}):Zu(a,lr(t)?{}:t[r],n[r]);else{const o=t[r];n[r]=!Mr(a,o)}}return xS(n)||{}}const fR={value:!1,isValid:!1},dR={value:!0,isValid:!0};var h3=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Jt(e[0].attributes.value)?Jt(e[0].value)||e[0].value===""?dR:{value:e[0].value,isValid:!0}:dR:fR}return fR},p3=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Jt(e)?e:t?e===""?NaN:e&&+e:n&&ir(e)?new Date(e):r?r(e):e;const hR={isValid:!1,value:null};var m3=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,hR):hR;function pR(e){const t=e.ref;return XA(t)?t.files:QA(t)?m3(e.refs).value:f3(t)?[...t.selectedOptions].map(({value:n})=>n):gd(t)?h3(e.refs).value:p3(Jt(t.value)?e.ref.value:t.value,e)}var EX=(e,t,n,r)=>{const a={};for(const o of e){const l=De(t,o);l&&zt(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Vp=e=>e instanceof RegExp,zu=e=>Jt(e)?e:Vp(e)?e.source:mn(e)?Vp(e.value)?e.value.source:e.value:e,mR=e=>({isOnSubmit:!e||e===Ea.onSubmit,isOnBlur:e===Ea.onBlur,isOnChange:e===Ea.onChange,isOnAll:e===Ea.all,isOnTouch:e===Ea.onTouched});const vR="AsyncFunction";var OX=e=>!!e&&!!e.validate&&!!(nr(e.validate)&&e.validate.constructor.name===vR||mn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===vR)),jX=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),gR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const af=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=De(e,a);if(o){const{_f:l,...c}=o;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(af(c,t))break}else if(mn(c)&&af(c,t))break}}};function yR(e,t,n){const r=De(e,n);if(r||xv(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=De(t,o),c=De(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(c&&c.type)return{name:o,error:c};if(c&&c.root&&c.root.type)return{name:`${o}.root`,error:c.root};a.pop()}return{name:n}}var TX=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return er(o)||r&&Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||Ea.all))},CX=(e,t,n)=>!e||!t||e===t||rf(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),RX=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,NX=(e,t)=>!VA(De(e,t)).length&&An(e,t),MX=(e,t,n)=>{const r=rf(De(e,n));return zt(r,s3,t[n]),zt(e,n,r),e};function bR(e,t,n="validate"){if(ir(e)||Array.isArray(e)&&e.every(ir)||Nr(e)&&!e)return{type:n,message:ir(e)?e:"",ref:t}}var Cl=e=>mn(e)&&!Vp(e)?e:{value:e,message:""},xR=async(e,t,n,r,a,o)=>{const{ref:l,refs:c,required:f,maxLength:d,minLength:m,min:h,max:g,pattern:x,validate:A,name:S,valueAsNumber:w,mount:E}=e._f,O=De(n,S);if(!E||t.has(S))return{};const j=c?c[0]:l,R=P=>{a&&j.reportValidity&&(j.setCustomValidity(Nr(P)?"":P||""),j.reportValidity())},C={},T=QA(l),N=gd(l),D=T||N,z=(w||XA(l))&&Jt(l.value)&&Jt(O)||Fp(l)&&l.value===""||O===""||Array.isArray(O)&&!O.length||w&&typeof O=="number"&&isNaN(O),G=ZA.bind(null,S,r,C),U=(P,B,q,W=Sa.maxLength,$=Sa.minLength)=>{const V=P?B:q;C[S]={type:P?W:$,message:V,ref:l,...G(P?W:$,V)}};if(o?!Array.isArray(O)||!O.length:f&&(!D&&(z||lr(O))||Nr(O)&&!O||N&&!h3(c).isValid||T&&!m3(c).isValid)){const{value:P,message:B}=ir(f)?{value:!!f,message:f}:Cl(f);if(P&&(C[S]={type:Sa.required,message:B,ref:j,...G(Sa.required,B)},!r))return R(B),C}if(!z&&(!lr(h)||!lr(g))){let P,B;const q=Cl(g),W=Cl(h);if(!lr(O)&&!isNaN(O)){const $=l.valueAsNumber||O&&+O;lr(q.value)||(P=$>q.value),lr(W.value)||(B=$<W.value)}else{const $=l.valueAsDate||new Date(O),V=ie=>new Date(new Date().toDateString()+" "+ie),F=l.type=="time",K=l.type=="week";ir(q.value)&&O&&(P=F?V(O)>V(q.value):K?O>q.value:$>new Date(q.value)),ir(W.value)&&O&&(B=F?V(O)<V(W.value):K?O<W.value:$<new Date(W.value))}if((P||B)&&(U(!!P,q.message,W.message,Sa.max,Sa.min),!r))return R(C[S].message),C}if((d||m)&&!z&&(ir(O)||o&&Array.isArray(O))){const P=Cl(d),B=Cl(m),q=!lr(P.value)&&O.length>+P.value,W=!lr(B.value)&&O.length<+B.value;if((q||W)&&(U(q,P.message,B.message),!r))return R(C[S].message),C}if(x&&!z&&ir(O)){const{value:P,message:B}=Cl(x);if(Vp(P)&&!O.match(P)&&(C[S]={type:Sa.pattern,message:B,ref:l,...G(Sa.pattern,B)},!r))return R(B),C}if(A){if(nr(A)){const P=await A(O,n),B=bR(P,j);if(B&&(C[S]={...B,...G(Sa.validate,B.message)},!r))return R(B.message),C}else if(mn(A)){let P={};for(const B in A){if(!er(P)&&!r)break;const q=bR(await A[B](O,n),j,B);q&&(P={...q,...G(B,q.message)},R(q.message),r&&(C[S]=P))}if(!er(P)&&(C[S]={ref:j,...P},!r))return C}}return R(!0),C};const PX={mode:Ea.onSubmit,reValidateMode:Ea.onChange,shouldFocusError:!0},v3={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function DX(e={}){let t={...PX,...e},n={...yn(v3),isLoading:nr(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},a=mn(t.defaultValues)||mn(t.values)?yn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:yn(a),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},f,d=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...m};let g={...h};const x={array:uR(),state:uR()},A=t.criteriaMode===Ea.all,S=H=>J=>{clearTimeout(d),d=setTimeout(H,J)},w=async H=>{if(!l.keepIsValid&&!t.disabled&&(h.isValid||g.isValid||H)){let J;t.resolver?(J=er((await z()).errors),E()):J=await P({fields:r,onlyCheckValid:!0,eventType:So.VALID}),J!==n.isValid&&x.state.next({isValid:J})}},E=(H,J)=>{!t.disabled&&(h.isValidating||h.validatingFields||g.isValidating||g.validatingFields)&&((H||Array.from(c.mount)).forEach(re=>{re&&(J?zt(n.validatingFields,re,J):An(n.validatingFields,re))}),x.state.next({validatingFields:n.validatingFields,isValidating:!er(n.validatingFields)}))},O=()=>{n.dirtyFields=Zu(a,o)},j=(H,J=[],re,Ce,je=!0,Oe=!0)=>{if(Ce&&re&&!t.disabled){if(l.action=!0,Oe&&Array.isArray(De(r,H))){const Pe=re(De(r,H),Ce.argA,Ce.argB);je&&zt(r,H,Pe)}if(Oe&&Array.isArray(De(n.errors,H))){const Pe=re(De(n.errors,H),Ce.argA,Ce.argB);je&&zt(n.errors,H,Pe),NX(n.errors,H)}if((h.touchedFields||g.touchedFields)&&Oe&&Array.isArray(De(n.touchedFields,H))){const Pe=re(De(n.touchedFields,H),Ce.argA,Ce.argB);je&&zt(n.touchedFields,H,Pe)}(h.dirtyFields||g.dirtyFields)&&O(),x.state.next({name:H,isDirty:q(H,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else zt(o,H,J)},R=(H,J)=>{zt(n.errors,H,J),x.state.next({errors:n.errors})},C=H=>{n.errors=H,x.state.next({errors:n.errors,isValid:!1})},T=(H,J,re,Ce)=>{const je=De(r,H);if(je){const Oe=Jt(De(o,H)),Pe=De(o,H,Jt(re)?De(a,H):re);Jt(Pe)||Ce&&Ce.defaultChecked||J?zt(o,H,J?Pe:pR(je._f)):V(H,Pe),l.mount&&!l.action&&(w(),Oe&&n.isDirty&&(h.isDirty||g.isDirty)&&(q()||(n.isDirty=!1,x.state.next({...n}))))}},N=(H,J,re,Ce,je)=>{let Oe=!1,Pe=!1;const Fe={name:H};if(!t.disabled){if(!re||Ce){(h.isDirty||g.isDirty)&&(Pe=n.isDirty,n.isDirty=Fe.isDirty=q(),Oe=Pe!==Fe.isDirty);const Xe=Mr(De(a,H),J);Pe=!!De(n.dirtyFields,H),Xe?An(n.dirtyFields,H):zt(n.dirtyFields,H,!0),Fe.dirtyFields=n.dirtyFields,Oe=Oe||(h.dirtyFields||g.dirtyFields)&&Pe!==!Xe}if(re){const Xe=De(n.touchedFields,H);Xe||(zt(n.touchedFields,H,re),Fe.touchedFields=n.touchedFields,Oe=Oe||(h.touchedFields||g.touchedFields)&&Xe!==re)}Oe&&je&&x.state.next(Fe)}return Oe?Fe:{}},D=(H,J,re,Ce)=>{const je=De(n.errors,H),Oe=(h.isValid||g.isValid)&&Nr(J)&&n.isValid!==J;if(t.delayError&&re?(f=S(()=>R(H,re)),f(t.delayError)):(clearTimeout(d),f=null,re?zt(n.errors,H,re):An(n.errors,H)),(re?!Mr(je,re):je)||!er(Ce)||Oe){const Pe={...Ce,...Oe&&Nr(J)?{isValid:J}:{},errors:n.errors,name:H};n={...n,...Pe},x.state.next(Pe)}},z=async H=>(E(H,!0),await t.resolver(o,t.context,EX(H||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),G=async H=>{const{errors:J}=await z(H);if(E(H),H)for(const re of H){const Ce=De(J,re);Ce?zt(n.errors,re,Ce):An(n.errors,re)}else n.errors=J;return J},U=async({name:H,eventType:J})=>{if(e.validate){const re=await e.validate({formValues:o,formState:n,name:H,eventType:J});if(mn(re))for(const Ce in re)re[Ce]&&me(`${Kb}.${Ce}`,{message:ir(re.message)?re.message:"",type:Sa.validate});else ir(re)||!re?me(Kb,{message:re||"",type:Sa.validate}):Ee(Kb);return re}return!0},P=async({fields:H,onlyCheckValid:J,name:re,eventType:Ce,context:je={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(je.runRootValidation=!0,!await U({name:re,eventType:Ce})&&(je.valid=!1,J)))return je.valid;for(const Oe in H){const Pe=H[Oe];if(Pe){const{_f:Fe,...Xe}=Pe;if(Fe){const St=c.array.has(Fe.name),wt=Pe._f&&OX(Pe._f);wt&&h.validatingFields&&E([Fe.name],!0);const Mt=await xR(Pe,c.disabled,o,A,t.shouldUseNativeValidation&&!J,St);if(wt&&h.validatingFields&&E([Fe.name]),Mt[Fe.name]&&(je.valid=!1,J)||(!J&&(De(Mt,Fe.name)?St?MX(n.errors,Mt,Fe.name):zt(n.errors,Fe.name,Mt[Fe.name]):An(n.errors,Fe.name)),e.shouldUseNativeValidation&&Mt[Fe.name]))break}!er(Xe)&&await P({context:je,onlyCheckValid:J,fields:Xe,name:Oe,eventType:Ce})}}return je.valid},B=()=>{for(const H of c.unMount){const J=De(r,H);J&&(J._f.refs?J._f.refs.every(re=>!Zb(re)):!Zb(J._f.ref))&&Ae(H)}c.unMount=new Set},q=(H,J)=>!t.disabled&&(H&&J&&zt(o,H,J),!Mr(oe(),a)),W=(H,J,re)=>gS(H,c,{...l.mount?o:Jt(J)?a:ir(H)?{[H]:J}:J},re,J),$=H=>VA(De(l.mount?o:a,H,t.shouldUnregister?De(a,H,[]):[])),V=(H,J,re={})=>{const Ce=De(r,H);let je=J;if(Ce){const Oe=Ce._f;Oe&&(!Oe.disabled&&zt(o,H,p3(J,Oe)),je=Fp(Oe.ref)&&lr(J)?"":J,f3(Oe.ref)?[...Oe.ref.options].forEach(Pe=>Pe.selected=je.includes(Pe.value)):Oe.refs?gd(Oe.ref)?Oe.refs.forEach(Pe=>{(!Pe.defaultChecked||!Pe.disabled)&&(Array.isArray(je)?Pe.checked=!!je.find(Fe=>Fe===Pe.value):Pe.checked=je===Pe.value||!!je)}):Oe.refs.forEach(Pe=>Pe.checked=Pe.value===je):XA(Oe.ref)?Oe.ref.value="":(Oe.ref.value=je,Oe.ref.type||x.state.next({name:H,values:yn(o)})))}(re.shouldDirty||re.shouldTouch)&&N(H,je,re.shouldTouch,re.shouldDirty,!0),re.shouldValidate&&X(H)},F=(H,J,re)=>{for(const Ce in J){if(!J.hasOwnProperty(Ce))return;const je=J[Ce],Oe=H+"."+Ce,Pe=De(r,Oe);(c.array.has(H)||mn(je)||Pe&&!Pe._f)&&!ps(je)?F(Oe,je,re):V(Oe,je,re)}},K=(H,J,re={})=>{const Ce=De(r,H),je=c.array.has(H),Oe=yn(J),Pe=De(o,H),Fe=Mr(Pe,Oe);if(zt(o,H,Oe),je)x.array.next({name:H,values:yn(o)}),(h.isDirty||h.dirtyFields||g.isDirty||g.dirtyFields)&&re.shouldDirty&&(O(),x.state.next({name:H,dirtyFields:n.dirtyFields,isDirty:q(H,Oe)}));else{const Xe=Array.isArray(Oe)&&!Oe.length||er(Oe);!Ce||Ce._f||lr(Oe)||Xe?V(H,Oe,re):F(H,Oe,re)}if(!Fe){const Xe=gR(H,c);x.state.next({...Xe&&n,name:l.mount||Xe?H:void 0,values:yn(o)})}},ie=H=>{const J=nr(H)?H(o):H;Mr(o,J)||(o={...o,...J},x.state.next({...n,values:o}))},I=async H=>{l.mount=!0;const J=H.target;let re=J.name,Ce=!0;const je=De(r,re),Oe=Xe=>{Ce=Number.isNaN(Xe)||ps(Xe)&&isNaN(Xe.getTime())||Mr(Xe,De(o,re,Xe))},Pe=mR(t.mode),Fe=mR(t.reValidateMode);if(je){let Xe,St;const wt=J.type?pR(je._f):i3(H),Mt=H.type===So.BLUR||H.type===So.FOCUS_OUT,Ft=!jX(je._f)&&!e.validate&&!t.resolver&&!De(n.errors,re)&&!je._f.deps||RX(Mt,De(n.touchedFields,re),n.isSubmitted,Fe,Pe),Hr=gR(re,c,Mt);zt(o,re,wt),Mt?(!J||!J.readOnly)&&(je._f.onBlur&&je._f.onBlur(H),f&&f(0)):je._f.onChange&&je._f.onChange(H);const Fr=N(re,wt,Mt),Rn=!er(Fr)||Hr;if(!Mt&&x.state.next({name:re,type:H.type,values:yn(o)}),Ft)return(h.isValid||g.isValid)&&(t.mode==="onBlur"?Mt&&w():Mt||w()),Rn&&x.state.next({name:re,...Hr?{}:Fr});if(!t.resolver&&e.validate&&await U({name:re,eventType:H.type}),!Mt&&Hr&&x.state.next({...n}),t.resolver){const{errors:Un}=await z([re]);if(E([re]),Oe(wt),Ce){const Qn=yR(n.errors,r,re),qn=yR(Un,r,Qn.name||re);Xe=qn.error,re=qn.name,St=er(Un)}}else E([re],!0),Xe=(await xR(je,c.disabled,o,A,t.shouldUseNativeValidation))[re],E([re]),Oe(wt),Ce&&(Xe?St=!1:(h.isValid||g.isValid)&&(St=await P({fields:r,onlyCheckValid:!0,name:re,eventType:H.type})));Ce&&(je._f.deps&&(!Array.isArray(je._f.deps)||je._f.deps.length>0)&&X(je._f.deps),D(re,St,Xe,Fr))}},Z=(H,J)=>{if(De(n.errors,J)&&H.focus)return H.focus(),1},X=async(H,J={})=>{let re,Ce;const je=rf(H);if(t.resolver){const Oe=await G(Jt(H)?H:je);re=er(Oe),Ce=H?!je.some(Pe=>De(Oe,Pe)):re}else H?(Ce=(await Promise.all(je.map(async Oe=>{const Pe=De(r,Oe);return await P({fields:Pe&&Pe._f?{[Oe]:Pe}:Pe,eventType:So.TRIGGER})}))).every(Boolean),!(!Ce&&!n.isValid)&&w()):Ce=re=await P({fields:r,name:H,eventType:So.TRIGGER});return x.state.next({...!ir(H)||(h.isValid||g.isValid)&&re!==n.isValid?{}:{name:H},...t.resolver||!H?{isValid:re}:{},errors:n.errors}),J.shouldFocus&&!Ce&&af(r,Z,H?je:c.mount),Ce},oe=(H,J)=>{let re={...l.mount?o:a};return J&&(re=u3(J.dirtyFields?n.dirtyFields:n.touchedFields,re)),Jt(H)?re:ir(H)?De(re,H):H.map(Ce=>De(re,Ce))},ge=(H,J)=>({invalid:!!De((J||n).errors,H),isDirty:!!De((J||n).dirtyFields,H),error:De((J||n).errors,H),isValidating:!!De(n.validatingFields,H),isTouched:!!De((J||n).touchedFields,H)}),Ee=H=>{const J=H?rf(H):void 0;J==null||J.forEach(re=>An(n.errors,re)),J?J.forEach(re=>{x.state.next({name:re,errors:n.errors})}):x.state.next({errors:{}})},me=(H,J,re)=>{const Ce=(De(r,H,{_f:{}})._f||{}).ref,je=De(n.errors,H)||{},{ref:Oe,message:Pe,type:Fe,...Xe}=je;zt(n.errors,H,{...Xe,...J,ref:Ce}),x.state.next({name:H,errors:n.errors,isValid:!1}),re&&re.shouldFocus&&Ce&&Ce.focus&&Ce.focus()},we=(H,J)=>nr(H)?x.state.subscribe({next:re=>"values"in re&&H(re.values||W(void 0,J),re)}):W(H,J,!0),ce=H=>x.state.subscribe({next:J=>{if(CX(H.name,J.name,H.exact)&&TX(J,H.formState||h,tn,H.reRenderRoot)){const re={...o};H.callback({values:re,...n,...J,defaultValues:a})}}}).unsubscribe,_e=H=>(l.mount=!0,g={...g,...H.formState},ce({...H,formState:{...m,...H.formState}})),Ae=(H,J={})=>{for(const re of H?rf(H):c.mount)c.mount.delete(re),c.array.delete(re),J.keepValue||(An(r,re),An(o,re)),!J.keepError&&An(n.errors,re),!J.keepDirty&&An(n.dirtyFields,re),!J.keepTouched&&An(n.touchedFields,re),!J.keepIsValidating&&An(n.validatingFields,re),!t.shouldUnregister&&!J.keepDefaultValue&&An(a,re);x.state.next({values:yn(o)}),x.state.next({...n,...J.keepDirty?{isDirty:q()}:{}}),!J.keepIsValid&&w()},se=({disabled:H,name:J})=>{if(Nr(H)&&l.mount||H||c.disabled.has(J)){const je=c.disabled.has(J)!==!!H;H?c.disabled.add(J):c.disabled.delete(J),je&&l.mount&&!l.action&&w()}},He=(H,J={})=>{let re=De(r,H);const Ce=Nr(J.disabled)||Nr(t.disabled),je=!c.registerName.has(H)&&re&&re._f&&!re._f.mount;return zt(r,H,{...re||{},_f:{...re&&re._f?re._f:{ref:{name:H}},name:H,mount:!0,...J}}),c.mount.add(H),re&&!je?se({disabled:Nr(J.disabled)?J.disabled:t.disabled,name:H}):T(H,!0,J.value),{...Ce?{disabled:J.disabled||t.disabled}:{},...t.progressive?{required:!!J.required,min:zu(J.min),max:zu(J.max),minLength:zu(J.minLength),maxLength:zu(J.maxLength),pattern:zu(J.pattern)}:{},name:H,onChange:I,onBlur:I,ref:Oe=>{if(Oe){c.registerName.add(H),He(H,J),c.registerName.delete(H),re=De(r,H);const Pe=Jt(Oe.value)&&Oe.querySelectorAll&&Oe.querySelectorAll("input,select,textarea")[0]||Oe,Fe=wX(Pe),Xe=re._f.refs||[];if(Fe?Xe.find(St=>St===Pe):Pe===re._f.ref)return;zt(r,H,{_f:{...re._f,...Fe?{refs:[...Xe.filter(Zb),Pe,...Array.isArray(De(a,H))?[{}]:[]],ref:{type:Pe.type,name:H}}:{ref:Pe}}}),T(H,!1,void 0,Pe)}else re=De(r,H,{}),re._f&&(re._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(o3(c.array,H)&&l.action)&&c.unMount.add(H)}}},$e=()=>t.shouldFocusError&&af(r,Z,c.mount),Je=H=>{Nr(H)&&(x.state.next({disabled:H}),af(r,(J,re)=>{const Ce=De(r,re);Ce&&(J.disabled=Ce._f.disabled||H,Array.isArray(Ce._f.refs)&&Ce._f.refs.forEach(je=>{je.disabled=Ce._f.disabled||H}))},0,!1))},We=(H,J)=>async re=>{let Ce;re&&(re.preventDefault&&re.preventDefault(),re.persist&&re.persist());let je=yn(o);if(x.state.next({isSubmitting:!0}),t.resolver){const{errors:Oe,values:Pe}=await z();E(),n.errors=Oe,je=yn(Pe)}else await P({fields:r,eventType:So.SUBMIT});if(c.disabled.size)for(const Oe of c.disabled)An(je,Oe);if(An(n.errors,s3),er(n.errors)){x.state.next({errors:{}});try{await H(je,re)}catch(Oe){Ce=Oe}}else J&&await J({...n.errors},re),$e(),setTimeout($e);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:er(n.errors)&&!Ce,submitCount:n.submitCount+1,errors:n.errors}),Ce)throw Ce},at=(H,J={})=>{De(r,H)&&(Jt(J.defaultValue)?K(H,yn(De(a,H))):(K(H,J.defaultValue),zt(a,H,yn(J.defaultValue))),J.keepTouched||An(n.touchedFields,H),J.keepDirty||(An(n.dirtyFields,H),n.isDirty=J.defaultValue?q(H,yn(De(a,H))):q()),J.keepError||(An(n.errors,H),h.isValid&&w()),x.state.next({...n}))},Rt=(H,J={})=>{const re=H?yn(H):a,Ce=yn(re),je=er(H),Oe=je?a:Ce;if(J.keepDefaultValues||(a=re),!J.keepValues){if(J.keepDirtyValues){const Pe=new Set([...c.mount,...Object.keys(Zu(a,o))]);for(const Fe of Array.from(Pe)){const Xe=De(n.dirtyFields,Fe),St=De(o,Fe),wt=De(Oe,Fe);Xe&&!Jt(St)?zt(Oe,Fe,St):!Xe&&!Jt(wt)&&K(Fe,wt)}}else{if(FA&&Jt(H))for(const Pe of c.mount){const Fe=De(r,Pe);if(Fe&&Fe._f){const Xe=Array.isArray(Fe._f.refs)?Fe._f.refs[0]:Fe._f.ref;if(Fp(Xe)){const St=Xe.closest("form");if(St){St.reset();break}}}}if(J.keepFieldsRef)for(const Pe of c.mount)K(Pe,De(Oe,Pe));else r={}}o=t.shouldUnregister?J.keepDefaultValues?yn(a):{}:yn(Oe),x.array.next({values:{...Oe}}),x.state.next({values:{...Oe}})}c={mount:J.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!J.keepIsValid||!!J.keepDirtyValues||!t.shouldUnregister&&!er(Oe),l.watch=!!t.shouldUnregister,l.keepIsValid=!!J.keepIsValid,l.action=!1,J.keepErrors||(n.errors={}),x.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:je?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!Mr(H,a)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:J.keepDirtyValues?J.keepDefaultValues&&o?Zu(a,o):n.dirtyFields:J.keepDefaultValues&&H?Zu(a,H):J.keepDirty?n.dirtyFields:{},touchedFields:J.keepTouched?n.touchedFields:{},errors:J.keepErrors?n.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},ft=(H,J)=>Rt(nr(H)?H(o):H,{...t.resetOptions,...J}),bn=(H,J={})=>{const re=De(r,H),Ce=re&&re._f;if(Ce){const je=Ce.refs?Ce.refs[0]:Ce.ref;je.focus&&setTimeout(()=>{je.focus(),J.shouldSelect&&nr(je.select)&&je.select()})}},tn=H=>{n={...n,...H}},ln={control:{register:He,unregister:Ae,getFieldState:ge,handleSubmit:We,setError:me,_subscribe:ce,_runSchema:z,_updateIsValidating:E,_focusError:$e,_getWatch:W,_getDirty:q,_setValid:w,_setFieldArray:j,_setDisabledField:se,_setErrors:C,_getFieldArray:$,_reset:Rt,_resetDefaultValues:()=>nr(t.defaultValues)&&t.defaultValues().then(H=>{ft(H,t.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:B,_disableForm:Je,_subjects:x,_proxyFormState:h,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(H){l=H},get _defaultValues(){return a},get _names(){return c},set _names(H){c=H},get _formState(){return n},get _options(){return t},set _options(H){t={...t,...H}}},subscribe:_e,trigger:X,register:He,handleSubmit:We,watch:we,setValue:K,setValues:ie,getValues:oe,reset:ft,resetField:at,clearErrors:Ee,unregister:Ae,setError:me,setFocus:bn,getFieldState:ge};return{...ln,formControl:ln}}function Ci(e={}){const t=L.useRef(void 0),n=L.useRef(void 0),[r,a]=L.useState(()=>({...yn(v3),isLoading:nr(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:nr(e.defaultValues)?void 0:e.defaultValues}));if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!nr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=DX(e);t.current={...c,formState:r}}const o=t.current.control;return o._options=e,YA(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:!0});return a(c=>({...c,isReady:!0})),o._formState.isReady=!0,l},[o]),L.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),L.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),L.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),L.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),L.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),L.useEffect(()=>{var l;e.values&&!Mr(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((l=o._options.resetOptions)===null||l===void 0)&&l.keepIsValid||o._setValid(),n.current=e.values,a(c=>({...c}))):o._resetDefaultValues()},[o,e.values]),L.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=L.useMemo(()=>c3(r,o),[o,r]),t.current}const wR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=De(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},wS=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?wR(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>wR(a,n,e))}},SR=(e,t)=>{t.shouldUseNativeValidation&&wS(e,t);const n={};for(const r in e){const a=De(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if(kX(t.names||Object.keys(e),r)){const l=Object.assign({},De(n,r));zt(l,"root",o),zt(n,r,l)}else zt(n,r,o)}return n},kX=(e,t)=>{const n=_R(t);return e.some(r=>_R(r).match(`^${n}\\.\\d+`))};function _R(e){return e.replace(/\]|\[/g,"")}var AR;function xe(e,t,n){function r(c,f){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:f,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,f);const d=l.prototype,m=Object.keys(d);for(let h=0;h<m.length;h++){const g=m[h];g in c||(c[g]=d[g].bind(c))}}const a=(n==null?void 0:n.Parent)??Object;class o extends a{}Object.defineProperty(o,"name",{value:e});function l(c){var f;const d=n!=null&&n.Parent?new o:this;r(d,c),(f=d._zod).deferred??(f.deferred=[]);for(const m of d._zod.deferred)m();return d}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>{var f,d;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(d=(f=c==null?void 0:c._zod)==null?void 0:f.traits)==null?void 0:d.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class Ul extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class g3 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(AR=globalThis).__zod_globalConfig??(AR.__zod_globalConfig={});const JA=globalThis.__zod_globalConfig;function As(e){return JA}function y3(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function SS(e,t){return typeof t=="bigint"?t.toString():t}function eE(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function tE(e){return e==null}function nE(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const ER=Symbol("evaluating");function qt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ER)return r===void 0&&(r=ER,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function zs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Do(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function OR(e){return JSON.stringify(e)}function $X(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const b3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const zX=eE(()=>{var e;if(JA.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function vf(e){if(Gp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Gp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function x3(e){return vf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const LX=new Set(["string","number","symbol"]);function wv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ko(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Qe(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function IX(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function BX(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Do(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return zs(this,"shape",l),l},checks:[]});return ko(e,o)}function UX(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Do(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return zs(this,"shape",l),l},checks:[]});return ko(e,o)}function qX(e,t){if(!vf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(o,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Do(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return zs(this,"shape",o),o}});return ko(e,a)}function HX(e,t){if(!vf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Do(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return zs(this,"shape",r),r}});return ko(e,n)}function FX(e,t){var r;if((r=e._zod.def.checks)!=null&&r.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Do(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return zs(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ko(e,n)}function VX(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Do(t._zod.def,{get shape(){const c=t._zod.def.shape,f={...c};if(n)for(const d in n){if(!(d in c))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(f[d]=e?new e({type:"optional",innerType:c[d]}):c[d])}else for(const d in c)f[d]=e?new e({type:"optional",innerType:c[d]}):c[d];return zs(this,"shape",f),f},checks:[]});return ko(t,l)}function GX(e,t,n){const r=Do(t._zod.def,{get shape(){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)o[l]=new e({type:"nonoptional",innerType:a[l]});return zs(this,"shape",o),o}});return ko(t,r)}function Dl(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function WX(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function w3(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function np(e){return typeof e=="string"?e:e==null?void 0:e.message}function Es(e,t,n){var f,d,m,h,g,x;const r=e.message?e.message:np((m=(d=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:d.error)==null?void 0:m.call(d,e))??np((h=t==null?void 0:t.error)==null?void 0:h.call(t,e))??np((g=n.customError)==null?void 0:g.call(n,e))??np((x=n.localeError)==null?void 0:x.call(n,e))??"Invalid input",{inst:a,continue:o,input:l,...c}=e;return c.path??(c.path=[]),c.message=r,t!=null&&t.reportInput&&(c.input=l),c}function rE(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const S3=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,SS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},aE=xe("$ZodError",S3),Sv=xe("$ZodError",S3,{Parent:Error});function YX(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function KX(e,t=n=>n.message){const n={_errors:[]},r=(a,o=[])=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>r({issues:c},[...o,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...o,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...o,...l.path]);else{const c=[...o,...l.path];if(c.length===0)n._errors.push(t(l));else{let f=n,d=0;for(;d<c.length;){const m=c[d];d===c.length-1?(f[m]=f[m]||{_errors:[]},f[m]._errors.push(t(l))):f[m]=f[m]||{_errors:[]},f=f[m],d++}}}};return r(e),n}const _v=e=>(t,n,r,a)=>{const o=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new Ul;if(l.issues.length){const c=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>Es(f,o,As())));throw b3(c,a==null?void 0:a.callee),c}return l.value},ZX=_v(Sv),Av=e=>async(t,n,r,a)=>{const o=r?{...r,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>Es(f,o,As())));throw b3(c,a==null?void 0:a.callee),c}return l.value},XX=Av(Sv),Ev=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ul;return o.issues.length?{success:!1,error:new(e??aE)(o.issues.map(l=>Es(l,a,As())))}:{success:!0,data:o.value}},QX=Ev(Sv),Ov=e=>async(t,n,r)=>{const a=r?{...r,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(l=>Es(l,a,As())))}:{success:!0,data:o.value}},JX=Ov(Sv),eQ=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return _v(e)(t,n,a)},tQ=e=>(t,n,r)=>_v(e)(t,n,r),nQ=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Av(e)(t,n,a)},rQ=e=>async(t,n,r)=>Av(e)(t,n,r),aQ=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Ev(e)(t,n,a)},iQ=e=>(t,n,r)=>Ev(e)(t,n,r),oQ=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Ov(e)(t,n,a)},sQ=e=>async(t,n,r)=>Ov(e)(t,n,r),lQ=/^[cC][0-9a-z]{6,}$/,cQ=/^[0-9a-z]+$/,uQ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fQ=/^[0-9a-vA-V]{20}$/,dQ=/^[A-Za-z0-9]{27}$/,hQ=/^[a-zA-Z0-9_-]{21}$/,pQ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mQ=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jR=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,vQ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,gQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function yQ(){return new RegExp(gQ,"u")}const bQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xQ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wQ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,SQ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_Q=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_3=/^[A-Za-z0-9_-]*$/,AQ=/^https?$/,EQ=/^\+[1-9]\d{6,14}$/,A3="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",OQ=new RegExp(`^${A3}$`);function E3(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function jQ(e){return new RegExp(`^${E3(e)}$`)}function TQ(e){const t=E3({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${A3}T(?:${r})$`)}const CQ=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},RQ=/^(?:true|false)$/i,NQ=/^[^A-Z]*$/,MQ=/^[^a-z]*$/,ni=xe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),PQ=xe("$ZodCheckMaxLength",(e,t)=>{var n;ni.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!tE(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const l=rE(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),DQ=xe("$ZodCheckMinLength",(e,t)=>{var n;ni.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!tE(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const l=rE(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),kQ=xe("$ZodCheckLengthEquals",(e,t)=>{var n;ni.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!tE(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,o=a.length;if(o===t.length)return;const l=rE(a),c=o>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),jv=xe("$ZodCheckStringFormat",(e,t)=>{var n,r;ni.init(e,t),e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),$Q=xe("$ZodCheckRegex",(e,t)=>{jv.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),zQ=xe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=NQ),jv.init(e,t)}),LQ=xe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=MQ),jv.init(e,t)}),IQ=xe("$ZodCheckIncludes",(e,t)=>{ni.init(e,t);const n=wv(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),BQ=xe("$ZodCheckStartsWith",(e,t)=>{ni.init(e,t);const n=new RegExp(`^${wv(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),UQ=xe("$ZodCheckEndsWith",(e,t)=>{ni.init(e,t);const n=new RegExp(`.*${wv(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),qQ=xe("$ZodCheckOverwrite",(e,t)=>{ni.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class HQ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
345
- `).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),o=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of o)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,a=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...n,a.join(`
346
- `))}}const FQ={major:4,minor:4,patch:3},Tn=xe("$ZodType",(e,t)=>{var a;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=FQ;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const l of o._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const o=(c,f,d)=>{let m=Dl(c),h;for(const g of f){if(g._zod.def.when){if(WX(c)||!g._zod.def.when(c))continue}else if(m)continue;const x=c.issues.length,A=g._zod.check(c);if(A instanceof Promise&&(d==null?void 0:d.async)===!1)throw new Ul;if(h||A instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await A,c.issues.length!==x&&(m||(m=Dl(c,x)))});else{if(c.issues.length===x)continue;m||(m=Dl(c,x))}}return h?h.then(()=>c):c},l=(c,f,d)=>{if(Dl(c))return c.aborted=!0,c;const m=o(f,r,d);if(m instanceof Promise){if(d.async===!1)throw new Ul;return m.then(h=>e._zod.parse(h,d))}return e._zod.parse(m,d)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){const m=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return m instanceof Promise?m.then(h=>l(h,c,f)):l(m,c,f)}const d=e._zod.parse(c,f);if(d instanceof Promise){if(f.async===!1)throw new Ul;return d.then(m=>o(m,r,f))}return o(d,r,f)}}qt(e,"~standard",()=>({validate:o=>{var l;try{const c=QX(e,o);return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}}catch{return JX(e,o).then(f=>{var d;return f.success?{value:f.data}:{issues:(d=f.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),iE=xe("$ZodString",(e,t)=>{var n;Tn.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??CQ(e._zod.bag),e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),sn=xe("$ZodStringFormat",(e,t)=>{jv.init(e,t),iE.init(e,t)}),VQ=xe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=mQ),sn.init(e,t)}),GQ=xe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=jR(r))}else t.pattern??(t.pattern=jR());sn.init(e,t)}),WQ=xe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=vQ),sn.init(e,t)}),YQ=xe("$ZodURL",(e,t)=>{sn.init(e,t),e._zod.check=n=>{var r;try{const a=n.value.trim();if(!t.normalize&&((r=t.protocol)==null?void 0:r.source)===AQ.source&&!/^https?:\/\//i.test(a)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const o=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),KQ=xe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=yQ()),sn.init(e,t)}),ZQ=xe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=hQ),sn.init(e,t)}),XQ=xe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=lQ),sn.init(e,t)}),QQ=xe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=cQ),sn.init(e,t)}),JQ=xe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=uQ),sn.init(e,t)}),eJ=xe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fQ),sn.init(e,t)}),tJ=xe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=dQ),sn.init(e,t)}),nJ=xe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=TQ(t)),sn.init(e,t)}),rJ=xe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=OQ),sn.init(e,t)}),aJ=xe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=jQ(t)),sn.init(e,t)}),iJ=xe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=pQ),sn.init(e,t)}),oJ=xe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=bQ),sn.init(e,t),e._zod.bag.format="ipv4"}),sJ=xe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xQ),sn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),lJ=xe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wQ),sn.init(e,t)}),cJ=xe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=SQ),sn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,o]=r;if(!o)throw new Error;const l=Number(o);if(`${l}`!==o)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function O3(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const uJ=xe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=_Q),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{O3(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function fJ(e){if(!_3.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return O3(n)}const dJ=xe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=_3),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{fJ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),hJ=xe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=EQ),sn.init(e,t)});function pJ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const mJ=xe("$ZodJWT",(e,t)=>{sn.init(e,t),e._zod.check=n=>{pJ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),vJ=xe("$ZodBoolean",(e,t)=>{Tn.init(e,t),e._zod.pattern=RQ,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),gJ=xe("$ZodUnknown",(e,t)=>{Tn.init(e,t),e._zod.parse=n=>n}),yJ=xe("$ZodNever",(e,t)=>{Tn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function TR(e,t,n){e.issues.length&&t.issues.push(...w3(n,e.issues)),t.value[n]=e.value}const bJ=xe("$ZodArray",(e,t)=>{Tn.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const o=[];for(let l=0;l<a.length;l++){const c=a[l],f=t.element._zod.run({value:c,issues:[]},r);f instanceof Promise?o.push(f.then(d=>TR(d,n,l))):TR(f,n,l)}return o.length?Promise.all(o).then(()=>n):n}});function Wp(e,t,n,r,a,o){const l=n in r;if(e.issues.length){if(a&&o&&!l)return;t.issues.push(...w3(n,e.issues))}if(!l&&!a){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function j3(e){var r,a,o,l;const t=Object.keys(e.shape);for(const c of t)if(!((l=(o=(a=(r=e.shape)==null?void 0:r[c])==null?void 0:a._zod)==null?void 0:o.traits)!=null&&l.has("$ZodType")))throw new Error(`Invalid element at key "${c}": expected a Zod schema`);const n=IX(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function T3(e,t,n,r,a,o){const l=[],c=a.keySet,f=a.catchall._zod,d=f.def.type,m=f.optin==="optional",h=f.optout==="optional";for(const g in t){if(g==="__proto__"||c.has(g))continue;if(d==="never"){l.push(g);continue}const x=f.run({value:t[g],issues:[]},r);x instanceof Promise?e.push(x.then(A=>Wp(A,n,g,t,m,h))):Wp(x,n,g,t,m,h)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const xJ=xe("$ZodObject",(e,t)=>{Tn.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...c};return Object.defineProperty(t,"shape",{value:f}),f}})}const r=eE(()=>j3(t));qt(e._zod,"propValues",()=>{const c=t.shape,f={};for(const d in c){const m=c[d]._zod;if(m.values){f[d]??(f[d]=new Set);for(const h of m.values)f[d].add(h)}}return f});const a=Gp,o=t.catchall;let l;e._zod.parse=(c,f)=>{l??(l=r.value);const d=c.value;if(!a(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value={};const m=[],h=l.shape;for(const g of l.keys){const x=h[g],A=x._zod.optin==="optional",S=x._zod.optout==="optional",w=x._zod.run({value:d[g],issues:[]},f);w instanceof Promise?m.push(w.then(E=>Wp(E,c,g,d,A,S))):Wp(w,c,g,d,A,S)}return o?T3(m,d,c,f,r.value,e):m.length?Promise.all(m).then(()=>c):c}}),wJ=xe("$ZodObjectJIT",(e,t)=>{xJ.init(e,t);const n=e._zod.parse,r=eE(()=>j3(t)),a=g=>{var j,R;const x=new HQ(["shape","payload","ctx"]),A=r.value,S=C=>{const T=OR(C);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};x.write("const input = payload.value;");const w=Object.create(null);let E=0;for(const C of A.keys)w[C]=`key_${E++}`;x.write("const newResult = {};");for(const C of A.keys){const T=w[C],N=OR(C),D=g[C],z=((j=D==null?void 0:D._zod)==null?void 0:j.optin)==="optional",G=((R=D==null?void 0:D._zod)==null?void 0:R.optout)==="optional";x.write(`const ${T} = ${S(C)};`),z&&G?x.write(`
347
- if (${T}.issues.length) {
348
- if (${N} in input) {
349
- payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
350
- ...iss,
351
- path: iss.path ? [${N}, ...iss.path] : [${N}]
352
- })));
353
- }
354
- }
355
-
356
- if (${T}.value === undefined) {
357
- if (${N} in input) {
358
- newResult[${N}] = undefined;
359
- }
360
- } else {
361
- newResult[${N}] = ${T}.value;
362
- }
363
-
364
- `):z?x.write(`
365
- if (${T}.issues.length) {
366
- payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
367
- ...iss,
368
- path: iss.path ? [${N}, ...iss.path] : [${N}]
369
- })));
370
- }
371
-
372
- if (${T}.value === undefined) {
373
- if (${N} in input) {
374
- newResult[${N}] = undefined;
375
- }
376
- } else {
377
- newResult[${N}] = ${T}.value;
378
- }
379
-
380
- `):x.write(`
381
- const ${T}_present = ${N} in input;
382
- if (${T}.issues.length) {
383
- payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
384
- ...iss,
385
- path: iss.path ? [${N}, ...iss.path] : [${N}]
386
- })));
387
- }
388
- if (!${T}_present && !${T}.issues.length) {
389
- payload.issues.push({
390
- code: "invalid_type",
391
- expected: "nonoptional",
392
- input: undefined,
393
- path: [${N}]
394
- });
395
- }
396
-
397
- if (${T}_present) {
398
- if (${T}.value === undefined) {
399
- newResult[${N}] = undefined;
400
- } else {
401
- newResult[${N}] = ${T}.value;
402
- }
403
- }
404
-
405
- `)}x.write("payload.value = newResult;"),x.write("return payload;");const O=x.compile();return(C,T)=>O(g,C,T)};let o;const l=Gp,c=!JA.jitless,d=c&&zX.value,m=t.catchall;let h;e._zod.parse=(g,x)=>{h??(h=r.value);const A=g.value;return l(A)?c&&d&&(x==null?void 0:x.async)===!1&&x.jitless!==!0?(o||(o=a(t.shape)),g=o(g,x),m?T3([],A,g,x,h,e):g):n(g,x):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function CR(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const a=e.filter(o=>!Dl(o));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(l=>Es(l,r,As())))}),t)}const SJ=xe("$ZodUnion",(e,t)=>{Tn.init(e,t),qt(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),qt(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),qt(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),qt(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${r.map(a=>nE(a.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,a)=>{if(n)return n(r,a);let o=!1;const l=[];for(const c of t.options){const f=c._zod.run({value:r.value,issues:[]},a);if(f instanceof Promise)l.push(f),o=!0;else{if(f.issues.length===0)return f;l.push(f)}}return o?Promise.all(l).then(c=>CR(c,r,e,a)):CR(l,r,e,a)}}),_J=xe("$ZodIntersection",(e,t)=>{Tn.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,o=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return o instanceof Promise||l instanceof Promise?Promise.all([o,l]).then(([f,d])=>RR(n,f,d)):RR(n,o,l)}});function _S(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(vf(e)&&vf(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),a={...e,...t};for(const o of r){const l=_S(e[o],t[o]);if(!l.valid)return{valid:!1,mergeErrorPath:[o,...l.mergeErrorPath]};a[o]=l.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],o=t[r],l=_S(a,o);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function RR(e,t,n){const r=new Map;let a;for(const c of t.issues)if(c.code==="unrecognized_keys"){a??(a=c);for(const f of c.keys)r.has(f)||r.set(f,{}),r.get(f).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const f of c.keys)r.has(f)||r.set(f,{}),r.get(f).r=!0;else e.issues.push(c);const o=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&a&&e.issues.push({...a,keys:o}),Dl(e))return e;const l=_S(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const AJ=xe("$ZodEnum",(e,t)=>{Tn.init(e,t);const n=y3(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>LX.has(typeof a)).map(a=>typeof a=="string"?wv(a):a.toString()).join("|")})$`),e._zod.parse=(a,o)=>{const l=a.value;return r.has(l)||a.issues.push({code:"invalid_value",values:n,input:l,inst:e}),a}}),EJ=xe("$ZodTransform",(e,t)=>{Tn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new g3(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n.fallback=!0,n));if(a instanceof Promise)throw new Ul;return n.value=a,n.fallback=!0,n}});function NR(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const C3=xe("$ZodOptional",(e,t)=>{Tn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${nE(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=n.value,o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>NR(l,a)):NR(o,a)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),OJ=xe("$ZodExactOptional",(e,t)=>{C3.init(e,t),qt(e._zod,"values",()=>t.innerType._zod.values),qt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),jJ=xe("$ZodNullable",(e,t)=>{Tn.init(e,t),qt(e._zod,"optin",()=>t.innerType._zod.optin),qt(e._zod,"optout",()=>t.innerType._zod.optout),qt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${nE(n.source)}|null)$`):void 0}),qt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),TJ=xe("$ZodDefault",(e,t)=>{Tn.init(e,t),e._zod.optin="optional",qt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>MR(o,t)):MR(a,t)}});function MR(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const CJ=xe("$ZodPrefault",(e,t)=>{Tn.init(e,t),e._zod.optin="optional",qt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),RJ=xe("$ZodNonOptional",(e,t)=>{Tn.init(e,t),qt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>PR(o,e)):PR(a,e)}});function PR(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const NJ=xe("$ZodCatch",(e,t)=>{Tn.init(e,t),e._zod.optin="optional",qt(e._zod,"optout",()=>t.innerType._zod.optout),qt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(l=>Es(l,r,As()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(o=>Es(o,r,As()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),MJ=xe("$ZodPipe",(e,t)=>{Tn.init(e,t),qt(e._zod,"values",()=>t.in._zod.values),qt(e._zod,"optin",()=>t.in._zod.optin),qt(e._zod,"optout",()=>t.out._zod.optout),qt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(l=>rp(l,t.in,r)):rp(o,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(o=>rp(o,t.out,r)):rp(a,t.out,r)}});function rp(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const PJ=xe("$ZodReadonly",(e,t)=>{Tn.init(e,t),qt(e._zod,"propValues",()=>t.innerType._zod.propValues),qt(e._zod,"values",()=>t.innerType._zod.values),qt(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),qt(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(DR):DR(a)}});function DR(e){return e.value=Object.freeze(e.value),e}const DJ=xe("$ZodCustom",(e,t)=>{ni.init(e,t),Tn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(o=>kR(o,n,r,e));kR(a,n,r,e)}});function kR(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(gf(a))}}var $R;class kJ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function $J(){return new kJ}($R=globalThis).__zod_globalRegistry??($R.__zod_globalRegistry=$J());const Xu=globalThis.__zod_globalRegistry;function zJ(e,t){return new e({type:"string",...Qe(t)})}function LJ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Qe(t)})}function zR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Qe(t)})}function IJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Qe(t)})}function BJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Qe(t)})}function UJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Qe(t)})}function qJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Qe(t)})}function HJ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Qe(t)})}function FJ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Qe(t)})}function VJ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Qe(t)})}function GJ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Qe(t)})}function WJ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Qe(t)})}function YJ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Qe(t)})}function KJ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Qe(t)})}function ZJ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Qe(t)})}function XJ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Qe(t)})}function QJ(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Qe(t)})}function JJ(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Qe(t)})}function eee(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Qe(t)})}function tee(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Qe(t)})}function nee(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Qe(t)})}function ree(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Qe(t)})}function aee(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Qe(t)})}function iee(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Qe(t)})}function oee(e,t){return new e({type:"string",format:"date",check:"string_format",...Qe(t)})}function see(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Qe(t)})}function lee(e,t){return new e({type:"string",format:"duration",check:"string_format",...Qe(t)})}function cee(e,t){return new e({type:"boolean",...Qe(t)})}function uee(e){return new e({type:"unknown"})}function fee(e,t){return new e({type:"never",...Qe(t)})}function R3(e,t){return new PQ({check:"max_length",...Qe(t),maximum:e})}function Yp(e,t){return new DQ({check:"min_length",...Qe(t),minimum:e})}function N3(e,t){return new kQ({check:"length_equals",...Qe(t),length:e})}function dee(e,t){return new $Q({check:"string_format",format:"regex",...Qe(t),pattern:e})}function hee(e){return new zQ({check:"string_format",format:"lowercase",...Qe(e)})}function pee(e){return new LQ({check:"string_format",format:"uppercase",...Qe(e)})}function mee(e,t){return new IQ({check:"string_format",format:"includes",...Qe(t),includes:e})}function vee(e,t){return new BQ({check:"string_format",format:"starts_with",...Qe(t),prefix:e})}function gee(e,t){return new UQ({check:"string_format",format:"ends_with",...Qe(t),suffix:e})}function Rc(e){return new qQ({check:"overwrite",tx:e})}function yee(e){return Rc(t=>t.normalize(e))}function bee(){return Rc(e=>e.trim())}function xee(){return Rc(e=>e.toLowerCase())}function wee(){return Rc(e=>e.toUpperCase())}function See(){return Rc(e=>$X(e))}function _ee(e,t,n){return new e({type:"array",element:t,...Qe(n)})}function Aee(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Qe(n)})}function Eee(e,t){const n=Oee(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(gf(a,r.value,n._zod.def));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(gf(o))}},e(r.value,r)),t);return n}function Oee(e,t){const n=new ni({check:"custom",...Qe(t)});return n._zod.check=e,n}function M3(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Xu,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Xn(e,t,n={path:[],schemaPath:[]}){var m,h;var r;const a=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const c=(h=(m=e._zod).toJSONSchema)==null?void 0:h.call(m);if(c)l.schema=c;else{const g={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const A=l.schema,S=t.processors[a.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);S(e,t,A,g)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),Xn(x,t,g),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&sr(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function P3(e,t){var l,c,f,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const m of e.seen.entries()){const h=(l=e.metadataRegistry.get(m[0]))==null?void 0:l.id;if(h){const g=r.get(h);if(g&&g!==m[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,m[0])}}const a=m=>{var S;const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const w=(S=e.external.registry.get(m[0]))==null?void 0:S.id,E=e.external.uri??(j=>j);if(w)return{ref:E(w)};const O=m[1].defId??m[1].schema.id??`schema${e.counter++}`;return m[1].defId=O,{defId:O,ref:`${E("__shared")}#/${h}/${O}`}}if(m[1]===n)return{ref:"#"};const x=`#/${h}/`,A=m[1].schema.id??`__schema${e.counter++}`;return{defId:A,ref:x+A}},o=m=>{if(m[1].schema.$ref)return;const h=m[1],{ref:g,defId:x}=a(m);h.def={...h.schema},x&&(h.defId=x);const A=h.schema;for(const S in A)delete A[S];A.$ref=g};if(e.cycles==="throw")for(const m of e.seen.entries()){const h=m[1];if(h.cycle)throw new Error(`Cycle detected: #/${(c=h.cycle)==null?void 0:c.join("/")}/<root>
406
-
407
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of e.seen.entries()){const h=m[1];if(t===m[0]){o(m);continue}if(e.external){const x=(f=e.external.registry.get(m[0]))==null?void 0:f.id;if(t!==m[0]&&x){o(m);continue}}if((d=e.metadataRegistry.get(m[0]))==null?void 0:d.id){o(m);continue}if(h.cycle){o(m);continue}if(h.count>1&&e.reused==="ref"){o(m);continue}}}function D3(e,t){var c,f,d,m;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const g=e.seen.get(h);if(g.ref===null)return;const x=g.def??g.schema,A={...x},S=g.ref;if(g.ref=null,S){r(S);const E=e.seen.get(S),O=E.schema;if(O.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(x.allOf=x.allOf??[],x.allOf.push(O)):Object.assign(x,O),Object.assign(x,A),h._zod.parent===S)for(const R in x)R==="$ref"||R==="allOf"||R in A||delete x[R];if(O.$ref&&E.def)for(const R in x)R==="$ref"||R==="allOf"||R in E.def&&JSON.stringify(x[R])===JSON.stringify(E.def[R])&&delete x[R]}const w=h._zod.parent;if(w&&w!==S){r(w);const E=e.seen.get(w);if(E!=null&&E.schema.$ref&&(x.$ref=E.schema.$ref,E.def))for(const O in x)O==="$ref"||O==="allOf"||O in E.def&&JSON.stringify(x[O])===JSON.stringify(E.def[O])&&delete x[O]}e.override({zodSchema:h,jsonSchema:x,path:g.path??[]})};for(const h of[...e.seen.entries()].reverse())r(h[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const h=(f=e.external.registry.get(t))==null?void 0:f.id;if(!h)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(h)}Object.assign(a,n.def??n.schema);const o=(d=e.metadataRegistry.get(t))==null?void 0:d.id;o!==void 0&&a.id===o&&delete a.id;const l=((m=e.external)==null?void 0:m.defs)??{};for(const h of e.seen.entries()){const g=h[1];g.def&&g.defId&&(g.def.id===g.defId&&delete g.def.id,l[g.defId]=g.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?a.$defs=l:a.definitions=l);try{const h=JSON.parse(JSON.stringify(a));return Object.defineProperty(h,"~standard",{value:{...t["~standard"],jsonSchema:{input:Kp(t,"input",e.processors),output:Kp(t,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function sr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return sr(r.element,n);if(r.type==="set")return sr(r.valueType,n);if(r.type==="lazy")return sr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return sr(r.innerType,n);if(r.type==="intersection")return sr(r.left,n)||sr(r.right,n);if(r.type==="record"||r.type==="map")return sr(r.keyType,n)||sr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:sr(r.in,n)||sr(r.out,n);if(r.type==="object"){for(const a in r.shape)if(sr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(sr(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(sr(a,n))return!0;return!!(r.rest&&sr(r.rest,n))}return!1}const jee=(e,t={})=>n=>{const r=M3({...n,processors:t});return Xn(e,r),P3(r,e),D3(r,e)},Kp=(e,t,n={})=>r=>{const{libraryOptions:a,target:o}=r??{},l=M3({...a??{},target:o,io:t,processors:n});return Xn(e,l),P3(l,e),D3(l,e)},Tee={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Cee=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:o,maximum:l,format:c,patterns:f,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof l=="number"&&(a.maxLength=l),c&&(a.format=Tee[c]??c,a.format===""&&delete a.format,c==="time"&&delete a.format),d&&(a.contentEncoding=d),f&&f.size>0){const m=[...f];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},Ree=(e,t,n,r)=>{n.type="boolean"},Nee=(e,t,n,r)=>{n.not={}},Mee=(e,t,n,r)=>{},Pee=(e,t,n,r)=>{const a=e._zod.def,o=y3(a.entries);o.every(l=>typeof l=="number")&&(n.type="number"),o.every(l=>typeof l=="string")&&(n.type="string"),n.enum=o},Dee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},kee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},$ee=(e,t,n,r)=>{const a=n,o=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof c=="number"&&(a.maxItems=c),a.type="array",a.items=Xn(o.element,t,{...r,path:[...r.path,"items"]})},zee=(e,t,n,r)=>{var d;const a=n,o=e._zod.def;a.type="object",a.properties={};const l=o.shape;for(const m in l)a.properties[m]=Xn(l[m],t,{...r,path:[...r.path,"properties",m]});const c=new Set(Object.keys(l)),f=new Set([...c].filter(m=>{const h=o.shape[m]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));f.size>0&&(a.required=Array.from(f)),((d=o.catchall)==null?void 0:d._zod.def.type)==="never"?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=Xn(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},Lee=(e,t,n,r)=>{const a=e._zod.def,o=a.inclusive===!1,l=a.options.map((c,f)=>Xn(c,t,{...r,path:[...r.path,o?"oneOf":"anyOf",f]}));o?n.oneOf=l:n.anyOf=l},Iee=(e,t,n,r)=>{const a=e._zod.def,o=Xn(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=Xn(a.right,t,{...r,path:[...r.path,"allOf",1]}),c=d=>"allOf"in d&&Object.keys(d).length===1,f=[...c(o)?o.allOf:[o],...c(l)?l.allOf:[l]];n.allOf=f},Bee=(e,t,n,r)=>{const a=e._zod.def,o=Xn(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Uee=(e,t,n,r)=>{const a=e._zod.def;Xn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType},qee=(e,t,n,r)=>{const a=e._zod.def;Xn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},Hee=(e,t,n,r)=>{const a=e._zod.def;Xn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},Fee=(e,t,n,r)=>{const a=e._zod.def;Xn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},Vee=(e,t,n,r)=>{const a=e._zod.def,o=a.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?o?a.out:a.in:a.out;Xn(l,t,r);const c=t.seen.get(e);c.ref=l},Gee=(e,t,n,r)=>{const a=e._zod.def;Xn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.readOnly=!0},k3=(e,t,n,r)=>{const a=e._zod.def;Xn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType};function LR(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function Wee(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(h){return e.push(h)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=ZA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function Yee(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(h){return e.push(h)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=ZA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function Ri(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,a,o){try{return Promise.resolve(LR(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&wS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c==null?void 0:c.issues)})(l))return{values:{},errors:SR(Wee(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,o){try{return Promise.resolve(LR(function(){return Promise.resolve((n.mode==="sync"?ZX:XX)(e,r,t)).then(function(l){return o.shouldUseNativeValidation&&wS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof aE})(l))return{values:{},errors:SR(Yee(l.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}const Kee=xe("ZodISODateTime",(e,t)=>{nJ.init(e,t),un.init(e,t)});function Zee(e){return iee(Kee,e)}const Xee=xe("ZodISODate",(e,t)=>{rJ.init(e,t),un.init(e,t)});function Qee(e){return oee(Xee,e)}const Jee=xe("ZodISOTime",(e,t)=>{aJ.init(e,t),un.init(e,t)});function ete(e){return see(Jee,e)}const tte=xe("ZodISODuration",(e,t)=>{iJ.init(e,t),un.init(e,t)});function nte(e){return lee(tte,e)}const rte=(e,t)=>{aE.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>KX(e,n)},flatten:{value:n=>YX(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,SS,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,SS,2)}},isEmpty:{get(){return e.issues.length===0}}})},ma=xe("ZodError",rte,{Parent:Error}),ate=_v(ma),ite=Av(ma),ote=Ev(ma),ste=Ov(ma),lte=eQ(ma),cte=tQ(ma),ute=nQ(ma),fte=rQ(ma),dte=aQ(ma),hte=iQ(ma),pte=oQ(ma),mte=sQ(ma),IR=new WeakMap;function Tv(e,t,n){const r=Object.getPrototypeOf(e);let a=IR.get(r);if(a||(a=new Set,IR.set(r,a)),!a.has(t)){a.add(t);for(const o in n){const l=n[o];Object.defineProperty(r,o,{configurable:!0,enumerable:!1,get(){const c=l.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}const Cn=xe("ZodType",(e,t)=>(Tn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Kp(e,"input"),output:Kp(e,"output")}}),e.toJSONSchema=jee(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>ate(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>ote(e,n,r),e.parseAsync=async(n,r)=>ite(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>ste(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>lte(e,n,r),e.decode=(n,r)=>cte(e,n,r),e.encodeAsync=async(n,r)=>ute(e,n,r),e.decodeAsync=async(n,r)=>fte(e,n,r),e.safeEncode=(n,r)=>dte(e,n,r),e.safeDecode=(n,r)=>hte(e,n,r),e.safeEncodeAsync=async(n,r)=>pte(e,n,r),e.safeDecodeAsync=async(n,r)=>mte(e,n,r),Tv(e,"ZodType",{check(...n){const r=this.def;return this.clone(Do(r,{checks:[...r.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return ko(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(lne(n,r))},superRefine(n,r){return this.check(cne(n,r))},overwrite(n){return this.check(Rc(n))},optional(){return qR(this)},exactOptional(){return Zte(this)},nullable(){return HR(this)},nullish(){return qR(HR(this))},nonoptional(n){return nne(this,n)},array(){return Bte(this)},or(n){return Hte([this,n])},and(n){return Vte(this,n)},transform(n){return FR(this,Yte(n))},default(n){return Jte(this,n)},prefault(n){return tne(this,n)},catch(n){return ane(this,n)},pipe(n){return FR(this,n)},readonly(){return sne(this)},describe(n){const r=this.clone();return Xu.add(r,{description:n}),r},meta(...n){if(n.length===0)return Xu.get(this);const r=this.clone();return Xu.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=Xu.get(e))==null?void 0:n.description},configurable:!0}),e)),$3=xe("_ZodString",(e,t)=>{iE.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(r,a,o)=>Cee(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Tv(e,"_ZodString",{regex(...r){return this.check(dee(...r))},includes(...r){return this.check(mee(...r))},startsWith(...r){return this.check(vee(...r))},endsWith(...r){return this.check(gee(...r))},min(...r){return this.check(Yp(...r))},max(...r){return this.check(R3(...r))},length(...r){return this.check(N3(...r))},nonempty(...r){return this.check(Yp(1,...r))},lowercase(r){return this.check(hee(r))},uppercase(r){return this.check(pee(r))},trim(){return this.check(bee())},normalize(...r){return this.check(yee(...r))},toLowerCase(){return this.check(xee())},toUpperCase(){return this.check(wee())},slugify(){return this.check(See())}})}),vte=xe("ZodString",(e,t)=>{iE.init(e,t),$3.init(e,t),e.email=n=>e.check(LJ(gte,n)),e.url=n=>e.check(HJ(yte,n)),e.jwt=n=>e.check(aee(Pte,n)),e.emoji=n=>e.check(FJ(bte,n)),e.guid=n=>e.check(zR(BR,n)),e.uuid=n=>e.check(IJ(ap,n)),e.uuidv4=n=>e.check(BJ(ap,n)),e.uuidv6=n=>e.check(UJ(ap,n)),e.uuidv7=n=>e.check(qJ(ap,n)),e.nanoid=n=>e.check(VJ(xte,n)),e.guid=n=>e.check(zR(BR,n)),e.cuid=n=>e.check(GJ(wte,n)),e.cuid2=n=>e.check(WJ(Ste,n)),e.ulid=n=>e.check(YJ(_te,n)),e.base64=n=>e.check(tee(Rte,n)),e.base64url=n=>e.check(nee(Nte,n)),e.xid=n=>e.check(KJ(Ate,n)),e.ksuid=n=>e.check(ZJ(Ete,n)),e.ipv4=n=>e.check(XJ(Ote,n)),e.ipv6=n=>e.check(QJ(jte,n)),e.cidrv4=n=>e.check(JJ(Tte,n)),e.cidrv6=n=>e.check(eee(Cte,n)),e.e164=n=>e.check(ree(Mte,n)),e.datetime=n=>e.check(Zee(n)),e.date=n=>e.check(Qee(n)),e.time=n=>e.check(ete(n)),e.duration=n=>e.check(nte(n))});function On(e){return zJ(vte,e)}const un=xe("ZodStringFormat",(e,t)=>{sn.init(e,t),$3.init(e,t)}),gte=xe("ZodEmail",(e,t)=>{WQ.init(e,t),un.init(e,t)}),BR=xe("ZodGUID",(e,t)=>{VQ.init(e,t),un.init(e,t)}),ap=xe("ZodUUID",(e,t)=>{GQ.init(e,t),un.init(e,t)}),yte=xe("ZodURL",(e,t)=>{YQ.init(e,t),un.init(e,t)}),bte=xe("ZodEmoji",(e,t)=>{KQ.init(e,t),un.init(e,t)}),xte=xe("ZodNanoID",(e,t)=>{ZQ.init(e,t),un.init(e,t)}),wte=xe("ZodCUID",(e,t)=>{XQ.init(e,t),un.init(e,t)}),Ste=xe("ZodCUID2",(e,t)=>{QQ.init(e,t),un.init(e,t)}),_te=xe("ZodULID",(e,t)=>{JQ.init(e,t),un.init(e,t)}),Ate=xe("ZodXID",(e,t)=>{eJ.init(e,t),un.init(e,t)}),Ete=xe("ZodKSUID",(e,t)=>{tJ.init(e,t),un.init(e,t)}),Ote=xe("ZodIPv4",(e,t)=>{oJ.init(e,t),un.init(e,t)}),jte=xe("ZodIPv6",(e,t)=>{sJ.init(e,t),un.init(e,t)}),Tte=xe("ZodCIDRv4",(e,t)=>{lJ.init(e,t),un.init(e,t)}),Cte=xe("ZodCIDRv6",(e,t)=>{cJ.init(e,t),un.init(e,t)}),Rte=xe("ZodBase64",(e,t)=>{uJ.init(e,t),un.init(e,t)}),Nte=xe("ZodBase64URL",(e,t)=>{dJ.init(e,t),un.init(e,t)}),Mte=xe("ZodE164",(e,t)=>{hJ.init(e,t),un.init(e,t)}),Pte=xe("ZodJWT",(e,t)=>{mJ.init(e,t),un.init(e,t)}),Dte=xe("ZodBoolean",(e,t)=>{vJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ree(e,n,r)});function kte(e){return cee(Dte,e)}const $te=xe("ZodUnknown",(e,t)=>{gJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Mee()});function UR(){return uee($te)}const zte=xe("ZodNever",(e,t)=>{yJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Nee(e,n,r)});function Lte(e){return fee(zte,e)}const Ite=xe("ZodArray",(e,t)=>{bJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$ee(e,n,r,a),e.element=t.element,Tv(e,"ZodArray",{min(n,r){return this.check(Yp(n,r))},nonempty(n){return this.check(Yp(1,n))},max(n,r){return this.check(R3(n,r))},length(n,r){return this.check(N3(n,r))},unwrap(){return this.element}})});function Bte(e,t){return _ee(Ite,e,t)}const Ute=xe("ZodObject",(e,t)=>{wJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>zee(e,n,r,a),qt(e,"shape",()=>t.shape),Tv(e,"ZodObject",{keyof(){return Gte(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:UR()})},loose(){return this.clone({...this._zod.def,catchall:UR()})},strict(){return this.clone({...this._zod.def,catchall:Lte()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return qX(this,n)},safeExtend(n){return HX(this,n)},merge(n){return FX(this,n)},pick(n){return BX(this,n)},omit(n){return UX(this,n)},partial(...n){return VX(z3,this,n[0])},required(...n){return GX(L3,this,n[0])}})});function ri(e,t){const n={type:"object",shape:e??{},...Qe(t)};return new Ute(n)}const qte=xe("ZodUnion",(e,t)=>{SJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Lee(e,n,r,a),e.options=t.options});function Hte(e,t){return new qte({type:"union",options:e,...Qe(t)})}const Fte=xe("ZodIntersection",(e,t)=>{_J.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Iee(e,n,r,a)});function Vte(e,t){return new Fte({type:"intersection",left:e,right:t})}const AS=xe("ZodEnum",(e,t)=>{AJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(r,a,o)=>Pee(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const o={};for(const l of r)if(n.has(l))o[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new AS({...t,checks:[],...Qe(a),entries:o})},e.exclude=(r,a)=>{const o={...t.entries};for(const l of r)if(n.has(l))delete o[l];else throw new Error(`Key ${l} not found in enum`);return new AS({...t,checks:[],...Qe(a),entries:o})}});function Gte(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new AS({type:"enum",entries:n,...Qe(t)})}const Wte=xe("ZodTransform",(e,t)=>{EJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kee(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new g3(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(gf(o,n.value,t));else{const l=o;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(gf(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function Yte(e){return new Wte({type:"transform",transform:e})}const z3=xe("ZodOptional",(e,t)=>{C3.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>k3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function qR(e){return new z3({type:"optional",innerType:e})}const Kte=xe("ZodExactOptional",(e,t)=>{OJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>k3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Zte(e){return new Kte({type:"optional",innerType:e})}const Xte=xe("ZodNullable",(e,t)=>{jJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Bee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function HR(e){return new Xte({type:"nullable",innerType:e})}const Qte=xe("ZodDefault",(e,t)=>{TJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>qee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jte(e,t){return new Qte({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():x3(t)}})}const ene=xe("ZodPrefault",(e,t)=>{CJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Hee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function tne(e,t){return new ene({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():x3(t)}})}const L3=xe("ZodNonOptional",(e,t)=>{RJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Uee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function nne(e,t){return new L3({type:"nonoptional",innerType:e,...Qe(t)})}const rne=xe("ZodCatch",(e,t)=>{NJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Fee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ane(e,t){return new rne({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ine=xe("ZodPipe",(e,t)=>{MJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Vee(e,n,r,a),e.in=t.in,e.out=t.out});function FR(e,t){return new ine({type:"pipe",in:e,out:t})}const one=xe("ZodReadonly",(e,t)=>{PJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Gee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function sne(e){return new one({type:"readonly",innerType:e})}const I3=xe("ZodCustom",(e,t)=>{DJ.init(e,t),Cn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Dee(e,n)});function lne(e,t={}){return Aee(I3,e,t)}function cne(e,t){return Eee(e,t)}function oE(e,t={}){const n=new I3({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Qe(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var une="Label",B3=y.forwardRef((e,t)=>v.jsx(O5.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));B3.displayName=une;var U3=B3;const fne=Ec("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Tt=y.forwardRef(({className:e,...t},n)=>v.jsx(U3,{ref:n,className:be(fne(),e),...t}));Tt.displayName=U3.displayName;const dne=Ec("rounded-lg bg-card text-card-foreground",{variants:{level:{0:"",1:"shadow-card-1",2:"shadow-card-2",3:"shadow-card-3",4:"shadow-card-4"}},defaultVariants:{level:2}}),$r=y.forwardRef(({className:e,level:t,...n},r)=>v.jsx("div",{ref:r,className:be(dne({level:t}),e),...n}));$r.displayName="Card";const zr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));zr.displayName="CardHeader";const Lr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("text-2xl font-semibold leading-none tracking-tight",e),...t}));Lr.displayName="CardTitle";const Os=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Os.displayName="CardDescription";const Ta=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("p-6 pt-0",e),...t}));Ta.displayName="CardContent";const hne=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",e),...t}));hne.displayName="CardFooter";const pne=ri({email:On().email(),password:On().min(8)});function mne(){const e=$a(),{resolvedTheme:t}=wc(),n=t==="dark"?"/logo-dark.svg":"/logo.svg";y.useEffect(()=>{fetch("/api/v1/auth/status").then(d=>d.json()).then(({initialized:d})=>{d||e("/setup",{replace:!0})}).catch(()=>{})},[e]);const{register:r,handleSubmit:a,setError:o,formState:{errors:l,isSubmitting:c}}=Ci({resolver:Ri(pne),mode:"onBlur"});async function f(d){try{const{status:m}=await t3.post("/api/v1/auth/login",{email:d.email,password:d.password});if(m!==200){o("root",{message:"Invalid email or password"});return}e("/app-center",{replace:!0})}catch{o("root",{message:"Network error. Please try again."})}}return v.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("img",{src:n,alt:"tapflow",className:"w-6 h-6"}),v.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),v.jsxs($r,{level:4,className:"w-full",children:[v.jsxs(zr,{className:"text-center",children:[v.jsx(Lr,{className:"text-2xl tracking-display-md",children:"Welcome back"}),v.jsx(Os,{children:"Sign in to your team workspace"})]}),v.jsx(Ta,{children:v.jsxs("form",{onSubmit:a(f),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"email",children:"Email"}),v.jsx(rn,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email",...r("email")}),l.email&&v.jsx("p",{className:"text-sm text-destructive",children:l.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"password",children:"Password"}),v.jsx(rn,{id:"password",type:"password",autoComplete:"current-password",...r("password")}),l.password&&v.jsx("p",{className:"text-sm text-destructive",children:l.password.message})]}),l.root&&v.jsx("p",{className:"text-sm text-destructive",children:l.root.message}),v.jsx(ct,{type:"submit",size:"lg",disabled:c,className:"w-full mt-1",children:c?"Signing in…":"Sign in"})]})})]})]})})}const vne=ri({email:On().email("Enter a valid email"),password:On().min(8,"Password must be at least 8 characters"),confirm:On()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function gne(){const e=$a(),{resolvedTheme:t}=wc(),n=t==="dark"?"/logo-dark.svg":"/logo.svg",{register:r,handleSubmit:a,setError:o,formState:{errors:l,isSubmitting:c}}=Ci({resolver:Ri(vne),mode:"onBlur"});y.useEffect(()=>{fetch("/api/v1/auth/status").then(d=>d.json()).then(({initialized:d})=>{d&&e("/login",{replace:!0})}).catch(()=>{})},[e]);async function f(d){try{const m=await fetch("/api/v1/auth/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:d.email,password:d.password})});if(!m.ok){const h=await m.json();o("root",{message:h.error??"Failed to create account"});return}e("/login",{replace:!0})}catch{o("root",{message:"Network error. Please try again."})}}return v.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("img",{src:n,alt:"tapflow",className:"w-6 h-6"}),v.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),v.jsxs($r,{level:4,className:"w-full",children:[v.jsx(zr,{className:"text-center",children:v.jsx(Lr,{className:"text-2xl tracking-display-md",children:"Set up tapflow"})}),v.jsx(Ta,{children:v.jsxs("form",{onSubmit:a(f),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"email",children:"Admin email"}),v.jsx(rn,{id:"email",type:"email",placeholder:"admin@yourteam.com",autoComplete:"email",...r("email")}),l.email&&v.jsx("p",{className:"text-sm text-destructive",children:l.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"password",children:"Password"}),v.jsx(rn,{id:"password",type:"password",autoComplete:"new-password",...r("password")}),l.password&&v.jsx("p",{className:"text-sm text-destructive",children:l.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(rn,{id:"confirm",type:"password",autoComplete:"new-password",...r("confirm")}),l.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:l.confirm.message})]}),l.root&&v.jsx("p",{className:"text-sm text-destructive",children:l.root.message}),v.jsx(ct,{type:"submit",size:"lg",disabled:c,className:"w-full mt-1",children:c?"Creating account…":"Create admin account"})]})})]})]})})}const yne=ri({displayName:On().optional(),avatar:oE(File).nullable().optional(),password:On().min(8),confirm:On()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function bne(){const e=$a(),[t]=nd(),n=t.get("token")??"",[r,a]=y.useState("loading"),[o,l]=y.useState(""),[c,f]=y.useState(null),d=y.useRef(null),{register:m,handleSubmit:h,control:g,setError:x,formState:{errors:A,isSubmitting:S}}=Ci({resolver:Ri(yne),mode:"onBlur",defaultValues:{displayName:"",avatar:null}}),w=KA({control:g,name:"displayName"})??"";y.useEffect(()=>{if(!n){a("invalid");return}fetch(`/api/v1/invitations/verify?token=${n}`).then(O=>O.ok?O.json():Promise.reject()).then(O=>{l(O.role),a("valid")}).catch(()=>a("invalid"))},[n]);async function E(O){var j;try{const R=new FormData;if(R.append("token",n),R.append("password",O.password),(j=O.displayName)!=null&&j.trim()&&R.append("display_name",O.displayName.trim()),O.avatar&&R.append("avatar",O.avatar),!(await fetch("/api/v1/invitations/accept",{method:"POST",body:R})).ok){x("root",{message:"Failed to accept invitation"});return}e("/app-center",{replace:!0})}catch{x("root",{message:"Network error. Please try again."})}}return r==="loading"?v.jsx("div",{className:"flex min-h-svh items-center justify-center"}):r==="invalid"?v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsx($r,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(zr,{children:[v.jsx(Lr,{children:"Invitation expired"}),v.jsx(Os,{children:"This invite link is invalid or has expired. Ask your admin for a new one."})]})})}):v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs($r,{level:4,className:"w-full max-w-sm",children:[v.jsxs(zr,{className:"text-center",children:[v.jsx(Lr,{children:"Set up your account"}),v.jsxs(Os,{children:["You're joining as ",v.jsx("strong",{children:o})]})]}),v.jsx(Ta,{children:v.jsxs("form",{onSubmit:h(E),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Tt,{htmlFor:"display-name",children:["Nickname ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),v.jsx(rn,{id:"display-name",placeholder:"Your name",...m("displayName")})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Tt,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional, png · jpg, max 2MB)"})]}),v.jsx(Hp,{name:"avatar",control:g,render:({field:O})=>{var j;return v.jsxs("div",{className:"relative w-14 h-14",children:[c?v.jsx("img",{src:c,alt:"avatar",className:"w-14 h-14 rounded-full object-cover border"}):v.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const R=qA(w);return{backgroundColor:R.bg,color:R.fg}})(),children:((j=w==null?void 0:w[0])==null?void 0:j.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var R;return(R=d.current)==null?void 0:R.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(rS,{className:"w-3 h-3"})}),v.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg",className:"hidden",onChange:R=>{var T;const C=(T=R.target.files)==null?void 0:T[0];if(C){if(C.size>2*1024*1024){x("avatar",{message:"Max 2MB for avatar"});return}O.onChange(C),f(URL.createObjectURL(C))}}})]})}}),A.avatar&&v.jsx("p",{className:"text-sm text-destructive",children:A.avatar.message})]}),v.jsx(Ja,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"password",children:"Password"}),v.jsx(rn,{id:"password",type:"password",...m("password")}),A.password&&v.jsx("p",{className:"text-sm text-destructive",children:A.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(rn,{id:"confirm",type:"password",...m("confirm")}),A.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:A.confirm.message})]}),A.root&&v.jsx("p",{className:"text-sm text-destructive",children:A.root.message}),v.jsx(ct,{type:"submit",disabled:S,className:"w-full",children:S?"Creating account…":"Create account"})]})})]})})}const xne=ri({password:On().min(8),confirm:On()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function wne(){const e=$a(),[t]=nd(),n=t.get("token")??"",[r,a]=y.useState("loading"),{register:o,handleSubmit:l,setError:c,formState:{errors:f,isSubmitting:d}}=Ci({resolver:Ri(xne),mode:"onBlur"});y.useEffect(()=>{if(!n){a("invalid");return}fetch(`/api/v1/auth/reset-password/verify?token=${n}`).then(h=>h.ok?a("valid"):Promise.reject()).catch(()=>a("invalid"))},[n]);async function m(h){try{const g=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:n,password:h.password})});if(!g.ok){const x=await g.json();c("root",{message:x.error??"Failed to reset password"});return}e("/login",{replace:!0})}catch{c("root",{message:"Network error. Please try again."})}}return r==="loading"?v.jsx("div",{className:"flex min-h-svh items-center justify-center"}):r==="invalid"?v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsx($r,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(zr,{children:[v.jsx(Lr,{children:"Link expired"}),v.jsx(Os,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs($r,{level:4,className:"w-full max-w-sm",children:[v.jsxs(zr,{className:"text-center",children:[v.jsx(Lr,{children:"Reset password"}),v.jsx(Os,{children:"Enter your new password below."})]}),v.jsx(Ta,{children:v.jsxs("form",{onSubmit:l(m),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"password",children:"New password"}),v.jsx(rn,{id:"password",type:"password",...o("password")}),f.password&&v.jsx("p",{className:"text-sm text-destructive",children:f.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(rn,{id:"confirm",type:"password",...o("confirm")}),f.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:f.confirm.message})]}),f.root&&v.jsx("p",{className:"text-sm text-destructive",children:f.root.message}),v.jsx(ct,{type:"submit",disabled:d,className:"w-full",children:d?"Saving…":"Set new password"})]})})]})})}function q3({value:e,onChange:t,placeholder:n,className:r}){return v.jsxs("div",{className:"relative",children:[v.jsx(y5,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),v.jsx(rn,{placeholder:n,value:e,onChange:a=>t(a.target.value),className:`h-8 pl-8 ${r??"w-48"}`})]})}function ES(e,[t,n]){return Math.min(n,Math.max(t,e))}function H3(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Sne=[" ","Enter","ArrowUp","ArrowDown"],_ne=[" ","Enter"],js="Select",[Cv,Rv,Ane]=PA(js),[Nc]=pa(js,[Ane,Cc]),Nv=Cc(),[Ene,$o]=Nc(js),[One,jne]=Nc(js),F3=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:d,name:m,autoComplete:h,disabled:g,required:x,form:A}=e,S=Nv(t),[w,E]=y.useState(null),[O,j]=y.useState(null),[R,C]=y.useState(!1),T=hd(d),[N,D]=Co({prop:r,defaultProp:a??!1,onChange:o,caller:js}),[z,G]=Co({prop:l,defaultProp:c,onChange:f,caller:js}),U=y.useRef(null),P=w?A||!!w.closest("form"):!0,[B,q]=y.useState(new Set),W=Array.from(B).map($=>$.props.value).join(";");return v.jsx(jA,{...S,children:v.jsxs(Ene,{required:x,scope:t,trigger:w,onTriggerChange:E,valueNode:O,onValueNodeChange:j,valueNodeHasChildren:R,onValueNodeHasChildrenChange:C,contentId:Na(),value:z,onValueChange:G,open:N,onOpenChange:D,dir:T,triggerPointerDownPosRef:U,disabled:g,children:[v.jsx(Cv.Provider,{scope:t,children:v.jsx(One,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback($=>{q(V=>new Set(V).add($))},[]),onNativeOptionRemove:y.useCallback($=>{q(V=>{const F=new Set(V);return F.delete($),F})},[]),children:n})}),P?v.jsxs(p4,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:h,value:z,onChange:$=>G($.target.value),disabled:g,form:A,children:[z===void 0?v.jsx("option",{value:""}):null,Array.from(B)]},W):null]})})};F3.displayName=js;var V3="SelectTrigger",G3=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Nv(n),l=$o(V3,n),c=l.disabled||r,f=ut(t,l.onTriggerChange),d=Rv(n),m=y.useRef("touch"),[h,g,x]=v4(S=>{const w=d().filter(j=>!j.disabled),E=w.find(j=>j.value===l.value),O=g4(w,S,E);O!==void 0&&l.onValueChange(O.value)}),A=S=>{c||(l.onOpenChange(!0),x()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return v.jsx(TA,{asChild:!0,...o,children:v.jsx(et.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":m4(l.value)?"":void 0,...a,ref:f,onClick:ze(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&A(S)}),onPointerDown:ze(a.onPointerDown,S=>{m.current=S.pointerType;const w=S.target;w.hasPointerCapture(S.pointerId)&&w.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(A(S),S.preventDefault())}),onKeyDown:ze(a.onKeyDown,S=>{const w=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(w&&S.key===" ")&&Sne.includes(S.key)&&(A(),S.preventDefault())})})})});G3.displayName=V3;var W3="SelectValue",Y3=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...c}=e,f=$o(W3,n),{onValueNodeHasChildrenChange:d}=f,m=o!==void 0,h=ut(t,f.onValueNodeChange);return Zn(()=>{d(m)},[d,m]),v.jsx(et.span,{...c,ref:h,style:{pointerEvents:"none"},children:m4(f.value)?v.jsx(v.Fragment,{children:l}):o})});Y3.displayName=W3;var Tne="SelectIcon",K3=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.jsx(et.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});K3.displayName=Tne;var Cne="SelectPortal",Z3=e=>v.jsx(od,{asChild:!0,...e});Z3.displayName=Cne;var Ts="SelectContent",X3=y.forwardRef((e,t)=>{const n=$o(Ts,e.__scopeSelect),[r,a]=y.useState();if(Zn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?rd.createPortal(v.jsx(Q3,{scope:e.__scopeSelect,children:v.jsx(Cv.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),o):null}return v.jsx(J3,{...e,ref:t})});X3.displayName=Ts;var _a=10,[Q3,zo]=Nc(Ts),Rne="SelectContentImpl",Nne=Yl("SelectContent.RemoveScroll"),J3=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w,...E}=e,O=$o(Ts,n),[j,R]=y.useState(null),[C,T]=y.useState(null),N=ut(t,me=>R(me)),[D,z]=y.useState(null),[G,U]=y.useState(null),P=Rv(n),[B,q]=y.useState(!1),W=y.useRef(!1);y.useEffect(()=>{if(j)return hA(j)},[j]),dA();const $=y.useCallback(me=>{const[we,...ce]=P().map(se=>se.ref.current),[_e]=ce.slice(-1),Ae=document.activeElement;for(const se of me)if(se===Ae||(se==null||se.scrollIntoView({block:"nearest"}),se===we&&C&&(C.scrollTop=0),se===_e&&C&&(C.scrollTop=C.scrollHeight),se==null||se.focus(),document.activeElement!==Ae))return},[P,C]),V=y.useCallback(()=>$([D,j]),[$,D,j]);y.useEffect(()=>{B&&V()},[B,V]);const{onOpenChange:F,triggerPointerDownPosRef:K}=O;y.useEffect(()=>{if(j){let me={x:0,y:0};const we=_e=>{var Ae,se;me={x:Math.abs(Math.round(_e.pageX)-(((Ae=K.current)==null?void 0:Ae.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((se=K.current)==null?void 0:se.y)??0))}},ce=_e=>{me.x<=10&&me.y<=10?_e.preventDefault():j.contains(_e.target)||F(!1),document.removeEventListener("pointermove",we),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",ce,{capture:!0})}}},[j,F,K]),y.useEffect(()=>{const me=()=>F(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[F]);const[ie,I]=v4(me=>{const we=P().filter(Ae=>!Ae.disabled),ce=we.find(Ae=>Ae.ref.current===document.activeElement),_e=g4(we,me,ce);_e&&setTimeout(()=>_e.ref.current.focus())}),Z=y.useCallback((me,we,ce)=>{const _e=!W.current&&!ce;(O.value!==void 0&&O.value===we||_e)&&(z(me),_e&&(W.current=!0))},[O.value]),X=y.useCallback(()=>j==null?void 0:j.focus(),[j]),oe=y.useCallback((me,we,ce)=>{const _e=!W.current&&!ce;(O.value!==void 0&&O.value===we||_e)&&U(me)},[O.value]),ge=r==="popper"?OS:e4,Ee=ge===OS?{side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w}:{};return v.jsx(Q3,{scope:n,content:j,viewport:C,onViewportChange:T,itemRefCallback:Z,selectedItem:D,onItemLeave:X,itemTextRefCallback:oe,focusSelectedItem:V,selectedItemText:G,position:r,isPositioned:B,searchRef:ie,children:v.jsx(ov,{as:Nne,allowPinchZoom:!0,children:v.jsx(av,{asChild:!0,trapped:O.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:ze(a,me=>{var we;(we=O.trigger)==null||we.focus({preventScroll:!0}),me.preventDefault()}),children:v.jsx(id,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:v.jsx(ge,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:me=>me.preventDefault(),...E,...Ee,onPlaced:()=>q(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:ze(E.onKeyDown,me=>{const we=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!we&&me.key.length===1&&I(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let _e=P().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(me.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const Ae=me.target,se=_e.indexOf(Ae);_e=_e.slice(se+1)}setTimeout(()=>$(_e)),me.preventDefault()}})})})})})})});J3.displayName=Rne;var Mne="SelectItemAlignedPosition",e4=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=$o(Ts,n),l=zo(Ts,n),[c,f]=y.useState(null),[d,m]=y.useState(null),h=ut(t,N=>m(N)),g=Rv(n),x=y.useRef(!1),A=y.useRef(!0),{viewport:S,selectedItem:w,selectedItemText:E,focusSelectedItem:O}=l,j=y.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&S&&w&&E){const N=o.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),z=o.valueNode.getBoundingClientRect(),G=E.getBoundingClientRect();if(o.dir!=="rtl"){const Ae=G.left-D.left,se=z.left-Ae,He=N.left-se,$e=N.width+He,Je=Math.max($e,D.width),We=window.innerWidth-_a,at=ES(se,[_a,Math.max(_a,We-Je)]);c.style.minWidth=$e+"px",c.style.left=at+"px"}else{const Ae=D.right-G.right,se=window.innerWidth-z.right-Ae,He=window.innerWidth-N.right-se,$e=N.width+He,Je=Math.max($e,D.width),We=window.innerWidth-_a,at=ES(se,[_a,Math.max(_a,We-Je)]);c.style.minWidth=$e+"px",c.style.right=at+"px"}const U=g(),P=window.innerHeight-_a*2,B=S.scrollHeight,q=window.getComputedStyle(d),W=parseInt(q.borderTopWidth,10),$=parseInt(q.paddingTop,10),V=parseInt(q.borderBottomWidth,10),F=parseInt(q.paddingBottom,10),K=W+$+B+F+V,ie=Math.min(w.offsetHeight*5,K),I=window.getComputedStyle(S),Z=parseInt(I.paddingTop,10),X=parseInt(I.paddingBottom,10),oe=N.top+N.height/2-_a,ge=P-oe,Ee=w.offsetHeight/2,me=w.offsetTop+Ee,we=W+$+me,ce=K-we;if(we<=oe){const Ae=U.length>0&&w===U[U.length-1].ref.current;c.style.bottom="0px";const se=d.clientHeight-S.offsetTop-S.offsetHeight,He=Math.max(ge,Ee+(Ae?X:0)+se+V),$e=we+He;c.style.height=$e+"px"}else{const Ae=U.length>0&&w===U[0].ref.current;c.style.top="0px";const He=Math.max(oe,W+S.offsetTop+(Ae?Z:0)+Ee)+ce;c.style.height=He+"px",S.scrollTop=we-oe+S.offsetTop}c.style.margin=`${_a}px 0`,c.style.minHeight=ie+"px",c.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[g,o.trigger,o.valueNode,c,d,S,w,E,o.dir,r]);Zn(()=>j(),[j]);const[R,C]=y.useState();Zn(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);const T=y.useCallback(N=>{N&&A.current===!0&&(j(),O==null||O(),A.current=!1)},[j,O]);return v.jsx(Dne,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:T,children:v.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:v.jsx(et.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});e4.displayName=Mne;var Pne="SelectPopperPosition",OS=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=_a,...o}=e,l=Nv(n);return v.jsx(CA,{...l,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});OS.displayName=Pne;var[Dne,sE]=Nc(Ts,{}),jS="SelectViewport",t4=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=zo(jS,n),l=sE(jS,n),c=ut(t,o.onViewportChange),f=y.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),v.jsx(Cv.Slot,{scope:n,children:v.jsx(et.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:ze(a.onScroll,d=>{const m=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&h){const x=Math.abs(f.current-m.scrollTop);if(x>0){const A=window.innerHeight-_a*2,S=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),E=Math.max(S,w);if(E<A){const O=E+x,j=Math.min(A,O),R=O-j;h.style.height=j+"px",h.style.bottom==="0px"&&(m.scrollTop=R>0?R:0,h.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});t4.displayName=jS;var n4="SelectGroup",[kne,$ne]=Nc(n4),zne=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Na();return v.jsx(kne,{scope:n,id:a,children:v.jsx(et.div,{role:"group","aria-labelledby":a,...r,ref:t})})});zne.displayName=n4;var r4="SelectLabel",a4=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=$ne(r4,n);return v.jsx(et.div,{id:a.id,...r,ref:t})});a4.displayName=r4;var Zp="SelectItem",[Lne,i4]=Nc(Zp),o4=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,c=$o(Zp,n),f=zo(Zp,n),d=c.value===r,[m,h]=y.useState(o??""),[g,x]=y.useState(!1),A=ut(t,O=>{var j;return(j=f.itemRefCallback)==null?void 0:j.call(f,O,r,a)}),S=Na(),w=y.useRef("touch"),E=()=>{a||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(Lne,{scope:n,value:r,disabled:a,textId:S,isSelected:d,onItemTextChange:y.useCallback(O=>{h(j=>j||((O==null?void 0:O.textContent)??"").trim())},[]),children:v.jsx(Cv.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:v.jsx(et.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:A,onFocus:ze(l.onFocus,()=>x(!0)),onBlur:ze(l.onBlur,()=>x(!1)),onClick:ze(l.onClick,()=>{w.current!=="mouse"&&E()}),onPointerUp:ze(l.onPointerUp,()=>{w.current==="mouse"&&E()}),onPointerDown:ze(l.onPointerDown,O=>{w.current=O.pointerType}),onPointerMove:ze(l.onPointerMove,O=>{var j;w.current=O.pointerType,a?(j=f.onItemLeave)==null||j.call(f):w.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ze(l.onPointerLeave,O=>{var j;O.currentTarget===document.activeElement&&((j=f.onItemLeave)==null||j.call(f))}),onKeyDown:ze(l.onKeyDown,O=>{var R;((R=f.searchRef)==null?void 0:R.current)!==""&&O.key===" "||(_ne.includes(O.key)&&E(),O.key===" "&&O.preventDefault())})})})})});o4.displayName=Zp;var Qu="SelectItemText",s4=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=$o(Qu,n),c=zo(Qu,n),f=i4(Qu,n),d=jne(Qu,n),[m,h]=y.useState(null),g=ut(t,E=>h(E),f.onItemTextChange,E=>{var O;return(O=c.itemTextRefCallback)==null?void 0:O.call(c,E,f.value,f.disabled)}),x=m==null?void 0:m.textContent,A=y.useMemo(()=>v.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:w}=d;return Zn(()=>(S(A),()=>w(A)),[S,w,A]),v.jsxs(v.Fragment,{children:[v.jsx(et.span,{id:f.textId,...o,ref:g}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?rd.createPortal(o.children,l.valueNode):null]})});s4.displayName=Qu;var l4="SelectItemIndicator",c4=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i4(l4,n).isSelected?v.jsx(et.span,{"aria-hidden":!0,...r,ref:t}):null});c4.displayName=l4;var TS="SelectScrollUpButton",u4=y.forwardRef((e,t)=>{const n=zo(TS,e.__scopeSelect),r=sE(TS,e.__scopeSelect),[a,o]=y.useState(!1),l=ut(t,r.onScrollButtonChange);return Zn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollTop>0;o(d)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(d4,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});u4.displayName=TS;var CS="SelectScrollDownButton",f4=y.forwardRef((e,t)=>{const n=zo(CS,e.__scopeSelect),r=sE(CS,e.__scopeSelect),[a,o]=y.useState(!1),l=ut(t,r.onScrollButtonChange);return Zn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<d;o(m)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(d4,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});f4.displayName=CS;var d4=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=zo("SelectScrollButton",n),l=y.useRef(null),c=Rv(n),f=y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return y.useEffect(()=>()=>f(),[f]),Zn(()=>{var m;const d=c().find(h=>h.ref.current===document.activeElement);(m=d==null?void 0:d.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),v.jsx(et.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:ze(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:ze(a.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:ze(a.onPointerLeave,()=>{f()})})}),Ine="SelectSeparator",h4=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(et.div,{"aria-hidden":!0,...r,ref:t})});h4.displayName=Ine;var RS="SelectArrow",Bne=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Nv(n),o=$o(RS,n),l=zo(RS,n);return o.open&&l.position==="popper"?v.jsx(RA,{...a,...r,ref:t}):null});Bne.displayName=RS;var Une="SelectBubbleInput",p4=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=y.useRef(null),o=ut(r,a),l=H3(t);return y.useEffect(()=>{const c=a.current;if(!c)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&m){const h=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(h)}},[l,t]),v.jsx(et.select,{...n,style:{...DL,...n.style},ref:o,defaultValue:t})});p4.displayName=Une;function m4(e){return e===""||e===void 0}function v4(e){const t=Yn(e),n=y.useRef(""),r=y.useRef(0),a=y.useCallback(l=>{const c=n.current+l;t(c),(function f(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function g4(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=qne(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function qne(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hne=F3,y4=G3,Fne=Y3,Vne=K3,Gne=Z3,b4=X3,Wne=t4,x4=a4,w4=o4,Yne=s4,Kne=c4,S4=u4,_4=f4,A4=h4;const Mo=Hne,Po=Fne,zi=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(y4,{ref:r,className:be("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,v.jsx(Vne,{asChild:!0,children:v.jsx(lA,{className:"h-4 w-4 opacity-50"})})]}));zi.displayName=y4.displayName;const E4=y.forwardRef(({className:e,...t},n)=>v.jsx(S4,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(J7,{className:"h-4 w-4"})}));E4.displayName=S4.displayName;const O4=y.forwardRef(({className:e,...t},n)=>v.jsx(_4,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(lA,{className:"h-4 w-4"})}));O4.displayName=_4.displayName;const Li=y.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>v.jsx(Gne,{children:v.jsxs(b4,{ref:a,className:be("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[v.jsx(E4,{}),v.jsx(Wne,{className:be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v.jsx(O4,{})]})}));Li.displayName=b4.displayName;const Zne=y.forwardRef(({className:e,...t},n)=>v.jsx(x4,{ref:n,className:be("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Zne.displayName=x4.displayName;const Ct=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(w4,{ref:r,className:be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(Kne,{children:v.jsx(d5,{className:"h-4 w-4"})})}),v.jsx(Yne,{children:t})]}));Ct.displayName=w4.displayName;const Xne=y.forwardRef(({className:e,...t},n)=>v.jsx(A4,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));Xne.displayName=A4.displayName;const yd=gA,Mv=oL,Qne=yA,j4=y.forwardRef(({className:e,...t},n)=>v.jsx(sd,{ref:n,className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));j4.displayName=sd.displayName;const Mc=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Qne,{children:[v.jsx(j4,{}),v.jsxs(ld,{ref:r,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,v.jsxs(lv,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[v.jsx(x5,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Mc.displayName=ld.displayName;const bd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});bd.displayName="DialogHeader";const Pc=y.forwardRef(({className:e,...t},n)=>v.jsx(cd,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",e),...t}));Pc.displayName=cd.displayName;const Jne=y.forwardRef(({className:e,...t},n)=>v.jsx(ud,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Jne.displayName=ud.displayName;function ere({onSuccess:e,appId:t}){const[n,r]=y.useState(!1),[a,o]=y.useState(null),[l,c]=y.useState("none"),f=y.useRef(null);function d(h){if(h.preventDefault(),!a)return;const g=new FormData;g.append("file",a),l!=="none"&&g.append("status",l),t&&g.append("app_id",String(t));const x=fetch("/api/v1/builds",{method:"POST",credentials:"include",body:g}).then(async A=>{if(!A.ok){const S=await A.json().catch(()=>({}));throw new Error(S.error??"Upload failed. Check the file format.")}e()});Et.promise(x,{loading:"Uploading build…",success:"Build uploaded",error:A=>A instanceof Error?A.message:"Failed to upload build"}),r(!1),o(null),c("none")}function m(h){r(h),h||(o(null),c("none"))}return v.jsxs(yd,{open:n,onOpenChange:m,children:[v.jsx(Mv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(bV,{className:"mr-2 h-4 w-4"}),"Upload build"]})}),v.jsxs(Mc,{className:"sm:max-w-md",children:[v.jsx(bd,{children:v.jsx(Pc,{children:"Upload build"})}),v.jsxs("form",{onSubmit:d,className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{children:"File"}),v.jsx("div",{className:"flex h-24 cursor-pointer items-center justify-center rounded-md border-2 border-dashed text-sm text-muted-foreground hover:border-primary",onClick:()=>{var h;return(h=f.current)==null?void 0:h.click()},onDragOver:h=>h.preventDefault(),onDrop:h=>{h.preventDefault();const g=h.dataTransfer.files[0];g&&o(g)},children:a?a.name:"Click or drag to upload"}),v.jsx("input",{ref:f,type:"file",accept:".zip,.apk",className:"hidden",onChange:h=>{var g;return o(((g=h.target.files)==null?void 0:g[0])??null)}}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["iOS: ",v.jsx("code",{children:".app.zip"})," (zip the ",v.jsx("code",{children:".app"})," folder after ",v.jsx("code",{children:"xcodebuild -sdk iphonesimulator"}),")  · Android: ",v.jsx("code",{children:".apk"})]})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Tt,{children:["Status ",v.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),v.jsxs(Mo,{value:l,onValueChange:c,children:[v.jsx(zi,{children:v.jsx(Po,{})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"none",children:"None"}),v.jsx(Ct,{value:"Backlog",children:"Backlog"}),v.jsx(Ct,{value:"In Progress",children:"In Progress"}),v.jsx(Ct,{value:"Done",children:"Done"}),v.jsx(Ct,{value:"Rejected",children:"Rejected"})]})]})]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(ct,{type:"button",variant:"outline",className:"w-24",onClick:()=>r(!1),children:"Cancel"}),v.jsx(ct,{type:"submit",className:"w-24",disabled:!a,children:"Upload"})]})]})]})]})}function Xp({className:e,...t}){return v.jsx("span",{className:be("font-mono text-xs tabular-nums tracking-tight",e),...t})}async function tre(){const e=await fetch("/api/v1/apps",{credentials:"include"});return e.ok?(await e.json()).items:[]}async function nre({appId:e,search:t,statusFilter:n}){const r=new URLSearchParams({app_id:String(e),limit:"100",sort:"uploaded_at",dir:"desc"});t&&r.set("q",t),n&&n!=="all"&&r.set("status",n);const a=await fetch(`/api/v1/builds?${r}`,{credentials:"include"});return a.ok?(await a.json()).items:[]}async function rre(e){const t=await fetch("/api/v1/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return t.status===409?{error:"App with this bundle ID and platform already exists"}:t.ok?t.json():null}async function are(e,t){await fetch(`/api/v1/builds/${e}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({status_label:t})})}async function ire(e){const t=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return t.ok?t.json():null}function ore(e){const t=new Map;for(const n of e){const r=n.version_name??"Unversioned";t.has(r)||t.set(r,[]),t.get(r).push(n)}return Array.from(t.entries()).map(([n,r])=>({versionName:n,builds:r}))}function sre({onSuccess:e}){const[t,n]=y.useState(!1),[r,a]=y.useState(""),[o,l]=y.useState(""),[c,f]=y.useState("ios"),[d,m]=y.useState(""),[h,g]=y.useState(!1);async function x(A){A.preventDefault(),m(""),g(!0);try{const S=await rre({name:r.trim(),bundle_id_key:o.trim(),platform:c});if(!S){m("Failed to create app");return}if("error"in S){m(S.error);return}n(!1),a(""),l(""),f("ios"),Et.success("App created"),e()}catch{Et.error("Failed to create app — check your network")}finally{g(!1)}}return v.jsxs(yd,{open:t,onOpenChange:n,children:[v.jsx(Mv,{asChild:!0,children:v.jsxs("button",{className:"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",children:[v.jsx(g5,{className:"size-3.5 shrink-0"}),v.jsx("span",{children:"Add App"})]})}),v.jsxs(Mc,{className:"sm:max-w-sm",children:[v.jsx(bd,{children:v.jsx(Pc,{children:"Add App"})}),v.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Tt,{htmlFor:"app-name",children:"Name"}),v.jsx(rn,{id:"app-name",value:r,onChange:A=>a(A.target.value),placeholder:"My App",required:!0})]}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Tt,{htmlFor:"bundle-id",children:"Bundle ID"}),v.jsx(rn,{id:"bundle-id",value:o,onChange:A=>l(A.target.value),placeholder:"com.example.myapp",required:!0})]}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Tt,{htmlFor:"platform",children:"Platform"}),v.jsxs(Mo,{value:c,onValueChange:A=>f(A),children:[v.jsx(zi,{id:"platform",children:v.jsx(Po,{})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"ios",children:"iOS"}),v.jsx(Ct,{value:"android",children:"Android"}),v.jsx(Ct,{value:"both",children:"Both"})]})]})]}),d&&v.jsx("p",{className:"text-sm text-destructive",children:d}),v.jsx(ct,{type:"submit",disabled:h,className:"w-full",children:h?"Creating…":"Create App"})]})]})]})}function lre({apps:e,selectedAppId:t,onSelect:n,onAdd:r}){return v.jsxs("aside",{className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[v.jsx("span",{className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Apps"}),e.length===0&&v.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:"No apps yet"}),e.map(a=>v.jsxs("button",{onClick:()=>n(a.id),className:["flex flex-col gap-0.5 rounded-md px-2 py-2 text-left text-sm hover:bg-accent overflow-hidden",a.id===t?"bg-accent font-medium":""].join(" "),children:[v.jsx("span",{className:"truncate",children:a.name}),v.jsx(Xp,{className:"text-muted-foreground truncate",children:a.bundle_id_key})]},a.id)),v.jsx("div",{className:"mt-1 border-t pt-1",children:v.jsx(sre,{onSuccess:r})})]})}const cre=Ec("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function Xl({className:e,variant:t,tone:n,...r}){return v.jsx("div",{className:be(cre({variant:t,tone:n}),e),...r})}var T4="AlertDialog",[ure]=pa(T4,[F5]),Fi=F5(),C4=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fi(t);return v.jsx(gA,{...r,...n,modal:!0})};C4.displayName=T4;var fre="AlertDialogTrigger",R4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Fi(n);return v.jsx(oL,{...a,...r,ref:t})});R4.displayName=fre;var dre="AlertDialogPortal",N4=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fi(t);return v.jsx(yA,{...r,...n})};N4.displayName=dre;var hre="AlertDialogOverlay",M4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Fi(n);return v.jsx(sd,{...a,...r,ref:t})});M4.displayName=hre;var ql="AlertDialogContent",[pre,mre]=ure(ql),vre=R5("AlertDialogContent"),P4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,o=Fi(n),l=y.useRef(null),c=ut(t,l),f=y.useRef(null);return v.jsx(RW,{contentName:ql,titleName:D4,docsSlug:"alert-dialog",children:v.jsx(pre,{scope:n,cancelRef:f,children:v.jsxs(ld,{role:"alertdialog",...o,...a,ref:c,onOpenAutoFocus:ze(a.onOpenAutoFocus,d=>{var m;d.preventDefault(),(m=f.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[v.jsx(vre,{children:r}),v.jsx(yre,{contentRef:l})]})})})});P4.displayName=ql;var D4="AlertDialogTitle",k4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Fi(n);return v.jsx(cd,{...a,...r,ref:t})});k4.displayName=D4;var $4="AlertDialogDescription",z4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Fi(n);return v.jsx(ud,{...a,...r,ref:t})});z4.displayName=$4;var gre="AlertDialogAction",L4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Fi(n);return v.jsx(lv,{...a,...r,ref:t})});L4.displayName=gre;var I4="AlertDialogCancel",B4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=mre(I4,n),o=Fi(n),l=ut(t,a);return v.jsx(lv,{...o,...r,ref:l})});B4.displayName=I4;var yre=({contentRef:e})=>{const t=`\`${ql}\` requires a description for the component to be accessible for screen reader users.
408
-
409
- You can add a description to the \`${ql}\` by passing a \`${$4}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
410
-
411
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ql}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
412
-
413
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},bre=C4,xre=R4,wre=N4,U4=M4,q4=P4,H4=L4,F4=B4,V4=k4,G4=z4;const Pv=bre,Sre=xre,_re=wre,W4=y.forwardRef(({className:e,...t},n)=>v.jsx(U4,{className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));W4.displayName=U4.displayName;const xd=y.forwardRef(({className:e,...t},n)=>v.jsxs(_re,{children:[v.jsx(W4,{}),v.jsx(q4,{ref:n,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));xd.displayName=q4.displayName;const wd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-2 text-center sm:text-left",e),...t});wd.displayName="AlertDialogHeader";const Sd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Sd.displayName="AlertDialogFooter";const _d=y.forwardRef(({className:e,...t},n)=>v.jsx(V4,{ref:n,className:be("text-lg font-semibold",e),...t}));_d.displayName=V4.displayName;const Ad=y.forwardRef(({className:e,...t},n)=>v.jsx(G4,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Ad.displayName=G4.displayName;const Dv=y.forwardRef(({className:e,...t},n)=>v.jsx(H4,{ref:n,className:be(rv(),e),...t}));Dv.displayName=H4.displayName;const Ed=y.forwardRef(({className:e,...t},n)=>v.jsx(F4,{ref:n,className:be(rv({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ed.displayName=F4.displayName;const Y4={Backlog:"backlog","In Progress":"progress",Done:"done",Rejected:"rejected"};function VR(e){return e.version_name&&e.build_number?`${e.version_name} · build ${e.build_number}`:e.version_name??e.version_label??(e.build_number?`build ${e.build_number}`:"Build")}function Are(e){const r=new Date(e).getTime()+6048e5-Date.now();if(r<=0)return{label:"Expired",urgent:!0};const a=Math.floor(r/36e5);return a<1?{label:"< 1 hour left",urgent:!0}:a<24?{label:`Expires in ${a}h`,urgent:a<6}:{label:`Expires in ${Math.floor(a/24)}d`,urgent:!1}}function Ere({build:e,isLast:t,onNavigate:n,onStatusChange:r}){const[a,o]=y.useState(!1),l=e.status_label==="Done",c=l&&e.completed_at?Are(e.completed_at):null;function f(d){if(d==="Done"){o(!0);return}r(e.id,d==="none"?null:d)}return v.jsxs(v.Fragment,{children:[v.jsx(Pv,{open:a,onOpenChange:o,children:v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Mark as Done?"}),v.jsx(Ad,{children:"Build files will be automatically deleted after 7 days. Reverting the status will cancel the scheduled deletion."})]}),v.jsxs(Sd,{children:[v.jsx(Ed,{children:"Cancel"}),v.jsx(Dv,{onClick:()=>{r(e.id,"Done"),o(!1)},children:"Confirm"})]})]})}),v.jsxs("div",{className:["flex items-center gap-3 px-4 py-3",t?"":"border-b"].join(" "),children:[v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[v.jsxs("span",{className:"text-sm font-medium",children:["build ",v.jsx(Xp,{children:e.build_number??"—"})]}),v.jsx(Xl,{tone:e.platform==="ios"?"ios":"android",className:"text-xs capitalize",children:e.platform}),e.status_label&&v.jsx(Xl,{tone:Y4[e.status_label],className:"text-xs",children:e.status_label})]}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"14px",marginTop:"0.7rem",alignItems:"center"},className:"text-xs text-muted-foreground",children:[e.uploader&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:e.uploader}),v.jsx(Ja,{orientation:"vertical",className:"h-3"})]}),v.jsx(Xp,{children:new Date(e.uploaded_at).toLocaleDateString()}),c&&v.jsxs(v.Fragment,{children:[v.jsx(Ja,{orientation:"vertical",className:"h-3"}),v.jsx("span",{className:c.urgent?"text-destructive":"",children:c.label})]})]})]}),v.jsxs(Mo,{value:e.status_label??"none",onValueChange:f,children:[v.jsx(zi,{className:"h-9 w-32 text-xs",children:v.jsx(Po,{})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"none",children:v.jsx("span",{className:"text-muted-foreground",children:"—"})}),v.jsx(Ct,{value:"Backlog",children:"Backlog"}),v.jsx(Ct,{value:"In Progress",children:"In Progress"}),v.jsx(Ct,{value:"Done",children:"Done"}),v.jsx(Ct,{value:"Rejected",children:"Rejected"})]})]}),v.jsxs(ct,{size:"sm",onClick:()=>n(e.id),disabled:l,children:[v.jsx(uA,{className:"mr-1.5 h-3.5 w-3.5"}),"Start QA"]})]})]})}function Ore({versionName:e,builds:t,isOpen:n,onToggle:r,onNavigate:a,onStatusChange:o}){return v.jsxs("div",{className:"rounded-lg shadow-card-2 overflow-hidden",children:[v.jsxs("button",{className:"flex w-full items-center gap-2 px-4 py-3 text-left hover:bg-accent/50 bg-card",onClick:r,children:[n?v.jsx(lA,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):v.jsx(cA,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),v.jsx(Xp,{className:"font-medium text-sm text-foreground",children:e}),v.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.length," build",t.length>1?"s":"",")"]})]}),n&&v.jsx("div",{className:"border-t bg-card",children:t.map((l,c)=>v.jsx(Ere,{build:l,isLast:c===t.length-1,onNavigate:a,onStatusChange:o},l.id))})]})}function jre(){const e=$a(),[t,n]=nd(),[r,a]=y.useState([]),[o,l]=y.useState([]),[c,f]=y.useState(""),[d,m]=y.useState("all"),[h,g]=y.useState(!0),[x,A]=y.useState(new Set),S=t.get("appId")?Number(t.get("appId")):null,w=r.find(N=>N.id===S)??null,E=y.useCallback(async()=>{const N=await tre();a(N),!t.get("appId")&&N.length>0&&n({appId:String(N[0].id)},{replace:!0})},[t,n]),O=y.useCallback(async()=>{if(!S){l([]),g(!1);return}g(!0);try{const N=await nre({appId:S,search:c,statusFilter:d});l(N),N.length>0&&x.size===0&&A(new Set([N[0].version_name??"Unversioned"]))}finally{g(!1)}},[S,c,d]);y.useEffect(()=>{E()},[]),y.useEffect(()=>{O()},[O]);function j(N){N!==S&&(l([]),A(new Set)),n({appId:String(N)})}function R(N){A(D=>{const z=new Set(D);return z.has(N)?z.delete(N):z.add(N),z})}async function C(N,D){await are(N,D),l(z=>z.map(G=>G.id===N?{...G,status_label:D}:G))}const T=ore(o);return v.jsxs("div",{className:"flex h-full gap-0",children:[v.jsx(lre,{apps:r,selectedAppId:S,onSelect:j,onAdd:E}),v.jsxs("main",{className:"flex-1 flex flex-col gap-4 p-4 overflow-y-auto min-w-0",children:[v.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:w?w.name:"App Center"}),v.jsx(ere,{onSuccess:()=>{E(),O()},appId:S})]}),S?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.jsx(q3,{placeholder:"Search version…",value:c,onChange:f}),v.jsxs(Mo,{value:d,onValueChange:m,children:[v.jsx(zi,{className:"h-8 w-36",children:v.jsx(Po,{placeholder:"Status"})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"all",children:"All statuses"}),v.jsx(Ct,{value:"Backlog",children:"Backlog"}),v.jsx(Ct,{value:"In Progress",children:"In Progress"}),v.jsx(Ct,{value:"Done",children:"Done"}),v.jsx(Ct,{value:"Rejected",children:"Rejected"})]})]})]}),h?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):T.length===0?v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(fV,{className:"w-8 h-8 text-muted-foreground/40"}),v.jsx("p",{className:"text-sm font-medium",children:"No builds yet"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload the first build to get started."})]}):v.jsx("div",{className:"flex flex-col gap-2",children:T.map(({versionName:N,builds:D})=>v.jsx(Ore,{versionName:N,builds:D,isOpen:x.has(N),onToggle:()=>R(N),onNavigate:z=>e(`/app-center/build?id=${z}`),onStatusChange:C},N))})]}):v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(sV,{className:"w-8 h-8 text-muted-foreground/40"}),v.jsx("p",{className:"text-sm font-medium",children:"No app selected"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose an app from the sidebar to view its builds."})]})]})]})}function Tre(e){const[t,n]=y.useState(null);return y.useEffect(()=>{e&&ire(e).then(n)},[e]),{build:t}}const Cre=location.protocol==="https:"?"wss:":"ws:",Rre=`${Cre}//${location.host}`,Nre=2e3;function lE(e,t){const n=y.useRef(null),[r,a]=y.useState(!1),o=y.useRef(e);o.current=e;const l=y.useRef(t);return l.current=t,y.useEffect(()=>{let f=!1;const d=()=>{if(f)return;const m=new WebSocket(Rre);m.binaryType="arraybuffer",n.current=m,m.onopen=()=>a(!0),m.onclose=()=>{a(!1),f||setTimeout(d,Nre)},m.onmessage=h=>{var g;if(h.data instanceof ArrayBuffer){(g=l.current)==null||g.call(l,h.data);return}try{o.current(JSON.parse(h.data))}catch{}}};return d(),()=>{var m;f=!0,(m=n.current)==null||m.close()}},[]),{send:y.useCallback(f=>{var d;((d=n.current)==null?void 0:d.readyState)===WebSocket.OPEN&&n.current.send(JSON.stringify(f))},[]),connected:r}}function Mre(e){const[t,n]=y.useState([]),[r,a]=y.useState(null),[o,l]=y.useState(null),[c,f]=y.useState(""),[d,m]=y.useState(!1),[h,g]=y.useState(""),x=y.useCallback(T=>{T.type==="agents:listed"&&n(T.sessions),T.type==="session:joined"&&(m(!1),g("Connected")),T.type==="error"&&(m(!1),g(`Error: ${T.message}`))},[]),{send:A,connected:S}=lE(x);y.useEffect(()=>{if(!S)return;A({type:"agents:list"});const T=setInterval(()=>A({type:"agents:list"}),5e3);return()=>clearInterval(T)},[S,A]);const w=y.useRef({sessionId:o,deviceId:c});y.useEffect(()=>{w.current={sessionId:o,deviceId:c}},[o,c]),y.useEffect(()=>()=>{const{sessionId:T,deviceId:N}=w.current;T&&N&&A({type:"device:shutdown",sessionId:T,payload:{deviceId:N}})},[A]);const E=t.filter(T=>T.devices.some(N=>N.platform===e)),O=y.useCallback(T=>{f(T.id),m(!0),g("Booting…"),l(T.sessionId)},[]),j=y.useCallback(()=>f(""),[]),R=y.useCallback(()=>{const{sessionId:T,deviceId:N}=w.current;T&&N&&A({type:"device:shutdown",sessionId:T,payload:{deviceId:N}}),l(null),m(!1),g("")},[A]),C=y.useCallback(()=>{const{sessionId:T,deviceId:N}=w.current;T&&N&&A({type:"device:shutdown",sessionId:T,payload:{deviceId:N}}),l(null),a(null),m(!1),g("")},[A]);return{sessions:t,selectedAgent:r,setSelectedAgent:a,activeSessionId:o,deviceId:c,booting:d,status:h,send:A,connected:S,agentGroups:E,startDevice:O,resetDevice:j,handleBack:R,handleBackToMacs:C}}function Pre(e,t){const[n,r]=y.useState(""),[a,o]=y.useState(""),[l,c]=y.useState("app-only"),f=(e==null?void 0:e.devices.filter(h=>h.platform===t))??[],d=[...new Set(f.map(h=>h.osVersion).filter(Boolean))].sort((h,g)=>{const x=w=>w.replace(/^[^\d]*/,"").split(".").map(Number),[A,S]=[x(h),x(g)];for(let w=0;w<Math.max(A.length,S.length);w++){const E=(S[w]??0)-(A[w]??0);if(E!==0)return E}return 0}),m=(n?f.filter(h=>h.osVersion===n):f).filter(h=>!a||h.name.toLowerCase().includes(a.toLowerCase()));return{filteredDevices:f,osVersions:d,osVersion:n,setOsVersion:r,deviceSearch:a,setDeviceSearch:o,versionedDevices:m,resetMode:l,setResetMode:c}}function Dre(){const[e]=nd(),t=e.get("perf")==="1",[n,r]=y.useState(t);return y.useEffect(()=>{if(!t){r(!1);return}r(!0);const a=o=>{o.ctrlKey&&o.shiftKey&&o.key==="P"&&r(l=>!l)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t]),{perfMode:t,visible:n}}const kre=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"];function K4({sessionId:e,buildId:t,onRecordingUploaded:n}){const[r,a]=y.useState("idle"),o=y.useRef(null),l=y.useRef(n);y.useEffect(()=>{l.current=n},[n]);const c=y.useRef(!1),f=y.useRef(null),d=y.useRef([]),m=y.useRef(""),h=y.useRef(0),g=y.useRef(null),x=y.useCallback(()=>{var w;c.current&&((w=g.current)==null||w.call(g),h.current=requestAnimationFrame(x))},[]),A=y.useCallback(w=>{const E=o.current;if(!E)return;const O=E.getContext("2d");O&&(O.fillStyle="#000",O.fillRect(0,0,E.width,E.height));const j=kre.find(C=>MediaRecorder.isTypeSupported(C))??"";if(!j)return;m.current=j,d.current=[];const R=new MediaRecorder(E.captureStream(30),{mimeType:j});R.ondataavailable=C=>{C.data.size>0&&d.current.push(C.data)},f.current=R,R.start(1e3),g.current=w,c.current=!0,h.current=requestAnimationFrame(x),a("recording")},[x]),S=y.useCallback(async()=>{var C;a("uploading"),c.current=!1,cancelAnimationFrame(h.current);const w=f.current;if(!w){a("idle");return}await new Promise(T=>{const N=setTimeout(T,5e3);w.onstop=()=>{clearTimeout(N),T()};try{w.stop()}catch{clearTimeout(N),T()}}),f.current=null;const E=m.current,O=E.includes("mp4")?".mp4":".webm",j=new Blob(d.current,{type:E});d.current=[];const R=new FormData;R.append("file",j,`tapflow-${Date.now()}${O}`);try{const T=new URLSearchParams({sessionId:e});t&&T.set("buildId",String(t));const N=await fetch(`/api/v1/recordings/upload?${T}`,{method:"POST",credentials:"include",body:R}),D=await N.json();if(N.ok&&D.url){const z=document.createElement("a");z.href=D.url,z.download="",z.click(),(C=l.current)==null||C.call(l),a("done"),setTimeout(()=>a("idle"),2e3)}else a("idle")}catch{a("idle")}},[e,t]);return y.useEffect(()=>{if(r!=="recording")return;const w=()=>{document.visibilityState==="hidden"&&S()};return document.addEventListener("visibilitychange",w),()=>{var E;document.removeEventListener("visibilitychange",w),c.current&&(c.current=!1,cancelAnimationFrame(h.current),(E=f.current)==null||E.stop(),f.current=null)}},[r,S]),{recordState:r,recordCanvasRef:o,startClientRecording:A,stopClientRecording:S}}function Z4(){const e=y.useRef(0),[t,n]=y.useState(0);return y.useEffect(()=>{const r=setInterval(()=>{n(e.current),e.current=0},1e3);return()=>clearInterval(r)},[]),{fps:t,frameCount:e}}function fs({className:e,...t}){return v.jsx("kbd",{"data-slot":"kbd",className:be("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e),...t})}function NS({className:e,...t}){return v.jsx("kbd",{"data-slot":"kbd-group",className:be("inline-flex items-center gap-1",e),...t})}function Lu({label:e,keys:t}){return v.jsxs("span",{className:"flex items-center gap-3",children:[e,v.jsx(NS,{children:t.map(n=>v.jsx(fs,{children:n},n))})]})}function X4({joined:e,onScreenshot:t,onRecordToggle:n,recordState:r,onRotate:a,onDeepLink:o,platformSlot:l,launchSlot:c}){return e?v.jsx(Bp,{delayDuration:400,children:v.jsxs("div",{className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 backdrop-blur-sm px-1.5 py-2.5 shrink-0 mt-3",children:[c,l,v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:o,children:v.jsx(m5,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsx(Lu,{label:"Deeplink",keys:["⌘","K"]})})]}),v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:t,children:v.jsx(Q7,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsx(Lu,{label:"Screenshot",keys:["⌘","S"]})})]}),v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:be("h-8 w-8",r==="recording"&&"text-red-500 hover:text-red-500"),disabled:r==="uploading"||r==="done",onClick:n,children:r==="uploading"?v.jsx(Dp,{className:"h-4 w-4 animate-spin"}):r==="recording"?v.jsx(vV,{className:"h-4 w-4 fill-current"}):v.jsx(SV,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:r==="idle"?v.jsx(Lu,{label:"Start recording",keys:["⌘","⇧","Y"]}):r==="recording"?v.jsx(Lu,{label:"Stop recording",keys:["⌘","⇧","Y"]}):"Processing…"})]}),v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:a,children:v.jsx(pV,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsx(Lu,{label:"Rotate",keys:["⌘","⇧","O"]})})]})]})}):null}function $re(e){const{connected:t,joined:n,bootError:r,deviceReady:a,installing:o,installError:l}=e;return t?n?r?`Boot failed: ${r.length>40?r.slice(0,40)+"…":r}`:a?o?"Installing app…":l?`Install failed: ${l}`:null:"Starting device…":"Joining session…":"Connecting…"}function cE(e){const{joined:t,fps:n,keyboardActive:r}=e,a=$re(e),o=n>15,l=n>0&&n<=15,c=o?"#10b981":l?"#94a3b8":"transparent",f=o?"Active":l?"Idle":null;return v.jsxs("div",{className:"w-[300px] shrink-0 mt-3 rounded-xl border bg-background px-4 py-4 flex flex-col gap-3",children:[v.jsxs("div",{className:be("flex items-center",r?"text-emerald-500":"text-muted-foreground"),style:{gap:6},children:[v.jsx(mV,{className:"h-3.5 w-3.5 shrink-0"}),v.jsx("span",{className:"text-[12px] font-medium",children:"Focus"})]}),t&&n>0&&v.jsxs("div",{className:"flex items-center",style:{gap:6},children:[v.jsx("span",{className:"h-2 w-2 rounded-full shrink-0",style:{background:c}}),v.jsx("span",{className:"text-[12px] font-mono text-foreground/75",children:n}),v.jsx("span",{className:"text-[12px] text-muted-foreground",children:"fps"}),f&&v.jsxs("span",{className:be("text-[11px]",o?"text-emerald-500":"text-muted-foreground/60"),children:["· ",f]})]}),a&&v.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-all",children:a})]})}function Q4({open:e,onOpenChange:t,sessionId:n,send:r}){const[a,o]=y.useState(""),l=y.useRef(null);y.useEffect(()=>{e?setTimeout(()=>{var f;return(f=l.current)==null?void 0:f.focus()},0):o("")},[e]);const c=()=>{a.trim()&&(r({type:"open-url",sessionId:n,payload:{url:a.trim()}}),t(!1))};return v.jsx(yd,{open:e,onOpenChange:t,children:v.jsxs(Mc,{className:"w-[500px] max-w-[500px] h-[52px] !rounded-[18px] p-[10px] border border-border bg-background shadow-lg overflow-hidden [&>button]:hidden","aria-describedby":void 0,children:[v.jsx(Pc,{className:"sr-only",children:"Open Deeplink"}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("div",{className:"flex-1 h-[32px] flex items-center gap-2 pl-[4px] pb-[1px]",children:[v.jsx(y5,{className:"h-4 w-4 text-muted-foreground shrink-0"}),v.jsx("input",{ref:l,className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground min-w-0",placeholder:"myapp://home...",value:a,onChange:f=>o(f.target.value),onKeyDown:f=>{f.key==="Enter"&&c()}})]}),v.jsx(ct,{size:"sm",disabled:!a.trim(),onClick:c,className:"shrink-0 rounded-xl h-8 px-4",children:"Open"})]})]})})}function zre(e,t,n,r,a,o){const{x:l,y:c,width:f,height:d}=a;let m,h;if(o){const g=(e.x-t.left)/t.width;m=(1-(e.y-t.top)/t.height)*n,h=g*r}else m=(e.x-t.left)*(n/t.width),h=(e.y-t.top)*(r/t.height);return m<l||m>l+f||h<c||h>c+d?null:{x:(m-l)/f,y:(h-c)/d}}function Lre(e,t,n){const r=(e.x-t.left)/t.width,a=(e.y-t.top)/t.height;return r<0||r>1||a<0||a>1?null:n?{x:a,y:1-r}:{x:r,y:a}}function J4(e){return{f0:{x:1-e.x,y:1-e.y},f1:e}}function Ire(e,t){return e>0?Math.min(1,t/e):1}class MS{constructor(t){this.bytes=t,this.bitPos=0}get position(){return this.bitPos}bit(){const t=this.bitPos>>3,n=7-(this.bitPos&7);return this.bitPos++,t>=this.bytes.length?0:this.bytes[t]>>n&1}bits(t){let n=0;for(let r=0;r<t;r++)n=n<<1|this.bit();return n>>>0}flag(){return this.bit()===1}ue(){let t=0;for(;this.bit()===0&&t<32;)t++;return t===0?0:(1<<t)-1+this.bits(t)}se(){const t=this.ue();return t&1?Math.ceil(t/2):-Math.ceil(t/2)}}class Bre{constructor(){this.bitsArr=[]}bit(t){this.bitsArr.push(t&1)}ue(t){const n=t+1,r=Math.floor(Math.log2(n));for(let a=0;a<r;a++)this.bit(0);for(let a=r;a>=0;a--)this.bit(n>>a&1)}toBytes(){const t=[];for(let n=0;n<this.bitsArr.length;n+=8){let r=0;for(let a=0;a<8;a++)r=r<<1|(this.bitsArr[n+a]??0);t.push(r)}return new Uint8Array(t)}}function eB(e){const t=[];let n=0;for(let r=1;r<e.length;r++){const a=e[r];if(n>=2&&a===3){n=0;continue}t.push(a),n=a===0?n+1:0}return new Uint8Array(t)}function Ure(e){const t=[];let n=0;for(const r of e)n>=2&&r<=3&&(t.push(3),n=0),t.push(r),n=r===0?n+1:0;return new Uint8Array(t)}const qre=new Set([100,110,122,244,44,83,86,118,128,138,139,134,135]);function GR(e){const t=e.ue()+1;e.bits(4),e.bits(4);for(let n=0;n<t;n++)e.ue(),e.ue(),e.flag();e.bits(5),e.bits(5),e.bits(5),e.bits(5)}function tB(e){const t=e.bits(8);e.bits(8);const n=e.bits(8);if(e.ue(),qre.has(t)){const h=e.ue();if(h===3&&e.flag(),e.ue(),e.ue(),e.flag(),e.flag()){const g=h!==3?8:12;for(let x=0;x<g;x++)if(e.flag()){const A=x<6?16:64;let S=8,w=8;for(let E=0;E<A;E++)w!==0&&(w=(S+e.se()+256)%256),S=w===0?S:w}}}e.ue();const r=e.ue();if(r===0)e.ue();else if(r===1){e.flag(),e.se(),e.se();const h=e.ue();for(let g=0;g<h;g++)e.se()}const a=e.ue();e.flag(),e.ue(),e.ue(),e.flag()||e.flag(),e.flag(),e.flag()&&(e.ue(),e.ue(),e.ue(),e.ue());const o={profileIdc:t,levelIdc:n,numRefFrames:a,bitstreamRestriction:!1,maxNumReorderFrames:null,maxDecFrameBuffering:null};if(!e.flag())return{...o,vuiPresent:!1,restrictionFlagPos:-1};e.flag()&&e.bits(8)===255&&(e.bits(16),e.bits(16)),e.flag()&&e.flag(),e.flag()&&(e.bits(3),e.flag(),e.flag()&&(e.bits(8),e.bits(8),e.bits(8))),e.flag()&&(e.ue(),e.ue()),e.flag()&&(e.bits(32),e.bits(32),e.flag());const c=e.flag();c&&GR(e);const f=e.flag();f&&GR(e),(c||f)&&e.flag(),e.flag();const d=e.position;return e.flag()?(e.flag(),e.ue(),e.ue(),e.ue(),e.ue(),{...o,vuiPresent:!0,bitstreamRestriction:!0,maxNumReorderFrames:e.ue(),maxDecFrameBuffering:e.ue(),restrictionFlagPos:d}):{...o,vuiPresent:!0,restrictionFlagPos:d}}function Hre(e){const t=tB(new MS(eB(e)));return{profileIdc:t.profileIdc,levelIdc:t.levelIdc,vuiPresent:t.vuiPresent,bitstreamRestriction:t.bitstreamRestriction,maxNumReorderFrames:t.maxNumReorderFrames,maxDecFrameBuffering:t.maxDecFrameBuffering}}function Fre(e){const t=eB(e),n=tB(new MS(t));if(!n.vuiPresent||n.restrictionFlagPos<0||n.bitstreamRestriction)return null;const r=new Bre,a=new MS(t);for(let o=0;o<n.restrictionFlagPos;o++)r.bit(a.bit());return r.bit(1),r.bit(1),r.ue(0),r.ue(0),r.ue(0),r.ue(0),r.ue(0),r.ue(n.numRefFrames),r.bit(1),Uint8Array.from([e[0],...Ure(r.toBytes())])}function Vre(e){const t=[],n=e.length;let r=-1,a=0;for(;a+2<n;){const o=a+3<n&&e[a]===0&&e[a+1]===0&&e[a+2]===0&&e[a+3]===1,l=e[a]===0&&e[a+1]===0&&e[a+2]===1;o||l?(r>=0&&t.push(e.subarray(r,a)),a+=o?4:3,r=a):a++}return r>=0&&t.push(e.subarray(r,n)),t}class Gre{constructor(t){this.onFrame=t,this.decoder=null,this.sps=null,this.pps=null,this.frameCount=0,this.submitAt=new Map,this.spsLogged=!1}setDecodeSampler(t){this.decodeSampler=t}decode(t){const n=[];let r=!1;for(const d of Vre(new Uint8Array(t))){const m=d[0]&31;if(m===7){const h=!this.sps||d.length!==this.sps.length||d.some((g,x)=>g!==this.sps[x]);this.sps=d,h&&this.decoder&&(this.decoder.close(),this.decoder=null)}else m===8?this.pps=d:m>=1&&m<=5&&(m===5&&(r=!0),n.push(d))}if(r&&this.sps&&this.pps&&!this.decoder&&this.initDecoder(this.sps,this.pps),!this.decoder||n.length===0)return;let a=0;for(const d of n)a+=4+d.length;const o=new Uint8Array(a),l=new DataView(o.buffer);let c=0;for(const d of n)l.setUint32(c,d.length,!1),c+=4,o.set(d,c),c+=d.length;const f=Math.round(this.frameCount++*(1e6/30));if(this.decodeSampler&&(this.submitAt.set(f,performance.now()),this.submitAt.size>120)){const d=this.submitAt.keys().next().value;d!==void 0&&this.submitAt.delete(d)}try{this.decoder.decode(new EncodedVideoChunk({type:r?"key":"delta",timestamp:f,data:o}))}catch{}}sampleDecode(t){var r;if(!this.decodeSampler)return;const n=this.submitAt.get(t.timestamp);n!==void 0&&(this.submitAt.delete(t.timestamp),this.decodeSampler({decodeMs:performance.now()-n,queueSize:((r=this.decoder)==null?void 0:r.decodeQueueSize)??0}))}close(){var t;(t=this.decoder)==null||t.close(),this.decoder=null}logSpsVui(t){if(!(this.spsLogged||!this.decodeSampler)){this.spsLogged=!0;try{console.log("[sps-vui]",JSON.stringify(Hre(t)))}catch(n){console.warn("[sps-vui] parse failed",n)}}}initDecoder(t,n){this.logSpsVui(t);const r=Fre(t)??t,a=r[0]===0?r.subarray(4):r,o=`avc1.${a[1].toString(16).padStart(2,"0")}${a[2].toString(16).padStart(2,"0")}${a[3].toString(16).padStart(2,"0")}`,l=this.buildAVCC(r,n);this.decoder=new VideoDecoder({output:c=>{this.sampleDecode(c),this.onFrame(c)},error:c=>console.error("[WebCodecsCore]",c)}),this.decoder.configure({codec:o,description:l,optimizeForLatency:!0})}buildAVCC(t,n){const r=t[0]===0?t.subarray(4):t,a=n[0]===0?n.subarray(4):n,o=new Uint8Array(8+r.length+1+2+a.length);let l=0;return o[l++]=1,o[l++]=r[1],o[l++]=r[2],o[l++]=r[3],o[l++]=255,o[l++]=225,o[l++]=r.length>>8&255,o[l++]=r.length&255,o.set(r,l),l+=r.length,o[l++]=1,o[l++]=a.length>>8&255,o[l++]=a.length&255,o.set(a,l),o}}const Wre=`#version 300 es
414
- in vec2 a_pos;
415
- out vec2 v_uv;
416
- void main() {
417
- v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
418
- gl_Position = vec4(a_pos, 0.0, 1.0);
419
- }`,Yre=`#version 300 es
420
- precision mediump float;
421
- in vec2 v_uv;
422
- uniform sampler2D u_tex;
423
- out vec4 out_color;
424
- void main() {
425
- out_color = texture(u_tex, v_uv);
426
- }`;function Kre(e){const t=e.getContext("webgl2",{alpha:!1,antialias:!1,powerPreference:"high-performance",preserveDrawingBuffer:!0});if(!t)return null;const n=(m,h)=>{const g=t.createShader(m);return t.shaderSource(g,h),t.compileShader(g),g},r=t.createProgram(),a=n(t.VERTEX_SHADER,Wre),o=n(t.FRAGMENT_SHADER,Yre);t.attachShader(r,a),t.attachShader(r,o),t.linkProgram(r),t.deleteShader(a),t.deleteShader(o),t.useProgram(r);const l=t.createVertexArray();t.bindVertexArray(l);const c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);const f=t.getAttribLocation(r,"a_pos");t.enableVertexAttribArray(f),t.vertexAttribPointer(f,2,t.FLOAT,!1,0,0),t.bindVertexArray(null);const d=t.createTexture();return t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,d),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.uniform1i(t.getUniformLocation(r,"u_tex"),0),{gl:t,program:r,tex:d,vao:l}}class Zre{constructor(t){this.canvas=t,this.state=null}init(){return this.state=Kre(this.canvas),this.state!==null}drawFrame(t){const n=this.state;if(!n)return t.close(),null;const r=t.displayWidth,a=t.displayHeight;try{return(this.canvas.width!==r||this.canvas.height!==a)&&(this.canvas.width=r,this.canvas.height=a,n.gl.viewport(0,0,r,a)),n.gl.activeTexture(n.gl.TEXTURE0),n.gl.bindTexture(n.gl.TEXTURE_2D,n.tex),n.gl.texImage2D(n.gl.TEXTURE_2D,0,n.gl.RGBA,n.gl.RGBA,n.gl.UNSIGNED_BYTE,t),n.gl.bindVertexArray(n.vao),n.gl.drawArrays(n.gl.TRIANGLES,0,6),n.gl.bindVertexArray(null),n.gl.bindTexture(n.gl.TEXTURE_2D,null),{width:r,height:a}}finally{t.close()}}dispose(){const t=this.state;t&&(t.gl.deleteTexture(t.tex),t.gl.deleteVertexArray(t.vao),t.gl.deleteProgram(t.program),this.state=null)}}function Xre(e){const t=new Zre(e);return t.init(),t}class Qre{constructor(t=Xre){this._size=null,this.canvas=document.createElement("canvas"),this.renderer=t(this.canvas),this.core=new Gre(n=>this.render(n))}get surface(){return this.canvas}get size(){return this._size}onResize(t){this.resizeCb=t}onDecodedFrame(t){this.decodedCb=t,this.core.setDecodeSampler(n=>{this.lastSample=n})}decode(t){this.core.decode(t)}close(){this.core.close(),this.renderer.dispose()}render(t){var r,a;const n=this.renderer.drawFrame(t);n&&((r=this.decodedCb)==null||r.call(this,performance.now(),this.lastSample),this.lastSample=void 0,(!this._size||this._size.width!==n.width||this._size.height!==n.height)&&(this._size=n,(a=this.resizeCb)==null||a.call(this,n)))}}const Jre=`#version 300 es
427
- in vec2 a_pos;
428
- out vec2 v_uv;
429
- void main() {
430
- v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
431
- gl_Position = vec4(a_pos, 0.0, 1.0);
432
- }`,eae=`#version 300 es
433
- precision mediump float;
434
- in vec2 v_uv;
435
- uniform sampler2D u_texY;
436
- uniform sampler2D u_texU;
437
- uniform sampler2D u_texV;
438
- out vec4 out_color;
439
- void main() {
440
- float Y = (texture(u_texY, v_uv).r - 0.0627451) * 1.1643836; // (y-16/255)*255/219
441
- float U = (texture(u_texU, v_uv).r - 0.5019608) * 1.1383929; // (u-128/255)*255/224
442
- float V = (texture(u_texV, v_uv).r - 0.5019608) * 1.1383929;
443
- float r = Y + 1.5748 * V;
444
- float g = Y - 0.1873 * U - 0.4681 * V;
445
- float b = Y + 1.8556 * U;
446
- out_color = vec4(r, g, b, 1.0);
447
- }`;function Xb(e,t,n,r){const a=e.createTexture();return e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.uniform1i(e.getUniformLocation(r,n),t),a}function tae(e){const t=e.getContext("webgl2",{alpha:!1,antialias:!1,powerPreference:"high-performance",preserveDrawingBuffer:!0});if(!t)return null;const n=(g,x)=>{const A=t.createShader(g);return t.shaderSource(A,x),t.compileShader(A),A},r=t.createProgram(),a=n(t.VERTEX_SHADER,Jre),o=n(t.FRAGMENT_SHADER,eae);t.attachShader(r,a),t.attachShader(r,o),t.linkProgram(r),t.deleteShader(a),t.deleteShader(o),t.useProgram(r);const l=t.createVertexArray();t.bindVertexArray(l);const c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);const f=t.getAttribLocation(r,"a_pos");t.enableVertexAttribArray(f),t.vertexAttribPointer(f,2,t.FLOAT,!1,0,0),t.bindVertexArray(null),t.pixelStorei(t.UNPACK_ALIGNMENT,1);const d=Xb(t,0,"u_texY",r),m=Xb(t,1,"u_texU",r),h=Xb(t,2,"u_texV",r);return{gl:t,program:r,texY:d,texU:m,texV:h,vao:l}}class nae{constructor(t){this.canvas=t,this.state=null}init(){return this.state=tae(this.canvas),this.state!==null}drawI420(t,n,r){const a=this.state;if(!a)return null;const{gl:o}=a,l=n+1>>1,c=r+1>>1,f=n*r,d=l*c,m=t.subarray(0,f),h=t.subarray(f,f+d),g=t.subarray(f+d,f+2*d);(this.canvas.width!==n||this.canvas.height!==r)&&(this.canvas.width=n,this.canvas.height=r,o.viewport(0,0,n,r));const x=(A,S,w,E,O)=>{o.activeTexture(o.TEXTURE0+A),o.bindTexture(o.TEXTURE_2D,S),o.texImage2D(o.TEXTURE_2D,0,o.R8,w,E,0,o.RED,o.UNSIGNED_BYTE,O)};return x(0,a.texY,n,r,m),x(1,a.texU,l,c,h),x(2,a.texV,l,c,g),o.bindVertexArray(a.vao),o.drawArrays(o.TRIANGLES,0,6),o.bindVertexArray(null),{width:n,height:r}}dispose(){const t=this.state;t&&(t.gl.deleteTexture(t.texY),t.gl.deleteTexture(t.texU),t.gl.deleteTexture(t.texV),t.gl.deleteVertexArray(t.vao),t.gl.deleteProgram(t.program),this.state=null)}}const rae=0;function aae(e){const t=new nae(e);return t.init(),t}function iae(){return new Worker(new URL("/assets/tinyh264.worker-DiJ50Hai.js",import.meta.url),{type:"module"})}class oae{constructor(t=aae,n=iae){this.ready=!1,this.pending=[],this._size=null,this.canvas=document.createElement("canvas"),this.renderer=t(this.canvas),this.worker=n(),this.worker.onmessage=r=>this.onMessage(r.data)}get surface(){return this.canvas}get size(){return this._size}onResize(t){this.resizeCb=t}onDecodedFrame(t){this.decodedCb=t}decode(t){if(!this.ready){this.pending.push(t);return}this.post(t)}close(){this.worker.terminate(),this.renderer.dispose()}post(t){this.worker.postMessage({type:"decode",data:t,offset:0,length:t.byteLength,renderStateId:rae},[t])}onMessage(t){var r,a;if(t.type==="decoderReady"){this.ready=!0;for(const o of this.pending)this.post(o);this.pending.length=0;return}const n=this.renderer.drawI420(new Uint8Array(t.data),t.width,t.height);n&&((r=this.decodedCb)==null||r.call(this,performance.now()),(!this._size||this._size.width!==n.width||this._size.height!==n.height)&&(this._size=n,(a=this.resizeCb)==null||a.call(this,n)))}}function nB(){const e=typeof window<"u";let t=!1;try{t=!!document.createElement("canvas").getContext("webgl2")}catch{t=!1}return{secureContext:e&&window.isSecureContext===!0,webCodecs:e&&"VideoDecoder"in window,webgl2:t,wasm:typeof WebAssembly<"u"&&typeof Worker<"u"}}function sae(e=nB()){return e.secureContext&&e.webCodecs&&e.webgl2?new Qre:e.wasm&&e.webgl2?new oae:null}function lae(e=nB()){return e.secureContext&&e.webCodecs&&e.webgl2||e.wasm&&e.webgl2}const rB=22,WR=[84,70,70,69],cae=1,uae=0,Qp=1,fae=1,dae=2;function hae(e){if(e.byteLength<rB)return null;const t=new DataView(e);for(let a=0;a<WR.length;a++)if(t.getUint8(a)!==WR[a])return null;if(t.getUint8(4)!==cae)return null;const n=t.getUint8(5),r=n&fae?Qp:uae;return{capturedAt:Number(t.getBigUint64(6)),relayedAt:Number(t.getBigUint64(14)),codec:r,keyframe:r===Qp&&(n&dae)!==0}}function aB(e){const{binaryFrameHandlerRef:t,perfHookRef:n,frameCount:r}=e,a=y.useRef(e);a.current=e,y.useEffect(()=>{let o=null,l=!1,c=!1,f;const d=()=>{if(o)return o;if(l)return null;const m=sae();return m?(o=m,m.onResize(h=>a.current.onResize(h)),f=a.current.onDecoderReady(m),m):(l=!0,a.current.onUnsupported(),console.warn("[decoder] none available — set up HTTPS or use a supported browser"),null)};return t.current=(m,h)=>{const g=a.current.onJpegFrame;if(g&&(h==null?void 0:h.codec)!==Qp){g(m,h);return}const x=d();if(x){if(!c){if(!(h!=null&&h.keyframe))return;c=!0}x.decode(m),r.current+=1}},()=>{t.current=void 0,typeof f=="function"&&f(),o==null||o.close(),o==null||o.surface.remove(),o=null}},[t,n,r])}const Fa=13,ls=8,YR=16,pae=.02,mae=100;function vae({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:c,installError:f,bootError:d,launching:m,setLaunching:h,chrome:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,swKeyboardVisible:S,swKeyboardPending:w,onKbdToggle:E,perfHookRef:O}){const j=y.useRef(null),R=y.useRef(null),C=y.useRef(null),{fps:T,frameCount:N}=Z4(),D=y.useRef(0),{recordState:z,recordCanvasRef:G,startClientRecording:U,stopClientRecording:P}=K4({sessionId:e,buildId:t,onRecordingUploaded:A}),B=y.useRef(0),[q,W]=y.useState(!1),[$,V]=y.useState(!1),[F,K]=y.useState(!1),[ie,I]=y.useState(!1),[Z,X]=y.useState(null),[oe,ge]=y.useState(null),[Ee,me]=y.useState(!1),[we,ce]=y.useState(null),_e=y.useRef(we);y.useEffect(()=>{_e.current=we},[we]);const Ae=y.useRef(null),se=y.useRef(null),He=y.useRef(!1),$e=y.useRef(!1),Je=y.useRef(0),We=y.useRef(null),at=y.useRef(null),Rt=y.useRef("idle"),ft=y.useRef(null),bn=y.useRef(null),tn=y.useRef(null);y.useEffect(()=>{tn.current=g},[g]),y.useEffect(()=>{const te=new Image;te.onload=()=>{bn.current=te},te.src=`data:image/png;base64,${g.framePng}`},[g.framePng]),aB({binaryFrameHandlerRef:x,perfHookRef:O,frameCount:N,onUnsupported:()=>{},onResize:te=>{const pe=j.current;if(pe&&(pe.width!==te.width||pe.height!==te.height)&&(pe.width=te.width,pe.height=te.height,!tn.current)){const fe=G.current;fe&&(fe.width=te.width,fe.height=te.height)}V(!0)},onDecoderReady:te=>{var Ne;const pe=te.surface,fe=j.current;pe.style.position="absolute",fe&&(pe.style.left=fe.style.left,pe.style.top=fe.style.top,pe.style.width=fe.style.width,pe.style.height=fe.style.height,pe.style.borderRadius=fe.style.borderRadius),pe.style.objectFit="fill",pe.style.zIndex="3",pe.style.pointerEvents="none",(Ne=R.current)==null||Ne.appendChild(pe);let ke=null;const Le=()=>{const Ue=j.current,tt=Ue==null?void 0:Ue.getContext("2d");if(Ue&&tt&&te.size)try{tt.drawImage(te.surface,0,0,Ue.width,Ue.height)}catch{}ke=requestAnimationFrame(Le)};return ke=requestAnimationFrame(Le),()=>{ke!==null&&cancelAnimationFrame(ke)}},onJpegFrame:te=>{const pe=performance.now();D.current&&pe-D.current,D.current=pe;const fe=B.current;createImageBitmap(new Blob([te],{type:"image/jpeg"})).then(ke=>{if(performance.now()-pe,B.current!==fe){ke.close();return}const Le=j.current,Ne=Le==null?void 0:Le.getContext("2d");if(!Le||!Ne){ke.close();return}if((Le.width!==ke.width||Le.height!==ke.height)&&(Le.width=ke.width,Le.height=ke.height,!tn.current)){const tt=G.current;tt&&(tt.width=ke.width,tt.height=ke.height)}const Ue=performance.now();Ne.drawImage(ke,0,0),performance.now()-Ue,ke.close(),V(!0),N.current+=1}).catch(()=>{})}}),y.useEffect(()=>{const te=G.current,pe=R.current;te&&pe&&(te.width=pe.clientWidth,te.height=pe.clientHeight)},[g]);const Nt=y.useCallback(()=>{const te=G.current,pe=j.current;if(!te||!pe)return;const fe=te.getContext("2d");if(!fe)return;const ke=tn.current;if(fe.clearRect(0,0,te.width,te.height),ke){bn.current&&fe.drawImage(bn.current,0,0,te.width,te.height);const Ue=Math.round(ke.screenCornerRadius/2*(te.height/(ke.compositeHeight/2)));fe.save(),fe.beginPath(),Ue>0?fe.roundRect(pe.offsetLeft,pe.offsetTop,pe.clientWidth,pe.clientHeight,Ue):fe.rect(pe.offsetLeft,pe.offsetTop,pe.clientWidth,pe.clientHeight),fe.clip(),fe.drawImage(pe,pe.offsetLeft,pe.offsetTop,pe.clientWidth,pe.clientHeight),fe.restore()}else fe.drawImage(pe,0,0,te.width,te.height);const Le=_e.current;if(Le)for(const Ue of[Le.f0,Le.f1]){const tt=ke?pe.offsetLeft+Ue.x*pe.clientWidth:Ue.x*te.width,Yt=ke?pe.offsetTop+Ue.y*pe.clientHeight:Ue.y*te.height;He.current?(fe.beginPath(),fe.arc(tt,Yt,ls,0,Math.PI*2),fe.fillStyle="rgba(255,255,255,0.92)",fe.fill(),fe.strokeStyle="rgba(0,0,0,0.2)",fe.lineWidth=1,fe.stroke()):(fe.beginPath(),fe.arc(tt,Yt,Fa,0,Math.PI*2),fe.strokeStyle="rgba(0,0,0,0.3)",fe.lineWidth=3,fe.stroke(),fe.beginPath(),fe.arc(tt,Yt,Fa,0,Math.PI*2),fe.strokeStyle="rgba(255,255,255,0.65)",fe.lineWidth=1.5,fe.stroke())}const Ne=at.current;if(Ne){const Ue=Rt.current,tt=ft.current;if(fe.save(),Ue==="down")fe.beginPath(),fe.arc(Ne.x,Ne.y,ls,0,Math.PI*2),fe.fillStyle="rgba(255,255,255,0.92)",fe.fill(),fe.strokeStyle="rgba(0,0,0,0.2)",fe.lineWidth=1,fe.stroke();else if(Ue==="release"&&tt){const Yt=Math.min((performance.now()-tt.startTime)/350,1);fe.beginPath(),fe.arc(Ne.x,Ne.y,ls+26*Yt,0,Math.PI*2),fe.strokeStyle=`rgba(255,255,255,${(1-Yt)*.55})`,fe.lineWidth=1.5,fe.stroke(),Yt>=1&&(Rt.current="idle",ft.current=null)}else fe.beginPath(),fe.arc(Ne.x,Ne.y,Fa,0,Math.PI*2),fe.strokeStyle="rgba(0,0,0,0.3)",fe.lineWidth=3,fe.stroke(),fe.beginPath(),fe.arc(Ne.x,Ne.y,Fa,0,Math.PI*2),fe.strokeStyle="rgba(255,255,255,0.65)",fe.lineWidth=1.5,fe.stroke();fe.restore()}},[]),ln=y.useCallback(()=>{const te=j.current;if(!te)return;const pe=document.createElement("canvas"),fe=pe.getContext("2d");fe&&(pe.width=te.width,pe.height=te.height,fe.drawImage(te,0,0),pe.toBlob(ke=>{if(!ke)return;const Le=URL.createObjectURL(ke),Ne=document.createElement("a");Ne.href=Le,Ne.download=`tapflow-${Date.now()}.png`,Ne.click(),URL.revokeObjectURL(Le)},"image/png"))},[]),H=y.useCallback(()=>{if(z==="idle"){const te=G.current;if(!te)return;const pe=R.current;if(pe&&pe.clientWidth>0)te.width=pe.clientWidth,te.height=pe.clientHeight;else{const fe=j.current;if(fe&&fe.width>0)te.width=fe.width,te.height=fe.height;else return}U(Nt)}else z==="recording"&&P()},[z,U,P,Nt]),J=y.useCallback(()=>{n({type:"input:rotate",sessionId:e}),K(te=>!te)},[n,e]),re=y.useRef(F);y.useEffect(()=>{re.current=F},[F]),y.useEffect(()=>()=>{re.current&&n({type:"input:rotate",sessionId:e})},[]),y.useEffect(()=>{const te=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),pe=Ne=>{if(Ne.code==="AltLeft"||Ne.code==="AltRight"){$e.current=!0;return}if(Ne.metaKey){const tt=document.activeElement;if(!tt||tt.tagName!=="INPUT"&&tt.tagName!=="TEXTAREA"){if(!Ne.shiftKey&&Ne.code==="KeyK"){Ne.preventDefault(),W(!0);return}if(!Ne.shiftKey&&Ne.code==="KeyS"){Ne.preventDefault(),ln();return}if(Ne.shiftKey&&Ne.code==="KeyY"){Ne.preventDefault(),H();return}if(Ne.shiftKey&&Ne.code==="KeyO"){Ne.preventDefault(),J();return}if(Ne.shiftKey&&Ne.code==="KeyU"){Ne.preventDefault(),n({type:"input:button",sessionId:e,payload:{name:"home"}});return}if(Ne.shiftKey&&Ne.code==="KeyK"){Ne.preventDefault(),w||E();return}}}if(!ie||te.has(Ne.code))return;Ne.preventDefault();const Ue=(Ne.shiftKey?2:0)|(Ne.ctrlKey?1:0)|(Ne.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:Ne.code,modifiers:Ue}})},fe=()=>{He.current&&(He.current=!1,me(!1),n({type:"input:pinch:end",sessionId:e})),$e.current=!1,ce(null)},ke=Ne=>{(Ne.code==="AltLeft"||Ne.code==="AltRight")&&fe()},Le=()=>{$e.current&&fe()};return window.addEventListener("keydown",pe),window.addEventListener("keyup",ke),window.addEventListener("blur",Le),()=>{window.removeEventListener("keydown",pe),window.removeEventListener("keyup",ke),window.removeEventListener("blur",Le)}},[ie,n,e,ln,H,J,E,w]),y.useEffect(()=>{if(!ie)return;const te=pe=>{const fe=R.current??j.current;fe&&!fe.contains(pe.target)&&I(!1)};return document.addEventListener("pointerdown",te),()=>document.removeEventListener("pointerdown",te)},[ie]);const Ce=y.useCallback(te=>{const pe=(F?C.current:null)??R.current;if(!pe)return null;const fe=pe.getBoundingClientRect(),ke=g.compositeWidth/2,Le=g.compositeHeight/2,Ne=g.screenRect.x/2,Ue=g.screenRect.y/2,tt=g.screenRect.width/2,Yt=g.screenRect.height/2;return zre({x:te.clientX,y:te.clientY},fe,ke,Le,{x:Ne,y:Ue,width:tt,height:Yt},F)},[g,F]),je=y.useCallback(te=>{const pe=Ce(te);return pe?J4(pe):null},[Ce]),Oe=y.useCallback(te=>{const pe=F?C.current:R.current;if(!pe)return null;const fe=pe.getBoundingClientRect();let ke,Le;if(F){const Ne=fe.height-(te.clientY-fe.top),Ue=te.clientX-fe.left;ke=Ne*(g.compositeWidth/fe.height),Le=Ue*(g.compositeHeight/fe.width)}else ke=(te.clientX-fe.left)*(g.compositeWidth/fe.width),Le=(te.clientY-fe.top)*(g.compositeHeight/fe.height);for(const Ne of g.buttons){const Ue=ke-Ne.normalOffset.x,tt=Le-Ne.normalOffset.y;if(Ue*Ue+tt*tt<mae**2)return Ne.name}return null},[g,F]),Pe=y.useCallback(te=>{const pe=j.current,fe=G.current;return pe&&pe.clientWidth>0?{x:pe.offsetLeft+te.x*pe.clientWidth,y:pe.offsetTop+te.y*pe.clientHeight}:{x:te.x*((fe==null?void 0:fe.width)??1),y:te.y*((fe==null?void 0:fe.height)??1)}},[]),Fe=y.useCallback(te=>{if(I(!0),$e.current){const Ne=je(te);if(!Ne)return;He.current=!0,me(!0),te.target.setPointerCapture(te.pointerId),ce(Ne),n({type:"input:pinch:start",sessionId:e,payload:Ne});return}const pe=Oe(te);if(pe){Ae.current=pe,X(pe);return}const fe=Ce(te);if(!fe)return;se.current=fe,te.target.setPointerCapture(te.pointerId),at.current=Pe(fe),Rt.current="down",ft.current=null;const ke=te.currentTarget.getBoundingClientRect(),Le=We.current;Le&&(Le.style.display="block",Le.style.left=`${te.clientX-ke.left}px`,Le.style.top=`${te.clientY-ke.top}px`,Le.style.width=`${ls*2}px`,Le.style.height=`${ls*2}px`,Le.style.background="rgba(255,255,255,0.92)",Le.style.border="1.5px solid rgba(0,0,0,0.2)",Le.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),n({type:"input:touch:start",sessionId:e,payload:fe})},[Oe,Ce,je,Pe,n,e]),Xe=y.useCallback(te=>{if(te.buttons===0){if(ge(Oe(te)),$e.current){ce(je(te)),at.current=null;const Ue=We.current;Ue&&(Ue.style.display="none")}else{ce(null);const Ue=Ce(te);at.current=Ue?Pe(Ue):null,Rt.current!=="down"&&(Rt.current="idle");const tt=We.current;if(tt)if(Ue){const Yt=te.currentTarget.getBoundingClientRect();tt.style.display="block",tt.style.left=`${te.clientX-Yt.left}px`,tt.style.top=`${te.clientY-Yt.top}px`,tt.style.width=`${Fa*2}px`,tt.style.height=`${Fa*2}px`,tt.style.background="transparent",tt.style.border="1.5px solid rgba(255,255,255,0.6)",tt.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"}else tt.style.display="none"}return}if(He.current){const Ue=je(te);if(!Ue)return;const tt=performance.now();if(tt-Je.current<YR)return;Je.current=tt,ce(Ue),n({type:"input:pinch:move",sessionId:e,payload:Ue});return}if(Ae.current||!se.current)return;const pe=Ce(te);if(!pe)return;const fe=pe.x-se.current.x,ke=pe.y-se.current.y;if(Math.sqrt(fe*fe+ke*ke)<pae)return;const Le=performance.now();if(Le-Je.current<YR)return;Je.current=Le,at.current=Pe(pe);const Ne=We.current;if(Ne&&Ne.style.display!=="none"){const Ue=te.currentTarget.getBoundingClientRect();Ne.style.left=`${te.clientX-Ue.left}px`,Ne.style.top=`${te.clientY-Ue.top}px`}n({type:"input:touch:move",sessionId:e,payload:pe})},[Oe,Ce,je,Pe,n,e]),St=y.useCallback(()=>{if(He.current){He.current=!1,me(!1),ce(null),n({type:"input:pinch:end",sessionId:e});return}if(se.current=null,Ae.current){n({type:"input:button",sessionId:e,payload:{name:Ae.current}}),Ae.current=null,setTimeout(()=>X(null),100);return}Rt.current="release",ft.current={startTime:performance.now()};const te=We.current;te&&(te.style.width=`${Fa*2}px`,te.style.height=`${Fa*2}px`,te.style.background="transparent",te.style.border="1.5px solid rgba(255,255,255,0.6)",te.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),n({type:"input:touch:end",sessionId:e})},[n,e]),wt=y.useCallback(()=>{if(He.current){He.current=!1,me(!1),ce(null),n({type:"input:pinch:end",sessionId:e});return}if(se.current=null,Ae.current){Ae.current=null,X(null);return}Rt.current="release",ft.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),Mt=y.useCallback(()=>{ge(null),ce(null),at.current=null;const te=We.current;te&&(te.style.display="none")},[]),Ft=g.compositeWidth/2,Hr=g.compositeHeight/2,Rn=Ire(Hr,750),Un=Math.round(Ft*Rn),Qn=Math.round(Hr*Rn),qn=g.screenRect.x/g.compositeWidth*100,Te=g.screenRect.y/g.compositeHeight*100,Se=g.screenRect.width/g.compositeWidth*100,Ve=g.screenRect.height/g.compositeHeight*100,Re=Math.round(g.screenCornerRadius/2*Rn),dt=v.jsxs(v.Fragment,{children:[v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>n({type:"input:button",sessionId:e,payload:{name:"home"}}),children:v.jsx(h5,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsxs("span",{className:"flex items-center gap-3",children:["Home ",v.jsxs(NS,{children:[v.jsx(fs,{children:"⌘"}),v.jsx(fs,{children:"⇧"}),v.jsx(fs,{children:"U"})]})]})})]}),v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:w,onClick:E,"data-active":S,children:w?v.jsx(Dp,{className:"h-4 w-4 animate-spin"}):v.jsx(oV,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsxs("span",{className:"flex items-center gap-3",children:["Software keyboard ",v.jsxs(NS,{children:[v.jsx(fs,{children:"⌘"}),v.jsx(fs,{children:"⇧"}),v.jsx(fs,{children:"K"})]})]})})]})]}),Ke=c&&t?v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m,onClick:()=>{h(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(Dp,{className:"h-4 w-4 animate-spin"}):v.jsx(uA,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:m?"Launching…":"Launch app"})]}):null;return v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("canvas",{ref:G,style:{display:"none"}}),v.jsx(Q4,{open:q,onOpenChange:W,sessionId:e,send:n}),v.jsx(X4,{joined:a,onDeepLink:()=>W(!0),onScreenshot:ln,onRecordToggle:H,recordState:z,onRotate:J,platformSlot:dt,launchSlot:Ke}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsxs("div",{ref:C,style:{width:F?Qn:Un,height:F?Un:Qn,position:"relative",flexShrink:0},children:[v.jsxs("div",{ref:R,className:`relative ${oe?"cursor-pointer":"cursor-default"}`,style:{width:Un,height:Qn,...F?{position:"absolute",top:(Un-Qn)/2,left:(Qn-Un)/2,transform:"rotate(-90deg)",transformOrigin:"center center"}:{}},onPointerDown:Fe,onPointerMove:Xe,onPointerUp:St,onPointerCancel:wt,onPointerLeave:Mt,children:[v.jsx("img",{src:`data:image/png;base64,${g.framePng}`,style:{position:"absolute",top:0,left:0,zIndex:2,width:"100%",height:"100%",display:"block",pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),v.jsx("canvas",{ref:j,style:{position:"absolute",zIndex:3,left:`${qn}%`,top:`${Te}%`,width:`${Se}%`,height:`${Ve}%`,borderRadius:Re>0?`${Re}px`:void 0,backgroundColor:"#010101",cursor:"none",visibility:$?"visible":"hidden"}}),!$&&v.jsx("div",{className:"absolute animate-pulse bg-zinc-700",style:{zIndex:3,left:`${qn}%`,top:`${Te}%`,width:`${Se}%`,height:`${Ve}%`,borderRadius:Re>0?`${Re}px`:void 0}}),we&&(()=>{const te=qn/100,pe=Te/100,fe=Se/100,ke=Ve/100,Le=(Ne,Ue)=>({left:`${(te+Ne*fe)*100}%`,top:`${(pe+Ue*ke)*100}%`});return v.jsx(v.Fragment,{children:[we.f0,we.f1].map((Ne,Ue)=>v.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",...Ee?{width:ls*2,height:ls*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:Fa*2,height:Fa*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"},...Le(Ne.x,Ne.y)}},Ue))})})(),a&&T===0&&v.jsx("div",{style:{position:"absolute",zIndex:8,left:`${qn}%`,top:`${Te}%`,width:`${Se}%`,height:`${Ve}%`,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:v.jsx("span",{style:{color:"white",fontSize:"0.875rem"},children:"Waiting for first frame..."})}),g.buttons.map(te=>{const pe=Z===te.name,fe=oe===te.name,ke=te.anchor==="bottom",Le=te.anchor==="top",Ne=ke?(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100:Le?te.rolloverOffset.y/g.compositeHeight*100:(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100,Ue=te.buttonH/g.compositeHeight*100,tt=te.buttonW/g.compositeWidth*100,Yt=te.buttonW/2,fn=(te.rolloverOffset.x-Yt)/g.compositeWidth*100,Vt=(2*te.rolloverOffset.x-te.normalOffset.x-Yt)/g.compositeWidth*100,Nn=te.rolloverOffset.x/g.compositeWidth*100,Vr=ke?(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100:Le?te.rolloverOffset.y/g.compositeHeight*100:(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100,qs=Le?(2*te.rolloverOffset.y-te.normalOffset.y)/g.compositeHeight*100:0,gg=te.onTop?4:1;return v.jsxs(y.Fragment,{children:[te.buttonPng&&v.jsx("img",{src:`data:image/png;base64,${te.buttonPng}`,style:{position:"absolute",zIndex:gg,top:`${Le&&fe?qs:Ne}%`,left:`${Le?fn:fe?Vt:fn}%`,width:`${tt}%`,height:`${Ue}%`,transition:Le?"top 0.15s ease":"left 0.15s ease",pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),pe&&te.pressedPng&&te.pressedRect&&v.jsx("img",{src:`data:image/png;base64,${te.pressedPng}`,style:{position:"absolute",zIndex:te.onTop?3:1,left:`${Le?fn:fe?Vt:fn}%`,top:`${Le&&fe?qs:Ne}%`,width:`${te.pressedRect.width/g.compositeWidth*100}%`,height:`${te.pressedRect.height/g.compositeHeight*100}%`,pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),fe&&v.jsx("div",{className:"bg-foreground/85 text-background text-[11px] px-[7px] py-1.5 rounded-lg whitespace-nowrap pointer-events-none",style:{position:"absolute",zIndex:5,left:`${Nn}%`,top:`${Vr}%`,transform:"translate(-50%, calc(-100% - 8px))"},children:te.accessibilityTitle})]},te.name)})]}),v.jsx("div",{ref:We,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}})]}),v.jsx(cE,{joined:a,fps:T,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:ie})]})]})}const cs=13,Iu=8,KR=16,gae=.02,Qb=720;function yae({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:c,installError:f,bootError:d,launching:m,setLaunching:h,androidButtons:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,screenWidth:S,screenHeight:w,cornerRadius:E,perfHookRef:O}){const j=y.useRef(null),R=y.useRef(null),C=y.useRef(null),{fps:T,frameCount:N}=Z4(),{recordState:D,recordCanvasRef:z,startClientRecording:G,stopClientRecording:U}=K4({sessionId:e,buildId:t,onRecordingUploaded:A}),[P,B]=y.useState(!1),[q,W]=y.useState(!1),[$,V]=y.useState(!1),F=y.useRef(null),[K,ie]=y.useState(null),[I,Z]=y.useState(!1),[X,oe]=y.useState(!1),[ge,Ee]=y.useState(!1),[me,we]=y.useState(null),ce=y.useRef(me);y.useEffect(()=>{ce.current=me},[me]);const _e=y.useRef(!1),Ae=y.useRef(!1),se=y.useRef(null),He=y.useRef(0),$e=y.useRef(null),Je=y.useRef(null),We=y.useRef("idle"),at=y.useRef(null);aB({binaryFrameHandlerRef:x,perfHookRef:O,frameCount:N,onUnsupported:()=>V(!0),onResize:Te=>{W(!0);const Se=F.current;(!Se||Se.width!==Te.width||Se.height!==Te.height)&&(F.current=Te,ie(Te))},onDecoderReady:Te=>{var Ve;C.current=Te;const Se=Te.surface;Se.style.display="block",Se.style.width="100%",Se.style.height="100%",Se.style.objectFit="fill",(Ve=j.current)==null||Ve.appendChild(Se)}});const Rt=y.useCallback(()=>{var tt;const Te=z.current,Se=(tt=C.current)==null?void 0:tt.surface,Ve=F.current;if(!Te||!Se||!Ve)return;const Re=Te.getContext("2d");if(!Re)return;const dt=Ve.width,Ke=Ve.height,te=Te.width>Te.height!=dt>Ke;Re.save(),te&&(Re.translate(Te.width,0),Re.rotate(Math.PI/2)),Re.drawImage(Se,0,0,dt,Ke);const pe=Math.max(dt,Ke),fe=pe>Qb?pe/Qb:1,ke=cs*fe,Le=Iu*fe,Ne=ce.current;if(Ne)for(const Yt of[Ne.f0,Ne.f1]){const fn=Yt.x*dt,Vt=Yt.y*Ke;_e.current?(Re.beginPath(),Re.arc(fn,Vt,Le,0,Math.PI*2),Re.fillStyle="rgba(255,255,255,0.92)",Re.fill(),Re.strokeStyle="rgba(0,0,0,0.2)",Re.lineWidth=fe,Re.stroke()):(Re.beginPath(),Re.arc(fn,Vt,ke,0,Math.PI*2),Re.strokeStyle="rgba(0,0,0,0.3)",Re.lineWidth=3*fe,Re.stroke(),Re.beginPath(),Re.arc(fn,Vt,ke,0,Math.PI*2),Re.strokeStyle="rgba(255,255,255,0.65)",Re.lineWidth=1.5*fe,Re.stroke())}const Ue=Je.current;if(Ue){const Yt=Ue.x*dt,fn=Ue.y*Ke,Vt=We.current,Nn=at.current;if(Vt==="down")Re.beginPath(),Re.arc(Yt,fn,Le,0,Math.PI*2),Re.fillStyle="rgba(255,255,255,0.92)",Re.fill(),Re.strokeStyle="rgba(0,0,0,0.2)",Re.lineWidth=fe,Re.stroke();else if(Vt==="release"&&Nn){const Vr=Math.min((performance.now()-Nn.startTime)/350,1);Re.beginPath(),Re.arc(Yt,fn,Le+26*fe*Vr,0,Math.PI*2),Re.strokeStyle=`rgba(255,255,255,${(1-Vr)*.55})`,Re.lineWidth=1.5*fe,Re.stroke(),Vr>=1&&(We.current="idle",at.current=null)}else Re.beginPath(),Re.arc(Yt,fn,ke,0,Math.PI*2),Re.strokeStyle="rgba(0,0,0,0.3)",Re.lineWidth=3*fe,Re.stroke(),Re.beginPath(),Re.arc(Yt,fn,ke,0,Math.PI*2),Re.strokeStyle="rgba(255,255,255,0.65)",Re.lineWidth=1.5*fe,Re.stroke()}Re.restore()},[]),ft=y.useCallback(()=>{var dt;const Te=(dt=C.current)==null?void 0:dt.surface,Se=F.current;if(!Te||!Se)return;const Ve=document.createElement("canvas"),Re=Ve.getContext("2d");Re&&(Ve.width=Se.width,Ve.height=Se.height,Re.drawImage(Te,0,0,Se.width,Se.height),Ve.toBlob(Ke=>{if(!Ke)return;const te=URL.createObjectURL(Ke),pe=document.createElement("a");pe.href=te,pe.download=`tapflow-${Date.now()}.png`,pe.click(),URL.revokeObjectURL(te)},"image/png"))},[]),bn=y.useCallback(()=>{if(D==="idle"){const Te=z.current;if(!Te)return;const Se=F.current;if(!Se)return;const Ve=ln.current;Te.width=Ve?Se.height:Se.width,Te.height=Ve?Se.width:Se.height,G(Rt)}else D==="recording"&&U()},[D,G,U,Rt]),tn=y.useCallback(()=>{n({type:"input:rotate",sessionId:e}),Z(Te=>!Te)},[n,e]),Nt=y.useRef(I);y.useEffect(()=>{Nt.current=I},[I]),y.useEffect(()=>()=>{Nt.current&&n({type:"input:rotate",sessionId:e})},[]),y.useEffect(()=>{const Te=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),Se=Ke=>{if(Ke.code==="AltLeft"||Ke.code==="AltRight"){Ae.current=!0;return}if(Ke.metaKey){const pe=document.activeElement;if(!pe||pe.tagName!=="INPUT"&&pe.tagName!=="TEXTAREA"){if(!Ke.shiftKey&&Ke.code==="KeyK"){Ke.preventDefault(),B(!0);return}if(!Ke.shiftKey&&Ke.code==="KeyS"){Ke.preventDefault(),ft();return}if(Ke.shiftKey&&Ke.code==="KeyY"){Ke.preventDefault(),bn();return}if(Ke.shiftKey&&Ke.code==="KeyO"){Ke.preventDefault(),tn();return}}}if(!X||Te.has(Ke.code))return;Ke.preventDefault();const te=(Ke.shiftKey?2:0)|(Ke.ctrlKey?1:0)|(Ke.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:Ke.code,modifiers:te}})},Ve=()=>{_e.current&&(_e.current=!1,Ee(!1),n({type:"input:pinch:end",sessionId:e})),Ae.current=!1,we(null)},Re=Ke=>{(Ke.code==="AltLeft"||Ke.code==="AltRight")&&Ve()},dt=()=>{Ae.current&&Ve()};return window.addEventListener("keydown",Se),window.addEventListener("keyup",Re),window.addEventListener("blur",dt),()=>{window.removeEventListener("keydown",Se),window.removeEventListener("keyup",Re),window.removeEventListener("blur",dt)}},[X,n,e,ft,bn,tn]),y.useEffect(()=>{if(!X)return;const Te=Se=>{const Ve=R.current??j.current;Ve&&!Ve.contains(Se.target)&&oe(!1)};return document.addEventListener("pointerdown",Te),()=>document.removeEventListener("pointerdown",Te)},[X]);const ln=y.useRef(!1),H=y.useCallback(Te=>{const Se=j.current;if(!Se)return null;const Ve=Se.getBoundingClientRect();return Lre({x:Te.clientX,y:Te.clientY},Ve,ln.current)},[]),J=y.useCallback(Te=>{const Se=H(Te);return Se?J4(Se):null},[H]),re=y.useCallback(Te=>{if(Ae.current){const dt=J(Te);if(!dt)return;_e.current=!0,Ee(!0),Te.target.setPointerCapture(Te.pointerId);const Ke=$e.current;Ke&&(Ke.style.display="none"),we(dt),n({type:"input:pinch:start",sessionId:e,payload:dt});return}const Se=H(Te);if(!Se)return;oe(!0),se.current=Se,Te.target.setPointerCapture(Te.pointerId);const Ve=Te.currentTarget.getBoundingClientRect();Je.current=Se,We.current="down",at.current=null;const Re=$e.current;Re&&(Re.style.display="block",Re.style.left=`${Te.clientX-Ve.left}px`,Re.style.top=`${Te.clientY-Ve.top}px`,Re.style.width=`${Iu*2}px`,Re.style.height=`${Iu*2}px`,Re.style.background="rgba(255,255,255,0.92)",Re.style.border="1.5px solid rgba(0,0,0,0.2)",Re.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),n({type:"input:touch:start",sessionId:e,payload:Se})},[H,J,n,e]),Ce=y.useCallback(Te=>{if(Te.buttons===0){if(Ae.current){we(J(Te)),Je.current=null;const Le=$e.current;Le&&(Le.style.display="none");return}const pe=H(Te),fe=Te.currentTarget.getBoundingClientRect(),ke=$e.current;pe?(Je.current=pe,We.current!=="down"&&(We.current="idle"),ke&&(ke.style.display="block",ke.style.left=`${Te.clientX-fe.left}px`,ke.style.top=`${Te.clientY-fe.top}px`,ke.style.width=`${cs*2}px`,ke.style.height=`${cs*2}px`,ke.style.background="transparent",ke.style.border="1.5px solid rgba(255,255,255,0.6)",ke.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)")):(Je.current=null,ke&&(ke.style.display="none"));return}if(_e.current){const pe=J(Te);if(!pe)return;const fe=performance.now();if(fe-He.current<KR)return;He.current=fe,we(pe),n({type:"input:pinch:move",sessionId:e,payload:pe});return}if(!se.current)return;const Se=H(Te);if(!Se)return;const Ve=Se.x-se.current.x,Re=Se.y-se.current.y;if(Math.sqrt(Ve*Ve+Re*Re)<gae)return;const dt=performance.now();if(dt-He.current<KR)return;He.current=dt;const Ke=Te.currentTarget.getBoundingClientRect();Je.current=Se;const te=$e.current;te&&te.style.display!=="none"&&(te.style.left=`${Te.clientX-Ke.left}px`,te.style.top=`${Te.clientY-Ke.top}px`),n({type:"input:touch:move",sessionId:e,payload:Se})},[H,J,n,e]),je=y.useCallback(()=>{if(_e.current){_e.current=!1,Ee(!1),we(null),n({type:"input:pinch:end",sessionId:e});return}se.current=null,We.current="release",at.current={startTime:performance.now()};const Te=$e.current;Te&&(Te.style.width=`${cs*2}px`,Te.style.height=`${cs*2}px`,Te.style.background="transparent",Te.style.border="1.5px solid rgba(255,255,255,0.6)",Te.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),n({type:"input:touch:end",sessionId:e})},[n,e]),Oe=y.useCallback(()=>{if(_e.current){_e.current=!1,Ee(!1),we(null),n({type:"input:pinch:end",sessionId:e});return}se.current=null,We.current="release",at.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),Pe=y.useCallback(()=>{we(null),Je.current=null;const Te=$e.current;Te&&(Te.style.display="none")},[]),Fe=K??(S&&w?{width:S,height:w}:null),Xe=Fe?Math.min(1,Qb/Math.max(Fe.width,Fe.height)):.3,St=Fe?Math.round(Fe.width*Xe):324,wt=Fe?Math.round(Fe.height*Xe):720,Mt=Fe?Fe.width>Fe.height:!1,Ft=I&&!Mt;y.useLayoutEffect(()=>{ln.current=Ft},[Ft]);const Hr=Ft?wt:St,Fr=Ft?St:wt,Rn=E!=null?Math.round(E*St):22,Un=Ft?{position:"absolute",width:St,height:wt,top:(St-wt)/2,left:(wt-St)/2,transform:"rotate(90deg)",transformOrigin:"center center",visibility:q?"visible":"hidden",cursor:"none"}:{visibility:q?"visible":"hidden",cursor:"none"},Qn=v.jsx(v.Fragment,{children:g==null?void 0:g.map(Te=>v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>n({type:"input:button",sessionId:e,payload:{name:Te.name}}),children:Te.name==="back"?v.jsx(K7,{className:"h-4 w-4"}):Te.name==="recent_apps"?v.jsx(p5,{className:"h-4 w-4"}):Te.name==="volume_up"?v.jsx(AV,{className:"h-4 w-4"}):Te.name==="volume_down"?v.jsx(_V,{className:"h-4 w-4"}):Te.name==="power"?v.jsx(hV,{className:"h-4 w-4"}):v.jsx(h5,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:Te.accessibilityTitle})]},Te.name))}),qn=c&&t?v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m||l,onClick:()=>{h(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(Dp,{className:"h-4 w-4 animate-spin"}):v.jsx(uA,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:m?"Launching…":l?"Installing…":"Launch app"})]}):null;return v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("canvas",{ref:z,style:{display:"none"}}),v.jsx(Q4,{open:P,onOpenChange:B,sessionId:e,send:n}),v.jsx(X4,{joined:a,onDeepLink:()=>B(!0),onScreenshot:ft,onRecordToggle:bn,recordState:D,onRotate:tn,platformSlot:Qn,launchSlot:qn}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsx("div",{style:{background:"#1c1c1e",borderRadius:`${Rn+12}px`,padding:"12px",flexShrink:0,boxShadow:"0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06)"},children:v.jsx("div",{ref:R,className:"relative",style:{width:Hr,height:Fr,backgroundColor:"#010101",borderRadius:`${Rn}px`,overflow:"hidden"},children:$?v.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4 text-center",children:v.jsxs("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"0.875rem"},children:["이 환경에서는 스트리밍을 표시할 수 없습니다.",v.jsx("br",{}),"Chrome/Edge 또는 HTTPS 환경에서 다시 시도해 주세요."]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:j,className:Ft?void 0:"block w-full h-full",style:Un,onPointerDown:re,onPointerMove:Ce,onPointerUp:je,onPointerCancel:Oe,onPointerLeave:Pe}),!q&&v.jsx("div",{className:"absolute inset-0 animate-pulse bg-zinc-700"}),!q&&o&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:v.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"0.875rem"},children:"Waiting for stream…"})}),v.jsx("div",{ref:$e,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}}),me&&v.jsx(v.Fragment,{children:[me.f0,me.f1].map((Te,Se)=>v.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",left:`${Te.x*100}%`,top:`${Te.y*100}%`,...ge?{width:Iu*2,height:Iu*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:cs*2,height:cs*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"}}},Se))})]})})}),v.jsx(cE,{joined:a,fps:T,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:X})]})]})}function bae({sessionId:e,deviceId:t,buildId:n,resetMode:r,onRecordingUploaded:a}){const o=y.useRef(()=>{});Dre();const l=y.useRef(null),c=y.useRef(null),f=y.useRef([]);y.useRef({onFrameBegin:()=>{var X;return(X=l.current)==null?void 0:X.onFrameBegin()},onFrameEnd:X=>{var Ee,me;const oe=f.current.shift()??null,ge=oe?{...X,capturedAt:oe.capturedAt,relayedAt:oe.relayedAt}:X;(Ee=l.current)==null||Ee.onFrameEnd(ge),(me=c.current)==null||me.call(c,ge)}});const[d,m]=y.useState(!1),[h,g]=y.useState(!1),[x,A]=y.useState(null),[S,w]=y.useState(!1),[E,O]=y.useState(!1),[j,R]=y.useState(null),[C,T]=y.useState(null),[N,D]=y.useState(!1),[z,G]=y.useState(!1),[U,P]=y.useState(!1),B=y.useRef(void 0),q=y.useCallback(X=>{if(X.type==="session:joined"&&(m(!0),o.current({type:"device:boot",sessionId:e,payload:{deviceId:t,resetMode:r,acceptH264:lae(),secureContext:window.isSecureContext}})),X.type==="device:boot-error"&&T(X.message),X.type==="device:booting"&&(g(!1),w(!1),O(!1),R(null),T(null),A(null)),X.type==="device:ready"&&(g(!0),n&&(w(!0),o.current({type:"app:install",sessionId:e,buildId:n}))),X.type==="app:install-done"&&(w(!1),O(!0)),X.type==="app:install-error"&&(w(!1),R(X.message)),X.type==="app:launch-done"&&D(!1),X.type==="app:launch-error"&&D(!1),X.type==="session:chrome"&&A(X.payload),X.type==="keyboard:toggled"){const{visible:oe}=X.payload;G(oe),P(!1)}X.type==="open-url:done"&&Et.success("Deeplink opened"),X.type==="open-url:error"&&Et.error(X.message),X.type==="error"&&X.message==="Agent resources exhausted"&&Et.error("Could not start session — this Mac is currently overloaded.",{description:"Go back and select a different Mac."})},[e,t,n]),W=y.useCallback(X=>{var me;const oe=hae(X);oe&&oe.codec===Qp||f.current.push(oe);const ge=oe?X.slice(rB):X,Ee=oe?{codec:oe.codec,keyframe:oe.keyframe,capturedAt:oe.capturedAt,relayedAt:oe.relayedAt}:void 0;(me=B.current)==null||me.call(B,ge,Ee)},[]),{send:$,connected:V}=lE(q,W);y.useLayoutEffect(()=>{o.current=$}),y.useEffect(()=>{V&&$({type:"session:start",sessionId:e})},[V,$,e]);const F=x!==null&&"framePng"in x?x:null,K=x!==null&&!("framePng"in x)?x:null,I={sessionId:e,buildId:n,send:$,connected:V,joined:d,deviceReady:h,installing:S,installed:E,installError:j,bootError:C,launching:N,setLaunching:D,binaryFrameHandlerRef:B,onRecordingUploaded:a,swKeyboardVisible:z,swKeyboardPending:U,onKbdToggle:()=>{P(!0),$({type:"input:keyboard:toggle",sessionId:e})}};if(!F&&!K)return v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("div",{className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 px-1.5 py-2.5 shrink-0 mt-3 opacity-40",children:Array.from({length:5}).map((X,oe)=>v.jsx("div",{className:"h-8 w-8 rounded-md bg-muted animate-pulse"},oe))}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsx("div",{style:{background:"#1c1c1e",borderRadius:"34px",padding:"12px",flexShrink:0},children:v.jsx("div",{className:"animate-pulse bg-zinc-700",style:{width:324,height:720,borderRadius:"22px"}})}),v.jsx(cE,{joined:d,fps:0,connected:V,deviceReady:h,bootError:C,installing:S,installError:j,keyboardActive:!1})]})]});const Z=void 0;return v.jsxs(v.Fragment,{children:[F&&v.jsx(vae,{...I,chrome:F,perfHookRef:Z}),K&&v.jsx(yae,{...I,androidButtons:K.buttons,screenWidth:K.screenWidth,screenHeight:K.screenHeight,cornerRadius:K.cornerRadius,perfHookRef:Z}),!1]})}var kv="Tabs",[xae]=pa(kv,[vv]),iB=vv(),[wae,uE]=xae(kv),oB=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...d}=e,m=hd(c),[h,g]=Co({prop:r,onChange:a,defaultProp:o??"",caller:kv});return v.jsx(wae,{scope:n,baseId:Na(),value:h,onValueChange:g,orientation:l,dir:m,activationMode:f,children:v.jsx(et.div,{dir:m,"data-orientation":l,...d,ref:t})})});oB.displayName=kv;var sB="TabsList",lB=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=uE(sB,n),l=iB(n);return v.jsx(aI,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:v.jsx(et.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});lB.displayName=sB;var cB="TabsTrigger",uB=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,l=uE(cB,n),c=iB(n),f=hB(l.baseId,r),d=pB(l.baseId,r),m=r===l.value;return v.jsx(iI,{asChild:!0,...c,focusable:!a,active:m,children:v.jsx(et.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:f,...o,ref:t,onMouseDown:ze(e.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?l.onValueChange(r):h.preventDefault()}),onKeyDown:ze(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&l.onValueChange(r)}),onFocus:ze(e.onFocus,()=>{const h=l.activationMode!=="manual";!m&&!a&&h&&l.onValueChange(r)})})})});uB.displayName=cB;var fB="TabsContent",dB=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...l}=e,c=uE(fB,n),f=hB(c.baseId,r),d=pB(c.baseId,r),m=r===c.value,h=y.useRef(m);return y.useEffect(()=>{const g=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(g)},[]),v.jsx(ur,{present:a||m,children:({present:g})=>v.jsx(et.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!g,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:g&&o})})});dB.displayName=fB;function hB(e,t){return`${e}-trigger-${t}`}function pB(e,t){return`${e}-content-${t}`}var Sae=oB,mB=lB,vB=uB,gB=dB;const yB=Sae,fE=y.forwardRef(({className:e,...t},n)=>v.jsx(mB,{ref:n,className:be("inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));fE.displayName=mB.displayName;const Jp=y.forwardRef(({className:e,...t},n)=>v.jsx(vB,{ref:n,className:be("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Jp.displayName=vB.displayName;const PS=y.forwardRef(({className:e,...t},n)=>v.jsx(gB,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));PS.displayName=gB.displayName;const bB=y.forwardRef(({className:e,...t},n)=>v.jsx("textarea",{className:be("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));bB.displayName="Textarea";function _ae(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var dE="ScrollArea",[xB]=pa(dE),[Aae,va]=xB(dE),wB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...l}=e,[c,f]=y.useState(null),[d,m]=y.useState(null),[h,g]=y.useState(null),[x,A]=y.useState(null),[S,w]=y.useState(null),[E,O]=y.useState(0),[j,R]=y.useState(0),[C,T]=y.useState(!1),[N,D]=y.useState(!1),z=ut(t,U=>f(U)),G=hd(a);return v.jsx(Aae,{scope:n,type:r,dir:G,scrollHideDelay:o,scrollArea:c,viewport:d,onViewportChange:m,content:h,onContentChange:g,scrollbarX:x,onScrollbarXChange:A,scrollbarXEnabled:C,onScrollbarXEnabledChange:T,scrollbarY:S,onScrollbarYChange:w,scrollbarYEnabled:N,onScrollbarYEnabledChange:D,onCornerWidthChange:O,onCornerHeightChange:R,children:v.jsx(et.div,{dir:G,...l,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});wB.displayName=dE;var SB="ScrollAreaViewport",_B=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,l=va(SB,n),c=y.useRef(null),f=ut(t,c,l.onViewportChange);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),v.jsx(et.div,{"data-radix-scroll-area-viewport":"",...o,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:v.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});_B.displayName=SB;var ai="ScrollAreaScrollbar",hE=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=va(ai,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=a,c=e.orientation==="horizontal";return y.useEffect(()=>(c?o(!0):l(!0),()=>{c?o(!1):l(!1)}),[c,o,l]),a.type==="hover"?v.jsx(Eae,{...r,ref:t,forceMount:n}):a.type==="scroll"?v.jsx(Oae,{...r,ref:t,forceMount:n}):a.type==="auto"?v.jsx(AB,{...r,ref:t,forceMount:n}):a.type==="always"?v.jsx(pE,{...r,ref:t}):null});hE.displayName=ai;var Eae=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=va(ai,e.__scopeScrollArea),[o,l]=y.useState(!1);return y.useEffect(()=>{const c=a.scrollArea;let f=0;if(c){const d=()=>{window.clearTimeout(f),l(!0)},m=()=>{f=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),v.jsx(ur,{present:n||o,children:v.jsx(AB,{"data-state":o?"visible":"hidden",...r,ref:t})})}),Oae=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=va(ai,e.__scopeScrollArea),o=e.orientation==="horizontal",l=zv(()=>f("SCROLL_END"),100),[c,f]=_ae("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,a.scrollHideDelay,f]),y.useEffect(()=>{const d=a.viewport,m=o?"scrollLeft":"scrollTop";if(d){let h=d[m];const g=()=>{const x=d[m];h!==x&&(f("SCROLL"),l()),h=x};return d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[a.viewport,o,f,l]),v.jsx(ur,{present:n||c!=="hidden",children:v.jsx(pE,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ze(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:ze(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),AB=y.forwardRef((e,t)=>{const n=va(ai,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,l]=y.useState(!1),c=e.orientation==="horizontal",f=zv(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(c?d:m)}},10);return Ql(n.viewport,f),Ql(n.content,f),v.jsx(ur,{present:r||o,children:v.jsx(pE,{"data-state":o?"visible":"hidden",...a,ref:t})})}),pE=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=va(ai,e.__scopeScrollArea),o=y.useRef(null),l=y.useRef(0),[c,f]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=CB(c.viewport,c.content),m={...r,sizes:c,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:g=>l.current=g};function h(g,x){return Mae(g,l.current,c,x)}return n==="horizontal"?v.jsx(jae,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollLeft,x=ZR(g,c,a.dir);o.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollLeft=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollLeft=h(g,a.dir))}}):n==="vertical"?v.jsx(Tae,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollTop,x=ZR(g,c);o.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollTop=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollTop=h(g))}}):null}),jae=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=va(ai,e.__scopeScrollArea),[l,c]=y.useState(),f=y.useRef(null),d=ut(t,f,o.onScrollbarXChange);return y.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx(OB,{"data-orientation":"horizontal",...a,ref:d,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":$v(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,h)=>{if(o.viewport){const g=o.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),NB(g,h)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:tm(l.paddingLeft),paddingEnd:tm(l.paddingRight)}})}})}),Tae=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=va(ai,e.__scopeScrollArea),[l,c]=y.useState(),f=y.useRef(null),d=ut(t,f,o.onScrollbarYChange);return y.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx(OB,{"data-orientation":"vertical",...a,ref:d,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":$v(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,h)=>{if(o.viewport){const g=o.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),NB(g,h)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:tm(l.paddingTop),paddingEnd:tm(l.paddingBottom)}})}})}),[Cae,EB]=xB(ai),OB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:m,onResize:h,...g}=e,x=va(ai,n),[A,S]=y.useState(null),w=ut(t,z=>S(z)),E=y.useRef(null),O=y.useRef(""),j=x.viewport,R=r.content-r.viewport,C=Yn(m),T=Yn(f),N=zv(h,10);function D(z){if(E.current){const G=z.clientX-E.current.left,U=z.clientY-E.current.top;d({x:G,y:U})}}return y.useEffect(()=>{const z=G=>{const U=G.target;(A==null?void 0:A.contains(U))&&C(G,R)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[j,A,R,C]),y.useEffect(T,[r,T]),Ql(A,N),Ql(x.content,N),v.jsx(Cae,{scope:n,scrollbar:A,hasThumb:a,onThumbChange:Yn(o),onThumbPointerUp:Yn(l),onThumbPositionChange:T,onThumbPointerDown:Yn(c),children:v.jsx(et.div,{...g,ref:w,style:{position:"absolute",...g.style},onPointerDown:ze(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),E.current=A.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),D(z))}),onPointerMove:ze(e.onPointerMove,D),onPointerUp:ze(e.onPointerUp,z=>{const G=z.target;G.hasPointerCapture(z.pointerId)&&G.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=O.current,x.viewport&&(x.viewport.style.scrollBehavior=""),E.current=null})})})}),em="ScrollAreaThumb",jB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=EB(em,e.__scopeScrollArea);return v.jsx(ur,{present:n||a.hasThumb,children:v.jsx(Rae,{ref:t,...r})})}),Rae=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=va(em,n),l=EB(em,n),{onThumbPositionChange:c}=l,f=ut(t,h=>l.onThumbChange(h)),d=y.useRef(void 0),m=zv(()=>{d.current&&(d.current(),d.current=void 0)},100);return y.useEffect(()=>{const h=o.viewport;if(h){const g=()=>{if(m(),!d.current){const x=Pae(h,c);d.current=x,c()}};return c(),h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[o.viewport,m,c]),v.jsx(et.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ze(e.onPointerDownCapture,h=>{const x=h.target.getBoundingClientRect(),A=h.clientX-x.left,S=h.clientY-x.top;l.onThumbPointerDown({x:A,y:S})}),onPointerUp:ze(e.onPointerUp,l.onThumbPointerUp)})});jB.displayName=em;var mE="ScrollAreaCorner",TB=y.forwardRef((e,t)=>{const n=va(mE,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(Nae,{...e,ref:t}):null});TB.displayName=mE;var Nae=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=va(mE,n),[o,l]=y.useState(0),[c,f]=y.useState(0),d=!!(o&&c);return Ql(a.scrollbarX,()=>{var h;const m=((h=a.scrollbarX)==null?void 0:h.offsetHeight)||0;a.onCornerHeightChange(m),f(m)}),Ql(a.scrollbarY,()=>{var h;const m=((h=a.scrollbarY)==null?void 0:h.offsetWidth)||0;a.onCornerWidthChange(m),l(m)}),d?v.jsx(et.div,{...r,ref:t,style:{width:o,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function tm(e){return e?parseInt(e,10):0}function CB(e,t){const n=e/t;return isNaN(n)?0:n}function $v(e){const t=CB(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Mae(e,t,n,r="ltr"){const a=$v(n),o=a/2,l=t||o,c=a-l,f=n.scrollbar.paddingStart+l,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,m=n.content-n.viewport,h=r==="ltr"?[0,m]:[m*-1,0];return RB([f,d],h)(e)}function ZR(e,t,n="ltr"){const r=$v(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,l=t.content-t.viewport,c=o-r,f=n==="ltr"?[0,l]:[l*-1,0],d=ES(e,f);return RB([0,l],[0,c])(d)}function RB(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function NB(e,t){return e>0&&e<t}var Pae=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,c=n.top!==o.top;(l||c)&&t(),n=o,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function zv(e,t){const n=Yn(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ql(e,t){const n=Yn(t);Zn(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var MB=wB,Dae=_B,kae=TB;const PB=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(MB,{ref:r,className:be("relative overflow-hidden",e),...n,children:[v.jsx(Dae,{className:"h-full w-full rounded-[inherit]",children:t}),v.jsx(DB,{}),v.jsx(kae,{})]}));PB.displayName=MB.displayName;const DB=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>v.jsx(hE,{ref:r,orientation:t,className:be("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:v.jsx(jB,{className:"relative flex-1 rounded-full bg-border"})}));DB.displayName=hE.displayName;function kB(e){return/[Zz]|[+-]\d{2}/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function $ae(e){const t=new Map;for(const a of e){const o=kB(a.created_at).toDateString();t.has(o)||t.set(o,[]),t.get(o).push(a)}const n=new Date().toDateString(),r=new Date(Date.now()-864e5).toDateString();return Array.from(t.entries()).map(([a,o])=>{let l;if(a===n)l="Today";else if(a===r)l="Yesterday";else{const c=new Date(a);l=c.toLocaleDateString(void 0,{month:"short",day:"numeric",...c.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{}})}return{label:l,items:o}})}function zae(e){return kB(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}const Lae=5*1024*1024,Iae=["image/png","image/jpeg","image/webp"];function Bae({buildId:e}){const[t,n]=y.useState([]),[r,a]=y.useState(""),[o,l]=y.useState(null),[c,f]=y.useState(!1),[d,m]=y.useState(""),h=y.useRef(null),g=y.useRef({});function x(){fetch(`/api/v1/comments?build_id=${e}`,{credentials:"include"}).then(O=>O.ok?O.json():[]).then(n)}y.useEffect(()=>{x()},[e]),y.useEffect(()=>{const O=window.location.hash;if(!O.startsWith("#comment-"))return;const j=Number(O.replace("#comment-","")),R=g.current[j];if(!R)return;R.scrollIntoView({behavior:"smooth"});const C=document.documentElement.classList.contains("dark");R.style.backgroundColor=C?"rgb(0 112 243 / 0.18)":"#d3e5ff",setTimeout(()=>{R.style.backgroundColor=""},2e3)},[t]);function A(O){const j=`${location.origin}${location.pathname}${location.search}#comment-${O}`;navigator.clipboard.writeText(j).catch(()=>{})}function S(O){if(m(""),!Iae.includes(O.type)){m("Only png, jpg, webp allowed");return}if(O.size>Lae){m("Max 5MB");return}l(O)}async function w(O){if(O.preventDefault(),!r.trim()&&!o)return;f(!0);const j=new FormData;j.append("build_id",String(e)),j.append("body",r),o&&j.append("attachment",o),(await fetch("/api/v1/comments",{method:"POST",credentials:"include",body:j})).ok&&(a(""),l(null),x()),f(!1)}const E=$ae(t);return v.jsxs("div",{className:"flex h-full flex-col gap-3",children:[v.jsx(PB,{className:"flex-1 rounded-md border",children:v.jsx("div",{className:"p-3",children:t.length===0?v.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No comments yet."}):v.jsx("div",{className:"flex flex-col",children:E.map(({label:O,items:j})=>v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center gap-2 py-3",children:[v.jsx("div",{className:"h-px flex-1 bg-border"}),v.jsx("span",{className:"text-[11px] font-medium text-muted-foreground px-1 select-none",children:O}),v.jsx("div",{className:"h-px flex-1 bg-border"})]}),v.jsx("div",{className:"flex flex-col gap-4",children:j.map(R=>v.jsxs("div",{id:`comment-${R.id}`,ref:C=>{g.current[R.id]=C},className:"group flex gap-2.5 rounded-md px-2 py-1.5 transition-all",children:[v.jsx("div",{className:"mt-0.5 shrink-0",children:v.jsx(n3,{name:R.author,avatarUrl:R.authorAvatarUrl,size:28})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"text-sm font-semibold leading-none",children:R.author}),v.jsx("span",{className:"text-[11px] text-muted-foreground leading-none",children:zae(R.created_at)}),v.jsx(ct,{variant:"ghost",size:"icon",className:"h-4 w-4 ml-0.5 opacity-0 group-hover:opacity-50 hover:!opacity-100 transition-opacity",onClick:()=>A(R.id),children:v.jsx(m5,{className:"h-3 w-3"})})]}),v.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap mt-1",children:R.body}),R.attachments.map(C=>v.jsx("a",{href:C.file_path,target:"_blank",rel:"noreferrer",className:"mt-1.5 block",children:v.jsx("img",{src:C.file_path,alt:"attachment",className:"max-h-48 rounded border object-contain"})},C.id))]})]},R.id))})]},O))})})}),v.jsx("div",{className:"px-1 pb-1",children:v.jsx("form",{onSubmit:w,children:v.jsxs("div",{className:"rounded-xl border border-input bg-background ring-offset-background transition-shadow focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",children:[v.jsx(bB,{placeholder:"Leave a comment…",value:r,onChange:O=>a(O.target.value),className:"min-h-16 resize-none border-0 bg-transparent shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm"}),(o||d)&&v.jsxs("div",{className:"px-3 -mt-1 pb-1",children:[o&&v.jsx("p",{className:"text-xs text-muted-foreground",children:o.name}),d&&v.jsx("p",{className:"text-xs text-destructive",children:d})]}),v.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[v.jsx(ct,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>{var O;return(O=h.current)==null?void 0:O.click()},children:v.jsx(rV,{className:"h-4 w-4"})}),v.jsx("input",{ref:h,type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:O=>{var R;const j=(R=O.target.files)==null?void 0:R[0];j&&S(j)}}),v.jsx("div",{className:"flex-1"}),v.jsx(ct,{type:"submit",size:"icon",className:"h-7 w-7 rounded-full",disabled:c||!r.trim()&&!o,children:v.jsx(Z7,{className:"h-3.5 w-3.5"})})]})]})})})]})}function Uae(e){return e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function qae(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Hae(e){const t=new Date(e).getTime()-Date.now();if(t<=0)return{label:"Expired",urgent:!0};const n=Math.floor(t/36e5);return n<1?{label:"< 1 hour left",urgent:!0}:n<24?{label:`Expires in ${n}h`,urgent:n<6}:{label:`Expires in ${Math.floor(n/24)}d`,urgent:!1}}function Fae({buildId:e,refreshKey:t}){const[n,r]=y.useState([]),[a,o]=y.useState(!0);return y.useEffect(()=>{o(!0),fetch(`/api/v1/recordings?buildId=${e}`,{credentials:"include"}).then(l=>l.ok?l.json():[]).then(l=>r(l)).catch(()=>r([])).finally(()=>o(!1))},[e,t]),a?v.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading recordings…"}):n.length===0?v.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No recordings yet."}):v.jsx("div",{className:"flex flex-col gap-2",children:n.map(l=>{const c=Hae(l.expiresAt);return v.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[v.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[v.jsx("span",{className:"text-xs font-medium truncate",children:qae(l.createdAt)}),v.jsxs("span",{className:`text-xs ${c.urgent?"text-destructive":"text-muted-foreground"}`,children:[c.label," · ",Uae(l.fileSize)]})]}),v.jsx(ct,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0 ml-2",title:"Download",onClick:()=>{const f=document.createElement("a");f.href=l.url,f.download="",f.click()},children:v.jsx(tV,{className:"h-3.5 w-3.5"})})]},l.id)})})}function Vae({buildId:e,recordingsRefreshKey:t=0}){return v.jsxs(yB,{defaultValue:"comments",className:"flex h-full flex-col",children:[v.jsxs(fE,{className:"w-full shrink-0",children:[v.jsxs(Jp,{value:"comments",className:"flex-1 gap-1.5",children:[v.jsx(cV,{className:"h-3.5 w-3.5"}),"Comments"]}),v.jsxs(Jp,{value:"recordings",className:"flex-1 gap-1.5",children:[v.jsx(nV,{className:"h-3.5 w-3.5"}),"Recordings"]})]}),v.jsx(PS,{value:"comments",className:"mt-3 min-h-0 flex-1 overflow-hidden",children:v.jsx(Bae,{buildId:e})}),v.jsx(PS,{value:"recordings",className:"mt-3 min-h-0 flex-1 overflow-y-auto",children:v.jsx(Fae,{buildId:e,refreshKey:t})})]})}const $B=y.forwardRef(({...e},t)=>v.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));$B.displayName="Breadcrumb";const zB=y.forwardRef(({className:e,...t},n)=>v.jsx("ol",{ref:n,className:be("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));zB.displayName="BreadcrumbList";const Ju=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,className:be("inline-flex items-center gap-1.5",e),...t}));Ju.displayName="BreadcrumbItem";const Tp=y.forwardRef(({asChild:e,className:t,...n},r)=>{const a=e?Ds:"a";return v.jsx(a,{ref:r,className:be("transition-colors hover:text-foreground cursor-pointer",t),...n})});Tp.displayName="BreadcrumbLink";const Cp=y.forwardRef(({className:e,...t},n)=>v.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:be("font-medium text-foreground",e),...t}));Cp.displayName="BreadcrumbPage";const Rp=({children:e,className:t,...n})=>v.jsx("li",{role:"presentation","aria-hidden":"true",className:be("[&>svg]:h-3.5 [&>svg]:w-3.5",t),...n,children:e??v.jsx(cA,{})});Rp.displayName="BreadcrumbSeparator";var Lv="Switch",[Gae]=pa(Lv),[Wae,Yae]=Gae(Lv),LB=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:l,disabled:c,value:f="on",onCheckedChange:d,form:m,...h}=e,[g,x]=y.useState(null),A=ut(t,j=>x(j)),S=y.useRef(!1),w=g?m||!!g.closest("form"):!0,[E,O]=Co({prop:a,defaultProp:o??!1,onChange:d,caller:Lv});return v.jsxs(Wae,{scope:n,checked:E,disabled:c,children:[v.jsx(et.button,{type:"button",role:"switch","aria-checked":E,"aria-required":l,"data-state":qB(E),"data-disabled":c?"":void 0,disabled:c,value:f,...h,ref:A,onClick:ze(e.onClick,j=>{O(R=>!R),w&&(S.current=j.isPropagationStopped(),S.current||j.stopPropagation())})}),w&&v.jsx(UB,{control:g,bubbles:!S.current,name:r,value:f,checked:E,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});LB.displayName=Lv;var IB="SwitchThumb",BB=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=Yae(IB,n);return v.jsx(et.span,{"data-state":qB(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});BB.displayName=IB;var Kae="SwitchBubbleInput",UB=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const l=y.useRef(null),c=ut(l,o),f=H3(n),d=AL(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const h=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(h,"checked").set;if(f!==n&&x){const A=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(A)}},[f,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});UB.displayName=Kae;function qB(e){return e?"checked":"unchecked"}var HB=LB,Zae=BB;const FB=y.forwardRef(({className:e,...t},n)=>v.jsx(HB,{className:be("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:v.jsx(Zae,{className:be("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));FB.displayName=HB.displayName;const XR=70,QR=80;function Xae(e,t){if(!e||t)return"unknown";const n=e.memUsedMB/e.memTotalMB*100;return e.cpuPercent>QR||n>QR?"overloaded":e.cpuPercent>=XR||n>=XR?"warning":"healthy"}function Qae(){const[e]=nd(),t=$a(),n=e.get("id"),{build:r}=Tre(n),[a,o]=y.useState(0),l=(r==null?void 0:r.platform)??"ios",{sessions:c,selectedAgent:f,setSelectedAgent:d,activeSessionId:m,deviceId:h,booting:g,status:x,connected:A,agentGroups:S,startDevice:w,resetDevice:E,handleBack:O,handleBackToMacs:j}=Mre(l),R=S.find(F=>F.agentName===f),{osVersions:C,osVersion:T,setOsVersion:N,deviceSearch:D,setDeviceSearch:z,versionedDevices:G,resetMode:U,setResetMode:P}=Pre(R,l),q=c.flatMap(F=>F.devices).find(F=>F.id===h),W=q?`${q.name}${q.osVersion?` · ${q.osVersion}`:""}`:"",$=y.useCallback(()=>o(F=>F+1),[]),{setNode:V}=HA();return y.useEffect(()=>{if(r)return V(v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx($B,{children:v.jsxs(zB,{children:[v.jsx(Ju,{children:v.jsx(Tp,{asChild:!0,children:v.jsx("button",{onClick:()=>t(`/app-center?appId=${r.app_id}`),children:r.name})})}),v.jsx(Rp,{}),v.jsx(Ju,{children:f?v.jsx(Tp,{asChild:!0,children:v.jsx("button",{onClick:j,children:VR(r)})}):v.jsx(Cp,{children:VR(r)})}),f&&v.jsxs(v.Fragment,{children:[v.jsx(Rp,{}),v.jsx(Ju,{children:m?v.jsx(Tp,{asChild:!0,children:v.jsx("button",{onClick:O,children:f})}):v.jsx(Cp,{children:f})})]}),m&&v.jsxs(v.Fragment,{children:[v.jsx(Rp,{}),v.jsx(Ju,{children:v.jsx(Cp,{children:W})})]})]})}),!f&&r.status_label&&v.jsx(Xl,{tone:Y4[r.status_label],children:r.status_label})]})),()=>V(null)},[r,f,m,W,t,O,j,V]),v.jsxs("div",{className:"flex h-full min-h-0 gap-6 p-6",children:[v.jsx("div",{className:"flex flex-col gap-3 flex-1 min-w-0 min-h-0",children:v.jsx("div",{className:"flex-1 min-h-0 overflow-auto -ml-1 pl-1 -mr-4 pr-4",children:m?v.jsx("div",{className:"min-h-full flex items-center justify-center py-6 px-8 min-w-max",children:v.jsx(bae,{sessionId:m,deviceId:h,buildId:r==null?void 0:r.id,resetMode:U,onRecordingUploaded:$})}):f?v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:j,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"← All Macs"}),v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select device"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(q3,{placeholder:"Search device…",value:D,onChange:z}),C.length>0&&v.jsxs(Mo,{value:T||"__all__",onValueChange:F=>{N(F==="__all__"?"":F),E()},children:[v.jsx(zi,{className:"h-8 w-36 shrink-0",children:v.jsx(Po,{})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"__all__",children:"Any version"}),C.map(F=>v.jsx(Ct,{value:F,children:F},F))]})]}),v.jsx(Bp,{children:v.jsxs(sa,{children:[v.jsxs("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:[v.jsx(la,{asChild:!0,children:v.jsxs(Tt,{htmlFor:"reset-mode",className:"flex items-center gap-1 text-sm cursor-pointer whitespace-nowrap",children:[v.jsx(aV,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Full reset"]})}),v.jsx(FB,{id:"reset-mode",checked:U==="full-erase",onCheckedChange:F=>P(F?"full-erase":"app-only")})]}),v.jsx(kr,{children:U==="full-erase"?"Erase all data before booting":"Keep existing data"})]})})]}),G.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:A?"No devices available for this OS.":"Connecting to relay…"}):v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:G.map(F=>{const K=F.status==="booted",ie=F.busy,I=ie?"In use":K?"Booted":"Available",Z=ie?"bg-amber-400":K?"bg-emerald-400":"bg-muted-foreground/40";return v.jsxs("button",{disabled:ie||g||!A,onClick:()=>w(F),className:be("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px]","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),children:[v.jsx("span",{className:"text-sm font-medium leading-tight",children:F.name}),F.osVersion&&v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:F.osVersion}),v.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsx("span",{className:be("inline-block h-1.5 w-1.5 rounded-full",Z)}),I]})]},F.id)})}),x&&v.jsx("p",{className:"text-sm text-muted-foreground",children:x})]}):v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select Mac"}),S.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:A?`No agents available for ${l}.`:"Connecting to relay…"}):v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:S.map(F=>{const K=F.resources,ie=K?Date.now()-K.reportedAt>3e4:!1,I=F.devices.filter(Ee=>Ee.platform===l).length,Z=(K==null?void 0:K.cpuPercent)??0,X=K?K.memUsedMB/K.memTotalMB*100:0,oe=Xae(K,ie),ge=oe==="overloaded";return v.jsx(Bp,{children:v.jsxs(sa,{children:[v.jsx(la,{asChild:!0,children:v.jsx("span",{tabIndex:ge?0:void 0,className:ge?"cursor-not-allowed":void 0,children:v.jsxs("button",{disabled:ge,"aria-disabled":ge,onClick:()=>d(F.agentName??null),className:be("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px] w-full",ge?"pointer-events-none":"hover:bg-accent"),children:[v.jsxs("div",{className:"flex items-start justify-between gap-2",children:[v.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v.jsx(Jae,{health:oe}),v.jsx("span",{className:"text-sm font-medium leading-tight truncate",children:F.agentName??"Unknown"})]}),ie&&v.jsx("span",{className:"shrink-0 text-[10px] font-medium text-amber-500",children:"Stale"})]}),v.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsxs("span",{children:[I," device",I!==1?"s":""]}),K&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"·"}),v.jsxs("span",{children:[K.slotsAvailable,"/",K.slotsTotal," slots"]})]})]}),K&&!ie&&v.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[v.jsx(JR,{label:"CPU",percent:Z,colorClass:"bg-blue-400"}),v.jsx(JR,{label:"RAM",percent:X,colorClass:"bg-violet-400"})]})]})})}),ge&&v.jsx(kr,{children:"This Mac is currently overloaded. Try again later."})]})},F.agentName)})})]})})}),n&&v.jsxs(v.Fragment,{children:[v.jsx(Ja,{orientation:"vertical",className:"h-auto"}),v.jsx("div",{className:"w-80 shrink-0 h-full",children:v.jsx(Vae,{buildId:Number(n),recordingsRefreshKey:a})})]})]})}function Jae({health:e}){const t={unknown:"bg-muted-foreground/40",healthy:"bg-emerald-400",warning:"bg-amber-400",overloaded:"bg-red-500"}[e];return v.jsx("span",{"data-testid":"resource-health-dot",className:be("inline-block h-2 w-2 shrink-0 rounded-full",t)})}function JR({label:e,percent:t,colorClass:n}){return v.jsxs("div",{className:"flex flex-col gap-0.5",children:[v.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground",children:[v.jsx("span",{children:e}),v.jsxs("span",{children:[t.toFixed(0),"%"]})]}),v.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:v.jsx("div",{className:be("h-full rounded-full transition-all",n),style:{width:`${Math.min(100,t)}%`}})})]})}var Jb,eN;function wr(){if(eN)return Jb;eN=1;var e=Array.isArray;return Jb=e,Jb}var e0,tN;function VB(){if(tN)return e0;tN=1;var e=typeof Gh=="object"&&Gh&&Gh.Object===Object&&Gh;return e0=e,e0}var t0,nN;function ii(){if(nN)return t0;nN=1;var e=VB(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return t0=n,t0}var n0,rN;function Od(){if(rN)return n0;rN=1;var e=ii(),t=e.Symbol;return n0=t,n0}var r0,aN;function eie(){if(aN)return r0;aN=1;var e=Od(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function o(l){var c=n.call(l,a),f=l[a];try{l[a]=void 0;var d=!0}catch{}var m=r.call(l);return d&&(c?l[a]=f:delete l[a]),m}return r0=o,r0}var a0,iN;function tie(){if(iN)return a0;iN=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return a0=n,a0}var i0,oN;function Vi(){if(oN)return i0;oN=1;var e=Od(),t=eie(),n=tie(),r="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?a:r:o&&o in Object(c)?t(c):n(c)}return i0=l,i0}var o0,sN;function Gi(){if(sN)return o0;sN=1;function e(t){return t!=null&&typeof t=="object"}return o0=e,o0}var s0,lN;function Dc(){if(lN)return s0;lN=1;var e=Vi(),t=Gi(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return s0=r,s0}var l0,cN;function vE(){if(cN)return l0;cN=1;var e=wr(),t=Dc(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(o,l){if(e(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return l0=a,l0}var c0,uN;function Lo(){if(uN)return c0;uN=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return c0=e,c0}var u0,fN;function gE(){if(fN)return u0;fN=1;var e=Vi(),t=Lo(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",o="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==a||f==n||f==o}return u0=l,u0}var f0,dN;function nie(){if(dN)return f0;dN=1;var e=ii(),t=e["__core-js_shared__"];return f0=t,f0}var d0,hN;function rie(){if(hN)return d0;hN=1;var e=nie(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return d0=n,d0}var h0,pN;function GB(){if(pN)return h0;pN=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return h0=n,h0}var p0,mN;function aie(){if(mN)return p0;mN=1;var e=gE(),t=rie(),n=Lo(),r=GB(),a=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,d=c.hasOwnProperty,m=RegExp("^"+f.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!n(g)||t(g))return!1;var x=e(g)?m:o;return x.test(r(g))}return p0=h,p0}var m0,vN;function iie(){if(vN)return m0;vN=1;function e(t,n){return t==null?void 0:t[n]}return m0=e,m0}var v0,gN;function Ls(){if(gN)return v0;gN=1;var e=aie(),t=iie();function n(r,a){var o=t(r,a);return e(o)?o:void 0}return v0=n,v0}var g0,yN;function Iv(){if(yN)return g0;yN=1;var e=Ls(),t=e(Object,"create");return g0=t,g0}var y0,bN;function oie(){if(bN)return y0;bN=1;var e=Iv();function t(){this.__data__=e?e(null):{},this.size=0}return y0=t,y0}var b0,xN;function sie(){if(xN)return b0;xN=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return b0=e,b0}var x0,wN;function lie(){if(wN)return x0;wN=1;var e=Iv(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(o){var l=this.__data__;if(e){var c=l[o];return c===t?void 0:c}return r.call(l,o)?l[o]:void 0}return x0=a,x0}var w0,SN;function cie(){if(SN)return w0;SN=1;var e=Iv(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var o=this.__data__;return e?o[a]!==void 0:n.call(o,a)}return w0=r,w0}var S0,_N;function uie(){if(_N)return S0;_N=1;var e=Iv(),t="__lodash_hash_undefined__";function n(r,a){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&a===void 0?t:a,this}return S0=n,S0}var _0,AN;function fie(){if(AN)return _0;AN=1;var e=oie(),t=sie(),n=lie(),r=cie(),a=uie();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,_0=o,_0}var A0,EN;function die(){if(EN)return A0;EN=1;function e(){this.__data__=[],this.size=0}return A0=e,A0}var E0,ON;function yE(){if(ON)return E0;ON=1;function e(t,n){return t===n||t!==t&&n!==n}return E0=e,E0}var O0,jN;function Bv(){if(jN)return O0;jN=1;var e=yE();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return O0=t,O0}var j0,TN;function hie(){if(TN)return j0;TN=1;var e=Bv(),t=Array.prototype,n=t.splice;function r(a){var o=this.__data__,l=e(o,a);if(l<0)return!1;var c=o.length-1;return l==c?o.pop():n.call(o,l,1),--this.size,!0}return j0=r,j0}var T0,CN;function pie(){if(CN)return T0;CN=1;var e=Bv();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return T0=t,T0}var C0,RN;function mie(){if(RN)return C0;RN=1;var e=Bv();function t(n){return e(this.__data__,n)>-1}return C0=t,C0}var R0,NN;function vie(){if(NN)return R0;NN=1;var e=Bv();function t(n,r){var a=this.__data__,o=e(a,n);return o<0?(++this.size,a.push([n,r])):a[o][1]=r,this}return R0=t,R0}var N0,MN;function Uv(){if(MN)return N0;MN=1;var e=die(),t=hie(),n=pie(),r=mie(),a=vie();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,N0=o,N0}var M0,PN;function bE(){if(PN)return M0;PN=1;var e=Ls(),t=ii(),n=e(t,"Map");return M0=n,M0}var P0,DN;function gie(){if(DN)return P0;DN=1;var e=fie(),t=Uv(),n=bE();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return P0=r,P0}var D0,kN;function yie(){if(kN)return D0;kN=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return D0=e,D0}var k0,$N;function qv(){if($N)return k0;$N=1;var e=yie();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return k0=t,k0}var $0,zN;function bie(){if(zN)return $0;zN=1;var e=qv();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return $0=t,$0}var z0,LN;function xie(){if(LN)return z0;LN=1;var e=qv();function t(n){return e(this,n).get(n)}return z0=t,z0}var L0,IN;function wie(){if(IN)return L0;IN=1;var e=qv();function t(n){return e(this,n).has(n)}return L0=t,L0}var I0,BN;function Sie(){if(BN)return I0;BN=1;var e=qv();function t(n,r){var a=e(this,n),o=a.size;return a.set(n,r),this.size+=a.size==o?0:1,this}return I0=t,I0}var B0,UN;function xE(){if(UN)return B0;UN=1;var e=gie(),t=bie(),n=xie(),r=wie(),a=Sie();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,B0=o,B0}var U0,qN;function WB(){if(qN)return U0;qN=1;var e=xE(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var o=function(){var l=arguments,c=a?a.apply(this,l):l[0],f=o.cache;if(f.has(c))return f.get(c);var d=r.apply(this,l);return o.cache=f.set(c,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,U0=n,U0}var q0,HN;function _ie(){if(HN)return q0;HN=1;var e=WB(),t=500;function n(r){var a=e(r,function(l){return o.size===t&&o.clear(),l}),o=a.cache;return a}return q0=n,q0}var H0,FN;function Aie(){if(FN)return H0;FN=1;var e=_ie(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var o=[];return a.charCodeAt(0)===46&&o.push(""),a.replace(t,function(l,c,f,d){o.push(f?d.replace(n,"$1"):c||l)}),o});return H0=r,H0}var F0,VN;function wE(){if(VN)return F0;VN=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=Array(a);++r<a;)o[r]=n(t[r],r,t);return o}return F0=e,F0}var V0,GN;function Eie(){if(GN)return V0;GN=1;var e=Od(),t=wE(),n=wr(),r=Dc(),a=e?e.prototype:void 0,o=a?a.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return o?o.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return V0=l,V0}var G0,WN;function YB(){if(WN)return G0;WN=1;var e=Eie();function t(n){return n==null?"":e(n)}return G0=t,G0}var W0,YN;function KB(){if(YN)return W0;YN=1;var e=wr(),t=vE(),n=Aie(),r=YB();function a(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return W0=a,W0}var Y0,KN;function Hv(){if(KN)return Y0;KN=1;var e=Dc();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Y0=t,Y0}var K0,ZN;function SE(){if(ZN)return K0;ZN=1;var e=KB(),t=Hv();function n(r,a){a=e(a,r);for(var o=0,l=a.length;r!=null&&o<l;)r=r[t(a[o++])];return o&&o==l?r:void 0}return K0=n,K0}var Z0,XN;function ZB(){if(XN)return Z0;XN=1;var e=SE();function t(n,r,a){var o=n==null?void 0:e(n,r);return o===void 0?a:o}return Z0=t,Z0}var Oie=ZB();const fa=Ht(Oie);var X0,QN;function jie(){if(QN)return X0;QN=1;function e(t){return t==null}return X0=e,X0}var Tie=jie();const yt=Ht(Tie);var Q0,JN;function Cie(){if(JN)return Q0;JN=1;var e=Vi(),t=wr(),n=Gi(),r="[object String]";function a(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return Q0=a,Q0}var Rie=Cie();const Cs=Ht(Rie);var Nie=gE();const lt=Ht(Nie);var Mie=Lo();const kc=Ht(Mie);var J0={exports:{}},Pt={};/**
448
- * @license React
449
- * react-is.production.min.js
450
- *
451
- * Copyright (c) Facebook, Inc. and its affiliates.
452
- *
453
- * This source code is licensed under the MIT license found in the
454
- * LICENSE file in the root directory of this source tree.
455
- */var eM;function Pie(){if(eM)return Pt;eM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),A;A=Symbol.for("react.module.reference");function S(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case e:switch(w=w.type,w){case n:case a:case r:case d:case m:return w;default:switch(w=w&&w.$$typeof,w){case c:case l:case f:case g:case h:case o:return w;default:return E}}case t:return E}}}return Pt.ContextConsumer=l,Pt.ContextProvider=o,Pt.Element=e,Pt.ForwardRef=f,Pt.Fragment=n,Pt.Lazy=g,Pt.Memo=h,Pt.Portal=t,Pt.Profiler=a,Pt.StrictMode=r,Pt.Suspense=d,Pt.SuspenseList=m,Pt.isAsyncMode=function(){return!1},Pt.isConcurrentMode=function(){return!1},Pt.isContextConsumer=function(w){return S(w)===l},Pt.isContextProvider=function(w){return S(w)===o},Pt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Pt.isForwardRef=function(w){return S(w)===f},Pt.isFragment=function(w){return S(w)===n},Pt.isLazy=function(w){return S(w)===g},Pt.isMemo=function(w){return S(w)===h},Pt.isPortal=function(w){return S(w)===t},Pt.isProfiler=function(w){return S(w)===a},Pt.isStrictMode=function(w){return S(w)===r},Pt.isSuspense=function(w){return S(w)===d},Pt.isSuspenseList=function(w){return S(w)===m},Pt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===a||w===r||w===d||w===m||w===x||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===o||w.$$typeof===l||w.$$typeof===f||w.$$typeof===A||w.getModuleId!==void 0)},Pt.typeOf=S,Pt}var tM;function Die(){return tM||(tM=1,J0.exports=Pie()),J0.exports}var kie=Die(),ex,nM;function XB(){if(nM)return ex;nM=1;var e=Vi(),t=Gi(),n="[object Number]";function r(a){return typeof a=="number"||t(a)&&e(a)==n}return ex=r,ex}var tx,rM;function $ie(){if(rM)return tx;rM=1;var e=XB();function t(n){return e(n)&&n!=+n}return tx=t,tx}var zie=$ie();const $c=Ht(zie);var Lie=XB();const Iie=Ht(Lie);var Ca=function(t){return t===0?0:t>0?1:-1},ms=function(t){return Cs(t)&&t.indexOf("%")===t.length-1},Me=function(t){return Iie(t)&&!$c(t)},Bie=function(t){return yt(t)},kn=function(t){return Me(t)||Cs(t)},Uie=0,jd=function(t){var n=++Uie;return"".concat(t||"").concat(n)},Rs=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Me(t)&&!Cs(t))return r;var o;if(ms(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return $c(o)&&(o=r),a&&o>n&&(o=n),o},Ao=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},qie=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},ia=function(t,n){return Me(t)&&Me(n)?function(r){return t+r*(n-t)}:function(){return n}};function nm(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):fa(r,t))===n})}var Hie=function(t,n){return Me(t)&&Me(n)?t-n:Cs(t)&&Cs(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Hl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function DS(e){"@babel/helpers - typeof";return DS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},DS(e)}var Fie=["viewBox","children"],Vie=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],aM=["points","pathLength"],nx={svg:Fie,polygon:aM,polyline:aM},_E=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],rm=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(y.isValidElement(t)&&(r=t.props),!kc(r))return null;var a={};return Object.keys(r).forEach(function(o){_E.includes(o)&&(a[o]=n||function(l){return r[o](r,l)})}),a},Gie=function(t,n,r){return function(a){return t(n,r,a),null}},am=function(t,n,r){if(!kc(t)||DS(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(o){var l=t[o];_E.includes(o)&&typeof l=="function"&&(a||(a={}),a[o]=Gie(l,n,r))}),a},Wie=["children"],Yie=["children"];function iM(e,t){if(e==null)return{};var n=Kie(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kS(e){"@babel/helpers - typeof";return kS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kS(e)}var oM={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Ni=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},sM=null,rx=null,AE=function e(t){if(t===sM&&Array.isArray(rx))return rx;var n=[];return y.Children.forEach(t,function(r){yt(r)||(kie.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),rx=n,sM=t,n};function Ma(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Ni(a)}):r=[Ni(t)],AE(e).forEach(function(a){var o=fa(a,"type.displayName")||fa(a,"type.name");r.indexOf(o)!==-1&&n.push(a)}),n}function Rr(e,t){var n=Ma(e,t);return n&&n[0]}var lM=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Me(r)||r<=0||!Me(a)||a<=0)},Zie=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Xie=function(t){return t&&t.type&&Cs(t.type)&&Zie.indexOf(t.type)>=0},Qie=function(t){return t&&kS(t)==="object"&&"clipDot"in t},Jie=function(t,n,r,a){var o,l=(o=nx==null?void 0:nx[a])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!lt(t)&&(a&&l.includes(n)||Vie.includes(n))||r&&_E.includes(n)},mt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(y.isValidElement(t)&&(a=t.props),!kc(a))return null;var o={};return Object.keys(a).forEach(function(l){var c;Jie((c=a)===null||c===void 0?void 0:c[l],l,n,r)&&(o[l]=a[l])}),o},$S=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return cM(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var o=t[a],l=n[a];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!cM(o,l))return!1}return!0},cM=function(t,n){if(yt(t)&&yt(n))return!0;if(!yt(t)&&!yt(n)){var r=t.props||{},a=r.children,o=iM(r,Wie),l=n.props||{},c=l.children,f=iM(l,Yie);return a&&c?Hl(o,f)&&$S(a,c):!a&&!c?Hl(o,f):!1}return!1},uM=function(t,n){var r=[],a={};return AE(t).forEach(function(o,l){if(Xie(o))r.push(o);else if(o){var c=Ni(o.type),f=n[c]||{},d=f.handler,m=f.once;if(d&&(!m||!a[c])){var h=d(o,c,l);r.push(h),a[c]=!0}}}),r},eoe=function(t){var n=t&&t.type;return n&&oM[n]?oM[n]:null},toe=function(t,n){return AE(n).indexOf(t)},noe=["children","width","height","viewBox","className","style","title","desc"];function zS(){return zS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zS.apply(this,arguments)}function roe(e,t){if(e==null)return{};var n=aoe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aoe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LS(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,o=e.className,l=e.style,c=e.title,f=e.desc,d=roe(e,noe),m=a||{width:n,height:r,x:0,y:0},h=xt("recharts-surface",o);return L.createElement("svg",zS({},mt(d,!0,"svg"),{className:h,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),L.createElement("title",null,c),L.createElement("desc",null,f),t)}var ioe=["children","className"];function IS(){return IS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IS.apply(this,arguments)}function ooe(e,t){if(e==null)return{};var n=soe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function soe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var cn=L.forwardRef(function(e,t){var n=e.children,r=e.className,a=ooe(e,ioe),o=xt("recharts-layer",r);return L.createElement("g",IS({className:o},mt(a,!0),{ref:t}),n)}),Mi=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o]},ax,fM;function loe(){if(fM)return ax;fM=1;function e(t,n,r){var a=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++a<o;)l[a]=t[a+n];return l}return ax=e,ax}var ix,dM;function coe(){if(dM)return ix;dM=1;var e=loe();function t(n,r,a){var o=n.length;return a=a===void 0?o:a,!r&&a>=o?n:e(n,r,a)}return ix=t,ix}var ox,hM;function QB(){if(hM)return ox;hM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+a+o+"]");function f(d){return c.test(d)}return ox=f,ox}var sx,pM;function uoe(){if(pM)return sx;pM=1;function e(t){return t.split("")}return sx=e,sx}var lx,mM;function foe(){if(mM)return lx;mM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",c="["+a+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",m="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",A=d+"?",S="["+o+"]?",w="(?:"+x+"(?:"+[m,h,g].join("|")+")"+S+A+")*",E=S+A+w,O="(?:"+[m+c+"?",c,h,g,l].join("|")+")",j=RegExp(f+"(?="+f+")|"+O+E,"g");function R(C){return C.match(j)||[]}return lx=R,lx}var cx,vM;function doe(){if(vM)return cx;vM=1;var e=uoe(),t=QB(),n=foe();function r(a){return t(a)?n(a):e(a)}return cx=r,cx}var ux,gM;function hoe(){if(gM)return ux;gM=1;var e=coe(),t=QB(),n=doe(),r=YB();function a(o){return function(l){l=r(l);var c=t(l)?n(l):void 0,f=c?c[0]:l.charAt(0),d=c?e(c,1).join(""):l.slice(1);return f[o]()+d}}return ux=a,ux}var fx,yM;function poe(){if(yM)return fx;yM=1;var e=hoe(),t=e("toUpperCase");return fx=t,fx}var moe=poe();const Fv=Ht(moe);function Kt(e){return function(){return e}}const JB=Math.cos,im=Math.sin,La=Math.sqrt,om=Math.PI,Vv=2*om,BS=Math.PI,US=2*BS,ds=1e-6,voe=US-ds;function e6(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function goe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return e6;const n=10**t;return function(r){this._+=r[0];for(let a=1,o=r.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class yoe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?e6:goe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,o,l){this._append`C${+t},${+n},${+r},${+a},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,a,o){if(t=+t,n=+n,r=+r,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,f=r-t,d=a-n,m=l-t,h=c-n,g=m*m+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>ds)if(!(Math.abs(h*f-d*m)>ds)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-l,A=a-c,S=f*f+d*d,w=x*x+A*A,E=Math.sqrt(S),O=Math.sqrt(g),j=o*Math.tan((BS-Math.acos((S+g-w)/(2*E*O)))/2),R=j/O,C=j/E;Math.abs(R-1)>ds&&this._append`L${t+R*m},${n+R*h}`,this._append`A${o},${o},0,0,${+(h*x>m*A)},${this._x1=t+C*f},${this._y1=n+C*d}`}}arc(t,n,r,a,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(a),f=r*Math.sin(a),d=t+c,m=n+f,h=1^l,g=l?a-o:o-a;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>ds||Math.abs(this._y1-m)>ds)&&this._append`L${d},${m}`,r&&(g<0&&(g=g%US+US),g>voe?this._append`A${r},${r},0,1,${h},${t-c},${n-f}A${r},${r},0,1,${h},${this._x1=d},${this._y1=m}`:g>ds&&this._append`A${r},${r},0,${+(g>=BS)},${h},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function EE(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new yoe(t)}function OE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function t6(e){this._context=e}t6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Gv(e){return new t6(e)}function n6(e){return e[0]}function r6(e){return e[1]}function a6(e,t){var n=Kt(!0),r=null,a=Gv,o=null,l=EE(c);e=typeof e=="function"?e:e===void 0?n6:Kt(e),t=typeof t=="function"?t:t===void 0?r6:Kt(t);function c(f){var d,m=(f=OE(f)).length,h,g=!1,x;for(r==null&&(o=a(x=l())),d=0;d<=m;++d)!(d<m&&n(h=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(h,d,f),+t(h,d,f));if(x)return o=null,x+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Kt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Kt(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:Kt(!!f),c):n},c.curve=function(f){return arguments.length?(a=f,r!=null&&(o=a(r)),c):a},c.context=function(f){return arguments.length?(f==null?r=o=null:o=a(r=f),c):r},c}function ip(e,t,n){var r=null,a=Kt(!0),o=null,l=Gv,c=null,f=EE(d);e=typeof e=="function"?e:e===void 0?n6:Kt(+e),t=typeof t=="function"?t:Kt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?r6:Kt(+n);function d(h){var g,x,A,S=(h=OE(h)).length,w,E=!1,O,j=new Array(S),R=new Array(S);for(o==null&&(c=l(O=f())),g=0;g<=S;++g){if(!(g<S&&a(w=h[g],g,h))===E)if(E=!E)x=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),A=g-1;A>=x;--A)c.point(j[A],R[A]);c.lineEnd(),c.areaEnd()}E&&(j[g]=+e(w,g,h),R[g]=+t(w,g,h),c.point(r?+r(w,g,h):j[g],n?+n(w,g,h):R[g]))}if(O)return c=null,O+""||null}function m(){return a6().defined(a).curve(l).context(o)}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:Kt(+h),r=null,d):e},d.x0=function(h){return arguments.length?(e=typeof h=="function"?h:Kt(+h),d):e},d.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Kt(+h),d):r},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:Kt(+h),n=null,d):t},d.y0=function(h){return arguments.length?(t=typeof h=="function"?h:Kt(+h),d):t},d.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Kt(+h),d):n},d.lineX0=d.lineY0=function(){return m().x(e).y(t)},d.lineY1=function(){return m().x(e).y(n)},d.lineX1=function(){return m().x(r).y(t)},d.defined=function(h){return arguments.length?(a=typeof h=="function"?h:Kt(!!h),d):a},d.curve=function(h){return arguments.length?(l=h,o!=null&&(c=l(o)),d):l},d.context=function(h){return arguments.length?(h==null?o=c=null:c=l(o=h),d):o},d}class i6{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function boe(e){return new i6(e,!0)}function xoe(e){return new i6(e,!1)}const jE={draw(e,t){const n=La(t/om);e.moveTo(n,0),e.arc(0,0,n,0,Vv)}},woe={draw(e,t){const n=La(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},o6=La(1/3),Soe=o6*2,_oe={draw(e,t){const n=La(t/Soe),r=n*o6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Aoe={draw(e,t){const n=La(t),r=-n/2;e.rect(r,r,n,n)}},Eoe=.8908130915292852,s6=im(om/10)/im(7*om/10),Ooe=im(Vv/10)*s6,joe=-JB(Vv/10)*s6,Toe={draw(e,t){const n=La(t*Eoe),r=Ooe*n,a=joe*n;e.moveTo(0,-n),e.lineTo(r,a);for(let o=1;o<5;++o){const l=Vv*o/5,c=JB(l),f=im(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*a,f*r+c*a)}e.closePath()}},dx=La(3),Coe={draw(e,t){const n=-La(t/(dx*3));e.moveTo(0,n*2),e.lineTo(-dx*n,-n),e.lineTo(dx*n,-n),e.closePath()}},na=-.5,ra=La(3)/2,qS=1/La(12),Roe=(qS/2+1)*3,Noe={draw(e,t){const n=La(t/Roe),r=n/2,a=n*qS,o=r,l=n*qS+n,c=-o,f=l;e.moveTo(r,a),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(na*r-ra*a,ra*r+na*a),e.lineTo(na*o-ra*l,ra*o+na*l),e.lineTo(na*c-ra*f,ra*c+na*f),e.lineTo(na*r+ra*a,na*a-ra*r),e.lineTo(na*o+ra*l,na*l-ra*o),e.lineTo(na*c+ra*f,na*f-ra*c),e.closePath()}};function Moe(e,t){let n=null,r=EE(a);e=typeof e=="function"?e:Kt(e||jE),t=typeof t=="function"?t:Kt(t===void 0?64:+t);function a(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:Kt(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:Kt(+o),a):t},a.context=function(o){return arguments.length?(n=o??null,a):n},a}function sm(){}function lm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function l6(e){this._context=e}l6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Poe(e){return new l6(e)}function c6(e){this._context=e}c6.prototype={areaStart:sm,areaEnd:sm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:lm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Doe(e){return new c6(e)}function u6(e){this._context=e}u6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:lm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function koe(e){return new u6(e)}function f6(e){this._context=e}f6.prototype={areaStart:sm,areaEnd:sm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function $oe(e){return new f6(e)}function bM(e){return e<0?-1:1}function xM(e,t,n){var r=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),c=(o*a+l*r)/(r+a);return(bM(o)+bM(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function wM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function hx(e,t,n){var r=e._x0,a=e._y0,o=e._x1,l=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,a+c*t,o-c,l-c*n,o,l)}function cm(e){this._context=e}cm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:hx(this,this._t0,wM(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,hx(this,wM(this,n=xM(this,e,t)),n);break;default:hx(this,this._t0,n=xM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function d6(e){this._context=new h6(e)}(d6.prototype=Object.create(cm.prototype)).point=function(e,t){cm.prototype.point.call(this,t,e)};function h6(e){this._context=e}h6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,o){this._context.bezierCurveTo(t,e,r,n,o,a)}};function zoe(e){return new cm(e)}function Loe(e){return new d6(e)}function p6(e){this._context=e}p6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=SM(e),a=SM(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],a[0][o],r[1][o],a[1][o],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function SM(e){var t,n=e.length-1,r,a=new Array(n),o=new Array(n),l=new Array(n);for(a[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(a[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)a[t]=(l[t]-a[t+1])/o[t];for(o[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function Ioe(e){return new p6(e)}function Wv(e,t){this._context=e,this._t=t}Wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Boe(e){return new Wv(e,.5)}function Uoe(e){return new Wv(e,0)}function qoe(e){return new Wv(e,1)}function Jl(e,t){if((l=e.length)>1)for(var n=1,r,a,o=e[t[0]],l,c=o.length;n<l;++n)for(a=o,o=e[t[n]],r=0;r<c;++r)o[r][1]+=o[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function HS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Hoe(e,t){return e[t]}function Foe(e){const t=[];return t.key=e,t}function Voe(){var e=Kt([]),t=HS,n=Jl,r=Hoe;function a(o){var l=Array.from(e.apply(this,arguments),Foe),c,f=l.length,d=-1,m;for(const h of o)for(c=0,++d;c<f;++c)(l[c][d]=[0,+r(h,l[c].key,d,o)]).data=h;for(c=0,m=OE(t(l));c<f;++c)l[m[c]].index=c;return n(l,m),l}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Kt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(r=typeof o=="function"?o:Kt(+o),a):r},a.order=function(o){return arguments.length?(t=o==null?HS:typeof o=="function"?o:Kt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(n=o??Jl,a):n},a}function Goe(e,t){if((r=e.length)>0){for(var n,r,a=0,o=e[0].length,l;a<o;++a){for(l=n=0;n<r;++n)l+=e[n][a][1]||0;if(l)for(n=0;n<r;++n)e[n][a][1]/=l}Jl(e,t)}}function Woe(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,o=r.length;n<o;++n){for(var l=0,c=0;l<a;++l)c+=e[l][n][1]||0;r[n][1]+=r[n][0]=-c/2}Jl(e,t)}}function Yoe(e,t){if(!(!((l=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,o,l;r<o;++r){for(var c=0,f=0,d=0;c<l;++c){for(var m=e[t[c]],h=m[r][1]||0,g=m[r-1][1]||0,x=(h-g)/2,A=0;A<c;++A){var S=e[t[A]],w=S[r][1]||0,E=S[r-1][1]||0;x+=w-E}f+=h,d+=x*h}a[r-1][1]+=a[r-1][0]=n,f&&(n-=d/f)}a[r-1][1]+=a[r-1][0]=n,Jl(e,t)}}function yf(e){"@babel/helpers - typeof";return yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yf(e)}var Koe=["type","size","sizeType"];function FS(){return FS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FS.apply(this,arguments)}function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(n),!0).forEach(function(r){Zoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_M(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zoe(e,t,n){return t=Xoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xoe(e){var t=Qoe(e,"string");return yf(t)=="symbol"?t:t+""}function Qoe(e,t){if(yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Joe(e,t){if(e==null)return{};var n=ese(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ese(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var m6={symbolCircle:jE,symbolCross:woe,symbolDiamond:_oe,symbolSquare:Aoe,symbolStar:Toe,symbolTriangle:Coe,symbolWye:Noe},tse=Math.PI/180,nse=function(t){var n="symbol".concat(Fv(t));return m6[n]||jE},rse=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*tse;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ase=function(t,n){m6["symbol".concat(Fv(t))]=n},TE=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,o=a===void 0?64:a,l=t.sizeType,c=l===void 0?"area":l,f=Joe(t,Koe),d=AM(AM({},f),{},{type:r,size:o,sizeType:c}),m=function(){var w=nse(r),E=Moe().type(w).size(rse(o,c,r));return E()},h=d.className,g=d.cx,x=d.cy,A=mt(d,!0);return g===+g&&x===+x&&o===+o?L.createElement("path",FS({},A,{className:xt("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(x,")"),d:m()})):null};TE.registerSymbol=ase;function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function VS(){return VS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VS.apply(this,arguments)}function EM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ise(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EM(Object(n),!0).forEach(function(r){bf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ose(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sse(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g6(r.key),r)}}function lse(e,t,n){return t&&sse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cse(e,t,n){return t=um(t),use(e,v6()?Reflect.construct(t,n||[],um(e).constructor):t.apply(e,n))}function use(e,t){if(t&&(ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fse(e)}function fse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v6=function(){return!!e})()}function um(e){return um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},um(e)}function dse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GS(e,t)}function GS(e,t){return GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},GS(e,t)}function bf(e,t,n){return t=g6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g6(e){var t=hse(e,"string");return ec(t)=="symbol"?t:t+""}function hse(e,t){if(ec(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ec(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var aa=32,CE=(function(e){function t(){return ose(this,t),cse(this,t,arguments)}return dse(t,e),lse(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,o=aa/2,l=aa/6,c=aa/3,f=r.inactive?a:r.color;if(r.type==="plainline")return L.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:aa,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return L.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(c,`
456
- A`).concat(l,",").concat(l,",0,1,1,").concat(2*c,",").concat(o,`
457
- H`).concat(aa,"M").concat(2*c,",").concat(o,`
458
- A`).concat(l,",").concat(l,",0,1,1,").concat(c,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return L.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(aa/8,"h").concat(aa,"v").concat(aa*3/4,"h").concat(-aa,"z"),className:"recharts-legend-icon"});if(L.isValidElement(r.legendIcon)){var d=ise({},r);return delete d.legendIcon,L.cloneElement(r.legendIcon,d)}return L.createElement(TE,{fill:f,cx:o,cy:o,size:aa,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,o=a.payload,l=a.iconSize,c=a.layout,f=a.formatter,d=a.inactiveColor,m={x:0,y:0,width:aa,height:aa},h={display:c==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(x,A){var S=x.formatter||f,w=xt(bf(bf({"recharts-legend-item":!0},"legend-item-".concat(A),!0),"inactive",x.inactive));if(x.type==="none")return null;var E=lt(x.value)?null:x.value;Mi(!lt(x.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var O=x.inactive?d:x.color;return L.createElement("li",VS({className:w,style:h,key:"legend-item-".concat(A)},am(r.props,x,A)),L.createElement(LS,{width:l,height:l,viewBox:m,style:g},r.renderIcon(x)),L.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},S?S(E,x,A):E))})}},{key:"render",value:function(){var r=this.props,a=r.payload,o=r.layout,l=r.align;if(!a||!a.length)return null;var c={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return L.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])})(y.PureComponent);bf(CE,"displayName","Legend");bf(CE,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var px,OM;function pse(){if(OM)return px;OM=1;var e=Uv();function t(){this.__data__=new e,this.size=0}return px=t,px}var mx,jM;function mse(){if(jM)return mx;jM=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return mx=e,mx}var vx,TM;function vse(){if(TM)return vx;TM=1;function e(t){return this.__data__.get(t)}return vx=e,vx}var gx,CM;function gse(){if(CM)return gx;CM=1;function e(t){return this.__data__.has(t)}return gx=e,gx}var yx,RM;function yse(){if(RM)return yx;RM=1;var e=Uv(),t=bE(),n=xE(),r=200;function a(o,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length<r-1)return f.push([o,l]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(o,l),this.size=c.size,this}return yx=a,yx}var bx,NM;function y6(){if(NM)return bx;NM=1;var e=Uv(),t=pse(),n=mse(),r=vse(),a=gse(),o=yse();function l(c){var f=this.__data__=new e(c);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=a,l.prototype.set=o,bx=l,bx}var xx,MM;function bse(){if(MM)return xx;MM=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return xx=t,xx}var wx,PM;function xse(){if(PM)return wx;PM=1;function e(t){return this.__data__.has(t)}return wx=e,wx}var Sx,DM;function b6(){if(DM)return Sx;DM=1;var e=xE(),t=bse(),n=xse();function r(a){var o=-1,l=a==null?0:a.length;for(this.__data__=new e;++o<l;)this.add(a[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Sx=r,Sx}var _x,kM;function x6(){if(kM)return _x;kM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return _x=e,_x}var Ax,$M;function w6(){if($M)return Ax;$M=1;function e(t,n){return t.has(n)}return Ax=e,Ax}var Ex,zM;function S6(){if(zM)return Ex;zM=1;var e=b6(),t=x6(),n=w6(),r=1,a=2;function o(l,c,f,d,m,h){var g=f&r,x=l.length,A=c.length;if(x!=A&&!(g&&A>x))return!1;var S=h.get(l),w=h.get(c);if(S&&w)return S==c&&w==l;var E=-1,O=!0,j=f&a?new e:void 0;for(h.set(l,c),h.set(c,l);++E<x;){var R=l[E],C=c[E];if(d)var T=g?d(C,R,E,c,l,h):d(R,C,E,l,c,h);if(T!==void 0){if(T)continue;O=!1;break}if(j){if(!t(c,function(N,D){if(!n(j,D)&&(R===N||m(R,N,f,d,h)))return j.push(D)})){O=!1;break}}else if(!(R===C||m(R,C,f,d,h))){O=!1;break}}return h.delete(l),h.delete(c),O}return Ex=o,Ex}var Ox,LM;function wse(){if(LM)return Ox;LM=1;var e=ii(),t=e.Uint8Array;return Ox=t,Ox}var jx,IM;function Sse(){if(IM)return jx;IM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,o){r[++n]=[o,a]}),r}return jx=e,jx}var Tx,BM;function RE(){if(BM)return Tx;BM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return Tx=e,Tx}var Cx,UM;function _se(){if(UM)return Cx;UM=1;var e=Od(),t=wse(),n=yE(),r=S6(),a=Sse(),o=RE(),l=1,c=2,f="[object Boolean]",d="[object Date]",m="[object Error]",h="[object Map]",g="[object Number]",x="[object RegExp]",A="[object Set]",S="[object String]",w="[object Symbol]",E="[object ArrayBuffer]",O="[object DataView]",j=e?e.prototype:void 0,R=j?j.valueOf:void 0;function C(T,N,D,z,G,U,P){switch(D){case O:if(T.byteLength!=N.byteLength||T.byteOffset!=N.byteOffset)return!1;T=T.buffer,N=N.buffer;case E:return!(T.byteLength!=N.byteLength||!U(new t(T),new t(N)));case f:case d:case g:return n(+T,+N);case m:return T.name==N.name&&T.message==N.message;case x:case S:return T==N+"";case h:var B=a;case A:var q=z&l;if(B||(B=o),T.size!=N.size&&!q)return!1;var W=P.get(T);if(W)return W==N;z|=c,P.set(T,N);var $=r(B(T),B(N),z,G,U,P);return P.delete(T),$;case w:if(R)return R.call(T)==R.call(N)}return!1}return Cx=C,Cx}var Rx,qM;function _6(){if(qM)return Rx;qM=1;function e(t,n){for(var r=-1,a=n.length,o=t.length;++r<a;)t[o+r]=n[r];return t}return Rx=e,Rx}var Nx,HM;function Ase(){if(HM)return Nx;HM=1;var e=_6(),t=wr();function n(r,a,o){var l=a(r);return t(r)?l:e(l,o(r))}return Nx=n,Nx}var Mx,FM;function Ese(){if(FM)return Mx;FM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=0,l=[];++r<a;){var c=t[r];n(c,r,t)&&(l[o++]=c)}return l}return Mx=e,Mx}var Px,VM;function Ose(){if(VM)return Px;VM=1;function e(){return[]}return Px=e,Px}var Dx,GM;function jse(){if(GM)return Dx;GM=1;var e=Ese(),t=Ose(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(l){return l==null?[]:(l=Object(l),e(a(l),function(c){return r.call(l,c)}))}:t;return Dx=o,Dx}var kx,WM;function Tse(){if(WM)return kx;WM=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return kx=e,kx}var $x,YM;function Cse(){if(YM)return $x;YM=1;var e=Vi(),t=Gi(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return $x=r,$x}var zx,KM;function NE(){if(KM)return zx;KM=1;var e=Cse(),t=Gi(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!a.call(l,"callee")};return zx=o,zx}var ef={exports:{}},Lx,ZM;function Rse(){if(ZM)return Lx;ZM=1;function e(){return!1}return Lx=e,Lx}ef.exports;var XM;function A6(){return XM||(XM=1,(function(e,t){var n=ii(),r=Rse(),a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===a,c=l?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||r;e.exports=d})(ef,ef.exports)),ef.exports}var Ix,QM;function ME(){if(QM)return Ix;QM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var o=typeof r;return a=a??e,!!a&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return Ix=n,Ix}var Bx,JM;function PE(){if(JM)return Bx;JM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Bx=t,Bx}var Ux,eP;function Nse(){if(eP)return Ux;eP=1;var e=Vi(),t=PE(),n=Gi(),r="[object Arguments]",a="[object Array]",o="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",m="[object Number]",h="[object Object]",g="[object RegExp]",x="[object Set]",A="[object String]",S="[object WeakMap]",w="[object ArrayBuffer]",E="[object DataView]",O="[object Float32Array]",j="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",T="[object Int32Array]",N="[object Uint8Array]",D="[object Uint8ClampedArray]",z="[object Uint16Array]",G="[object Uint32Array]",U={};U[O]=U[j]=U[R]=U[C]=U[T]=U[N]=U[D]=U[z]=U[G]=!0,U[r]=U[a]=U[w]=U[o]=U[E]=U[l]=U[c]=U[f]=U[d]=U[m]=U[h]=U[g]=U[x]=U[A]=U[S]=!1;function P(B){return n(B)&&t(B.length)&&!!U[e(B)]}return Ux=P,Ux}var qx,tP;function E6(){if(tP)return qx;tP=1;function e(t){return function(n){return t(n)}}return qx=e,qx}var tf={exports:{}};tf.exports;var nP;function Mse(){return nP||(nP=1,(function(e,t){var n=VB(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,l=o&&n.process,c=(function(){try{var f=a&&a.require&&a.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(tf,tf.exports)),tf.exports}var Hx,rP;function O6(){if(rP)return Hx;rP=1;var e=Nse(),t=E6(),n=Mse(),r=n&&n.isTypedArray,a=r?t(r):e;return Hx=a,Hx}var Fx,aP;function Pse(){if(aP)return Fx;aP=1;var e=Tse(),t=NE(),n=wr(),r=A6(),a=ME(),o=O6(),l=Object.prototype,c=l.hasOwnProperty;function f(d,m){var h=n(d),g=!h&&t(d),x=!h&&!g&&r(d),A=!h&&!g&&!x&&o(d),S=h||g||x||A,w=S?e(d.length,String):[],E=w.length;for(var O in d)(m||c.call(d,O))&&!(S&&(O=="length"||x&&(O=="offset"||O=="parent")||A&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||a(O,E)))&&w.push(O);return w}return Fx=f,Fx}var Vx,iP;function Dse(){if(iP)return Vx;iP=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return Vx=t,Vx}var Gx,oP;function j6(){if(oP)return Gx;oP=1;function e(t,n){return function(r){return t(n(r))}}return Gx=e,Gx}var Wx,sP;function kse(){if(sP)return Wx;sP=1;var e=j6(),t=e(Object.keys,Object);return Wx=t,Wx}var Yx,lP;function $se(){if(lP)return Yx;lP=1;var e=Dse(),t=kse(),n=Object.prototype,r=n.hasOwnProperty;function a(o){if(!e(o))return t(o);var l=[];for(var c in Object(o))r.call(o,c)&&c!="constructor"&&l.push(c);return l}return Yx=a,Yx}var Kx,cP;function Td(){if(cP)return Kx;cP=1;var e=gE(),t=PE();function n(r){return r!=null&&t(r.length)&&!e(r)}return Kx=n,Kx}var Zx,uP;function Yv(){if(uP)return Zx;uP=1;var e=Pse(),t=$se(),n=Td();function r(a){return n(a)?e(a):t(a)}return Zx=r,Zx}var Xx,fP;function zse(){if(fP)return Xx;fP=1;var e=Ase(),t=jse(),n=Yv();function r(a){return e(a,n,t)}return Xx=r,Xx}var Qx,dP;function Lse(){if(dP)return Qx;dP=1;var e=zse(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(o,l,c,f,d,m){var h=c&t,g=e(o),x=g.length,A=e(l),S=A.length;if(x!=S&&!h)return!1;for(var w=x;w--;){var E=g[w];if(!(h?E in l:r.call(l,E)))return!1}var O=m.get(o),j=m.get(l);if(O&&j)return O==l&&j==o;var R=!0;m.set(o,l),m.set(l,o);for(var C=h;++w<x;){E=g[w];var T=o[E],N=l[E];if(f)var D=h?f(N,T,E,l,o,m):f(T,N,E,o,l,m);if(!(D===void 0?T===N||d(T,N,c,f,m):D)){R=!1;break}C||(C=E=="constructor")}if(R&&!C){var z=o.constructor,G=l.constructor;z!=G&&"constructor"in o&&"constructor"in l&&!(typeof z=="function"&&z instanceof z&&typeof G=="function"&&G instanceof G)&&(R=!1)}return m.delete(o),m.delete(l),R}return Qx=a,Qx}var Jx,hP;function Ise(){if(hP)return Jx;hP=1;var e=Ls(),t=ii(),n=e(t,"DataView");return Jx=n,Jx}var ew,pP;function Bse(){if(pP)return ew;pP=1;var e=Ls(),t=ii(),n=e(t,"Promise");return ew=n,ew}var tw,mP;function T6(){if(mP)return tw;mP=1;var e=Ls(),t=ii(),n=e(t,"Set");return tw=n,tw}var nw,vP;function Use(){if(vP)return nw;vP=1;var e=Ls(),t=ii(),n=e(t,"WeakMap");return nw=n,nw}var rw,gP;function qse(){if(gP)return rw;gP=1;var e=Ise(),t=bE(),n=Bse(),r=T6(),a=Use(),o=Vi(),l=GB(),c="[object Map]",f="[object Object]",d="[object Promise]",m="[object Set]",h="[object WeakMap]",g="[object DataView]",x=l(e),A=l(t),S=l(n),w=l(r),E=l(a),O=o;return(e&&O(new e(new ArrayBuffer(1)))!=g||t&&O(new t)!=c||n&&O(n.resolve())!=d||r&&O(new r)!=m||a&&O(new a)!=h)&&(O=function(j){var R=o(j),C=R==f?j.constructor:void 0,T=C?l(C):"";if(T)switch(T){case x:return g;case A:return c;case S:return d;case w:return m;case E:return h}return R}),rw=O,rw}var aw,yP;function Hse(){if(yP)return aw;yP=1;var e=y6(),t=S6(),n=_se(),r=Lse(),a=qse(),o=wr(),l=A6(),c=O6(),f=1,d="[object Arguments]",m="[object Array]",h="[object Object]",g=Object.prototype,x=g.hasOwnProperty;function A(S,w,E,O,j,R){var C=o(S),T=o(w),N=C?m:a(S),D=T?m:a(w);N=N==d?h:N,D=D==d?h:D;var z=N==h,G=D==h,U=N==D;if(U&&l(S)){if(!l(w))return!1;C=!0,z=!1}if(U&&!z)return R||(R=new e),C||c(S)?t(S,w,E,O,j,R):n(S,w,N,E,O,j,R);if(!(E&f)){var P=z&&x.call(S,"__wrapped__"),B=G&&x.call(w,"__wrapped__");if(P||B){var q=P?S.value():S,W=B?w.value():w;return R||(R=new e),j(q,W,E,O,R)}}return U?(R||(R=new e),r(S,w,E,O,j,R)):!1}return aw=A,aw}var iw,bP;function DE(){if(bP)return iw;bP=1;var e=Hse(),t=Gi();function n(r,a,o,l,c){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,o,l,n,c)}return iw=n,iw}var ow,xP;function Fse(){if(xP)return ow;xP=1;var e=y6(),t=DE(),n=1,r=2;function a(o,l,c,f){var d=c.length,m=d,h=!f;if(o==null)return!m;for(o=Object(o);d--;){var g=c[d];if(h&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<m;){g=c[d];var x=g[0],A=o[x],S=g[1];if(h&&g[2]){if(A===void 0&&!(x in o))return!1}else{var w=new e;if(f)var E=f(A,S,x,o,l,w);if(!(E===void 0?t(S,A,n|r,f,w):E))return!1}}return!0}return ow=a,ow}var sw,wP;function C6(){if(wP)return sw;wP=1;var e=Lo();function t(n){return n===n&&!e(n)}return sw=t,sw}var lw,SP;function Vse(){if(SP)return lw;SP=1;var e=C6(),t=Yv();function n(r){for(var a=t(r),o=a.length;o--;){var l=a[o],c=r[l];a[o]=[l,c,e(c)]}return a}return lw=n,lw}var cw,_P;function R6(){if(_P)return cw;_P=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return cw=e,cw}var uw,AP;function Gse(){if(AP)return uw;AP=1;var e=Fse(),t=Vse(),n=R6();function r(a){var o=t(a);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===a||e(l,a,o)}}return uw=r,uw}var fw,EP;function Wse(){if(EP)return fw;EP=1;function e(t,n){return t!=null&&n in Object(t)}return fw=e,fw}var dw,OP;function Yse(){if(OP)return dw;OP=1;var e=KB(),t=NE(),n=wr(),r=ME(),a=PE(),o=Hv();function l(c,f,d){f=e(f,c);for(var m=-1,h=f.length,g=!1;++m<h;){var x=o(f[m]);if(!(g=c!=null&&d(c,x)))break;c=c[x]}return g||++m!=h?g:(h=c==null?0:c.length,!!h&&a(h)&&r(x,h)&&(n(c)||t(c)))}return dw=l,dw}var hw,jP;function Kse(){if(jP)return hw;jP=1;var e=Wse(),t=Yse();function n(r,a){return r!=null&&t(r,a,e)}return hw=n,hw}var pw,TP;function Zse(){if(TP)return pw;TP=1;var e=DE(),t=ZB(),n=Kse(),r=vE(),a=C6(),o=R6(),l=Hv(),c=1,f=2;function d(m,h){return r(m)&&a(h)?o(l(m),h):function(g){var x=t(g,m);return x===void 0&&x===h?n(g,m):e(h,x,c|f)}}return pw=d,pw}var mw,CP;function zc(){if(CP)return mw;CP=1;function e(t){return t}return mw=e,mw}var vw,RP;function Xse(){if(RP)return vw;RP=1;function e(t){return function(n){return n==null?void 0:n[t]}}return vw=e,vw}var gw,NP;function Qse(){if(NP)return gw;NP=1;var e=SE();function t(n){return function(r){return e(r,n)}}return gw=t,gw}var yw,MP;function Jse(){if(MP)return yw;MP=1;var e=Xse(),t=Qse(),n=vE(),r=Hv();function a(o){return n(o)?e(r(o)):t(o)}return yw=a,yw}var bw,PP;function Io(){if(PP)return bw;PP=1;var e=Gse(),t=Zse(),n=zc(),r=wr(),a=Jse();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):a(l)}return bw=o,bw}var xw,DP;function N6(){if(DP)return xw;DP=1;function e(t,n,r,a){for(var o=t.length,l=r+(a?1:-1);a?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return xw=e,xw}var ww,kP;function ele(){if(kP)return ww;kP=1;function e(t){return t!==t}return ww=e,ww}var Sw,$P;function tle(){if($P)return Sw;$P=1;function e(t,n,r){for(var a=r-1,o=t.length;++a<o;)if(t[a]===n)return a;return-1}return Sw=e,Sw}var _w,zP;function nle(){if(zP)return _w;zP=1;var e=N6(),t=ele(),n=tle();function r(a,o,l){return o===o?n(a,o,l):e(a,t,l)}return _w=r,_w}var Aw,LP;function rle(){if(LP)return Aw;LP=1;var e=nle();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return Aw=t,Aw}var Ew,IP;function ale(){if(IP)return Ew;IP=1;function e(t,n,r){for(var a=-1,o=t==null?0:t.length;++a<o;)if(r(n,t[a]))return!0;return!1}return Ew=e,Ew}var Ow,BP;function ile(){if(BP)return Ow;BP=1;function e(){}return Ow=e,Ow}var jw,UP;function ole(){if(UP)return jw;UP=1;var e=T6(),t=ile(),n=RE(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return jw=a,jw}var Tw,qP;function sle(){if(qP)return Tw;qP=1;var e=b6(),t=rle(),n=ale(),r=w6(),a=ole(),o=RE(),l=200;function c(f,d,m){var h=-1,g=t,x=f.length,A=!0,S=[],w=S;if(m)A=!1,g=n;else if(x>=l){var E=d?null:a(f);if(E)return o(E);A=!1,g=r,w=new e}else w=d?[]:S;e:for(;++h<x;){var O=f[h],j=d?d(O):O;if(O=m||O!==0?O:0,A&&j===j){for(var R=w.length;R--;)if(w[R]===j)continue e;d&&w.push(j),S.push(O)}else g(w,j,m)||(w!==S&&w.push(j),S.push(O))}return S}return Tw=c,Tw}var Cw,HP;function lle(){if(HP)return Cw;HP=1;var e=Io(),t=sle();function n(r,a){return r&&r.length?t(r,e(a,2)):[]}return Cw=n,Cw}var cle=lle();const FP=Ht(cle);function M6(e,t,n){return t===!0?FP(e,n):lt(t)?FP(e,t):e}function tc(e){"@babel/helpers - typeof";return tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tc(e)}var ule=["ref"];function VP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ei(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(n),!0).forEach(function(r){Kv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,D6(r.key),r)}}function dle(e,t,n){return t&&GP(e.prototype,t),n&&GP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hle(e,t,n){return t=fm(t),ple(e,P6()?Reflect.construct(t,n||[],fm(e).constructor):t.apply(e,n))}function ple(e,t){if(t&&(tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mle(e)}function mle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P6=function(){return!!e})()}function fm(e){return fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fm(e)}function vle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WS(e,t)}function WS(e,t){return WS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},WS(e,t)}function Kv(e,t,n){return t=D6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D6(e){var t=gle(e,"string");return tc(t)=="symbol"?t:t+""}function gle(e,t){if(tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function yle(e,t){if(e==null)return{};var n=ble(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ble(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xle(e){return e.value}function wle(e,t){if(L.isValidElement(e))return L.cloneElement(e,t);if(typeof e=="function")return L.createElement(e,t);t.ref;var n=yle(t,ule);return L.createElement(CE,n)}var WP=1,Fl=(function(e){function t(){var n;fle(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=hle(this,t,[].concat(a)),Kv(n,"lastBoundingBox",{width:-1,height:-1}),n}return vle(t,e),dle(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>WP||Math.abs(a.height-this.lastBoundingBox.height)>WP)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ei({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,o=a.layout,l=a.align,c=a.verticalAlign,f=a.margin,d=a.chartWidth,m=a.chartHeight,h,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&o==="vertical"){var x=this.getBBoxSnapshot();h={left:((d||0)-x.width)/2}}else h=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(c==="middle"){var A=this.getBBoxSnapshot();g={top:((m||0)-A.height)/2}}else g=c==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Ei(Ei({},h),g)}},{key:"render",value:function(){var r=this,a=this.props,o=a.content,l=a.width,c=a.height,f=a.wrapperStyle,d=a.payloadUniqBy,m=a.payload,h=Ei(Ei({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(f)),f);return L.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(x){r.wrapperNode=x}},wle(o,Ei(Ei({},this.props),{},{payload:M6(m,d,xle)})))}}],[{key:"getWithHeight",value:function(r,a){var o=Ei(Ei({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&Me(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])})(y.PureComponent);Kv(Fl,"displayName","Legend");Kv(Fl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Rw,YP;function Sle(){if(YP)return Rw;YP=1;var e=Od(),t=NE(),n=wr(),r=e?e.isConcatSpreadable:void 0;function a(o){return n(o)||t(o)||!!(r&&o&&o[r])}return Rw=a,Rw}var Nw,KP;function k6(){if(KP)return Nw;KP=1;var e=_6(),t=Sle();function n(r,a,o,l,c){var f=-1,d=r.length;for(o||(o=t),c||(c=[]);++f<d;){var m=r[f];a>0&&o(m)?a>1?n(m,a-1,o,l,c):e(c,m):l||(c[c.length]=m)}return c}return Nw=n,Nw}var Mw,ZP;function _le(){if(ZP)return Mw;ZP=1;function e(t){return function(n,r,a){for(var o=-1,l=Object(n),c=a(n),f=c.length;f--;){var d=c[t?f:++o];if(r(l[d],d,l)===!1)break}return n}}return Mw=e,Mw}var Pw,XP;function Ale(){if(XP)return Pw;XP=1;var e=_le(),t=e();return Pw=t,Pw}var Dw,QP;function $6(){if(QP)return Dw;QP=1;var e=Ale(),t=Yv();function n(r,a){return r&&e(r,a,t)}return Dw=n,Dw}var kw,JP;function Ele(){if(JP)return kw;JP=1;var e=Td();function t(n,r){return function(a,o){if(a==null)return a;if(!e(a))return n(a,o);for(var l=a.length,c=r?l:-1,f=Object(a);(r?c--:++c<l)&&o(f[c],c,f)!==!1;);return a}}return kw=t,kw}var $w,eD;function kE(){if(eD)return $w;eD=1;var e=$6(),t=Ele(),n=t(e);return $w=n,$w}var zw,tD;function z6(){if(tD)return zw;tD=1;var e=kE(),t=Td();function n(r,a){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(c,f,d){l[++o]=a(c,f,d)}),l}return zw=n,zw}var Lw,nD;function Ole(){if(nD)return Lw;nD=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Lw=e,Lw}var Iw,rD;function jle(){if(rD)return Iw;rD=1;var e=Dc();function t(n,r){if(n!==r){var a=n!==void 0,o=n===null,l=n===n,c=e(n),f=r!==void 0,d=r===null,m=r===r,h=e(r);if(!d&&!h&&!c&&n>r||c&&f&&m&&!d&&!h||o&&f&&m||!a&&m||!l)return 1;if(!o&&!c&&!h&&n<r||h&&a&&l&&!o&&!c||d&&a&&l||!f&&l||!m)return-1}return 0}return Iw=t,Iw}var Bw,aD;function Tle(){if(aD)return Bw;aD=1;var e=jle();function t(n,r,a){for(var o=-1,l=n.criteria,c=r.criteria,f=l.length,d=a.length;++o<f;){var m=e(l[o],c[o]);if(m){if(o>=d)return m;var h=a[o];return m*(h=="desc"?-1:1)}}return n.index-r.index}return Bw=t,Bw}var Uw,iD;function Cle(){if(iD)return Uw;iD=1;var e=wE(),t=SE(),n=Io(),r=z6(),a=Ole(),o=E6(),l=Tle(),c=zc(),f=wr();function d(m,h,g){h.length?h=e(h,function(S){return f(S)?function(w){return t(w,S.length===1?S[0]:S)}:S}):h=[c];var x=-1;h=e(h,o(n));var A=r(m,function(S,w,E){var O=e(h,function(j){return j(S)});return{criteria:O,index:++x,value:S}});return a(A,function(S,w){return l(S,w,g)})}return Uw=d,Uw}var qw,oD;function Rle(){if(oD)return qw;oD=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return qw=e,qw}var Hw,sD;function Nle(){if(sD)return Hw;sD=1;var e=Rle(),t=Math.max;function n(r,a,o){return a=t(a===void 0?r.length-1:a,0),function(){for(var l=arguments,c=-1,f=t(l.length-a,0),d=Array(f);++c<f;)d[c]=l[a+c];c=-1;for(var m=Array(a+1);++c<a;)m[c]=l[c];return m[a]=o(d),e(r,this,m)}}return Hw=n,Hw}var Fw,lD;function Mle(){if(lD)return Fw;lD=1;function e(t){return function(){return t}}return Fw=e,Fw}var Vw,cD;function L6(){if(cD)return Vw;cD=1;var e=Ls(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Vw=t,Vw}var Gw,uD;function Ple(){if(uD)return Gw;uD=1;var e=Mle(),t=L6(),n=zc(),r=t?function(a,o){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Gw=r,Gw}var Ww,fD;function Dle(){if(fD)return Ww;fD=1;var e=800,t=16,n=Date.now;function r(a){var o=0,l=0;return function(){var c=n(),f=t-(c-l);if(l=c,f>0){if(++o>=e)return arguments[0]}else o=0;return a.apply(void 0,arguments)}}return Ww=r,Ww}var Yw,dD;function kle(){if(dD)return Yw;dD=1;var e=Ple(),t=Dle(),n=t(e);return Yw=n,Yw}var Kw,hD;function $le(){if(hD)return Kw;hD=1;var e=zc(),t=Nle(),n=kle();function r(a,o){return n(t(a,o,e),a+"")}return Kw=r,Kw}var Zw,pD;function Zv(){if(pD)return Zw;pD=1;var e=yE(),t=Td(),n=ME(),r=Lo();function a(o,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],o):!1}return Zw=a,Zw}var Xw,mD;function zle(){if(mD)return Xw;mD=1;var e=k6(),t=Cle(),n=$le(),r=Zv(),a=n(function(o,l){if(o==null)return[];var c=l.length;return c>1&&r(o,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return Xw=a,Xw}var Lle=zle();const $E=Ht(Lle);function xf(e){"@babel/helpers - typeof";return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xf(e)}function YS(){return YS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YS.apply(this,arguments)}function Ile(e,t){return Hle(e)||qle(e,t)||Ule(e,t)||Ble()}function Ble(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
459
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ule(e,t){if(e){if(typeof e=="string")return vD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vD(e,t)}}function vD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Hle(e){if(Array.isArray(e))return e}function gD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Qw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gD(Object(n),!0).forEach(function(r){Fle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fle(e,t,n){return t=Vle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vle(e){var t=Gle(e,"string");return xf(t)=="symbol"?t:t+""}function Gle(e,t){if(xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wle(e){return Array.isArray(e)&&kn(e[0])&&kn(e[1])?e.join(" ~ "):e}var Yle=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,o=a===void 0?{}:a,l=t.itemStyle,c=l===void 0?{}:l,f=t.labelStyle,d=f===void 0?{}:f,m=t.payload,h=t.formatter,g=t.itemSorter,x=t.wrapperClassName,A=t.labelClassName,S=t.label,w=t.labelFormatter,E=t.accessibilityLayer,O=E===void 0?!1:E,j=function(){if(m&&m.length){var P={padding:0,margin:0},B=(g?$E(m,g):m).map(function(q,W){if(q.type==="none")return null;var $=Qw({display:"block",paddingTop:4,paddingBottom:4,color:q.color||"#000"},c),V=q.formatter||h||Wle,F=q.value,K=q.name,ie=F,I=K;if(V&&ie!=null&&I!=null){var Z=V(F,K,q,W,m);if(Array.isArray(Z)){var X=Ile(Z,2);ie=X[0],I=X[1]}else ie=Z}return L.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(W),style:$},kn(I)?L.createElement("span",{className:"recharts-tooltip-item-name"},I):null,kn(I)?L.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,L.createElement("span",{className:"recharts-tooltip-item-value"},ie),L.createElement("span",{className:"recharts-tooltip-item-unit"},q.unit||""))});return L.createElement("ul",{className:"recharts-tooltip-item-list",style:P},B)}return null},R=Qw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),C=Qw({margin:0},d),T=!yt(S),N=T?S:"",D=xt("recharts-default-tooltip",x),z=xt("recharts-tooltip-label",A);T&&w&&m!==void 0&&m!==null&&(N=w(S,m));var G=O?{role:"status","aria-live":"assertive"}:{};return L.createElement("div",YS({className:D,style:R},G),L.createElement("p",{className:z,style:C},L.isValidElement(N)?N:"".concat(N)),j())};function wf(e){"@babel/helpers - typeof";return wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wf(e)}function op(e,t,n){return t=Kle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kle(e){var t=Zle(e,"string");return wf(t)=="symbol"?t:t+""}function Zle(e,t){if(wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bu="recharts-tooltip-wrapper",Xle={visibility:"hidden"};function Qle(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return xt(Bu,op(op(op(op({},"".concat(Bu,"-right"),Me(n)&&t&&Me(t.x)&&n>=t.x),"".concat(Bu,"-left"),Me(n)&&t&&Me(t.x)&&n<t.x),"".concat(Bu,"-bottom"),Me(r)&&t&&Me(t.y)&&r>=t.y),"".concat(Bu,"-top"),Me(r)&&t&&Me(t.y)&&r<t.y))}function yD(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,o=e.position,l=e.reverseDirection,c=e.tooltipDimension,f=e.viewBox,d=e.viewBoxDimension;if(o&&Me(o[r]))return o[r];var m=n[r]-c-a,h=n[r]+a;if(t[r])return l[r]?m:h;if(l[r]){var g=m,x=f[r];return g<x?Math.max(h,f[r]):Math.max(m,f[r])}var A=h+c,S=f[r]+d;return A>S?Math.max(m,f[r]):Math.max(h,f[r])}function Jle(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function ece(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,f=e.viewBox,d,m,h;return l.height>0&&l.width>0&&n?(m=yD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),h=yD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=Jle({translateX:m,translateY:h,useTranslate3d:c})):d=Xle,{cssProperties:d,cssClasses:Qle({translateX:m,translateY:h,coordinate:n})}}function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function bD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bD(Object(n),!0).forEach(function(r){ZS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B6(r.key),r)}}function rce(e,t,n){return t&&nce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ace(e,t,n){return t=dm(t),ice(e,I6()?Reflect.construct(t,n||[],dm(e).constructor):t.apply(e,n))}function ice(e,t){if(t&&(nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oce(e)}function oce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I6=function(){return!!e})()}function dm(e){return dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dm(e)}function sce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&KS(e,t)}function KS(e,t){return KS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},KS(e,t)}function ZS(e,t,n){return t=B6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B6(e){var t=lce(e,"string");return nc(t)=="symbol"?t:t+""}function lce(e,t){if(nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wD=1,cce=(function(e){function t(){var n;tce(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=ace(this,t,[].concat(a)),ZS(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),ZS(n,"handleKeyDown",function(l){if(l.key==="Escape"){var c,f,d,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(c=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&c!==void 0?c:0,y:(d=(m=n.props.coordinate)===null||m===void 0?void 0:m.y)!==null&&d!==void 0?d:0}})}}),n}return sce(t,e),rce(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>wD||Math.abs(r.height-this.state.lastBoundingBox.height)>wD)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,c=a.animationDuration,f=a.animationEasing,d=a.children,m=a.coordinate,h=a.hasPayload,g=a.isAnimationActive,x=a.offset,A=a.position,S=a.reverseDirection,w=a.useTranslate3d,E=a.viewBox,O=a.wrapperStyle,j=ece({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:x,position:A,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:E}),R=j.cssClasses,C=j.cssProperties,T=xD(xD({transition:g&&o?"transform ".concat(c,"ms ").concat(f):void 0},C),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&h?"visible":"hidden",position:"absolute",top:0,left:0},O);return L.createElement("div",{tabIndex:-1,className:R,style:T,ref:function(D){r.wrapperNode=D}},d)}}])})(y.PureComponent),uce=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Lc={isSsr:uce()};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function SD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SD(Object(n),!0).forEach(function(r){zE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,q6(r.key),r)}}function hce(e,t,n){return t&&dce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pce(e,t,n){return t=hm(t),mce(e,U6()?Reflect.construct(t,n||[],hm(e).constructor):t.apply(e,n))}function mce(e,t){if(t&&(rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vce(e)}function vce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U6=function(){return!!e})()}function hm(e){return hm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hm(e)}function gce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XS(e,t)}function XS(e,t){return XS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},XS(e,t)}function zE(e,t,n){return t=q6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q6(e){var t=yce(e,"string");return rc(t)=="symbol"?t:t+""}function yce(e,t){if(rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function bce(e){return e.dataKey}function xce(e,t){return L.isValidElement(e)?L.cloneElement(e,t):typeof e=="function"?L.createElement(e,t):L.createElement(Yle,t)}var Va=(function(e){function t(){return fce(this,t),pce(this,t,arguments)}return gce(t,e),hce(t,[{key:"render",value:function(){var r=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,c=a.animationDuration,f=a.animationEasing,d=a.content,m=a.coordinate,h=a.filterNull,g=a.isAnimationActive,x=a.offset,A=a.payload,S=a.payloadUniqBy,w=a.position,E=a.reverseDirection,O=a.useTranslate3d,j=a.viewBox,R=a.wrapperStyle,C=A??[];h&&C.length&&(C=M6(A.filter(function(N){return N.value!=null&&(N.hide!==!0||r.props.includeHidden)}),S,bce));var T=C.length>0;return L.createElement(cce,{allowEscapeViewBox:l,animationDuration:c,animationEasing:f,isAnimationActive:g,active:o,coordinate:m,hasPayload:T,offset:x,position:w,reverseDirection:E,useTranslate3d:O,viewBox:j,wrapperStyle:R},xce(d,_D(_D({},this.props),{},{payload:C})))}}])})(y.PureComponent);zE(Va,"displayName","Tooltip");zE(Va,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Lc.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Jw,AD;function wce(){if(AD)return Jw;AD=1;var e=ii(),t=function(){return e.Date.now()};return Jw=t,Jw}var e1,ED;function Sce(){if(ED)return e1;ED=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return e1=t,e1}var t1,OD;function _ce(){if(OD)return t1;OD=1;var e=Sce(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return t1=n,t1}var n1,jD;function H6(){if(jD)return n1;jD=1;var e=_ce(),t=Lo(),n=Dc(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=o.test(d);return h||l.test(d)?c(d.slice(2),h?2:8):a.test(d)?r:+d}return n1=f,n1}var r1,TD;function Ace(){if(TD)return r1;TD=1;var e=Lo(),t=wce(),n=H6(),r="Expected a function",a=Math.max,o=Math.min;function l(c,f,d){var m,h,g,x,A,S,w=0,E=!1,O=!1,j=!0;if(typeof c!="function")throw new TypeError(r);f=n(f)||0,e(d)&&(E=!!d.leading,O="maxWait"in d,g=O?a(n(d.maxWait)||0,f):g,j="trailing"in d?!!d.trailing:j);function R(B){var q=m,W=h;return m=h=void 0,w=B,x=c.apply(W,q),x}function C(B){return w=B,A=setTimeout(D,f),E?R(B):x}function T(B){var q=B-S,W=B-w,$=f-q;return O?o($,g-W):$}function N(B){var q=B-S,W=B-w;return S===void 0||q>=f||q<0||O&&W>=g}function D(){var B=t();if(N(B))return z(B);A=setTimeout(D,T(B))}function z(B){return A=void 0,j&&m?R(B):(m=h=void 0,x)}function G(){A!==void 0&&clearTimeout(A),w=0,m=S=h=A=void 0}function U(){return A===void 0?x:z(t())}function P(){var B=t(),q=N(B);if(m=arguments,h=this,S=B,q){if(A===void 0)return C(S);if(O)return clearTimeout(A),A=setTimeout(D,f),R(S)}return A===void 0&&(A=setTimeout(D,f)),x}return P.cancel=G,P.flush=U,P}return r1=l,r1}var a1,CD;function Ece(){if(CD)return a1;CD=1;var e=Ace(),t=Lo(),n="Expected a function";function r(a,o,l){var c=!0,f=!0;if(typeof a!="function")throw new TypeError(n);return t(l)&&(c="leading"in l?!!l.leading:c,f="trailing"in l?!!l.trailing:f),e(a,o,{leading:c,maxWait:o,trailing:f})}return a1=r,a1}var Oce=Ece();const F6=Ht(Oce);function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}function RD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RD(Object(n),!0).forEach(function(r){jce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jce(e,t,n){return t=Tce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tce(e){var t=Cce(e,"string");return Sf(t)=="symbol"?t:t+""}function Cce(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rce(e,t){return Dce(e)||Pce(e,t)||Mce(e,t)||Nce()}function Nce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
460
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mce(e,t){if(e){if(typeof e=="string")return ND(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ND(e,t)}}function ND(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Dce(e){if(Array.isArray(e))return e}var kce=y.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,o=e.width,l=o===void 0?"100%":o,c=e.height,f=c===void 0?"100%":c,d=e.minWidth,m=d===void 0?0:d,h=e.minHeight,g=e.maxHeight,x=e.children,A=e.debounce,S=A===void 0?0:A,w=e.id,E=e.className,O=e.onResize,j=e.style,R=j===void 0?{}:j,C=y.useRef(null),T=y.useRef();T.current=O,y.useImperativeHandle(t,function(){return Object.defineProperty(C.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),C.current},configurable:!0})});var N=y.useState({containerWidth:a.width,containerHeight:a.height}),D=Rce(N,2),z=D[0],G=D[1],U=y.useCallback(function(B,q){G(function(W){var $=Math.round(B),V=Math.round(q);return W.containerWidth===$&&W.containerHeight===V?W:{containerWidth:$,containerHeight:V}})},[]);y.useEffect(function(){var B=function(K){var ie,I=K[0].contentRect,Z=I.width,X=I.height;U(Z,X),(ie=T.current)===null||ie===void 0||ie.call(T,Z,X)};S>0&&(B=F6(B,S,{trailing:!0,leading:!1}));var q=new ResizeObserver(B),W=C.current.getBoundingClientRect(),$=W.width,V=W.height;return U($,V),q.observe(C.current),function(){q.disconnect()}},[U,S]);var P=y.useMemo(function(){var B=z.containerWidth,q=z.containerHeight;if(B<0||q<0)return null;Mi(ms(l)||ms(f),`The width(%s) and height(%s) are both fixed numbers,
461
- maybe you don't need to use a ResponsiveContainer.`,l,f),Mi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var W=ms(l)?B:l,$=ms(f)?q:f;n&&n>0&&(W?$=W/n:$&&(W=$*n),g&&$>g&&($=g)),Mi(W>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0,
462
- please check the style of container, or the props width(%s) and height(%s),
463
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
464
- height and width.`,W,$,l,f,m,h,n);var V=!Array.isArray(x)&&Ni(x.type).endsWith("Chart");return L.Children.map(x,function(F){return L.isValidElement(F)?y.cloneElement(F,sp({width:W,height:$},V?{style:sp({height:"100%",width:"100%",maxHeight:$,maxWidth:W},F.props.style)}:{})):F})},[n,x,f,g,h,m,z,l]);return L.createElement("div",{id:w?"".concat(w):void 0,className:xt("recharts-responsive-container",E),style:sp(sp({},R),{},{width:l,height:f,minWidth:m,minHeight:h,maxHeight:g}),ref:C},P)}),V6=function(t){return null};V6.displayName="Cell";function _f(e){"@babel/helpers - typeof";return _f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_f(e)}function MD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function QS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MD(Object(n),!0).forEach(function(r){$ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ce(e,t,n){return t=zce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zce(e){var t=Lce(e,"string");return _f(t)=="symbol"?t:t+""}function Lce(e,t){if(_f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rl={widthCache:{},cacheCount:0},Ice=2e3,Bce={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},PD="recharts_measurement_span";function Uce(e){var t=QS({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var of=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Lc.isSsr)return{width:0,height:0};var r=Uce(n),a=JSON.stringify({text:t,copyStyle:r});if(Rl.widthCache[a])return Rl.widthCache[a];try{var o=document.getElementById(PD);o||(o=document.createElement("span"),o.setAttribute("id",PD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=QS(QS({},Bce),r);Object.assign(o.style,l),o.textContent="".concat(t);var c=o.getBoundingClientRect(),f={width:c.width,height:c.height};return Rl.widthCache[a]=f,++Rl.cacheCount>Ice&&(Rl.cacheCount=0,Rl.widthCache={}),f}catch{return{width:0,height:0}}},qce=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function pm(e,t){return Gce(e)||Vce(e,t)||Fce(e,t)||Hce()}function Hce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
465
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fce(e,t){if(e){if(typeof e=="string")return DD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DD(e,t)}}function DD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Gce(e){if(Array.isArray(e))return e}function Wce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kce(r.key),r)}}function Yce(e,t,n){return t&&kD(e.prototype,t),n&&kD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kce(e){var t=Zce(e,"string");return Af(t)=="symbol"?t:t+""}function Zce(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $D=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,zD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Xce=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Qce=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,G6={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Jce=Object.keys(G6),kl="NaN";function eue(e,t){return e*G6[t]}var lp=(function(){function e(t,n){Wce(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Xce.test(n)&&(this.num=NaN,this.unit=""),Jce.includes(n)&&(this.num=eue(t,n),this.unit="px")}return Yce(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,a=(r=Qce.exec(n))!==null&&r!==void 0?r:[],o=pm(a,3),l=o[1],c=o[2];return new e(parseFloat(l),c??"")}}])})();function W6(e){if(e.includes(kl))return kl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=$D.exec(t))!==null&&n!==void 0?n:[],a=pm(r,4),o=a[1],l=a[2],c=a[3],f=lp.parse(o??""),d=lp.parse(c??""),m=l==="*"?f.multiply(d):f.divide(d);if(m.isNaN())return kl;t=t.replace($D,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,g=(h=zD.exec(t))!==null&&h!==void 0?h:[],x=pm(g,4),A=x[1],S=x[2],w=x[3],E=lp.parse(A??""),O=lp.parse(w??""),j=S==="+"?E.add(O):E.subtract(O);if(j.isNaN())return kl;t=t.replace(zD,j.toString())}return t}var LD=/\(([^()]*)\)/;function tue(e){for(var t=e;t.includes("(");){var n=LD.exec(t),r=pm(n,2),a=r[1];t=t.replace(LD,W6(a))}return t}function nue(e){var t=e.replace(/\s+/g,"");return t=tue(t),t=W6(t),t}function rue(e){try{return nue(e)}catch{return kl}}function i1(e){var t=rue(e.slice(5,-1));return t===kl?"":t}var aue=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],iue=["dx","dy","angle","className","breakAll"];function JS(){return JS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JS.apply(this,arguments)}function ID(e,t){if(e==null)return{};var n=oue(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function BD(e,t){return uue(e)||cue(e,t)||lue(e,t)||sue()}function sue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
466
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lue(e,t){if(e){if(typeof e=="string")return UD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UD(e,t)}}function UD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function uue(e){if(Array.isArray(e))return e}var Y6=/[ \f\n\r\t\v\u2028\u2029]+/,K6=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var o=[];yt(n)||(r?o=n.toString().split(""):o=n.toString().split(Y6));var l=o.map(function(f){return{word:f,width:of(f,a).width}}),c=r?0:of(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:c}}catch{return null}},fue=function(t,n,r,a,o){var l=t.maxLines,c=t.children,f=t.style,d=t.breakAll,m=Me(l),h=c,g=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return W.reduce(function($,V){var F=V.word,K=V.width,ie=$[$.length-1];if(ie&&(a==null||o||ie.width+K+r<Number(a)))ie.words.push(F),ie.width+=K+r;else{var I={words:[F],width:K};$.push(I)}return $},[])},x=g(n),A=function(W){return W.reduce(function($,V){return $.width>V.width?$:V})};if(!m)return x;for(var S="…",w=function(W){var $=h.slice(0,W),V=K6({breakAll:d,style:f,children:$+S}).wordsWithComputedWidth,F=g(V),K=F.length>l||A(F).width>Number(a);return[K,F]},E=0,O=h.length-1,j=0,R;E<=O&&j<=h.length-1;){var C=Math.floor((E+O)/2),T=C-1,N=w(T),D=BD(N,2),z=D[0],G=D[1],U=w(C),P=BD(U,1),B=P[0];if(!z&&!B&&(E=C+1),z&&B&&(O=C-1),!z&&B){R=G;break}j++}return R||x},qD=function(t){var n=yt(t)?[]:t.toString().split(Y6);return[{words:n}]},due=function(t){var n=t.width,r=t.scaleToFit,a=t.children,o=t.style,l=t.breakAll,c=t.maxLines;if((n||r)&&!Lc.isSsr){var f,d,m=K6({breakAll:l,children:a,style:o});if(m){var h=m.wordsWithComputedWidth,g=m.spaceWidth;f=h,d=g}else return qD(a);return fue({breakAll:l,children:a,maxLines:c,style:o},f,d,n,r)}return qD(a)},HD="#808080",mm=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.lineHeight,c=l===void 0?"1em":l,f=t.capHeight,d=f===void 0?"0.71em":f,m=t.scaleToFit,h=m===void 0?!1:m,g=t.textAnchor,x=g===void 0?"start":g,A=t.verticalAnchor,S=A===void 0?"end":A,w=t.fill,E=w===void 0?HD:w,O=ID(t,aue),j=y.useMemo(function(){return due({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),R=O.dx,C=O.dy,T=O.angle,N=O.className,D=O.breakAll,z=ID(O,iue);if(!kn(r)||!kn(o))return null;var G=r+(Me(R)?R:0),U=o+(Me(C)?C:0),P;switch(S){case"start":P=i1("calc(".concat(d,")"));break;case"middle":P=i1("calc(".concat((j.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:P=i1("calc(".concat(j.length-1," * -").concat(c,")"));break}var B=[];if(h){var q=j[0].width,W=O.width;B.push("scale(".concat((Me(W)?W/q:1)/q,")"))}return T&&B.push("rotate(".concat(T,", ").concat(G,", ").concat(U,")")),B.length&&(z.transform=B.join(" ")),L.createElement("text",JS({},mt(z,!0),{x:G,y:U,className:xt("recharts-text",N),textAnchor:x,fill:E.includes("url")?HD:E}),j.map(function($,V){var F=$.words.join(D?"":" ");return L.createElement("tspan",{x:G,dy:V===0?P:c,key:"".concat(F,"-").concat(V)},F)}))};function jo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function hue(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function LE(e){let t,n,r;e.length!==2?(t=jo,n=(c,f)=>jo(e(c),f),r=(c,f)=>e(c)-f):(t=e===jo||e===hue?e:pue,n=e,r=e);function a(c,f,d=0,m=c.length){if(d<m){if(t(f,f)!==0)return m;do{const h=d+m>>>1;n(c[h],f)<0?d=h+1:m=h}while(d<m)}return d}function o(c,f,d=0,m=c.length){if(d<m){if(t(f,f)!==0)return m;do{const h=d+m>>>1;n(c[h],f)<=0?d=h+1:m=h}while(d<m)}return d}function l(c,f,d=0,m=c.length){const h=a(c,f,d,m-1);return h>d&&r(c[h-1],f)>-r(c[h],f)?h-1:h}return{left:a,center:l,right:o}}function pue(){return 0}function Z6(e){return e===null?NaN:+e}function*mue(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const vue=LE(jo),Cd=vue.right;LE(Z6).center;class FD extends Map{constructor(t,n=bue){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(VD(this,t))}has(t){return super.has(VD(this,t))}set(t,n){return super.set(gue(this,t),n)}delete(t){return super.delete(yue(this,t))}}function VD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function gue({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function yue({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function bue(e){return e!==null&&typeof e=="object"?e.valueOf():e}function xue(e=jo){if(e===jo)return X6;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function X6(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const wue=Math.sqrt(50),Sue=Math.sqrt(10),_ue=Math.sqrt(2);function vm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),l=o>=wue?10:o>=Sue?5:o>=_ue?2:1;let c,f,d;return a<0?(d=Math.pow(10,-a)/l,c=Math.round(e*d),f=Math.round(t*d),c/d<e&&++c,f/d>t&&--f,d=-d):(d=Math.pow(10,a)*l,c=Math.round(e/d),f=Math.round(t/d),c*d<e&&++c,f*d>t&&--f),f<c&&.5<=n&&n<2?vm(e,t,n*2):[c,f,d]}function e_(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,o,l]=r?vm(t,e,n):vm(e,t,n);if(!(o>=a))return[];const c=o-a+1,f=new Array(c);if(r)if(l<0)for(let d=0;d<c;++d)f[d]=(o-d)/-l;else for(let d=0;d<c;++d)f[d]=(o-d)*l;else if(l<0)for(let d=0;d<c;++d)f[d]=(a+d)/-l;else for(let d=0;d<c;++d)f[d]=(a+d)*l;return f}function t_(e,t,n){return t=+t,e=+e,n=+n,vm(e,t,n)[2]}function n_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?t_(t,e,n):t_(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function GD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function WD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Q6(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?X6:xue(a);r>n;){if(r-n>600){const f=r-n+1,d=t-n+1,m=Math.log(f),h=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*h*(f-h)/f)*(d-f/2<0?-1:1),x=Math.max(n,Math.floor(t-d*h/f+g)),A=Math.min(r,Math.floor(t+(f-d)*h/f+g));Q6(e,t,x,A,a)}const o=e[t];let l=n,c=r;for(Uu(e,n,t),a(e[r],o)>0&&Uu(e,n,r);l<c;){for(Uu(e,l,c),++l,--c;a(e[l],o)<0;)++l;for(;a(e[c],o)>0;)--c}a(e[n],o)===0?Uu(e,n,c):(++c,Uu(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function Uu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Aue(e,t,n){if(e=Float64Array.from(mue(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return WD(e);if(t>=1)return GD(e);var r,a=(r-1)*t,o=Math.floor(a),l=GD(Q6(e,o).subarray(0,o+1)),c=WD(e.subarray(o+1));return l+(c-l)*(a-o)}}function Eue(e,t,n=Z6){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,o=Math.floor(a),l=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return l+(c-l)*(a-o)}}function Oue(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(a);++r<a;)o[r]=e+r*n;return o}function ga(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Wi(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const r_=Symbol("implicit");function IE(){var e=new FD,t=[],n=[],r=r_;function a(o){let l=e.get(o);if(l===void 0){if(r!==r_)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new FD;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return a},a.range=function(o){return arguments.length?(n=Array.from(o),a):n.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return IE(t,n).unknown(r)},ga.apply(a,arguments),a}function Ef(){var e=IE().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,o,l,c=!1,f=0,d=0,m=.5;delete e.unknown;function h(){var g=t().length,x=a<r,A=x?a:r,S=x?r:a;o=(S-A)/Math.max(1,g-f+d*2),c&&(o=Math.floor(o)),A+=(S-A-o*(g-f))*m,l=o*(1-f),c&&(A=Math.round(A),l=Math.round(l));var w=Oue(g).map(function(E){return A+o*E});return n(x?w.reverse():w)}return e.domain=function(g){return arguments.length?(t(g),h()):t()},e.range=function(g){return arguments.length?([r,a]=g,r=+r,a=+a,h()):[r,a]},e.rangeRound=function(g){return[r,a]=g,r=+r,a=+a,c=!0,h()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,h()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),h()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),h()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,h()):d},e.align=function(g){return arguments.length?(m=Math.max(0,Math.min(1,g)),h()):m},e.copy=function(){return Ef(t(),[r,a]).round(c).paddingInner(f).paddingOuter(d).align(m)},ga.apply(h(),arguments)}function J6(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return J6(t())},e}function sf(){return J6(Ef.apply(null,arguments).paddingInner(1))}function BE(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function e8(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Rd(){}var Of=.7,gm=1/Of,Vl="\\s*([+-]?\\d+)\\s*",jf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jue=/^#([0-9a-f]{3,8})$/,Tue=new RegExp(`^rgb\\(${Vl},${Vl},${Vl}\\)$`),Cue=new RegExp(`^rgb\\(${Xa},${Xa},${Xa}\\)$`),Rue=new RegExp(`^rgba\\(${Vl},${Vl},${Vl},${jf}\\)$`),Nue=new RegExp(`^rgba\\(${Xa},${Xa},${Xa},${jf}\\)$`),Mue=new RegExp(`^hsl\\(${jf},${Xa},${Xa}\\)$`),Pue=new RegExp(`^hsla\\(${jf},${Xa},${Xa},${jf}\\)$`),YD={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};BE(Rd,Tf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KD,formatHex:KD,formatHex8:Due,formatHsl:kue,formatRgb:ZD,toString:ZD});function KD(){return this.rgb().formatHex()}function Due(){return this.rgb().formatHex8()}function kue(){return t8(this).formatHsl()}function ZD(){return this.rgb().formatRgb()}function Tf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=jue.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?XD(t):n===3?new xr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Tue.exec(e))?new xr(t[1],t[2],t[3],1):(t=Cue.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Rue.exec(e))?cp(t[1],t[2],t[3],t[4]):(t=Nue.exec(e))?cp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Mue.exec(e))?ek(t[1],t[2]/100,t[3]/100,1):(t=Pue.exec(e))?ek(t[1],t[2]/100,t[3]/100,t[4]):YD.hasOwnProperty(e)?XD(YD[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function XD(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function cp(e,t,n,r){return r<=0&&(e=t=n=NaN),new xr(e,t,n,r)}function $ue(e){return e instanceof Rd||(e=Tf(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function a_(e,t,n,r){return arguments.length===1?$ue(e):new xr(e,t,n,r??1)}function xr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}BE(xr,a_,e8(Rd,{brighter(e){return e=e==null?gm:Math.pow(gm,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Of:Math.pow(Of,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(xs(this.r),xs(this.g),xs(this.b),ym(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:QD,formatHex:QD,formatHex8:zue,formatRgb:JD,toString:JD}));function QD(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}`}function zue(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}${vs((isNaN(this.opacity)?1:this.opacity)*255)}`}function JD(){const e=ym(this.opacity);return`${e===1?"rgb(":"rgba("}${xs(this.r)}, ${xs(this.g)}, ${xs(this.b)}${e===1?")":`, ${e})`}`}function ym(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vs(e){return e=xs(e),(e<16?"0":"")+e.toString(16)}function ek(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Oa(e,t,n,r)}function t8(e){if(e instanceof Oa)return new Oa(e.h,e.s,e.l,e.opacity);if(e instanceof Rd||(e=Tf(e)),!e)return new Oa;if(e instanceof Oa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,c=o-a,f=(o+a)/2;return c?(t===o?l=(n-r)/c+(n<r)*6:n===o?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?o+a:2-o-a,l*=60):c=f>0&&f<1?0:l,new Oa(l,c,f,e.opacity)}function Lue(e,t,n,r){return arguments.length===1?t8(e):new Oa(e,t,n,r??1)}function Oa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}BE(Oa,Lue,e8(Rd,{brighter(e){return e=e==null?gm:Math.pow(gm,e),new Oa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Of:Math.pow(Of,e),new Oa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new xr(o1(e>=240?e-240:e+120,a,r),o1(e,a,r),o1(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Oa(tk(this.h),up(this.s),up(this.l),ym(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ym(this.opacity);return`${e===1?"hsl(":"hsla("}${tk(this.h)}, ${up(this.s)*100}%, ${up(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tk(e){return e=(e||0)%360,e<0?e+360:e}function up(e){return Math.max(0,Math.min(1,e||0))}function o1(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const UE=e=>()=>e;function Iue(e,t){return function(n){return e+n*t}}function Bue(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Uue(e){return(e=+e)==1?n8:function(t,n){return n-t?Bue(t,n,e):UE(isNaN(t)?n:t)}}function n8(e,t){var n=t-e;return n?Iue(e,n):UE(isNaN(e)?t:e)}const nk=(function e(t){var n=Uue(t);function r(a,o){var l=n((a=a_(a)).r,(o=a_(o)).r),c=n(a.g,o.g),f=n(a.b,o.b),d=n8(a.opacity,o.opacity);return function(m){return a.r=l(m),a.g=c(m),a.b=f(m),a.opacity=d(m),a+""}}return r.gamma=e,r})(1);function que(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(o){for(a=0;a<n;++a)r[a]=e[a]*(1-o)+t[a]*o;return r}}function Hue(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Fue(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)a[l]=Ic(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(c){for(l=0;l<r;++l)o[l]=a[l](c);return o}}function Vue(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function bm(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Gue(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=Ic(e[a],t[a]):r[a]=t[a];return function(o){for(a in n)r[a]=n[a](o);return r}}var i_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,s1=new RegExp(i_.source,"g");function Wue(e){return function(){return e}}function Yue(e){return function(t){return e(t)+""}}function Kue(e,t){var n=i_.lastIndex=s1.lastIndex=0,r,a,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=i_.exec(e))&&(a=s1.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(r=r[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,f.push({i:l,x:bm(r,a)})),n=s1.lastIndex;return n<t.length&&(o=t.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?Yue(f[0].x):Wue(t):(t=f.length,function(d){for(var m=0,h;m<t;++m)c[(h=f[m]).i]=h.x(d);return c.join("")})}function Ic(e,t){var n=typeof t,r;return t==null||n==="boolean"?UE(t):(n==="number"?bm:n==="string"?(r=Tf(t))?(t=r,nk):Kue:t instanceof Tf?nk:t instanceof Date?Vue:Hue(t)?que:Array.isArray(t)?Fue:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Gue:bm)(e,t)}function qE(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Zue(e,t){t===void 0&&(t=e,e=Ic);for(var n=0,r=t.length-1,a=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(a,a=t[++n]);return function(l){var c=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[c](l-c)}}function Xue(e){return function(){return e}}function xm(e){return+e}var rk=[0,1];function cr(e){return e}function o_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Xue(isNaN(t)?NaN:.5)}function Que(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Jue(e,t,n){var r=e[0],a=e[1],o=t[0],l=t[1];return a<r?(r=o_(a,r),o=n(l,o)):(r=o_(r,a),o=n(o,l)),function(c){return o(r(c))}}function efe(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)a[l]=o_(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(c){var f=Cd(e,c,1,r)-1;return o[f](a[f](c))}}function Nd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Xv(){var e=rk,t=rk,n=Ic,r,a,o,l=cr,c,f,d;function m(){var g=Math.min(e.length,t.length);return l!==cr&&(l=Que(e[0],e[g-1])),c=g>2?efe:Jue,f=d=null,h}function h(g){return g==null||isNaN(g=+g)?o:(f||(f=c(e.map(r),t,n)))(r(l(g)))}return h.invert=function(g){return l(a((d||(d=c(t,e.map(r),bm)))(g)))},h.domain=function(g){return arguments.length?(e=Array.from(g,xm),m()):e.slice()},h.range=function(g){return arguments.length?(t=Array.from(g),m()):t.slice()},h.rangeRound=function(g){return t=Array.from(g),n=qE,m()},h.clamp=function(g){return arguments.length?(l=g?!0:cr,m()):l!==cr},h.interpolate=function(g){return arguments.length?(n=g,m()):n},h.unknown=function(g){return arguments.length?(o=g,h):o},function(g,x){return r=g,a=x,m()}}function HE(){return Xv()(cr,cr)}function tfe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function wm(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ac(e){return e=wm(Math.abs(e)),e?e[1]:NaN}function nfe(e,t){return function(n,r){for(var a=n.length,o=[],l=0,c=e[0],f=0;a>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),o.push(n.substring(a-=c,a+c)),!((f+=c+1)>r));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function rfe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var afe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cf(e){if(!(t=afe.exec(e)))throw new Error("invalid format: "+e);var t;return new FE({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Cf.prototype=FE.prototype;function FE(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}FE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ife(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Sm;function ofe(e,t){var n=wm(e,t);if(!n)return Sm=void 0,e.toPrecision(t);var r=n[0],a=n[1],o=a-(Sm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+wm(e,Math.max(0,t+o-1))[0]}function ak(e,t){var n=wm(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const ik={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:tfe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ak(e*100,t),r:ak,s:ofe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ok(e){return e}var sk=Array.prototype.map,lk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sfe(e){var t=e.grouping===void 0||e.thousands===void 0?ok:nfe(sk.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?ok:rfe(sk.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(h,g){h=Cf(h);var x=h.fill,A=h.align,S=h.sign,w=h.symbol,E=h.zero,O=h.width,j=h.comma,R=h.precision,C=h.trim,T=h.type;T==="n"?(j=!0,T="g"):ik[T]||(R===void 0&&(R=12),C=!0,T="g"),(E||x==="0"&&A==="=")&&(E=!0,x="0",A="=");var N=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?n:w==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),D=(w==="$"?r:/[%p]/.test(T)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),z=ik[T],G=/[defgprs%]/.test(T);R=R===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,R)):Math.max(0,Math.min(20,R));function U(P){var B=N,q=D,W,$,V;if(T==="c")q=z(P)+q,P="";else{P=+P;var F=P<0||1/P<0;if(P=isNaN(P)?f:z(Math.abs(P),R),C&&(P=ife(P)),F&&+P==0&&S!=="+"&&(F=!1),B=(F?S==="("?S:c:S==="-"||S==="("?"":S)+B,q=(T==="s"&&!isNaN(P)&&Sm!==void 0?lk[8+Sm/3]:"")+q+(F&&S==="("?")":""),G){for(W=-1,$=P.length;++W<$;)if(V=P.charCodeAt(W),48>V||V>57){q=(V===46?a+P.slice(W+1):P.slice(W))+q,P=P.slice(0,W);break}}}j&&!E&&(P=t(P,1/0));var K=B.length+P.length+q.length,ie=K<O?new Array(O-K+1).join(x):"";switch(j&&E&&(P=t(ie+P,ie.length?O-q.length:1/0),ie=""),A){case"<":P=B+P+q+ie;break;case"=":P=B+ie+P+q;break;case"^":P=ie.slice(0,K=ie.length>>1)+B+P+q+ie.slice(K);break;default:P=ie+B+P+q;break}return o(P)}return U.toString=function(){return h+""},U}function m(h,g){var x=Math.max(-8,Math.min(8,Math.floor(ac(g)/3)))*3,A=Math.pow(10,-x),S=d((h=Cf(h),h.type="f",h),{suffix:lk[8+x/3]});return function(w){return S(A*w)}}return{format:d,formatPrefix:m}}var fp,VE,r8;lfe({thousands:",",grouping:[3],currency:["$",""]});function lfe(e){return fp=sfe(e),VE=fp.format,r8=fp.formatPrefix,fp}function cfe(e){return Math.max(0,-ac(Math.abs(e)))}function ufe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ac(t)/3)))*3-ac(Math.abs(e)))}function ffe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ac(t)-ac(e))+1}function a8(e,t,n,r){var a=n_(e,t,n),o;switch(r=Cf(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=ufe(a,l))&&(r.precision=o),r8(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=ffe(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=cfe(a))&&(r.precision=o-(r.type==="%")*2);break}}return VE(r)}function Bo(e){var t=e.domain;return e.ticks=function(n){var r=t();return e_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return a8(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,o=r.length-1,l=r[a],c=r[o],f,d,m=10;for(c<l&&(d=l,l=c,c=d,d=a,a=o,o=d);m-- >0;){if(d=t_(l,c,n),d===f)return r[a]=l,r[o]=c,t(r);if(d>0)l=Math.floor(l/d)*d,c=Math.ceil(c/d)*d;else if(d<0)l=Math.ceil(l*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function _m(){var e=HE();return e.copy=function(){return Nd(e,_m())},ga.apply(e,arguments),Bo(e)}function i8(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,xm),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return i8(e).unknown(t)},e=arguments.length?Array.from(e,xm):[0,1],Bo(n)}function o8(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],o=e[r],l;return o<a&&(l=n,n=r,r=l,l=a,a=o,o=l),e[n]=t.floor(a),e[r]=t.ceil(o),e}function ck(e){return Math.log(e)}function uk(e){return Math.exp(e)}function dfe(e){return-Math.log(-e)}function hfe(e){return-Math.exp(-e)}function pfe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function mfe(e){return e===10?pfe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function vfe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function fk(e){return(t,n)=>-e(-t,n)}function GE(e){const t=e(ck,uk),n=t.domain;let r=10,a,o;function l(){return a=vfe(r),o=mfe(r),n()[0]<0?(a=fk(a),o=fk(o),e(dfe,hfe)):e(ck,uk),t}return t.base=function(c){return arguments.length?(r=+c,l()):r},t.domain=function(c){return arguments.length?(n(c),l()):n()},t.ticks=c=>{const f=n();let d=f[0],m=f[f.length-1];const h=m<d;h&&([d,m]=[m,d]);let g=a(d),x=a(m),A,S;const w=c==null?10:+c;let E=[];if(!(r%1)&&x-g<w){if(g=Math.floor(g),x=Math.ceil(x),d>0){for(;g<=x;++g)for(A=1;A<r;++A)if(S=g<0?A/o(-g):A*o(g),!(S<d)){if(S>m)break;E.push(S)}}else for(;g<=x;++g)for(A=r-1;A>=1;--A)if(S=g>0?A/o(-g):A*o(g),!(S<d)){if(S>m)break;E.push(S)}E.length*2<w&&(E=e_(d,m,w))}else E=e_(g,x,Math.min(x-g,w)).map(o);return h?E.reverse():E},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Cf(f)).precision==null&&(f.trim=!0),f=VE(f)),c===1/0)return f;const d=Math.max(1,r*c/t.ticks().length);return m=>{let h=m/o(Math.round(a(m)));return h*r<r-.5&&(h*=r),h<=d?f(m):""}},t.nice=()=>n(o8(n(),{floor:c=>o(Math.floor(a(c))),ceil:c=>o(Math.ceil(a(c)))})),t}function s8(){const e=GE(Xv()).domain([1,10]);return e.copy=()=>Nd(e,s8()).base(e.base()),ga.apply(e,arguments),e}function dk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function hk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function WE(e){var t=1,n=e(dk(t),hk(t));return n.constant=function(r){return arguments.length?e(dk(t=+r),hk(t)):t},Bo(n)}function l8(){var e=WE(Xv());return e.copy=function(){return Nd(e,l8()).constant(e.constant())},ga.apply(e,arguments)}function pk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function gfe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function yfe(e){return e<0?-e*e:e*e}function YE(e){var t=e(cr,cr),n=1;function r(){return n===1?e(cr,cr):n===.5?e(gfe,yfe):e(pk(n),pk(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Bo(t)}function KE(){var e=YE(Xv());return e.copy=function(){return Nd(e,KE()).exponent(e.exponent())},ga.apply(e,arguments),e}function bfe(){return KE.apply(null,arguments).exponent(.5)}function mk(e){return Math.sign(e)*e*e}function xfe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function c8(){var e=HE(),t=[0,1],n=!1,r;function a(o){var l=xfe(e(o));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(o){return e.invert(mk(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,xm)).map(mk)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(n=!!o,a):n},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return c8(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ga.apply(a,arguments),Bo(a)}function u8(){var e=[],t=[],n=[],r;function a(){var l=0,c=Math.max(1,t.length);for(n=new Array(c-1);++l<c;)n[l-1]=Eue(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Cd(n,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(jo),a()},o.range=function(l){return arguments.length?(t=Array.from(l),a()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return u8().domain(e).range(t).unknown(r)},ga.apply(o,arguments)}function f8(){var e=0,t=1,n=1,r=[.5],a=[0,1],o;function l(f){return f!=null&&f<=f?a[Cd(r,f,0,n)]:o}function c(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},l.range=function(f){return arguments.length?(n=(a=Array.from(f)).length-1,c()):a.slice()},l.invertExtent=function(f){var d=a.indexOf(f);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return f8().domain([e,t]).range(a).unknown(o)},ga.apply(Bo(l),arguments)}function d8(){var e=[.5],t=[0,1],n,r=1;function a(o){return o!=null&&o<=o?t[Cd(e,o,0,r)]:n}return a.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return d8().domain(e).range(t).unknown(n)},ga.apply(a,arguments)}const l1=new Date,c1=new Date;function $n(e,t,n,r){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const l=a(o),c=a.ceil(o);return o-l<c-o?l:c},a.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),a.range=(o,l,c)=>{const f=[];if(o=a.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return f;let d;do f.push(d=new Date(+o)),t(o,c),e(o);while(d<o&&o<l);return f},a.filter=o=>$n(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),n&&(a.count=(o,l)=>(l1.setTime(+o),c1.setTime(+l),e(l1),e(c1),Math.floor(n(l1,c1))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(r?l=>r(l)%o===0:l=>a.count(0,l)%o===0):a)),a}const Am=$n(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Am.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?$n(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Am);Am.range;const Oi=1e3,ca=Oi*60,ji=ca*60,Ii=ji*24,ZE=Ii*7,vk=Ii*30,u1=Ii*365,gs=$n(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Oi)},(e,t)=>(t-e)/Oi,e=>e.getUTCSeconds());gs.range;const XE=$n(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Oi)},(e,t)=>{e.setTime(+e+t*ca)},(e,t)=>(t-e)/ca,e=>e.getMinutes());XE.range;const QE=$n(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ca)},(e,t)=>(t-e)/ca,e=>e.getUTCMinutes());QE.range;const JE=$n(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Oi-e.getMinutes()*ca)},(e,t)=>{e.setTime(+e+t*ji)},(e,t)=>(t-e)/ji,e=>e.getHours());JE.range;const eO=$n(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ji)},(e,t)=>(t-e)/ji,e=>e.getUTCHours());eO.range;const Md=$n(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ca)/Ii,e=>e.getDate()-1);Md.range;const Qv=$n(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ii,e=>e.getUTCDate()-1);Qv.range;const h8=$n(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ii,e=>Math.floor(e/Ii));h8.range;function Is(e){return $n(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ca)/ZE)}const Jv=Is(0),Em=Is(1),wfe=Is(2),Sfe=Is(3),ic=Is(4),_fe=Is(5),Afe=Is(6);Jv.range;Em.range;wfe.range;Sfe.range;ic.range;_fe.range;Afe.range;function Bs(e){return $n(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ZE)}const eg=Bs(0),Om=Bs(1),Efe=Bs(2),Ofe=Bs(3),oc=Bs(4),jfe=Bs(5),Tfe=Bs(6);eg.range;Om.range;Efe.range;Ofe.range;oc.range;jfe.range;Tfe.range;const tO=$n(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());tO.range;const nO=$n(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());nO.range;const Bi=$n(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Bi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$n(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Bi.range;const Ui=$n(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ui.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$n(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ui.range;function p8(e,t,n,r,a,o){const l=[[gs,1,Oi],[gs,5,5*Oi],[gs,15,15*Oi],[gs,30,30*Oi],[o,1,ca],[o,5,5*ca],[o,15,15*ca],[o,30,30*ca],[a,1,ji],[a,3,3*ji],[a,6,6*ji],[a,12,12*ji],[r,1,Ii],[r,2,2*Ii],[n,1,ZE],[t,1,vk],[t,3,3*vk],[e,1,u1]];function c(d,m,h){const g=m<d;g&&([d,m]=[m,d]);const x=h&&typeof h.range=="function"?h:f(d,m,h),A=x?x.range(d,+m+1):[];return g?A.reverse():A}function f(d,m,h){const g=Math.abs(m-d)/h,x=LE(([,,w])=>w).right(l,g);if(x===l.length)return e.every(n_(d/u1,m/u1,h));if(x===0)return Am.every(Math.max(n_(d,m,h),1));const[A,S]=l[g/l[x-1][2]<l[x][2]/g?x-1:x];return A.every(S)}return[c,f]}const[Cfe,Rfe]=p8(Ui,nO,eg,h8,eO,QE),[Nfe,Mfe]=p8(Bi,tO,Jv,Md,JE,XE);function f1(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function d1(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qu(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Pfe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,o=e.days,l=e.shortDays,c=e.months,f=e.shortMonths,d=Hu(a),m=Fu(a),h=Hu(o),g=Fu(o),x=Hu(l),A=Fu(l),S=Hu(c),w=Fu(c),E=Hu(f),O=Fu(f),j={a:V,A:F,b:K,B:ie,c:null,d:Sk,e:Sk,f:nde,g:dde,G:pde,H:Jfe,I:ede,j:tde,L:m8,m:rde,M:ade,p:I,q:Z,Q:Ek,s:Ok,S:ide,u:ode,U:sde,V:lde,w:cde,W:ude,x:null,X:null,y:fde,Y:hde,Z:mde,"%":Ak},R={a:X,A:oe,b:ge,B:Ee,c:null,d:_k,e:_k,f:bde,g:Cde,G:Nde,H:vde,I:gde,j:yde,L:g8,m:xde,M:wde,p:me,q:we,Q:Ek,s:Ok,S:Sde,u:_de,U:Ade,V:Ede,w:Ode,W:jde,x:null,X:null,y:Tde,Y:Rde,Z:Mde,"%":Ak},C={a:G,A:U,b:P,B,c:q,d:xk,e:xk,f:Kfe,g:bk,G:yk,H:wk,I:wk,j:Vfe,L:Yfe,m:Ffe,M:Gfe,p:z,q:Hfe,Q:Xfe,s:Qfe,S:Wfe,u:Lfe,U:Ife,V:Bfe,w:zfe,W:Ufe,x:W,X:$,y:bk,Y:yk,Z:qfe,"%":Zfe};j.x=T(n,j),j.X=T(r,j),j.c=T(t,j),R.x=T(n,R),R.X=T(r,R),R.c=T(t,R);function T(ce,_e){return function(Ae){var se=[],He=-1,$e=0,Je=ce.length,We,at,Rt;for(Ae instanceof Date||(Ae=new Date(+Ae));++He<Je;)ce.charCodeAt(He)===37&&(se.push(ce.slice($e,He)),(at=gk[We=ce.charAt(++He)])!=null?We=ce.charAt(++He):at=We==="e"?" ":"0",(Rt=_e[We])&&(We=Rt(Ae,at)),se.push(We),$e=He+1);return se.push(ce.slice($e,He)),se.join("")}}function N(ce,_e){return function(Ae){var se=qu(1900,void 0,1),He=D(se,ce,Ae+="",0),$e,Je;if(He!=Ae.length)return null;if("Q"in se)return new Date(se.Q);if("s"in se)return new Date(se.s*1e3+("L"in se?se.L:0));if(_e&&!("Z"in se)&&(se.Z=0),"p"in se&&(se.H=se.H%12+se.p*12),se.m===void 0&&(se.m="q"in se?se.q:0),"V"in se){if(se.V<1||se.V>53)return null;"w"in se||(se.w=1),"Z"in se?($e=d1(qu(se.y,0,1)),Je=$e.getUTCDay(),$e=Je>4||Je===0?Om.ceil($e):Om($e),$e=Qv.offset($e,(se.V-1)*7),se.y=$e.getUTCFullYear(),se.m=$e.getUTCMonth(),se.d=$e.getUTCDate()+(se.w+6)%7):($e=f1(qu(se.y,0,1)),Je=$e.getDay(),$e=Je>4||Je===0?Em.ceil($e):Em($e),$e=Md.offset($e,(se.V-1)*7),se.y=$e.getFullYear(),se.m=$e.getMonth(),se.d=$e.getDate()+(se.w+6)%7)}else("W"in se||"U"in se)&&("w"in se||(se.w="u"in se?se.u%7:"W"in se?1:0),Je="Z"in se?d1(qu(se.y,0,1)).getUTCDay():f1(qu(se.y,0,1)).getDay(),se.m=0,se.d="W"in se?(se.w+6)%7+se.W*7-(Je+5)%7:se.w+se.U*7-(Je+6)%7);return"Z"in se?(se.H+=se.Z/100|0,se.M+=se.Z%100,d1(se)):f1(se)}}function D(ce,_e,Ae,se){for(var He=0,$e=_e.length,Je=Ae.length,We,at;He<$e;){if(se>=Je)return-1;if(We=_e.charCodeAt(He++),We===37){if(We=_e.charAt(He++),at=C[We in gk?_e.charAt(He++):We],!at||(se=at(ce,Ae,se))<0)return-1}else if(We!=Ae.charCodeAt(se++))return-1}return se}function z(ce,_e,Ae){var se=d.exec(_e.slice(Ae));return se?(ce.p=m.get(se[0].toLowerCase()),Ae+se[0].length):-1}function G(ce,_e,Ae){var se=x.exec(_e.slice(Ae));return se?(ce.w=A.get(se[0].toLowerCase()),Ae+se[0].length):-1}function U(ce,_e,Ae){var se=h.exec(_e.slice(Ae));return se?(ce.w=g.get(se[0].toLowerCase()),Ae+se[0].length):-1}function P(ce,_e,Ae){var se=E.exec(_e.slice(Ae));return se?(ce.m=O.get(se[0].toLowerCase()),Ae+se[0].length):-1}function B(ce,_e,Ae){var se=S.exec(_e.slice(Ae));return se?(ce.m=w.get(se[0].toLowerCase()),Ae+se[0].length):-1}function q(ce,_e,Ae){return D(ce,t,_e,Ae)}function W(ce,_e,Ae){return D(ce,n,_e,Ae)}function $(ce,_e,Ae){return D(ce,r,_e,Ae)}function V(ce){return l[ce.getDay()]}function F(ce){return o[ce.getDay()]}function K(ce){return f[ce.getMonth()]}function ie(ce){return c[ce.getMonth()]}function I(ce){return a[+(ce.getHours()>=12)]}function Z(ce){return 1+~~(ce.getMonth()/3)}function X(ce){return l[ce.getUTCDay()]}function oe(ce){return o[ce.getUTCDay()]}function ge(ce){return f[ce.getUTCMonth()]}function Ee(ce){return c[ce.getUTCMonth()]}function me(ce){return a[+(ce.getUTCHours()>=12)]}function we(ce){return 1+~~(ce.getUTCMonth()/3)}return{format:function(ce){var _e=T(ce+="",j);return _e.toString=function(){return ce},_e},parse:function(ce){var _e=N(ce+="",!1);return _e.toString=function(){return ce},_e},utcFormat:function(ce){var _e=T(ce+="",R);return _e.toString=function(){return ce},_e},utcParse:function(ce){var _e=N(ce+="",!0);return _e.toString=function(){return ce},_e}}}var gk={"-":"",_:" ",0:"0"},Bn=/^\s*\d+/,Dfe=/^%/,kfe=/[\\^$*+?|[\]().{}]/g;function Ot(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",o=a.length;return r+(o<n?new Array(n-o+1).join(t)+a:a)}function $fe(e){return e.replace(kfe,"\\$&")}function Hu(e){return new RegExp("^(?:"+e.map($fe).join("|")+")","i")}function Fu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function zfe(e,t,n){var r=Bn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Lfe(e,t,n){var r=Bn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ife(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bfe(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ufe(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function yk(e,t,n){var r=Bn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function bk(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qfe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Hfe(e,t,n){var r=Bn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ffe(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function xk(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Vfe(e,t,n){var r=Bn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wk(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Gfe(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wfe(e,t,n){var r=Bn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Yfe(e,t,n){var r=Bn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Kfe(e,t,n){var r=Bn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Zfe(e,t,n){var r=Dfe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Xfe(e,t,n){var r=Bn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Qfe(e,t,n){var r=Bn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Sk(e,t){return Ot(e.getDate(),t,2)}function Jfe(e,t){return Ot(e.getHours(),t,2)}function ede(e,t){return Ot(e.getHours()%12||12,t,2)}function tde(e,t){return Ot(1+Md.count(Bi(e),e),t,3)}function m8(e,t){return Ot(e.getMilliseconds(),t,3)}function nde(e,t){return m8(e,t)+"000"}function rde(e,t){return Ot(e.getMonth()+1,t,2)}function ade(e,t){return Ot(e.getMinutes(),t,2)}function ide(e,t){return Ot(e.getSeconds(),t,2)}function ode(e){var t=e.getDay();return t===0?7:t}function sde(e,t){return Ot(Jv.count(Bi(e)-1,e),t,2)}function v8(e){var t=e.getDay();return t>=4||t===0?ic(e):ic.ceil(e)}function lde(e,t){return e=v8(e),Ot(ic.count(Bi(e),e)+(Bi(e).getDay()===4),t,2)}function cde(e){return e.getDay()}function ude(e,t){return Ot(Em.count(Bi(e)-1,e),t,2)}function fde(e,t){return Ot(e.getFullYear()%100,t,2)}function dde(e,t){return e=v8(e),Ot(e.getFullYear()%100,t,2)}function hde(e,t){return Ot(e.getFullYear()%1e4,t,4)}function pde(e,t){var n=e.getDay();return e=n>=4||n===0?ic(e):ic.ceil(e),Ot(e.getFullYear()%1e4,t,4)}function mde(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ot(t/60|0,"0",2)+Ot(t%60,"0",2)}function _k(e,t){return Ot(e.getUTCDate(),t,2)}function vde(e,t){return Ot(e.getUTCHours(),t,2)}function gde(e,t){return Ot(e.getUTCHours()%12||12,t,2)}function yde(e,t){return Ot(1+Qv.count(Ui(e),e),t,3)}function g8(e,t){return Ot(e.getUTCMilliseconds(),t,3)}function bde(e,t){return g8(e,t)+"000"}function xde(e,t){return Ot(e.getUTCMonth()+1,t,2)}function wde(e,t){return Ot(e.getUTCMinutes(),t,2)}function Sde(e,t){return Ot(e.getUTCSeconds(),t,2)}function _de(e){var t=e.getUTCDay();return t===0?7:t}function Ade(e,t){return Ot(eg.count(Ui(e)-1,e),t,2)}function y8(e){var t=e.getUTCDay();return t>=4||t===0?oc(e):oc.ceil(e)}function Ede(e,t){return e=y8(e),Ot(oc.count(Ui(e),e)+(Ui(e).getUTCDay()===4),t,2)}function Ode(e){return e.getUTCDay()}function jde(e,t){return Ot(Om.count(Ui(e)-1,e),t,2)}function Tde(e,t){return Ot(e.getUTCFullYear()%100,t,2)}function Cde(e,t){return e=y8(e),Ot(e.getUTCFullYear()%100,t,2)}function Rde(e,t){return Ot(e.getUTCFullYear()%1e4,t,4)}function Nde(e,t){var n=e.getUTCDay();return e=n>=4||n===0?oc(e):oc.ceil(e),Ot(e.getUTCFullYear()%1e4,t,4)}function Mde(){return"+0000"}function Ak(){return"%"}function Ek(e){return+e}function Ok(e){return Math.floor(+e/1e3)}var Nl,b8,x8;Pde({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Pde(e){return Nl=Pfe(e),b8=Nl.format,Nl.parse,x8=Nl.utcFormat,Nl.utcParse,Nl}function Dde(e){return new Date(e)}function kde(e){return e instanceof Date?+e:+new Date(+e)}function rO(e,t,n,r,a,o,l,c,f,d){var m=HE(),h=m.invert,g=m.domain,x=d(".%L"),A=d(":%S"),S=d("%I:%M"),w=d("%I %p"),E=d("%a %d"),O=d("%b %d"),j=d("%B"),R=d("%Y");function C(T){return(f(T)<T?x:c(T)<T?A:l(T)<T?S:o(T)<T?w:r(T)<T?a(T)<T?E:O:n(T)<T?j:R)(T)}return m.invert=function(T){return new Date(h(T))},m.domain=function(T){return arguments.length?g(Array.from(T,kde)):g().map(Dde)},m.ticks=function(T){var N=g();return e(N[0],N[N.length-1],T??10)},m.tickFormat=function(T,N){return N==null?C:d(N)},m.nice=function(T){var N=g();return(!T||typeof T.range!="function")&&(T=t(N[0],N[N.length-1],T??10)),T?g(o8(N,T)):m},m.copy=function(){return Nd(m,rO(e,t,n,r,a,o,l,c,f,d))},m}function $de(){return ga.apply(rO(Nfe,Mfe,Bi,tO,Jv,Md,JE,XE,gs,b8).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zde(){return ga.apply(rO(Cfe,Rfe,Ui,nO,eg,Qv,eO,QE,gs,x8).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function tg(){var e=0,t=1,n,r,a,o,l=cr,c=!1,f;function d(h){return h==null||isNaN(h=+h)?f:l(a===0?.5:(h=(o(h)-n)*a,c?Math.max(0,Math.min(1,h)):h))}d.domain=function(h){return arguments.length?([e,t]=h,n=o(e=+e),r=o(t=+t),a=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(h){return arguments.length?(c=!!h,d):c},d.interpolator=function(h){return arguments.length?(l=h,d):l};function m(h){return function(g){var x,A;return arguments.length?([x,A]=g,l=h(x,A),d):[l(0),l(1)]}}return d.range=m(Ic),d.rangeRound=m(qE),d.unknown=function(h){return arguments.length?(f=h,d):f},function(h){return o=h,n=h(e),r=h(t),a=n===r?0:1/(r-n),d}}function Uo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function w8(){var e=Bo(tg()(cr));return e.copy=function(){return Uo(e,w8())},Wi.apply(e,arguments)}function S8(){var e=GE(tg()).domain([1,10]);return e.copy=function(){return Uo(e,S8()).base(e.base())},Wi.apply(e,arguments)}function _8(){var e=WE(tg());return e.copy=function(){return Uo(e,_8()).constant(e.constant())},Wi.apply(e,arguments)}function aO(){var e=YE(tg());return e.copy=function(){return Uo(e,aO()).exponent(e.exponent())},Wi.apply(e,arguments)}function Lde(){return aO.apply(null,arguments).exponent(.5)}function A8(){var e=[],t=cr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Cd(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(jo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,o)=>Aue(e,o/r))},n.copy=function(){return A8(t).domain(e)},Wi.apply(n,arguments)}function ng(){var e=0,t=.5,n=1,r=1,a,o,l,c,f,d=cr,m,h=!1,g;function x(S){return isNaN(S=+S)?g:(S=.5+((S=+m(S))-o)*(r*S<r*o?c:f),d(h?Math.max(0,Math.min(1,S)):S))}x.domain=function(S){return arguments.length?([e,t,n]=S,a=m(e=+e),o=m(t=+t),l=m(n=+n),c=a===o?0:.5/(o-a),f=o===l?0:.5/(l-o),r=o<a?-1:1,x):[e,t,n]},x.clamp=function(S){return arguments.length?(h=!!S,x):h},x.interpolator=function(S){return arguments.length?(d=S,x):d};function A(S){return function(w){var E,O,j;return arguments.length?([E,O,j]=w,d=Zue(S,[E,O,j]),x):[d(0),d(.5),d(1)]}}return x.range=A(Ic),x.rangeRound=A(qE),x.unknown=function(S){return arguments.length?(g=S,x):g},function(S){return m=S,a=S(e),o=S(t),l=S(n),c=a===o?0:.5/(o-a),f=o===l?0:.5/(l-o),r=o<a?-1:1,x}}function E8(){var e=Bo(ng()(cr));return e.copy=function(){return Uo(e,E8())},Wi.apply(e,arguments)}function O8(){var e=GE(ng()).domain([.1,1,10]);return e.copy=function(){return Uo(e,O8()).base(e.base())},Wi.apply(e,arguments)}function j8(){var e=WE(ng());return e.copy=function(){return Uo(e,j8()).constant(e.constant())},Wi.apply(e,arguments)}function iO(){var e=YE(ng());return e.copy=function(){return Uo(e,iO()).exponent(e.exponent())},Wi.apply(e,arguments)}function Ide(){return iO.apply(null,arguments).exponent(.5)}const jk=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ef,scaleDiverging:E8,scaleDivergingLog:O8,scaleDivergingPow:iO,scaleDivergingSqrt:Ide,scaleDivergingSymlog:j8,scaleIdentity:i8,scaleImplicit:r_,scaleLinear:_m,scaleLog:s8,scaleOrdinal:IE,scalePoint:sf,scalePow:KE,scaleQuantile:u8,scaleQuantize:f8,scaleRadial:c8,scaleSequential:w8,scaleSequentialLog:S8,scaleSequentialPow:aO,scaleSequentialQuantile:A8,scaleSequentialSqrt:Lde,scaleSequentialSymlog:_8,scaleSqrt:bfe,scaleSymlog:l8,scaleThreshold:d8,scaleTime:$de,scaleUtc:zde,tickFormat:a8},Symbol.toStringTag,{value:"Module"}));var h1,Tk;function T8(){if(Tk)return h1;Tk=1;var e=Dc();function t(n,r,a){for(var o=-1,l=n.length;++o<l;){var c=n[o],f=r(c);if(f!=null&&(d===void 0?f===f&&!e(f):a(f,d)))var d=f,m=c}return m}return h1=t,h1}var p1,Ck;function Bde(){if(Ck)return p1;Ck=1;function e(t,n){return t>n}return p1=e,p1}var m1,Rk;function Ude(){if(Rk)return m1;Rk=1;var e=T8(),t=Bde(),n=zc();function r(a){return a&&a.length?e(a,n,t):void 0}return m1=r,m1}var qde=Ude();const Eo=Ht(qde);var v1,Nk;function Hde(){if(Nk)return v1;Nk=1;function e(t,n){return t<n}return v1=e,v1}var g1,Mk;function Fde(){if(Mk)return g1;Mk=1;var e=T8(),t=Hde(),n=zc();function r(a){return a&&a.length?e(a,n,t):void 0}return g1=r,g1}var Vde=Fde();const rg=Ht(Vde);var y1,Pk;function Gde(){if(Pk)return y1;Pk=1;var e=wE(),t=Io(),n=z6(),r=wr();function a(o,l){var c=r(o)?e:n;return c(o,t(l,3))}return y1=a,y1}var b1,Dk;function Wde(){if(Dk)return b1;Dk=1;var e=k6(),t=Gde();function n(r,a){return e(t(r,a),1)}return b1=n,b1}var Yde=Wde();const Kde=Ht(Yde);var x1,kk;function Zde(){if(kk)return x1;kk=1;var e=DE();function t(n,r){return e(n,r)}return x1=t,x1}var Xde=Zde();const Rf=Ht(Xde);var Bc=1e9,Qde={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},sO,an=!0,ha="[DecimalError] ",ws=ha+"Invalid argument: ",oO=ha+"Exponent out of range: ",Uc=Math.floor,hs=Math.pow,Jde=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dr,In=1e7,en=7,C8=9007199254740991,jm=Uc(C8/en),Ie={};Ie.absoluteValue=Ie.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ie.comparedTo=Ie.cmp=function(e){var t,n,r,a,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===a?0:r>a^o.s<0?1:-1};Ie.decimalPlaces=Ie.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*en;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ie.dividedBy=Ie.div=function(e){return Pi(this,new this.constructor(e))};Ie.dividedToIntegerBy=Ie.idiv=function(e){var t=this,n=t.constructor;return Wt(Pi(t,new n(e),0,1),n.precision)};Ie.equals=Ie.eq=function(e){return!this.cmp(e)};Ie.exponent=function(){return jn(this)};Ie.greaterThan=Ie.gt=function(e){return this.cmp(e)>0};Ie.greaterThanOrEqualTo=Ie.gte=function(e){return this.cmp(e)>=0};Ie.isInteger=Ie.isint=function(){return this.e>this.d.length-2};Ie.isNegative=Ie.isneg=function(){return this.s<0};Ie.isPositive=Ie.ispos=function(){return this.s>0};Ie.isZero=function(){return this.s===0};Ie.lessThan=Ie.lt=function(e){return this.cmp(e)<0};Ie.lessThanOrEqualTo=Ie.lte=function(e){return this.cmp(e)<1};Ie.logarithm=Ie.log=function(e){var t,n=this,r=n.constructor,a=r.precision,o=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Dr))throw Error(ha+"NaN");if(n.s<1)throw Error(ha+(n.s?"NaN":"-Infinity"));return n.eq(Dr)?new r(0):(an=!1,t=Pi(Nf(n,o),Nf(e,o),o),an=!0,Wt(t,a))};Ie.minus=Ie.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?M8(t,e):R8(t,(e.s=-e.s,e))};Ie.modulo=Ie.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(ha+"NaN");return n.s?(an=!1,t=Pi(n,e,0,1).times(e),an=!0,n.minus(t)):Wt(new r(n),a)};Ie.naturalExponential=Ie.exp=function(){return N8(this)};Ie.naturalLogarithm=Ie.ln=function(){return Nf(this)};Ie.negated=Ie.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ie.plus=Ie.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?R8(t,e):M8(t,(e.s=-e.s,e))};Ie.precision=Ie.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ws+e);if(t=jn(a)+1,r=a.d.length-1,n=r*en+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ie.squareRoot=Ie.sqrt=function(){var e,t,n,r,a,o,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(ha+"NaN")}for(e=jn(c),an=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=Ya(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Uc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new f(t)):r=new f(a.toString()),n=f.precision,a=l=n+3;;)if(o=r,r=o.plus(Pi(c,o,l+2)).times(.5),Ya(o.d).slice(0,l)===(t=Ya(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(Wt(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;l+=4}return an=!0,Wt(r,n)};Ie.times=Ie.mul=function(e){var t,n,r,a,o,l,c,f,d,m=this,h=m.constructor,g=m.d,x=(e=new h(e)).d;if(!m.s||!e.s)return new h(0);for(e.s*=m.s,n=m.e+e.e,f=g.length,d=x.length,f<d&&(o=g,g=x,x=o,l=f,f=d,d=l),o=[],l=f+d,r=l;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,a=f+r;a>r;)c=o[a]+x[r]*g[a-r-1]+t,o[a--]=c%In|0,t=c/In|0;o[a]=(o[a]+t)%In|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,an?Wt(e,h.precision):e};Ie.toDecimalPlaces=Ie.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ei(e,0,Bc),t===void 0?t=r.rounding:ei(t,0,8),Wt(n,e+jn(n)+1,t))};Ie.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Ns(r,!0):(ei(e,0,Bc),t===void 0?t=a.rounding:ei(t,0,8),r=Wt(new a(r),e+1,t),n=Ns(r,!0,e+1)),n};Ie.toFixed=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?Ns(a):(ei(e,0,Bc),t===void 0?t=o.rounding:ei(t,0,8),r=Wt(new o(a),e+jn(a)+1,t),n=Ns(r.abs(),!1,e+jn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Ie.toInteger=Ie.toint=function(){var e=this,t=e.constructor;return Wt(new t(e),jn(e)+1,t.rounding)};Ie.toNumber=function(){return+this};Ie.toPower=Ie.pow=function(e){var t,n,r,a,o,l,c=this,f=c.constructor,d=12,m=+(e=new f(e));if(!e.s)return new f(Dr);if(c=new f(c),!c.s){if(e.s<1)throw Error(ha+"Infinity");return c}if(c.eq(Dr))return c;if(r=f.precision,e.eq(Dr))return Wt(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=c.s,l){if((n=m<0?-m:m)<=C8){for(a=new f(Dr),t=Math.ceil(r/en+4),an=!1;n%2&&(a=a.times(c),zk(a.d,t)),n=Uc(n/2),n!==0;)c=c.times(c),zk(c.d,t);return an=!0,e.s<0?new f(Dr).div(a):Wt(a,r)}}else if(o<0)throw Error(ha+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,an=!1,a=e.times(Nf(c,r+d)),an=!0,a=N8(a),a.s=o,a};Ie.toPrecision=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?(n=jn(a),r=Ns(a,n<=o.toExpNeg||n>=o.toExpPos)):(ei(e,1,Bc),t===void 0?t=o.rounding:ei(t,0,8),a=Wt(new o(a),e,t),n=jn(a),r=Ns(a,e<=n||n<=o.toExpNeg,e)),r};Ie.toSignificantDigits=Ie.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ei(e,1,Bc),t===void 0?t=r.rounding:ei(t,0,8)),Wt(new r(n),e,t)};Ie.toString=Ie.valueOf=Ie.val=Ie.toJSON=Ie[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=jn(e),n=e.constructor;return Ns(e,t<=n.toExpNeg||t>=n.toExpPos)};function R8(e,t){var n,r,a,o,l,c,f,d,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),an?Wt(t,h):t;if(f=e.d,d=t.d,l=e.e,a=t.e,f=f.slice(),o=l-a,o){for(o<0?(r=f,o=-o,c=d.length):(r=d,a=l,c=f.length),l=Math.ceil(h/en),c=l>c?l+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=f.length,o=d.length,c-o<0&&(o=c,r=d,d=f,f=r),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/In|0,f[o]%=In;for(n&&(f.unshift(n),++a),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=a,an?Wt(t,h):t}function ei(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ws+e)}function Ya(e){var t,n,r,a=e.length-1,o="",l=e[0];if(a>0){for(o+=l,t=1;t<a;t++)r=e[t]+"",n=en-r.length,n&&(o+=_o(n)),o+=r;l=e[t],r=l+"",n=en-r.length,n&&(o+=_o(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Pi=(function(){function e(r,a){var o,l=0,c=r.length;for(r=r.slice();c--;)o=r[c]*a+l,r[c]=o%In|0,l=o/In|0;return l&&r.unshift(l),r}function t(r,a,o,l){var c,f;if(o!=l)f=o>l?1:-1;else for(c=f=0;c<o;c++)if(r[c]!=a[c]){f=r[c]>a[c]?1:-1;break}return f}function n(r,a,o){for(var l=0;o--;)r[o]-=l,l=r[o]<a[o]?1:0,r[o]=l*In+r[o]-a[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,o,l){var c,f,d,m,h,g,x,A,S,w,E,O,j,R,C,T,N,D,z=r.constructor,G=r.s==a.s?1:-1,U=r.d,P=a.d;if(!r.s)return new z(r);if(!a.s)throw Error(ha+"Division by zero");for(f=r.e-a.e,N=P.length,C=U.length,x=new z(G),A=x.d=[],d=0;P[d]==(U[d]||0);)++d;if(P[d]>(U[d]||0)&&--f,o==null?O=o=z.precision:l?O=o+(jn(r)-jn(a))+1:O=o,O<0)return new z(0);if(O=O/en+2|0,d=0,N==1)for(m=0,P=P[0],O++;(d<C||m)&&O--;d++)j=m*In+(U[d]||0),A[d]=j/P|0,m=j%P|0;else{for(m=In/(P[0]+1)|0,m>1&&(P=e(P,m),U=e(U,m),N=P.length,C=U.length),R=N,S=U.slice(0,N),w=S.length;w<N;)S[w++]=0;D=P.slice(),D.unshift(0),T=P[0],P[1]>=In/2&&++T;do m=0,c=t(P,S,N,w),c<0?(E=S[0],N!=w&&(E=E*In+(S[1]||0)),m=E/T|0,m>1?(m>=In&&(m=In-1),h=e(P,m),g=h.length,w=S.length,c=t(h,S,g,w),c==1&&(m--,n(h,N<g?D:P,g))):(m==0&&(c=m=1),h=P.slice()),g=h.length,g<w&&h.unshift(0),n(S,h,w),c==-1&&(w=S.length,c=t(P,S,N,w),c<1&&(m++,n(S,N<w?D:P,w))),w=S.length):c===0&&(m++,S=[0]),A[d++]=m,c&&S[0]?S[w++]=U[R]||0:(S=[U[R]],w=1);while((R++<C||S[0]!==void 0)&&O--)}return A[0]||A.shift(),x.e=f,Wt(x,l?o+jn(x)+1:o)}})();function N8(e,t){var n,r,a,o,l,c,f=0,d=0,m=e.constructor,h=m.precision;if(jn(e)>16)throw Error(oO+jn(e));if(!e.s)return new m(Dr);for(an=!1,c=h,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(hs(2,d))/Math.LN10*2+5|0,c+=r,n=a=o=new m(Dr),m.precision=c;;){if(a=Wt(a.times(e),c),n=n.times(++f),l=o.plus(Pi(a,n,c)),Ya(l.d).slice(0,c)===Ya(o.d).slice(0,c)){for(;d--;)o=Wt(o.times(o),c);return m.precision=h,t==null?(an=!0,Wt(o,h)):o}o=l}}function jn(e){for(var t=e.e*en,n=e.d[0];n>=10;n/=10)t++;return t}function w1(e,t,n){if(t>e.LN10.sd())throw an=!0,n&&(e.precision=n),Error(ha+"LN10 precision limit exceeded");return Wt(new e(e.LN10),t)}function _o(e){for(var t="";e--;)t+="0";return t}function Nf(e,t){var n,r,a,o,l,c,f,d,m,h=1,g=10,x=e,A=x.d,S=x.constructor,w=S.precision;if(x.s<1)throw Error(ha+(x.s?"NaN":"-Infinity"));if(x.eq(Dr))return new S(0);if(t==null?(an=!1,d=w):d=t,x.eq(10))return t==null&&(an=!0),w1(S,d);if(d+=g,S.precision=d,n=Ya(A),r=n.charAt(0),o=jn(x),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=Ya(x.d),r=n.charAt(0),h++;o=jn(x),r>1?(x=new S("0."+n),o++):x=new S(r+"."+n.slice(1))}else return f=w1(S,d+2,w).times(o+""),x=Nf(new S(r+"."+n.slice(1)),d-g).plus(f),S.precision=w,t==null?(an=!0,Wt(x,w)):x;for(c=l=x=Pi(x.minus(Dr),x.plus(Dr),d),m=Wt(x.times(x),d),a=3;;){if(l=Wt(l.times(m),d),f=c.plus(Pi(l,new S(a),d)),Ya(f.d).slice(0,d)===Ya(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(w1(S,d+2,w).times(o+""))),c=Pi(c,new S(h),d),S.precision=w,t==null?(an=!0,Wt(c,w)):c;c=f,a+=2}}function $k(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Uc(n/en),e.d=[],r=(n+1)%en,n<0&&(r+=en),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=en;r<a;)e.d.push(+t.slice(r,r+=en));t=t.slice(r),r=en-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),an&&(e.e>jm||e.e<-jm))throw Error(oO+n)}else e.s=0,e.e=0,e.d=[0];return e}function Wt(e,t,n){var r,a,o,l,c,f,d,m,h=e.d;for(l=1,o=h[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=en,a=t,d=h[m=0];else{if(m=Math.ceil((r+1)/en),o=h.length,m>=o)return e;for(d=o=h[m],l=1;o>=10;o/=10)l++;r%=en,a=r-en+l}if(n!==void 0&&(o=hs(10,l-a-1),c=d/o%10|0,f=t<0||h[m+1]!==void 0||d%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(r>0?a>0?d/hs(10,l-a):0:h[m-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return f?(o=jn(e),h.length=1,t=t-o-1,h[0]=hs(10,(en-t%en)%en),e.e=Uc(-t/en)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=m,o=1,m--):(h.length=m+1,o=hs(10,en-r),h[m]=a>0?(d/hs(10,l-a)%hs(10,a)|0)*o:0),f)for(;;)if(m==0){(h[0]+=o)==In&&(h[0]=1,++e.e);break}else{if(h[m]+=o,h[m]!=In)break;h[m--]=0,o=1}for(r=h.length;h[--r]===0;)h.pop();if(an&&(e.e>jm||e.e<-jm))throw Error(oO+jn(e));return e}function M8(e,t){var n,r,a,o,l,c,f,d,m,h,g=e.constructor,x=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),an?Wt(t,x):t;if(f=e.d,h=t.d,r=t.e,d=e.e,f=f.slice(),l=d-r,l){for(m=l<0,m?(n=f,l=-l,c=h.length):(n=h,r=d,c=f.length),a=Math.max(Math.ceil(x/en),c)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=f.length,c=h.length,m=a<c,m&&(c=a),a=0;a<c;a++)if(f[a]!=h[a]){m=f[a]<h[a];break}l=0}for(m&&(n=f,f=h,h=n,t.s=-t.s),c=f.length,a=h.length-c;a>0;--a)f[c++]=0;for(a=h.length;a>l;){if(f[--a]<h[a]){for(o=a;o&&f[--o]===0;)f[o]=In-1;--f[o],f[a]+=In}f[a]-=h[a]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,an?Wt(t,x):t):new g(0)}function Ns(e,t,n){var r,a=jn(e),o=Ya(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+_o(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+_o(-a-1)+o,n&&(r=n-l)>0&&(o+=_o(r))):a>=l?(o+=_o(a+1-l),n&&(r=n-a-1)>0&&(o=o+"."+_o(r))):((r=a+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(o+="."),o+=_o(r))),e.s<0?"-"+o:o}function zk(e,t){if(e.length>t)return e.length=t,!0}function P8(e){var t,n,r;function a(o){var l=this;if(!(l instanceof a))return new a(o);if(l.constructor=a,o instanceof a){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ws+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return $k(l,o.toString())}else if(typeof o!="string")throw Error(ws+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,Jde.test(o))$k(l,o);else throw Error(ws+o)}if(a.prototype=Ie,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=P8,a.config=a.set=ehe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function ehe(e){if(!e||typeof e!="object")throw Error(ha+"Object expected");var t,n,r,a=["precision",1,Bc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(Uc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(ws+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ws+n+": "+r);return this}var sO=P8(Qde);Dr=new sO(1);const Ut=sO;function the(e){return ihe(e)||ahe(e)||rhe(e)||nhe()}function nhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
467
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rhe(e,t){if(e){if(typeof e=="string")return s_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s_(e,t)}}function ahe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ihe(e){if(Array.isArray(e))return s_(e)}function s_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ohe=function(t){return t},D8={},k8=function(t){return t===D8},Lk=function(t){return function n(){return arguments.length===0||arguments.length===1&&k8(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},she=function e(t,n){return t===1?n:Lk(function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];var l=a.filter(function(c){return c!==D8}).length;return l>=t?n.apply(void 0,a):e(t-l,Lk(function(){for(var c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];var m=a.map(function(h){return k8(h)?f.shift():h});return n.apply(void 0,the(m).concat(f))}))})},ag=function(t){return she(t.length,t)},l_=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},lhe=ag(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),che=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return ohe;var a=n.reverse(),o=a[0],l=a.slice(1);return function(){return l.reduce(function(c,f){return f(c)},o.apply(void 0,arguments))}},c_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},$8=function(t){var n=null,r=null;return function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return n&&o.every(function(c,f){return c===n[f]})||(n=o,r=t.apply(void 0,o)),r}};function uhe(e){var t;return e===0?t=1:t=Math.floor(new Ut(e).abs().log(10).toNumber())+1,t}function fhe(e,t,n){for(var r=new Ut(e),a=0,o=[];r.lt(t)&&a<1e5;)o.push(r.toNumber()),r=r.add(n),a++;return o}var dhe=ag(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),hhe=ag(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),phe=ag(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const ig={rangeStep:fhe,getDigitCount:uhe,interpolateNumber:dhe,uninterpolateNumber:hhe,uninterpolateTruncation:phe};function u_(e){return ghe(e)||vhe(e)||z8(e)||mhe()}function mhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
468
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vhe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ghe(e){if(Array.isArray(e))return f_(e)}function Mf(e,t){return xhe(e)||bhe(e,t)||z8(e,t)||yhe()}function yhe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
469
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z8(e,t){if(e){if(typeof e=="string")return f_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f_(e,t)}}function f_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bhe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=void 0;try{for(var l=e[Symbol.iterator](),c;!(r=(c=l.next()).done)&&(n.push(c.value),!(t&&n.length===t));r=!0);}catch(f){a=!0,o=f}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function xhe(e){if(Array.isArray(e))return e}function L8(e){var t=Mf(e,2),n=t[0],r=t[1],a=n,o=r;return n>r&&(a=r,o=n),[a,o]}function I8(e,t,n){if(e.lte(0))return new Ut(0);var r=ig.getDigitCount(e.toNumber()),a=new Ut(10).pow(r),o=e.div(a),l=r!==1?.05:.1,c=new Ut(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=c.mul(a);return t?f:new Ut(Math.ceil(f))}function whe(e,t,n){var r=1,a=new Ut(e);if(!a.isint()&&n){var o=Math.abs(e);o<1?(r=new Ut(10).pow(ig.getDigitCount(e)-1),a=new Ut(Math.floor(a.div(r).toNumber())).mul(r)):o>1&&(a=new Ut(Math.floor(e)))}else e===0?a=new Ut(Math.floor((t-1)/2)):n||(a=new Ut(Math.floor(e)));var l=Math.floor((t-1)/2),c=che(lhe(function(f){return a.add(new Ut(f-l).mul(r)).toNumber()}),l_);return c(0,t)}function B8(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ut(0),tickMin:new Ut(0),tickMax:new Ut(0)};var o=I8(new Ut(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Ut(0):(l=new Ut(e).add(t).div(2),l=l.sub(new Ut(l).mod(o)));var c=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new Ut(t).sub(l).div(o).toNumber()),d=c+f+1;return d>n?B8(e,t,n,r,a+1):(d<n&&(f=t>0?f+(n-d):f,c=t>0?c:c+(n-d)),{step:o,tickMin:l.sub(new Ut(c).mul(o)),tickMax:l.add(new Ut(f).mul(o))})}function She(e){var t=Mf(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),c=L8([n,r]),f=Mf(c,2),d=f[0],m=f[1];if(d===-1/0||m===1/0){var h=m===1/0?[d].concat(u_(l_(0,a-1).map(function(){return 1/0}))):[].concat(u_(l_(0,a-1).map(function(){return-1/0})),[m]);return n>r?c_(h):h}if(d===m)return whe(d,a,o);var g=B8(d,m,l,o),x=g.step,A=g.tickMin,S=g.tickMax,w=ig.rangeStep(A,S.add(new Ut(.1).mul(x)),x);return n>r?c_(w):w}function _he(e,t){var n=Mf(e,2),r=n[0],a=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=L8([r,a]),c=Mf(l,2),f=c[0],d=c[1];if(f===-1/0||d===1/0)return[r,a];if(f===d)return[f];var m=Math.max(t,2),h=I8(new Ut(d).sub(f).div(m-1),o,0),g=[].concat(u_(ig.rangeStep(new Ut(f),new Ut(d).sub(new Ut(.99).mul(h)),h)),[d]);return r>a?c_(g):g}var Ahe=$8(She),Ehe=$8(_he),Ohe="Invariant failed";function Ms(e,t){throw new Error(Ohe)}var jhe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function sc(e){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sc(e)}function Tm(){return Tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tm.apply(this,arguments)}function The(e,t){return Mhe(e)||Nhe(e,t)||Rhe(e,t)||Che()}function Che(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
470
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rhe(e,t){if(e){if(typeof e=="string")return Ik(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ik(e,t)}}function Ik(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Mhe(e){if(Array.isArray(e))return e}function Phe(e,t){if(e==null)return{};var n=Dhe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dhe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function khe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H8(r.key),r)}}function zhe(e,t,n){return t&&$he(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lhe(e,t,n){return t=Cm(t),Ihe(e,U8()?Reflect.construct(t,n||[],Cm(e).constructor):t.apply(e,n))}function Ihe(e,t){if(t&&(sc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bhe(e)}function Bhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U8=function(){return!!e})()}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cm(e)}function Uhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d_(e,t)}function d_(e,t){return d_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},d_(e,t)}function q8(e,t,n){return t=H8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H8(e){var t=qhe(e,"string");return sc(t)=="symbol"?t:t+""}function qhe(e,t){if(sc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var og=(function(e){function t(){return khe(this,t),Lhe(this,t,arguments)}return Uhe(t,e),zhe(t,[{key:"render",value:function(){var r=this.props,a=r.offset,o=r.layout,l=r.width,c=r.dataKey,f=r.data,d=r.dataPointFormatter,m=r.xAxis,h=r.yAxis,g=Phe(r,jhe),x=mt(g,!1);this.props.direction==="x"&&m.type!=="number"&&Ms();var A=f.map(function(S){var w=d(S,c),E=w.x,O=w.y,j=w.value,R=w.errorVal;if(!R)return null;var C=[],T,N;if(Array.isArray(R)){var D=The(R,2);T=D[0],N=D[1]}else T=N=R;if(o==="vertical"){var z=m.scale,G=O+a,U=G+l,P=G-l,B=z(j-T),q=z(j+N);C.push({x1:q,y1:U,x2:q,y2:P}),C.push({x1:B,y1:G,x2:q,y2:G}),C.push({x1:B,y1:U,x2:B,y2:P})}else if(o==="horizontal"){var W=h.scale,$=E+a,V=$-l,F=$+l,K=W(j-T),ie=W(j+N);C.push({x1:V,y1:ie,x2:F,y2:ie}),C.push({x1:$,y1:K,x2:$,y2:ie}),C.push({x1:V,y1:K,x2:F,y2:K})}return L.createElement(cn,Tm({className:"recharts-errorBar",key:"bar-".concat(C.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},x),C.map(function(I){return L.createElement("line",Tm({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return L.createElement(cn,{className:"recharts-errorBars"},A)}}])})(L.Component);q8(og,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});q8(og,"displayName","ErrorBar");function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function Bk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function us(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bk(Object(n),!0).forEach(function(r){Hhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hhe(e,t,n){return t=Fhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fhe(e){var t=Vhe(e,"string");return Pf(t)=="symbol"?t:t+""}function Vhe(e,t){if(Pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F8=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,o=t.legendContent,l=Rr(n,Fl);if(!l)return null;var c=Fl.defaultProps,f=c!==void 0?us(us({},c),l.props):{},d;return l.props&&l.props.payload?d=l.props&&l.props.payload:o==="children"?d=(r||[]).reduce(function(m,h){var g=h.item,x=h.props,A=x.sectors||x.data||[];return m.concat(A.map(function(S){return{type:l.props.iconType||g.props.legendType,value:S.name,color:S.fill,payload:S}}))},[]):d=(r||[]).map(function(m){var h=m.item,g=h.type.defaultProps,x=g!==void 0?us(us({},g),h.props):{},A=x.dataKey,S=x.name,w=x.legendType,E=x.hide;return{inactive:E,dataKey:A,type:f.iconType||w||"square",color:lO(h),value:S||A,payload:x}}),us(us(us({},f),Fl.getWithHeight(l,a)),{},{payload:d,item:l})};function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function Uk(e){return Khe(e)||Yhe(e)||Whe(e)||Ghe()}function Ghe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
471
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Whe(e,t){if(e){if(typeof e=="string")return h_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h_(e,t)}}function Yhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Khe(e){if(Array.isArray(e))return h_(e)}function h_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(n),!0).forEach(function(r){Gl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gl(e,t,n){return t=Zhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zhe(e){var t=Xhe(e,"string");return Df(t)=="symbol"?t:t+""}function Xhe(e,t){if(Df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Br(e,t,n){return yt(e)||yt(t)?n:kn(t)?fa(e,t,n):lt(t)?t(e):n}function lf(e,t,n,r){var a=Kde(e,function(c){return Br(c,t)});if(n==="number"){var o=a.filter(function(c){return Me(c)||parseFloat(c)});return o.length?[rg(o),Eo(o)]:[1/0,-1/0]}var l=r?a.filter(function(c){return!yt(c)}):a;return l.map(function(c){return kn(c)||c instanceof Date?c:""})}var Qhe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,c=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(c<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var f=o.range,d=0;d<c;d++){var m=d>0?a[d-1].coordinate:a[c-1].coordinate,h=a[d].coordinate,g=d>=c-1?a[0].coordinate:a[d+1].coordinate,x=void 0;if(Ca(h-m)!==Ca(g-h)){var A=[];if(Ca(g-h)===Ca(f[1]-f[0])){x=g;var S=h+f[1]-f[0];A[0]=Math.min(S,(S+m)/2),A[1]=Math.max(S,(S+m)/2)}else{x=m;var w=g+f[1]-f[0];A[0]=Math.min(h,(w+h)/2),A[1]=Math.max(h,(w+h)/2)}var E=[Math.min(h,(x+h)/2),Math.max(h,(x+h)/2)];if(t>E[0]&&t<=E[1]||t>=A[0]&&t<=A[1]){l=a[d].index;break}}else{var O=Math.min(m,g),j=Math.max(m,g);if(t>(O+h)/2&&t<=(j+h)/2){l=a[d].index;break}}}else for(var R=0;R<c;R++)if(R===0&&t<=(r[R].coordinate+r[R+1].coordinate)/2||R>0&&R<c-1&&t>(r[R].coordinate+r[R-1].coordinate)/2&&t<=(r[R].coordinate+r[R+1].coordinate)/2||R===c-1&&t>(r[R].coordinate+r[R-1].coordinate)/2){l=r[R].index;break}return l},lO=function(t){var n,r=t,a=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?pn(pn({},t.type.defaultProps),t.props):t.props,l=o.stroke,c=o.fill,f;switch(a){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:c;break;default:f=c;break}return f},Jhe=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var l={},c=Object.keys(o),f=0,d=c.length;f<d;f++)for(var m=o[c[f]].stackGroups,h=Object.keys(m),g=0,x=h.length;g<x;g++){var A=m[h[g]],S=A.items,w=A.cateAxisId,E=S.filter(function(N){return Ni(N.type).indexOf("Bar")>=0});if(E&&E.length){var O=E[0].type.defaultProps,j=O!==void 0?pn(pn({},O),E[0].props):E[0].props,R=j.barSize,C=j[w];l[C]||(l[C]=[]);var T=yt(R)?n:R;l[C].push({item:E[0],stackList:E.slice(1),barSize:yt(T)?void 0:Rs(T,r,0)})}}return l},epe=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,c=t.maxBarSize,f=l.length;if(f<1)return null;var d=Rs(n,a,0,!0),m,h=[];if(l[0].barSize===+l[0].barSize){var g=!1,x=a/f,A=l.reduce(function(R,C){return R+C.barSize||0},0);A+=(f-1)*d,A>=a&&(A-=(f-1)*d,d=0),A>=a&&x>0&&(g=!0,x*=.9,A=f*x);var S=(a-A)/2>>0,w={offset:S-d,size:0};m=l.reduce(function(R,C){var T={item:C.item,position:{offset:w.offset+w.size+d,size:g?x:C.barSize}},N=[].concat(Uk(R),[T]);return w=N[N.length-1].position,C.stackList&&C.stackList.length&&C.stackList.forEach(function(D){N.push({item:D,position:w})}),N},h)}else{var E=Rs(r,a,0,!0);a-2*E-(f-1)*d<=0&&(d=0);var O=(a-2*E-(f-1)*d)/f;O>1&&(O>>=0);var j=c===+c?Math.min(O,c):O;m=l.reduce(function(R,C,T){var N=[].concat(Uk(R),[{item:C.item,position:{offset:E+(O+d)*T+(O-j)/2,size:j}}]);return C.stackList&&C.stackList.length&&C.stackList.forEach(function(D){N.push({item:D,position:N[N.length-1].position})}),N},h)}return m},tpe=function(t,n,r,a){var o=r.children,l=r.width,c=r.margin,f=l-(c.left||0)-(c.right||0),d=F8({children:o,legendWidth:f});if(d){var m=a||{},h=m.width,g=m.height,x=d.align,A=d.verticalAlign,S=d.layout;if((S==="vertical"||S==="horizontal"&&A==="middle")&&x!=="center"&&Me(t[x]))return pn(pn({},t),{},Gl({},x,t[x]+(h||0)));if((S==="horizontal"||S==="vertical"&&x==="center")&&A!=="middle"&&Me(t[A]))return pn(pn({},t),{},Gl({},A,t[A]+(g||0)))}return t},npe=function(t,n,r){return yt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},V8=function(t,n,r,a,o){var l=n.props.children,c=Ma(l,og).filter(function(d){return npe(a,o,d.props.direction)});if(c&&c.length){var f=c.map(function(d){return d.props.dataKey});return t.reduce(function(d,m){var h=Br(m,r);if(yt(h))return d;var g=Array.isArray(h)?[rg(h),Eo(h)]:[h,h],x=f.reduce(function(A,S){var w=Br(m,S,0),E=g[0]-Math.abs(Array.isArray(w)?w[0]:w),O=g[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(E,A[0]),Math.max(O,A[1])]},[1/0,-1/0]);return[Math.min(x[0],d[0]),Math.max(x[1],d[1])]},[1/0,-1/0])}return null},rpe=function(t,n,r,a,o){var l=n.map(function(c){return V8(t,c,r,o,a)}).filter(function(c){return!yt(c)});return l&&l.length?l.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]):null},G8=function(t,n,r,a,o){var l=n.map(function(f){var d=f.props.dataKey;return r==="number"&&d&&V8(t,f,d,a)||lf(t,d,r,o)});if(r==="number")return l.reduce(function(f,d){return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);var c={};return l.reduce(function(f,d){for(var m=0,h=d.length;m<h;m++)c[d[m]]||(c[d[m]]=!0,f.push(d[m]));return f},[])},W8=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Y8=function(t,n,r,a){if(a)return t.map(function(f){return f.coordinate});var o,l,c=t.map(function(f){return f.coordinate===n&&(o=!0),f.coordinate===r&&(l=!0),f.coordinate});return o||c.push(n),l||c.push(r),c},Ti=function(t,n,r){if(!t)return null;var a=t.scale,o=t.duplicateDomain,l=t.type,c=t.range,f=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,d=(n||r)&&l==="category"&&a.bandwidth?a.bandwidth()/f:0;if(d=t.axisType==="angleAxis"&&(c==null?void 0:c.length)>=2?Ca(c[0]-c[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(h){var g=o?o.indexOf(h):h;return{coordinate:a(g)+d,value:h,offset:d}});return m.filter(function(h){return!$c(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,g){return{coordinate:a(h)+d,value:h,index:g,offset:d}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(h){return{coordinate:a(h)+d,value:h,offset:d}}):a.domain().map(function(h,g){return{coordinate:a(h)+d,value:o?o[h]:h,index:g,offset:d}})},S1=new WeakMap,dp=function(t,n){if(typeof n!="function")return t;S1.has(t)||S1.set(t,new WeakMap);var r=S1.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},ape=function(t,n,r){var a=t.scale,o=t.type,l=t.layout,c=t.axisType;if(a==="auto")return l==="radial"&&c==="radiusAxis"?{scale:Ef(),realScaleType:"band"}:l==="radial"&&c==="angleAxis"?{scale:_m(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:sf(),realScaleType:"point"}:o==="category"?{scale:Ef(),realScaleType:"band"}:{scale:_m(),realScaleType:"linear"};if(Cs(a)){var f="scale".concat(Fv(a));return{scale:(jk[f]||sf)(),realScaleType:jk[f]?f:"point"}}return lt(a)?{scale:a}:{scale:sf(),realScaleType:"point"}},Hk=1e-4,ipe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),o=Math.min(a[0],a[1])-Hk,l=Math.max(a[0],a[1])+Hk,c=t(n[0]),f=t(n[r-1]);(c<o||c>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},ope=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},spe=function(t,n){if(!n||n.length!==2||!Me(n[0])||!Me(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!Me(t[0])||t[0]<r)&&(o[0]=r),(!Me(t[1])||t[1]>a)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]<r&&(o[1]=r),o},lpe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0,c=0;c<n;++c){var f=$c(t[c][r][1])?t[c][r][0]:t[c][r][1];f>=0?(t[c][r][0]=o,t[c][r][1]=o+f,o=t[c][r][1]):(t[c][r][0]=l,t[c][r][1]=l+f,l=t[c][r][1])}},cpe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0;l<n;++l){var c=$c(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},upe={sign:lpe,expand:Goe,none:Jl,silhouette:Woe,wiggle:Yoe,positive:cpe},fpe=function(t,n,r){var a=n.map(function(c){return c.props.dataKey}),o=upe[r],l=Voe().keys(a).value(function(c,f){return+Br(c,f,0)}).order(HS).offset(o);return l(t)},dpe=function(t,n,r,a,o,l){if(!t)return null;var c=l?n.reverse():n,f={},d=c.reduce(function(h,g){var x,A=(x=g.type)!==null&&x!==void 0&&x.defaultProps?pn(pn({},g.type.defaultProps),g.props):g.props,S=A.stackId,w=A.hide;if(w)return h;var E=A[r],O=h[E]||{hasStack:!1,stackGroups:{}};if(kn(S)){var j=O.stackGroups[S]||{numericAxisId:r,cateAxisId:a,items:[]};j.items.push(g),O.hasStack=!0,O.stackGroups[S]=j}else O.stackGroups[jd("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[g]};return pn(pn({},h),{},Gl({},E,O))},f),m={};return Object.keys(d).reduce(function(h,g){var x=d[g];if(x.hasStack){var A={};x.stackGroups=Object.keys(x.stackGroups).reduce(function(S,w){var E=x.stackGroups[w];return pn(pn({},S),{},Gl({},w,{numericAxisId:r,cateAxisId:a,items:E.items,stackedData:fpe(t,E.items,o)}))},A)}return pn(pn({},h),{},Gl({},g,x))},m)},hpe=function(t,n){var r=n.realScaleType,a=n.type,o=n.tickCount,l=n.originalDomain,c=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(o&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var d=t.domain();if(!d.length)return null;var m=Ahe(d,o,c);return t.domain([rg(m),Eo(m)]),{niceTicks:m}}if(o&&a==="number"){var h=t.domain(),g=Ehe(h,o,c);return{niceTicks:g}}return null};function Fk(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,o=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!yt(a[t.dataKey])){var c=nm(n,"value",a[t.dataKey]);if(c)return c.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=Br(a,yt(l)?t.dataKey:l);return yt(f)?null:t.scale(f)}var Vk=function(t){var n=t.axis,r=t.ticks,a=t.offset,o=t.bandSize,l=t.entry,c=t.index;if(n.type==="category")return r[c]?r[c].coordinate+a:null;var f=Br(l,n.dataKey,n.domain[c]);return yt(f)?null:n.scale(f)-o/2+a},ppe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return a<=0&&o>=0?0:o<0?o:a}return r[0]},mpe=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?pn(pn({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(kn(o)){var l=n[o];if(l){var c=l.items.indexOf(t);return c>=0?l.stackedData[c]:null}}return null},vpe=function(t){return t.reduce(function(n,r){return[rg(r.concat([n[0]]).filter(Me)),Eo(r.concat([n[1]]).filter(Me))]},[1/0,-1/0])},K8=function(t,n,r){return Object.keys(t).reduce(function(a,o){var l=t[o],c=l.stackedData,f=c.reduce(function(d,m){var h=vpe(m.slice(n,r+1));return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]);return[Math.min(f[0],a[0]),Math.max(f[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},Gk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Wk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p_=function(t,n,r){if(lt(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Me(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(Gk.test(t[0])){var o=+Gk.exec(t[0])[1];a[0]=n[0]-o}else lt(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Me(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(Wk.test(t[1])){var l=+Wk.exec(t[1])[1];a[1]=n[1]+l}else lt(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},Rm=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var o=$E(n,function(h){return h.coordinate}),l=1/0,c=1,f=o.length;c<f;c++){var d=o[c],m=o[c-1];l=Math.min((d.coordinate||0)-(m.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},Yk=function(t,n,r){return!t||!t.length||Rf(t,fa(r,"type.defaultProps.domain"))?n:t},Z8=function(t,n){var r=t.type.defaultProps?pn(pn({},t.type.defaultProps),t.props):t.props,a=r.dataKey,o=r.name,l=r.unit,c=r.formatter,f=r.tooltipType,d=r.chartType,m=r.hide;return pn(pn({},mt(t,!1)),{},{dataKey:a,unit:l,formatter:c,name:o||a,color:lO(t),value:Br(n,a),type:f,payload:n,chartType:d,hide:m})};function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}function Kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kk(Object(n),!0).forEach(function(r){gpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gpe(e,t,n){return t=ype(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ype(e){var t=bpe(e,"string");return kf(t)=="symbol"?t:t+""}function bpe(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nm=Math.PI/180,xpe=function(t){return t*180/Math.PI},Kn=function(t,n,r,a){return{x:t+Math.cos(-Nm*a)*r,y:n+Math.sin(-Nm*a)*r}},wpe=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(a-l,2))},Spe=function(t,n){var r=t.x,a=t.y,o=n.cx,l=n.cy,c=wpe({x:r,y:a},{x:o,y:l});if(c<=0)return{radius:c};var f=(r-o)/c,d=Math.acos(f);return a>l&&(d=2*Math.PI-d),{radius:c,angle:xpe(d),angleInRadian:d}},_pe=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(a,o);return{startAngle:n-l*360,endAngle:r-l*360}},Ape=function(t,n){var r=n.startAngle,a=n.endAngle,o=Math.floor(r/360),l=Math.floor(a/360),c=Math.min(o,l);return t+c*360},Xk=function(t,n){var r=t.x,a=t.y,o=Spe({x:r,y:a},n),l=o.radius,c=o.angle,f=n.innerRadius,d=n.outerRadius;if(l<f||l>d)return!1;if(l===0)return!0;var m=_pe(n),h=m.startAngle,g=m.endAngle,x=c,A;if(h<=g){for(;x>g;)x-=360;for(;x<h;)x+=360;A=x>=h&&x<=g}else{for(;x>h;)x-=360;for(;x<g;)x+=360;A=x>=g&&x<=h}return A?Zk(Zk({},n),{},{radius:l,angle:Ape(x,n)}):null};function $f(e){"@babel/helpers - typeof";return $f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(e)}var Epe=["offset"];function Ope(e){return Rpe(e)||Cpe(e)||Tpe(e)||jpe()}function jpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
472
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tpe(e,t){if(e){if(typeof e=="string")return m_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m_(e,t)}}function Cpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rpe(e){if(Array.isArray(e))return m_(e)}function m_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Npe(e,t){if(e==null)return{};var n=Mpe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mpe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qk(Object(n),!0).forEach(function(r){Ppe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ppe(e,t,n){return t=Dpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dpe(e){var t=kpe(e,"string");return $f(t)=="symbol"?t:t+""}function kpe(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zf(){return zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zf.apply(this,arguments)}var $pe=function(t){var n=t.value,r=t.formatter,a=yt(t.children)?n:t.children;return lt(r)?r(a):a},zpe=function(t,n){var r=Ca(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Lpe=function(t,n,r){var a=t.position,o=t.viewBox,l=t.offset,c=t.className,f=o,d=f.cx,m=f.cy,h=f.innerRadius,g=f.outerRadius,x=f.startAngle,A=f.endAngle,S=f.clockWise,w=(h+g)/2,E=zpe(x,A),O=E>=0?1:-1,j,R;a==="insideStart"?(j=x+O*l,R=S):a==="insideEnd"?(j=A-O*l,R=!S):a==="end"&&(j=A+O*l,R=S),R=E<=0?R:!R;var C=Kn(d,m,w,j),T=Kn(d,m,w,j+(R?1:-1)*359),N="M".concat(C.x,",").concat(C.y,`
473
- A`).concat(w,",").concat(w,",0,1,").concat(R?0:1,`,
474
- `).concat(T.x,",").concat(T.y),D=yt(t.id)?jd("recharts-radial-line-"):t.id;return L.createElement("text",zf({},r,{dominantBaseline:"central",className:xt("recharts-radial-bar-label",c)}),L.createElement("defs",null,L.createElement("path",{id:D,d:N})),L.createElement("textPath",{xlinkHref:"#".concat(D)},n))},Ipe=function(t){var n=t.viewBox,r=t.offset,a=t.position,o=n,l=o.cx,c=o.cy,f=o.innerRadius,d=o.outerRadius,m=o.startAngle,h=o.endAngle,g=(m+h)/2;if(a==="outside"){var x=Kn(l,c,d+r,g),A=x.x,S=x.y;return{x:A,y:S,textAnchor:A>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"end"};var w=(f+d)/2,E=Kn(l,c,w,g),O=E.x,j=E.y;return{x:O,y:j,textAnchor:"middle",verticalAnchor:"middle"}},Bpe=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,o=t.position,l=n,c=l.x,f=l.y,d=l.width,m=l.height,h=m>=0?1:-1,g=h*a,x=h>0?"end":"start",A=h>0?"start":"end",S=d>=0?1:-1,w=S*a,E=S>0?"end":"start",O=S>0?"start":"end";if(o==="top"){var j={x:c+d/2,y:f-h*a,textAnchor:"middle",verticalAnchor:x};return Dn(Dn({},j),r?{height:Math.max(f-r.y,0),width:d}:{})}if(o==="bottom"){var R={x:c+d/2,y:f+m+g,textAnchor:"middle",verticalAnchor:A};return Dn(Dn({},R),r?{height:Math.max(r.y+r.height-(f+m),0),width:d}:{})}if(o==="left"){var C={x:c-w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"};return Dn(Dn({},C),r?{width:Math.max(C.x-r.x,0),height:m}:{})}if(o==="right"){var T={x:c+d+w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"};return Dn(Dn({},T),r?{width:Math.max(r.x+r.width-T.x,0),height:m}:{})}var N=r?{width:d,height:m}:{};return o==="insideLeft"?Dn({x:c+w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"},N):o==="insideRight"?Dn({x:c+d-w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"},N):o==="insideTop"?Dn({x:c+d/2,y:f+g,textAnchor:"middle",verticalAnchor:A},N):o==="insideBottom"?Dn({x:c+d/2,y:f+m-g,textAnchor:"middle",verticalAnchor:x},N):o==="insideTopLeft"?Dn({x:c+w,y:f+g,textAnchor:O,verticalAnchor:A},N):o==="insideTopRight"?Dn({x:c+d-w,y:f+g,textAnchor:E,verticalAnchor:A},N):o==="insideBottomLeft"?Dn({x:c+w,y:f+m-g,textAnchor:O,verticalAnchor:x},N):o==="insideBottomRight"?Dn({x:c+d-w,y:f+m-g,textAnchor:E,verticalAnchor:x},N):kc(o)&&(Me(o.x)||ms(o.x))&&(Me(o.y)||ms(o.y))?Dn({x:c+Rs(o.x,d),y:f+Rs(o.y,m),textAnchor:"end",verticalAnchor:"end"},N):Dn({x:c+d/2,y:f+m/2,textAnchor:"middle",verticalAnchor:"middle"},N)},Upe=function(t){return"cx"in t&&Me(t.cx)};function rr(e){var t=e.offset,n=t===void 0?5:t,r=Npe(e,Epe),a=Dn({offset:n},r),o=a.viewBox,l=a.position,c=a.value,f=a.children,d=a.content,m=a.className,h=m===void 0?"":m,g=a.textBreakAll;if(!o||yt(c)&&yt(f)&&!y.isValidElement(d)&&!lt(d))return null;if(y.isValidElement(d))return y.cloneElement(d,a);var x;if(lt(d)){if(x=y.createElement(d,a),y.isValidElement(x))return x}else x=$pe(a);var A=Upe(o),S=mt(a,!0);if(A&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Lpe(a,x,S);var w=A?Ipe(a):Bpe(a);return L.createElement(mm,zf({className:xt("recharts-label",h)},S,w,{breakAll:g}),x)}rr.displayName="Label";var X8=function(t){var n=t.cx,r=t.cy,a=t.angle,o=t.startAngle,l=t.endAngle,c=t.r,f=t.radius,d=t.innerRadius,m=t.outerRadius,h=t.x,g=t.y,x=t.top,A=t.left,S=t.width,w=t.height,E=t.clockWise,O=t.labelViewBox;if(O)return O;if(Me(S)&&Me(w)){if(Me(h)&&Me(g))return{x:h,y:g,width:S,height:w};if(Me(x)&&Me(A))return{x,y:A,width:S,height:w}}return Me(h)&&Me(g)?{x:h,y:g,width:0,height:0}:Me(n)&&Me(r)?{cx:n,cy:r,startAngle:o||a||0,endAngle:l||a||0,innerRadius:d||0,outerRadius:m||f||c||0,clockWise:E}:t.viewBox?t.viewBox:{}},qpe=function(t,n){return t?t===!0?L.createElement(rr,{key:"label-implicit",viewBox:n}):kn(t)?L.createElement(rr,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===rr?y.cloneElement(t,{key:"label-implicit",viewBox:n}):L.createElement(rr,{key:"label-implicit",content:t,viewBox:n}):lt(t)?L.createElement(rr,{key:"label-implicit",content:t,viewBox:n}):kc(t)?L.createElement(rr,zf({viewBox:n},t,{key:"label-implicit"})):null:null},Hpe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,o=X8(t),l=Ma(a,rr).map(function(f,d){return y.cloneElement(f,{viewBox:n||o,key:"label-".concat(d)})});if(!r)return l;var c=qpe(t.label,n||o);return[c].concat(Ope(l))};rr.parseViewBox=X8;rr.renderCallByParent=Hpe;var _1,Jk;function Fpe(){if(Jk)return _1;Jk=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return _1=e,_1}var Vpe=Fpe();const Gpe=Ht(Vpe);function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}var Wpe=["valueAccessor"],Ype=["data","dataKey","clockWise","id","textBreakAll"];function Kpe(e){return Jpe(e)||Qpe(e)||Xpe(e)||Zpe()}function Zpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
475
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xpe(e,t){if(e){if(typeof e=="string")return v_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v_(e,t)}}function Qpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jpe(e){if(Array.isArray(e))return v_(e)}function v_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mm(){return Mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mm.apply(this,arguments)}function e$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function t$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e$(Object(n),!0).forEach(function(r){eme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eme(e,t,n){return t=tme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tme(e){var t=nme(e,"string");return Lf(t)=="symbol"?t:t+""}function nme(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function n$(e,t){if(e==null)return{};var n=rme(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ame=function(t){return Array.isArray(t.value)?Gpe(t.value):t.value};function To(e){var t=e.valueAccessor,n=t===void 0?ame:t,r=n$(e,Wpe),a=r.data,o=r.dataKey,l=r.clockWise,c=r.id,f=r.textBreakAll,d=n$(r,Ype);return!a||!a.length?null:L.createElement(cn,{className:"recharts-label-list"},a.map(function(m,h){var g=yt(o)?n(m,h):Br(m&&m.payload,o),x=yt(c)?{}:{id:"".concat(c,"-").concat(h)};return L.createElement(rr,Mm({},mt(m,!0),d,x,{parentViewBox:m.parentViewBox,value:g,textBreakAll:f,viewBox:rr.parseViewBox(yt(l)?m:t$(t$({},m),{},{clockWise:l})),key:"label-".concat(h),index:h}))}))}To.displayName="LabelList";function ime(e,t){return e?e===!0?L.createElement(To,{key:"labelList-implicit",data:t}):L.isValidElement(e)||lt(e)?L.createElement(To,{key:"labelList-implicit",data:t,content:e}):kc(e)?L.createElement(To,Mm({data:t},e,{key:"labelList-implicit"})):null:null}function ome(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=Ma(r,To).map(function(l,c){return y.cloneElement(l,{data:t,key:"labelList-".concat(c)})});if(!n)return a;var o=ime(e.label,t);return[o].concat(Kpe(a))}To.renderCallByParent=ome;function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function g_(){return g_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g_.apply(this,arguments)}function r$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function a$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r$(Object(n),!0).forEach(function(r){sme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sme(e,t,n){return t=lme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lme(e){var t=cme(e,"string");return If(t)=="symbol"?t:t+""}function cme(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ume=function(t,n){var r=Ca(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},hp=function(t){var n=t.cx,r=t.cy,a=t.radius,o=t.angle,l=t.sign,c=t.isExternal,f=t.cornerRadius,d=t.cornerIsExternal,m=f*(c?1:-1)+a,h=Math.asin(f/m)/Nm,g=d?o:o+l*h,x=Kn(n,r,m,g),A=Kn(n,r,a,g),S=d?o-l*h:o,w=Kn(n,r,m*Math.cos(h*Nm),S);return{center:x,circleTangency:A,lineTangency:w,theta:h}},Q8=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.startAngle,c=t.endAngle,f=ume(l,c),d=l+f,m=Kn(n,r,o,l),h=Kn(n,r,o,d),g="M ".concat(m.x,",").concat(m.y,`
476
- A `).concat(o,",").concat(o,`,0,
477
- `).concat(+(Math.abs(f)>180),",").concat(+(l>d),`,
478
- `).concat(h.x,",").concat(h.y,`
479
- `);if(a>0){var x=Kn(n,r,a,l),A=Kn(n,r,a,d);g+="L ".concat(A.x,",").concat(A.y,`
480
- A `).concat(a,",").concat(a,`,0,
481
- `).concat(+(Math.abs(f)>180),",").concat(+(l<=d),`,
482
- `).concat(x.x,",").concat(x.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},fme=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,d=t.startAngle,m=t.endAngle,h=Ca(m-d),g=hp({cx:n,cy:r,radius:o,angle:d,sign:h,cornerRadius:l,cornerIsExternal:f}),x=g.circleTangency,A=g.lineTangency,S=g.theta,w=hp({cx:n,cy:r,radius:o,angle:m,sign:-h,cornerRadius:l,cornerIsExternal:f}),E=w.circleTangency,O=w.lineTangency,j=w.theta,R=f?Math.abs(d-m):Math.abs(d-m)-S-j;if(R<0)return c?"M ".concat(A.x,",").concat(A.y,`
483
- a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
484
- a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
485
- `):Q8({cx:n,cy:r,innerRadius:a,outerRadius:o,startAngle:d,endAngle:m});var C="M ".concat(A.x,",").concat(A.y,`
486
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(x.x,",").concat(x.y,`
487
- A`).concat(o,",").concat(o,",0,").concat(+(R>180),",").concat(+(h<0),",").concat(E.x,",").concat(E.y,`
488
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,`
489
- `);if(a>0){var T=hp({cx:n,cy:r,radius:a,angle:d,sign:h,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),N=T.circleTangency,D=T.lineTangency,z=T.theta,G=hp({cx:n,cy:r,radius:a,angle:m,sign:-h,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),U=G.circleTangency,P=G.lineTangency,B=G.theta,q=f?Math.abs(d-m):Math.abs(d-m)-z-B;if(q<0&&l===0)return"".concat(C,"L").concat(n,",").concat(r,"Z");C+="L".concat(P.x,",").concat(P.y,`
490
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(U.x,",").concat(U.y,`
491
- A`).concat(a,",").concat(a,",0,").concat(+(q>180),",").concat(+(h>0),",").concat(N.x,",").concat(N.y,`
492
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(D.x,",").concat(D.y,"Z")}else C+="L".concat(n,",").concat(r,"Z");return C},dme={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},J8=function(t){var n=a$(a$({},dme),t),r=n.cx,a=n.cy,o=n.innerRadius,l=n.outerRadius,c=n.cornerRadius,f=n.forceCornerRadius,d=n.cornerIsExternal,m=n.startAngle,h=n.endAngle,g=n.className;if(l<o||m===h)return null;var x=xt("recharts-sector",g),A=l-o,S=Rs(c,A,0,!0),w;return S>0&&Math.abs(m-h)<360?w=fme({cx:r,cy:a,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,A/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:m,endAngle:h}):w=Q8({cx:r,cy:a,innerRadius:o,outerRadius:l,startAngle:m,endAngle:h}),L.createElement("path",g_({},mt(n,!0),{className:x,d:w,role:"img"}))};function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function y_(){return y_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y_.apply(this,arguments)}function i$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function o$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i$(Object(n),!0).forEach(function(r){hme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hme(e,t,n){return t=pme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pme(e){var t=mme(e,"string");return Bf(t)=="symbol"?t:t+""}function mme(e,t){if(Bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var s$={curveBasisClosed:Doe,curveBasisOpen:koe,curveBasis:Poe,curveBumpX:boe,curveBumpY:xoe,curveLinearClosed:$oe,curveLinear:Gv,curveMonotoneX:zoe,curveMonotoneY:Loe,curveNatural:Ioe,curveStep:Boe,curveStepAfter:qoe,curveStepBefore:Uoe},pp=function(t){return t.x===+t.x&&t.y===+t.y},Vu=function(t){return t.x},Gu=function(t){return t.y},vme=function(t,n){if(lt(t))return t;var r="curve".concat(Fv(t));return(r==="curveMonotone"||r==="curveBump")&&n?s$["".concat(r).concat(n==="vertical"?"Y":"X")]:s$[r]||Gv},gme=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,o=a===void 0?[]:a,l=t.baseLine,c=t.layout,f=t.connectNulls,d=f===void 0?!1:f,m=vme(r,c),h=d?o.filter(function(S){return pp(S)}):o,g;if(Array.isArray(l)){var x=d?l.filter(function(S){return pp(S)}):l,A=h.map(function(S,w){return o$(o$({},S),{},{base:x[w]})});return c==="vertical"?g=ip().y(Gu).x1(Vu).x0(function(S){return S.base.x}):g=ip().x(Vu).y1(Gu).y0(function(S){return S.base.y}),g.defined(pp).curve(m),g(A)}return c==="vertical"&&Me(l)?g=ip().y(Gu).x1(Vu).x0(l):Me(l)?g=ip().x(Vu).y1(Gu).y0(l):g=a6().x(Vu).y(Gu),g.defined(pp).curve(m),g(h)},cf=function(t){var n=t.className,r=t.points,a=t.path,o=t.pathRef;if((!r||!r.length)&&!a)return null;var l=r&&r.length?gme(t):a;return y.createElement("path",y_({},mt(t,!1),rm(t),{className:xt("recharts-curve",n),d:l,ref:o}))},A1={exports:{}},E1,l$;function yme(){if(l$)return E1;l$=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return E1=e,E1}var O1,c$;function bme(){if(c$)return O1;c$=1;var e=yme();function t(){}function n(){}return n.resetWarningCache=t,O1=function(){function r(l,c,f,d,m,h){if(h!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},O1}var u$;function xme(){return u$||(u$=1,A1.exports=bme()()),A1.exports}var wme=xme();const Dt=Ht(wme),{getOwnPropertyNames:Sme,getOwnPropertySymbols:_me}=Object,{hasOwnProperty:Ame}=Object.prototype;function j1(e,t){return function(r,a,o){return e(r,a,o)&&t(r,a,o)}}function mp(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);const{cache:o}=a,l=o.get(n),c=o.get(r);if(l&&c)return l===r&&c===n;o.set(n,r),o.set(r,n);const f=e(n,r,a);return o.delete(n),o.delete(r),f}}function Eme(e){return e!=null?e[Symbol.toStringTag]:void 0}function f$(e){return Sme(e).concat(_me(e))}const Ome=Object.hasOwn||((e,t)=>Ame.call(e,t));function Us(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const jme="__v",Tme="__o",Cme="_owner",{getOwnPropertyDescriptor:d$,keys:h$}=Object;function Rme(e,t){return e.byteLength===t.byteLength&&Pm(new Uint8Array(e),new Uint8Array(t))}function Nme(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Mme(e,t){return e.byteLength===t.byteLength&&Pm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Pme(e,t){return Us(e.getTime(),t.getTime())}function Dme(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function kme(e,t){return e===t}function p$(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),o=e.entries();let l,c,f=0;for(;(l=o.next())&&!l.done;){const d=t.entries();let m=!1,h=0;for(;(c=d.next())&&!c.done;){if(a[h]){h++;continue}const g=l.value,x=c.value;if(n.equals(g[0],x[0],f,h,e,t,n)&&n.equals(g[1],x[1],g[0],x[0],e,t,n)){m=a[h]=!0;break}h++}if(!m)return!1;f++}return!0}const $me=Us;function zme(e,t,n){const r=h$(e);let a=r.length;if(h$(t).length!==a)return!1;for(;a-- >0;)if(!eU(e,t,n,r[a]))return!1;return!0}function Wu(e,t,n){const r=f$(e);let a=r.length;if(f$(t).length!==a)return!1;let o,l,c;for(;a-- >0;)if(o=r[a],!eU(e,t,n,o)||(l=d$(e,o),c=d$(t,o),(l||c)&&(!l||!c||l.configurable!==c.configurable||l.enumerable!==c.enumerable||l.writable!==c.writable)))return!1;return!0}function Lme(e,t){return Us(e.valueOf(),t.valueOf())}function Ime(e,t){return e.source===t.source&&e.flags===t.flags}function m$(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),o=e.values();let l,c;for(;(l=o.next())&&!l.done;){const f=t.values();let d=!1,m=0;for(;(c=f.next())&&!c.done;){if(!a[m]&&n.equals(l.value,c.value,l.value,c.value,e,t,n)){d=a[m]=!0;break}m++}if(!d)return!1}return!0}function Pm(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Bme(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function eU(e,t,n,r){return(r===Cme||r===Tme||r===jme)&&(e.$$typeof||t.$$typeof)?!0:Ome(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Ume="[object ArrayBuffer]",qme="[object Arguments]",Hme="[object Boolean]",Fme="[object DataView]",Vme="[object Date]",Gme="[object Error]",Wme="[object Map]",Yme="[object Number]",Kme="[object Object]",Zme="[object RegExp]",Xme="[object Set]",Qme="[object String]",Jme={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},eve="[object URL]",tve=Object.prototype.toString;function nve({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:c,areObjectsEqual:f,arePrimitiveWrappersEqual:d,areRegExpsEqual:m,areSetsEqual:h,areTypedArraysEqual:g,areUrlsEqual:x,unknownTagComparators:A}){return function(w,E,O){if(w===E)return!0;if(w==null||E==null)return!1;const j=typeof w;if(j!==typeof E)return!1;if(j!=="object")return j==="number"?c(w,E,O):j==="function"?o(w,E,O):!1;const R=w.constructor;if(R!==E.constructor)return!1;if(R===Object)return f(w,E,O);if(Array.isArray(w))return t(w,E,O);if(R===Date)return r(w,E,O);if(R===RegExp)return m(w,E,O);if(R===Map)return l(w,E,O);if(R===Set)return h(w,E,O);const C=tve.call(w);if(C===Vme)return r(w,E,O);if(C===Zme)return m(w,E,O);if(C===Wme)return l(w,E,O);if(C===Xme)return h(w,E,O);if(C===Kme)return typeof w.then!="function"&&typeof E.then!="function"&&f(w,E,O);if(C===eve)return x(w,E,O);if(C===Gme)return a(w,E,O);if(C===qme)return f(w,E,O);if(Jme[C])return g(w,E,O);if(C===Ume)return e(w,E,O);if(C===Fme)return n(w,E,O);if(C===Hme||C===Yme||C===Qme)return d(w,E,O);if(A){let T=A[C];if(!T){const N=Eme(w);N&&(T=A[N])}if(T)return T(w,E,O)}return!1}}function rve({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Rme,areArraysEqual:n?Wu:Nme,areDataViewsEqual:Mme,areDatesEqual:Pme,areErrorsEqual:Dme,areFunctionsEqual:kme,areMapsEqual:n?j1(p$,Wu):p$,areNumbersEqual:$me,areObjectsEqual:n?Wu:zme,arePrimitiveWrappersEqual:Lme,areRegExpsEqual:Ime,areSetsEqual:n?j1(m$,Wu):m$,areTypedArraysEqual:n?j1(Pm,Wu):Pm,areUrlsEqual:Bme,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=mp(r.areArraysEqual),o=mp(r.areMapsEqual),l=mp(r.areObjectsEqual),c=mp(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return r}function ave(e){return function(t,n,r,a,o,l,c){return e(t,n,c)}}function ive({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(c,f){const{cache:d=e?new WeakMap:void 0,meta:m}=n();return t(c,f,{cache:d,equals:r,meta:m,strict:a})};if(e)return function(c,f){return t(c,f,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const o={cache:void 0,equals:r,meta:void 0,strict:a};return function(c,f){return t(c,f,o)}}const ove=qo();qo({strict:!0});qo({circular:!0});qo({circular:!0,strict:!0});qo({createInternalComparator:()=>Us});qo({strict:!0,createInternalComparator:()=>Us});qo({circular:!0,createInternalComparator:()=>Us});qo({circular:!0,createInternalComparator:()=>Us,strict:!0});function qo(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,o=rve(e),l=nve(o),c=n?n(l):ave(l);return ive({circular:t,comparator:l,createState:r,equals:c,strict:a})}function sve(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function v$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(o){n<0&&(n=o),o-n>t?(e(o),n=-1):sve(a)};requestAnimationFrame(r)}function b_(e){"@babel/helpers - typeof";return b_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b_(e)}function lve(e){return dve(e)||fve(e)||uve(e)||cve()}function cve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
493
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uve(e,t){if(e){if(typeof e=="string")return g$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g$(e,t)}}function g$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dve(e){if(Array.isArray(e))return e}function hve(){var e={},t=function(){return null},n=!1,r=function a(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,c=lve(l),f=c[0],d=c.slice(1);if(typeof f=="number"){v$(a.bind(null,d),f);return}a(f),v$(a.bind(null,d));return}b_(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function y$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function b$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y$(Object(n),!0).forEach(function(r){tU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tU(e,t,n){return t=pve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pve(e){var t=mve(e,"string");return Uf(t)==="symbol"?t:String(t)}function mve(e,t){if(Uf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vve=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(o){return a.includes(o)})})},gve=function(t){return t},yve=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},uf=function(t,n){return Object.keys(n).reduce(function(r,a){return b$(b$({},r),{},tU({},a,t(a,n[a])))},{})},x$=function(t,n,r){return t.map(function(a){return"".concat(yve(a)," ").concat(n,"ms ").concat(r)}).join(",")};function bve(e,t){return Sve(e)||wve(e,t)||nU(e,t)||xve()}function xve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
494
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Sve(e){if(Array.isArray(e))return e}function _ve(e){return Ove(e)||Eve(e)||nU(e)||Ave()}function Ave(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
495
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nU(e,t){if(e){if(typeof e=="string")return x_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x_(e,t)}}function Eve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ove(e){if(Array.isArray(e))return x_(e)}function x_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dm=1e-4,rU=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},aU=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},w$=function(t,n){return function(r){var a=rU(t,n);return aU(a,r)}},jve=function(t,n){return function(r){var a=rU(t,n),o=[].concat(_ve(a.map(function(l,c){return l*c}).slice(1)),[0]);return aU(o,r)}},S$=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],o=n[1],l=n[2],c=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,o=0,l=1,c=1;break;case"ease":a=.25,o=.1,l=.25,c=1;break;case"ease-in":a=.42,o=0,l=1,c=1;break;case"ease-out":a=.42,o=0,l=.58,c=1;break;case"ease-in-out":a=0,o=0,l=.58,c=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var d=f[1].split(")")[0].split(",").map(function(w){return parseFloat(w)}),m=bve(d,4);a=m[0],o=m[1],l=m[2],c=m[3]}}}var h=w$(a,l),g=w$(o,c),x=jve(a,l),A=function(E){return E>1?1:E<0?0:E},S=function(E){for(var O=E>1?1:E,j=O,R=0;R<8;++R){var C=h(j)-O,T=x(j);if(Math.abs(C-O)<Dm||T<Dm)return g(j);j=A(j-C/T)}return g(j)};return S.isStepper=!1,S},Tve=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,o=a===void 0?8:a,l=t.dt,c=l===void 0?17:l,f=function(m,h,g){var x=-(m-h)*r,A=g*o,S=g+(x-A)*c/1e3,w=g*c/1e3+m;return Math.abs(w-h)<Dm&&Math.abs(S)<Dm?[h,0]:[w,S]};return f.isStepper=!0,f.dt=c,f},Cve=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return S$(a);case"spring":return Tve();default:if(a.split("(")[0]==="cubic-bezier")return S$(a)}return typeof a=="function"?a:null};function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function _$(e){return Mve(e)||Nve(e)||iU(e)||Rve()}function Rve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
496
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mve(e){if(Array.isArray(e))return S_(e)}function A$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(n),!0).forEach(function(r){w_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w_(e,t,n){return t=Pve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pve(e){var t=Dve(e,"string");return qf(t)==="symbol"?t:String(t)}function Dve(e,t){if(qf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kve(e,t){return Lve(e)||zve(e,t)||iU(e,t)||$ve()}function $ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
497
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iU(e,t){if(e){if(typeof e=="string")return S_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S_(e,t)}}function S_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Lve(e){if(Array.isArray(e))return e}var km=function(t,n,r){return t+(n-t)*r},__=function(t){var n=t.from,r=t.to;return n!==r},Ive=function e(t,n,r){var a=uf(function(o,l){if(__(l)){var c=t(l.from,l.to,l.velocity),f=kve(c,2),d=f[0],m=f[1];return Wn(Wn({},l),{},{from:d,velocity:m})}return l},n);return r<1?uf(function(o,l){return __(l)?Wn(Wn({},l),{},{velocity:km(l.velocity,a[o].velocity,r),from:km(l.from,a[o].from,r)}):l},n):e(t,a,r-1)};const Bve=(function(e,t,n,r,a){var o=vve(e,t),l=o.reduce(function(w,E){return Wn(Wn({},w),{},w_({},E,[e[E],t[E]]))},{}),c=o.reduce(function(w,E){return Wn(Wn({},w),{},w_({},E,{from:e[E],velocity:0,to:t[E]}))},{}),f=-1,d,m,h=function(){return null},g=function(){return uf(function(E,O){return O.from},c)},x=function(){return!Object.values(c).filter(__).length},A=function(E){d||(d=E);var O=E-d,j=O/n.dt;c=Ive(n,c,j),a(Wn(Wn(Wn({},e),t),g())),d=E,x()||(f=requestAnimationFrame(h))},S=function(E){m||(m=E);var O=(E-m)/r,j=uf(function(C,T){return km.apply(void 0,_$(T).concat([n(O)]))},l);if(a(Wn(Wn(Wn({},e),t),j)),O<1)f=requestAnimationFrame(h);else{var R=uf(function(C,T){return km.apply(void 0,_$(T).concat([n(1)]))},l);a(Wn(Wn(Wn({},e),t),R))}};return h=n.isStepper?A:S,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(f)}}});function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}var Uve=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function qve(e,t){if(e==null)return{};var n=Hve(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hve(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function T1(e){return Wve(e)||Gve(e)||Vve(e)||Fve()}function Fve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
498
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vve(e,t){if(e){if(typeof e=="string")return A_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A_(e,t)}}function Gve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wve(e){if(Array.isArray(e))return A_(e)}function A_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E$(Object(n),!0).forEach(function(r){nf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nf(e,t,n){return t=oU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oU(r.key),r)}}function Zve(e,t,n){return t&&Kve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oU(e){var t=Xve(e,"string");return lc(t)==="symbol"?t:String(t)}function Xve(e,t){if(lc(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lc(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E_(e,t)}function E_(e,t){return E_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},E_(e,t)}function Jve(e){var t=ege();return function(){var r=$m(e),a;if(t){var o=$m(this).constructor;a=Reflect.construct(r,arguments,o)}else a=r.apply(this,arguments);return O_(this,a)}}function O_(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j_(e)}function j_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ege(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $m(e){return $m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$m(e)}var qi=(function(e){Qve(n,e);var t=Jve(n);function n(r,a){var o;Yve(this,n),o=t.call(this,r,a);var l=o.props,c=l.isActive,f=l.attributeName,d=l.from,m=l.to,h=l.steps,g=l.children,x=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(j_(o)),o.changeStyle=o.changeStyle.bind(j_(o)),!c||x<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:m}),O_(o);if(h&&h.length)o.state={style:h[0].style};else if(d){if(typeof g=="function")return o.state={style:d},O_(o);o.state={style:f?nf({},f,d):d}}else o.state={style:{}};return o}return Zve(n,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,l=a.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,l=o.isActive,c=o.canBegin,f=o.attributeName,d=o.shouldReAnimate,m=o.to,h=o.from,g=this.state.style;if(c){if(!l){var x={style:f?nf({},f,m):m};this.state&&g&&(f&&g[f]!==m||!f&&g!==m)&&this.setState(x);return}if(!(ove(a.to,m)&&a.canBegin&&a.isActive)){var A=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=A||d?h:a.to;if(this.state&&g){var w={style:f?nf({},f,S):S};(f&&g[f]!==S||!f&&g!==S)&&this.setState(w)}this.runAnimation(wa(wa({},this.props),{},{from:S,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var o=this,l=a.from,c=a.to,f=a.duration,d=a.easing,m=a.begin,h=a.onAnimationEnd,g=a.onAnimationStart,x=Bve(l,c,Cve(d),f,this.changeStyle),A=function(){o.stopJSAnimation=x()};this.manager.start([g,m,A,f,h])}},{key:"runStepAnimation",value:function(a){var o=this,l=a.steps,c=a.begin,f=a.onAnimationStart,d=l[0],m=d.style,h=d.duration,g=h===void 0?0:h,x=function(S,w,E){if(E===0)return S;var O=w.duration,j=w.easing,R=j===void 0?"ease":j,C=w.style,T=w.properties,N=w.onAnimationEnd,D=E>0?l[E-1]:w,z=T||Object.keys(C);if(typeof R=="function"||R==="spring")return[].concat(T1(S),[o.runJSAnimation.bind(o,{from:D.style,to:C,duration:O,easing:R}),O]);var G=x$(z,O,R),U=wa(wa(wa({},D.style),C),{},{transition:G});return[].concat(T1(S),[U,O,N]).filter(gve)};return this.manager.start([f].concat(T1(l.reduce(x,[m,Math.max(g,c)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=hve());var o=a.begin,l=a.duration,c=a.attributeName,f=a.to,d=a.easing,m=a.onAnimationStart,h=a.onAnimationEnd,g=a.steps,x=a.children,A=this.manager;if(this.unSubscribe=A.subscribe(this.handleStyleChange),typeof d=="function"||typeof x=="function"||d==="spring"){this.runJSAnimation(a);return}if(g.length>1){this.runStepAnimation(a);return}var S=c?nf({},c,f):f,w=x$(Object.keys(S),l,d);A.start([m,o,wa(wa({},S),{},{transition:w}),l,h])}},{key:"render",value:function(){var a=this.props,o=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var c=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var f=qve(a,Uve),d=y.Children.count(o),m=this.state.style;if(typeof o=="function")return o(m);if(!c||d===0||l<=0)return o;var h=function(x){var A=x.props,S=A.style,w=S===void 0?{}:S,E=A.className,O=y.cloneElement(x,wa(wa({},f),{},{style:wa(wa({},w),m),className:E}));return O};return d===1?h(y.Children.only(o)):L.createElement("div",null,y.Children.map(o,function(g){return h(g)}))}}]),n})(y.PureComponent);qi.displayName="Animate";qi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};qi.propTypes={from:Dt.oneOfType([Dt.object,Dt.string]),to:Dt.oneOfType([Dt.object,Dt.string]),attributeName:Dt.string,duration:Dt.number,begin:Dt.number,easing:Dt.oneOfType([Dt.string,Dt.func]),steps:Dt.arrayOf(Dt.shape({duration:Dt.number.isRequired,style:Dt.object.isRequired,easing:Dt.oneOfType([Dt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Dt.func]),properties:Dt.arrayOf("string"),onAnimationEnd:Dt.func})),children:Dt.oneOfType([Dt.node,Dt.func]),isActive:Dt.bool,canBegin:Dt.bool,onAnimationEnd:Dt.func,shouldReAnimate:Dt.bool,onAnimationStart:Dt.func,onAnimationReStart:Dt.func};function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function zm(){return zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zm.apply(this,arguments)}function tge(e,t){return ige(e)||age(e,t)||rge(e,t)||nge()}function nge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
499
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rge(e,t){if(e){if(typeof e=="string")return O$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O$(e,t)}}function O$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function age(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function ige(e){if(Array.isArray(e))return e}function j$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function T$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j$(Object(n),!0).forEach(function(r){oge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oge(e,t,n){return t=sge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sge(e){var t=lge(e,"string");return Hf(t)=="symbol"?t:t+""}function lge(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C$=function(t,n,r,a,o){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),c=a>=0?1:-1,f=r>=0?1:-1,d=a>=0&&r>=0||a<0&&r<0?1:0,m;if(l>0&&o instanceof Array){for(var h=[0,0,0,0],g=0,x=4;g<x;g++)h[g]=o[g]>l?l:o[g];m="M".concat(t,",").concat(n+c*h[0]),h[0]>0&&(m+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(d,",").concat(t+f*h[0],",").concat(n)),m+="L ".concat(t+r-f*h[1],",").concat(n),h[1]>0&&(m+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(d,`,
500
- `).concat(t+r,",").concat(n+c*h[1])),m+="L ".concat(t+r,",").concat(n+a-c*h[2]),h[2]>0&&(m+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(d,`,
501
- `).concat(t+r-f*h[2],",").concat(n+a)),m+="L ".concat(t+f*h[3],",").concat(n+a),h[3]>0&&(m+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(d,`,
502
- `).concat(t,",").concat(n+a-c*h[3])),m+="Z"}else if(l>0&&o===+o&&o>0){var A=Math.min(l,o);m="M ".concat(t,",").concat(n+c*A,`
503
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+f*A,",").concat(n,`
504
- L `).concat(t+r-f*A,",").concat(n,`
505
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r,",").concat(n+c*A,`
506
- L `).concat(t+r,",").concat(n+a-c*A,`
507
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r-f*A,",").concat(n+a,`
508
- L `).concat(t+f*A,",").concat(n+a,`
509
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t,",").concat(n+a-c*A," Z")}else m="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return m},cge=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,o=n.x,l=n.y,c=n.width,f=n.height;if(Math.abs(c)>0&&Math.abs(f)>0){var d=Math.min(o,o+c),m=Math.max(o,o+c),h=Math.min(l,l+f),g=Math.max(l,l+f);return r>=d&&r<=m&&a>=h&&a<=g}return!1},uge={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cO=function(t){var n=T$(T$({},uge),t),r=y.useRef(),a=y.useState(-1),o=tge(a,2),l=o[0],c=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var R=r.current.getTotalLength();R&&c(R)}catch{}},[]);var f=n.x,d=n.y,m=n.width,h=n.height,g=n.radius,x=n.className,A=n.animationEasing,S=n.animationDuration,w=n.animationBegin,E=n.isAnimationActive,O=n.isUpdateAnimationActive;if(f!==+f||d!==+d||m!==+m||h!==+h||m===0||h===0)return null;var j=xt("recharts-rectangle",x);return O?L.createElement(qi,{canBegin:l>0,from:{width:m,height:h,x:f,y:d},to:{width:m,height:h,x:f,y:d},duration:S,animationEasing:A,isActive:O},function(R){var C=R.width,T=R.height,N=R.x,D=R.y;return L.createElement(qi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:S,isActive:E,easing:A},L.createElement("path",zm({},mt(n,!0),{className:j,d:C$(N,D,C,T,g),ref:r})))}):L.createElement("path",zm({},mt(n,!0),{className:j,d:C$(f,d,m,h,g)}))};function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T_.apply(this,arguments)}var uO=function(t){var n=t.cx,r=t.cy,a=t.r,o=t.className,l=xt("recharts-dot",o);return n===+n&&r===+r&&a===+a?y.createElement("circle",T_({},mt(t,!1),rm(t),{className:l,cx:n,cy:r,r:a})):null};function Ff(e){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ff(e)}var fge=["x","y","top","left","width","height","className"];function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C_.apply(this,arguments)}function R$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function dge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(n),!0).forEach(function(r){hge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hge(e,t,n){return t=pge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pge(e){var t=mge(e,"string");return Ff(t)=="symbol"?t:t+""}function mge(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vge(e,t){if(e==null)return{};var n=gge(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var yge=function(t,n,r,a,o,l){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},bge=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.top,c=l===void 0?0:l,f=t.left,d=f===void 0?0:f,m=t.width,h=m===void 0?0:m,g=t.height,x=g===void 0?0:g,A=t.className,S=vge(t,fge),w=dge({x:r,y:o,top:c,left:d,width:h,height:x},S);return!Me(r)||!Me(o)||!Me(h)||!Me(x)||!Me(c)||!Me(d)?null:L.createElement("path",C_({},mt(w,!0),{className:xt("recharts-cross",A),d:yge(r,o,h,x,c,d)}))},C1,N$;function xge(){if(N$)return C1;N$=1;var e=j6(),t=e(Object.getPrototypeOf,Object);return C1=t,C1}var R1,M$;function wge(){if(M$)return R1;M$=1;var e=Vi(),t=xge(),n=Gi(),r="[object Object]",a=Function.prototype,o=Object.prototype,l=a.toString,c=o.hasOwnProperty,f=l.call(Object);function d(m){if(!n(m)||e(m)!=r)return!1;var h=t(m);if(h===null)return!0;var g=c.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return R1=d,R1}var Sge=wge();const _ge=Ht(Sge);var N1,P$;function Age(){if(P$)return N1;P$=1;var e=Vi(),t=Gi(),n="[object Boolean]";function r(a){return a===!0||a===!1||t(a)&&e(a)==n}return N1=r,N1}var Ege=Age();const Oge=Ht(Ege);function Vf(e){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vf(e)}function Lm(){return Lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lm.apply(this,arguments)}function jge(e,t){return Nge(e)||Rge(e,t)||Cge(e,t)||Tge()}function Tge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
510
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cge(e,t){if(e){if(typeof e=="string")return D$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D$(e,t)}}function D$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Nge(e){if(Array.isArray(e))return e}function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){Mge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mge(e,t,n){return t=Pge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pge(e){var t=Dge(e,"string");return Vf(t)=="symbol"?t:t+""}function Dge(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var z$=function(t,n,r,a,o){var l=r-a,c;return c="M ".concat(t,",").concat(n),c+="L ".concat(t+r,",").concat(n),c+="L ".concat(t+r-l/2,",").concat(n+o),c+="L ".concat(t+r-l/2-a,",").concat(n+o),c+="L ".concat(t,",").concat(n," Z"),c},kge={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$ge=function(t){var n=$$($$({},kge),t),r=y.useRef(),a=y.useState(-1),o=jge(a,2),l=o[0],c=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var j=r.current.getTotalLength();j&&c(j)}catch{}},[]);var f=n.x,d=n.y,m=n.upperWidth,h=n.lowerWidth,g=n.height,x=n.className,A=n.animationEasing,S=n.animationDuration,w=n.animationBegin,E=n.isUpdateAnimationActive;if(f!==+f||d!==+d||m!==+m||h!==+h||g!==+g||m===0&&h===0||g===0)return null;var O=xt("recharts-trapezoid",x);return E?L.createElement(qi,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:f,y:d},to:{upperWidth:m,lowerWidth:h,height:g,x:f,y:d},duration:S,animationEasing:A,isActive:E},function(j){var R=j.upperWidth,C=j.lowerWidth,T=j.height,N=j.x,D=j.y;return L.createElement(qi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:S,easing:A},L.createElement("path",Lm({},mt(n,!0),{className:O,d:z$(N,D,R,C,T),ref:r})))}):L.createElement("g",null,L.createElement("path",Lm({},mt(n,!0),{className:O,d:z$(f,d,m,h,g)})))},zge=["option","shapeType","propTransformer","activeClassName","isActive"];function Gf(e){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(e)}function Lge(e,t){if(e==null)return{};var n=Ige(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ige(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function L$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Im(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L$(Object(n),!0).forEach(function(r){Bge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bge(e,t,n){return t=Uge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uge(e){var t=qge(e,"string");return Gf(t)=="symbol"?t:t+""}function qge(e,t){if(Gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hge(e,t){return Im(Im({},t),e)}function Fge(e,t){return e==="symbols"}function I$(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return L.createElement(cO,n);case"trapezoid":return L.createElement($ge,n);case"sector":return L.createElement(J8,n);case"symbols":if(Fge(t))return L.createElement(TE,n);break;default:return null}}function Vge(e){return y.isValidElement(e)?e.props:e}function Gge(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?Hge:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,c=e.isActive,f=Lge(e,zge),d;if(y.isValidElement(t))d=y.cloneElement(t,Im(Im({},f),Vge(t)));else if(lt(t))d=t(f);else if(_ge(t)&&!Oge(t)){var m=a(t,f);d=L.createElement(I$,{shapeType:n,elementProps:m})}else{var h=f;d=L.createElement(I$,{shapeType:n,elementProps:h})}return c?L.createElement(cn,{className:l},d):d}function sg(e,t){return t!=null&&"trapezoids"in e.props}function lg(e,t){return t!=null&&"sectors"in e.props}function Wf(e,t){return t!=null&&"points"in e.props}function Wge(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&o}function Yge(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Kge(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function Zge(e,t){var n;return sg(e,t)?n=Wge:lg(e,t)?n=Yge:Wf(e,t)&&(n=Kge),n}function Xge(e,t){var n;return sg(e,t)?n="trapezoids":lg(e,t)?n="sectors":Wf(e,t)&&(n="points"),n}function Qge(e,t){if(sg(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(lg(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Wf(e,t)?t.payload:{}}function Jge(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=Xge(n,t),o=Qge(n,t),l=r.filter(function(f,d){var m=Rf(o,f),h=n.props[a].filter(function(A){var S=Zge(n,t);return S(A,t)}),g=n.props[a].indexOf(h[h.length-1]),x=d===g;return m&&x}),c=r.indexOf(l[l.length-1]);return c}var M1,B$;function eye(){if(B$)return M1;B$=1;var e=Math.ceil,t=Math.max;function n(r,a,o,l){for(var c=-1,f=t(e((a-r)/(o||1)),0),d=Array(f);f--;)d[l?f:++c]=r,r+=o;return d}return M1=n,M1}var P1,U$;function sU(){if(U$)return P1;U$=1;var e=H6(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var o=a<0?-1:1;return o*n}return a===a?a:0}return P1=r,P1}var D1,q$;function tye(){if(q$)return D1;q$=1;var e=eye(),t=Zv(),n=sU();function r(a){return function(o,l,c){return c&&typeof c!="number"&&t(o,l,c)&&(l=c=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),c=c===void 0?o<l?1:-1:n(c),e(o,l,c,a)}}return D1=r,D1}var k1,H$;function nye(){if(H$)return k1;H$=1;var e=tye(),t=e();return k1=t,k1}var rye=nye();const Bm=Ht(rye);function Yf(e){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yf(e)}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function V$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F$(Object(n),!0).forEach(function(r){lU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lU(e,t,n){return t=aye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aye(e){var t=iye(e,"string");return Yf(t)=="symbol"?t:t+""}function iye(e,t){if(Yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oye=["Webkit","Moz","O","ms"],sye=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),a=oye.reduce(function(o,l){return V$(V$({},o),{},lU({},l+r,n))},{});return a[t]=n,a};function cc(e){"@babel/helpers - typeof";return cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cc(e)}function Um(){return Um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Um.apply(this,arguments)}function G$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G$(Object(n),!0).forEach(function(r){Cr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uU(r.key),r)}}function cye(e,t,n){return t&&W$(e.prototype,t),n&&W$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function uye(e,t,n){return t=qm(t),fye(e,cU()?Reflect.construct(t,n||[],qm(e).constructor):t.apply(e,n))}function fye(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dye(e)}function dye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cU=function(){return!!e})()}function qm(e){return qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qm(e)}function hye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R_(e,t)}function R_(e,t){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},R_(e,t)}function Cr(e,t,n){return t=uU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uU(e){var t=pye(e,"string");return cc(t)=="symbol"?t:t+""}function pye(e,t){if(cc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mye=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,o=t.x,l=t.width,c=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,d=sf().domain(Bm(0,f)).range([o,o+l-c]),m=d.domain().map(function(h){return d(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(r),endX:d(a),scale:d,scaleValues:m}},Y$=function(t){return t.changedTouches&&!!t.changedTouches.length},uc=(function(e){function t(n){var r;return lye(this,t),r=uye(this,t,[n]),Cr(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),Cr(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),Cr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,o=a.endIndex,l=a.onDragEnd,c=a.startIndex;l==null||l({endIndex:o,startIndex:c})}),r.detachDragEndListener()}),Cr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Cr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Cr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Cr(r,"handleSlideDragStart",function(a){var o=Y$(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return hye(t,e),cye(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,o=r.endX,l=this.state.scaleValues,c=this.props,f=c.gap,d=c.data,m=d.length-1,h=Math.min(a,o),g=Math.max(a,o),x=t.getIndexInRange(l,h),A=t.getIndexInRange(l,g);return{startIndex:x-x%f,endIndex:A===m?m:A-A%f}}},{key:"getTextOfTick",value:function(r){var a=this.props,o=a.data,l=a.tickFormatter,c=a.dataKey,f=Br(o[r],c,r);return lt(l)?l(f,r):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,o=a.slideMoveStartX,l=a.startX,c=a.endX,f=this.props,d=f.x,m=f.width,h=f.travellerWidth,g=f.startIndex,x=f.endIndex,A=f.onChange,S=r.pageX-o;S>0?S=Math.min(S,d+m-h-c,d+m-h-l):S<0&&(S=Math.max(S,d-l,d-c));var w=this.getIndex({startX:l+S,endX:c+S});(w.startIndex!==g||w.endIndex!==x)&&A&&A(w),this.setState({startX:l+S,endX:c+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var o=Y$(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,o=a.brushMoveStartX,l=a.movingTravellerId,c=a.endX,f=a.startX,d=this.state[l],m=this.props,h=m.x,g=m.width,x=m.travellerWidth,A=m.onChange,S=m.gap,w=m.data,E={startX:this.state.startX,endX:this.state.endX},O=r.pageX-o;O>0?O=Math.min(O,h+g-x-d):O<0&&(O=Math.max(O,h-d)),E[l]=d+O;var j=this.getIndex(E),R=j.startIndex,C=j.endIndex,T=function(){var D=w.length-1;return l==="startX"&&(c>f?R%S===0:C%S===0)||c<f&&C===D||l==="endX"&&(c>f?C%S===0:R%S===0)||c>f&&C===D};this.setState(Cr(Cr({},l,d+O),"brushMoveStartX",r.pageX),function(){A&&T()&&A(j)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var o=this,l=this.state,c=l.scaleValues,f=l.startX,d=l.endX,m=this.state[a],h=c.indexOf(m);if(h!==-1){var g=h+r;if(!(g===-1||g>=c.length)){var x=c[g];a==="startX"&&x>=d||a==="endX"&&x<=f||this.setState(Cr({},a,x),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,c=r.height,f=r.fill,d=r.stroke;return L.createElement("rect",{stroke:d,fill:f,x:a,y:o,width:l,height:c})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,c=r.height,f=r.data,d=r.children,m=r.padding,h=y.Children.only(d);return h?L.cloneElement(h,{x:a,y:o,width:l,height:c,margin:m,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,a){var o,l,c=this,f=this.props,d=f.y,m=f.travellerWidth,h=f.height,g=f.traveller,x=f.ariaLabel,A=f.data,S=f.startIndex,w=f.endIndex,E=Math.max(r,this.props.x),O=$1($1({},mt(this.props,!1)),{},{x:E,y:d,width:m,height:h}),j=x||"Min value: ".concat((o=A[S])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=A[w])===null||l===void 0?void 0:l.name);return L.createElement(cn,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(C){["ArrowLeft","ArrowRight"].includes(C.key)&&(C.preventDefault(),C.stopPropagation(),c.handleTravellerMoveKeyboard(C.key==="ArrowRight"?1:-1,a))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,O))}},{key:"renderSlide",value:function(r,a){var o=this.props,l=o.y,c=o.height,f=o.stroke,d=o.travellerWidth,m=Math.min(r,a)+d,h=Math.max(Math.abs(a-r)-d,0);return L.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:m,y:l,width:h,height:c})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,o=r.endIndex,l=r.y,c=r.height,f=r.travellerWidth,d=r.stroke,m=this.state,h=m.startX,g=m.endX,x=5,A={pointerEvents:"none",fill:d};return L.createElement(cn,{className:"recharts-brush-texts"},L.createElement(mm,Um({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-x,y:l+c/2},A),this.getTextOfTick(a)),L.createElement(mm,Um({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,g)+f+x,y:l+c/2},A),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,a=r.data,o=r.className,l=r.children,c=r.x,f=r.y,d=r.width,m=r.height,h=r.alwaysShowText,g=this.state,x=g.startX,A=g.endX,S=g.isTextActive,w=g.isSlideMoving,E=g.isTravellerMoving,O=g.isTravellerFocused;if(!a||!a.length||!Me(c)||!Me(f)||!Me(d)||!Me(m)||d<=0||m<=0)return null;var j=xt("recharts-brush",o),R=L.Children.count(l)===1,C=sye("userSelect","none");return L.createElement(cn,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:C},this.renderBackground(),R&&this.renderPanorama(),this.renderSlide(x,A),this.renderTravellerLayer(x,"startX"),this.renderTravellerLayer(A,"endX"),(S||w||E||O||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,o=r.y,l=r.width,c=r.height,f=r.stroke,d=Math.floor(o+c/2)-1;return L.createElement(L.Fragment,null,L.createElement("rect",{x:a,y:o,width:l,height:c,fill:f,stroke:"none"}),L.createElement("line",{x1:a+1,y1:d,x2:a+l-1,y2:d,fill:"none",stroke:"#fff"}),L.createElement("line",{x1:a+1,y1:d+2,x2:a+l-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var o;return L.isValidElement(r)?o=L.cloneElement(r,a):lt(r)?o=r(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(r,a){var o=r.data,l=r.width,c=r.x,f=r.travellerWidth,d=r.updateId,m=r.startIndex,h=r.endIndex;if(o!==a.prevData||d!==a.prevUpdateId)return $1({prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l},o&&o.length?mye({data:o,width:l,x:c,travellerWidth:f,startIndex:m,endIndex:h}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||c!==a.prevX||f!==a.prevTravellerWidth)){a.scale.range([c,c+l-f]);var g=a.scale.domain().map(function(x){return a.scale(x)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,a){for(var o=r.length,l=0,c=o-1;c-l>1;){var f=Math.floor((l+c)/2);r[f]>a?c=f:l=f}return a>=r[c]?c:l}}])})(y.PureComponent);Cr(uc,"displayName","Brush");Cr(uc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var z1,K$;function vye(){if(K$)return z1;K$=1;var e=kE();function t(n,r){var a;return e(n,function(o,l,c){return a=r(o,l,c),!a}),!!a}return z1=t,z1}var L1,Z$;function gye(){if(Z$)return L1;Z$=1;var e=x6(),t=Io(),n=vye(),r=wr(),a=Zv();function o(l,c,f){var d=r(l)?e:n;return f&&a(l,c,f)&&(c=void 0),d(l,t(c,3))}return L1=o,L1}var yye=gye();const bye=Ht(yye);var Qa=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},I1,X$;function xye(){if(X$)return I1;X$=1;var e=L6();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return I1=t,I1}var B1,Q$;function wye(){if(Q$)return B1;Q$=1;var e=xye(),t=$6(),n=Io();function r(a,o){var l={};return o=n(o,3),t(a,function(c,f,d){e(l,f,o(c,f,d))}),l}return B1=r,B1}var Sye=wye();const _ye=Ht(Sye);var U1,J$;function Aye(){if(J$)return U1;J$=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(!n(t[r],r,t))return!1;return!0}return U1=e,U1}var q1,ez;function Eye(){if(ez)return q1;ez=1;var e=kE();function t(n,r){var a=!0;return e(n,function(o,l,c){return a=!!r(o,l,c),a}),a}return q1=t,q1}var H1,tz;function Oye(){if(tz)return H1;tz=1;var e=Aye(),t=Eye(),n=Io(),r=wr(),a=Zv();function o(l,c,f){var d=r(l)?e:t;return f&&a(l,c,f)&&(c=void 0),d(l,n(c,3))}return H1=o,H1}var jye=Oye();const fU=Ht(jye);var Tye=["x","y"];function Kf(e){"@babel/helpers - typeof";return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(this,arguments)}function nz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nz(Object(n),!0).forEach(function(r){Cye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cye(e,t,n){return t=Rye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rye(e){var t=Nye(e,"string");return Kf(t)=="symbol"?t:t+""}function Nye(e,t){if(Kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mye(e,t){if(e==null)return{};var n=Pye(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dye(e,t){var n=e.x,r=e.y,a=Mye(e,Tye),o="".concat(n),l=parseInt(o,10),c="".concat(r),f=parseInt(c,10),d="".concat(t.height||a.height),m=parseInt(d,10),h="".concat(t.width||a.width),g=parseInt(h,10);return Yu(Yu(Yu(Yu(Yu({},t),a),l?{x:l}:{}),f?{y:f}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function rz(e){return L.createElement(Gge,N_({shapeType:"rectangle",propTransformer:Dye,activeClassName:"recharts-active-bar"},e))}var kye=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var o=Me(r)||Bie(r);return o?t(r,a):(o||Ms(),n)}},$ye=["value","background"],dU;function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function zye(e,t){if(e==null)return{};var n=Lye(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hm(){return Hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hm.apply(this,arguments)}function az(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function En(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?az(Object(n),!0).forEach(function(r){Oo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):az(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pU(r.key),r)}}function Bye(e,t,n){return t&&iz(e.prototype,t),n&&iz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uye(e,t,n){return t=Fm(t),qye(e,hU()?Reflect.construct(t,n||[],Fm(e).constructor):t.apply(e,n))}function qye(e,t){if(t&&(fc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hye(e)}function Hye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hU=function(){return!!e})()}function Fm(e){return Fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fm(e)}function Fye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M_(e,t)}function M_(e,t){return M_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},M_(e,t)}function Oo(e,t,n){return t=pU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pU(e){var t=Vye(e,"string");return fc(t)=="symbol"?t:t+""}function Vye(e,t){if(fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pd=(function(e){function t(){var n;Iye(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=Uye(this,t,[].concat(a)),Oo(n,"state",{isAnimationFinished:!1}),Oo(n,"id",jd("recharts-bar-")),Oo(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Oo(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Fye(t,e),Bye(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,o=this.props,l=o.shape,c=o.dataKey,f=o.activeIndex,d=o.activeBar,m=mt(this.props,!1);return r&&r.map(function(h,g){var x=g===f,A=x?d:l,S=En(En(En({},m),h),{},{isActive:x,option:A,index:g,dataKey:c,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return L.createElement(cn,Hm({className:"recharts-bar-rectangle"},am(a.props,h,g),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(g)}),L.createElement(rz,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,o=a.data,l=a.layout,c=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,m=a.animationEasing,h=a.animationId,g=this.state.prevData;return L.createElement(qi,{begin:f,duration:d,isActive:c,easing:m,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var A=x.t,S=o.map(function(w,E){var O=g&&g[E];if(O){var j=ia(O.x,w.x),R=ia(O.y,w.y),C=ia(O.width,w.width),T=ia(O.height,w.height);return En(En({},w),{},{x:j(A),y:R(A),width:C(A),height:T(A)})}if(l==="horizontal"){var N=ia(0,w.height),D=N(A);return En(En({},w),{},{y:w.y+w.height-D,height:D})}var z=ia(0,w.width),G=z(A);return En(En({},w),{},{width:G})});return L.createElement(cn,null,r.renderRectanglesStatically(S))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&a&&a.length&&(!l||!Rf(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,o=a.data,l=a.dataKey,c=a.activeIndex,f=mt(this.props.background,!1);return o.map(function(d,m){d.value;var h=d.background,g=zye(d,$ye);if(!h)return null;var x=En(En(En(En(En({},g),{},{fill:"#eee"},h),f),am(r.props,d,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return L.createElement(rz,Hm({key:"background-bar-".concat(m),option:r.props.background,isActive:m===c},x))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,c=o.xAxis,f=o.yAxis,d=o.layout,m=o.children,h=Ma(m,og);if(!h)return null;var g=d==="vertical"?l[0].height/2:l[0].width/2,x=function(w,E){var O=Array.isArray(w.value)?w.value[1]:w.value;return{x:w.x,y:w.y,value:O,errorVal:Br(w,E)}},A={clipPath:r?"url(#clipPath-".concat(a,")"):null};return L.createElement(cn,A,h.map(function(S){return L.cloneElement(S,{key:"error-bar-".concat(a,"-").concat(S.props.dataKey),data:l,xAxis:c,yAxis:f,layout:d,offset:g,dataPointFormatter:x})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,o=r.data,l=r.className,c=r.xAxis,f=r.yAxis,d=r.left,m=r.top,h=r.width,g=r.height,x=r.isAnimationActive,A=r.background,S=r.id;if(a||!o||!o.length)return null;var w=this.state.isAnimationFinished,E=xt("recharts-bar",l),O=c&&c.allowDataOverflow,j=f&&f.allowDataOverflow,R=O||j,C=yt(S)?this.id:S;return L.createElement(cn,{className:E},O||j?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(C)},L.createElement("rect",{x:O?d:d-h/2,y:j?m:m-g/2,width:O?h:h*2,height:j?g:g*2}))):null,L.createElement(cn,{className:"recharts-bar-rectangles",clipPath:R?"url(#clipPath-".concat(C,")"):null},A?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(R,C),(!x||w)&&To.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])})(y.PureComponent);dU=Pd;Oo(Pd,"displayName","Bar");Oo(Pd,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Lc.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Oo(Pd,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,o=e.xAxis,l=e.yAxis,c=e.xAxisTicks,f=e.yAxisTicks,d=e.stackedData,m=e.dataStartIndex,h=e.displayedData,g=e.offset,x=ope(r,n);if(!x)return null;var A=t.layout,S=n.type.defaultProps,w=S!==void 0?En(En({},S),n.props):n.props,E=w.dataKey,O=w.children,j=w.minPointSize,R=A==="horizontal"?l:o,C=d?R.scale.domain():null,T=ppe({numericAxis:R}),N=Ma(O,V6),D=h.map(function(z,G){var U,P,B,q,W,$;d?U=spe(d[m+G],C):(U=Br(z,E),Array.isArray(U)||(U=[T,U]));var V=kye(j,dU.defaultProps.minPointSize)(U[1],G);if(A==="horizontal"){var F,K=[l.scale(U[0]),l.scale(U[1])],ie=K[0],I=K[1];P=Vk({axis:o,ticks:c,bandSize:a,offset:x.offset,entry:z,index:G}),B=(F=I??ie)!==null&&F!==void 0?F:void 0,q=x.size;var Z=ie-I;if(W=Number.isNaN(Z)?0:Z,$={x:P,y:l.y,width:q,height:l.height},Math.abs(V)>0&&Math.abs(W)<Math.abs(V)){var X=Ca(W||V)*(Math.abs(V)-Math.abs(W));B-=X,W+=X}}else{var oe=[o.scale(U[0]),o.scale(U[1])],ge=oe[0],Ee=oe[1];if(P=ge,B=Vk({axis:l,ticks:f,bandSize:a,offset:x.offset,entry:z,index:G}),q=Ee-ge,W=x.size,$={x:o.x,y:B,width:o.width,height:W},Math.abs(V)>0&&Math.abs(q)<Math.abs(V)){var me=Ca(q||V)*(Math.abs(V)-Math.abs(q));q+=me}}return En(En(En({},z),{},{x:P,y:B,width:q,height:W,value:d?U:U[1],payload:z,background:$},N&&N[G]&&N[G].props),{},{tooltipPayload:[Z8(n,z)],tooltipPosition:{x:P+q/2,y:B+W/2}})});return En({data:D,layout:A},g)});function Zf(e){"@babel/helpers - typeof";return Zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zf(e)}function Gye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mU(r.key),r)}}function Wye(e,t,n){return t&&oz(e.prototype,t),n&&oz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Aa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sz(Object(n),!0).forEach(function(r){cg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cg(e,t,n){return t=mU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mU(e){var t=Yye(e,"string");return Zf(t)=="symbol"?t:t+""}function Yye(e,t){if(Zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kye=function(t,n,r,a,o){var l=t.width,c=t.height,f=t.layout,d=t.children,m=Object.keys(n),h={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:c-r.bottom,bottomMirror:c-r.bottom},g=!!Rr(d,Pd);return m.reduce(function(x,A){var S=n[A],w=S.orientation,E=S.domain,O=S.padding,j=O===void 0?{}:O,R=S.mirror,C=S.reversed,T="".concat(w).concat(R?"Mirror":""),N,D,z,G,U;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var P=E[1]-E[0],B=1/0,q=S.categoricalDomain.sort(Hie);if(q.forEach(function(oe,ge){ge>0&&(B=Math.min((oe||0)-(q[ge-1]||0),B))}),Number.isFinite(B)){var W=B/P,$=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(N=W*$/2),S.padding==="no-gap"){var V=Rs(t.barCategoryGap,W*$),F=W*$/2;N=F-V-(F-V)/$*V}}}a==="xAxis"?D=[r.left+(j.left||0)+(N||0),r.left+r.width-(j.right||0)-(N||0)]:a==="yAxis"?D=f==="horizontal"?[r.top+r.height-(j.bottom||0),r.top+(j.top||0)]:[r.top+(j.top||0)+(N||0),r.top+r.height-(j.bottom||0)-(N||0)]:D=S.range,C&&(D=[D[1],D[0]]);var K=ape(S,o,g),ie=K.scale,I=K.realScaleType;ie.domain(E).range(D),ipe(ie);var Z=hpe(ie,Aa(Aa({},S),{},{realScaleType:I}));a==="xAxis"?(U=w==="top"&&!R||w==="bottom"&&R,z=r.left,G=h[T]-U*S.height):a==="yAxis"&&(U=w==="left"&&!R||w==="right"&&R,z=h[T]-U*S.width,G=r.top);var X=Aa(Aa(Aa({},S),Z),{},{realScaleType:I,x:z,y:G,scale:ie,width:a==="xAxis"?r.width:S.width,height:a==="yAxis"?r.height:S.height});return X.bandSize=Rm(X,Z),!S.hide&&a==="xAxis"?h[T]+=(U?-1:1)*X.height:S.hide||(h[T]+=(U?-1:1)*X.width),Aa(Aa({},x),{},cg({},A,X))},{})},vU=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(a,l),width:Math.abs(o-r),height:Math.abs(l-a)}},Zye=function(t){var n=t.x1,r=t.y1,a=t.x2,o=t.y2;return vU({x:n,y:r},{x:a,y:o})},gU=(function(){function e(t){Gye(this,e),this.scale=t}return Wye(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var c=this.bandwidth?this.bandwidth():0;return this.scale(n)+c}default:return this.scale(n)}if(a){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],o=r[r.length-1];return a<=o?n>=a&&n<=o:n>=o&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])})();cg(gU,"EPS",1e-4);var fO=function(t){var n=Object.keys(t).reduce(function(r,a){return Aa(Aa({},r),{},cg({},a,gU.create(t[a])))},{});return Aa(Aa({},n),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,c=o.position;return _ye(a,function(f,d){return n[d].apply(f,{bandAware:l,position:c})})},isInRange:function(a){return fU(a,function(o,l){return n[l].isInRange(o)})}})};function Xye(e){return(e%180+180)%180}var Qye=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Xye(a),l=o*Math.PI/180,c=Math.atan(r/n),f=l>c&&l<Math.PI-c?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},F1,lz;function Jye(){if(lz)return F1;lz=1;var e=Io(),t=Td(),n=Yv();function r(a){return function(o,l,c){var f=Object(o);if(!t(o)){var d=e(l,3);o=n(o),l=function(h){return d(f[h],h,f)}}var m=a(o,l,c);return m>-1?f[d?o[m]:m]:void 0}}return F1=r,F1}var V1,cz;function ebe(){if(cz)return V1;cz=1;var e=sU();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return V1=t,V1}var G1,uz;function tbe(){if(uz)return G1;uz=1;var e=N6(),t=Io(),n=ebe(),r=Math.max;function a(o,l,c){var f=o==null?0:o.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=r(f+d,0)),e(o,t(l,3),d)}return G1=a,G1}var W1,fz;function nbe(){if(fz)return W1;fz=1;var e=Jye(),t=tbe(),n=e(t);return W1=n,W1}var rbe=nbe();const abe=Ht(rbe);var ibe=WB();const obe=Ht(ibe);var sbe=obe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),dO=y.createContext(void 0),hO=y.createContext(void 0),yU=y.createContext(void 0),bU=y.createContext({}),xU=y.createContext(void 0),wU=y.createContext(0),SU=y.createContext(0),dz=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,o=n.offset,l=t.clipPathId,c=t.children,f=t.width,d=t.height,m=sbe(o);return L.createElement(dO.Provider,{value:r},L.createElement(hO.Provider,{value:a},L.createElement(bU.Provider,{value:o},L.createElement(yU.Provider,{value:m},L.createElement(xU.Provider,{value:l},L.createElement(wU.Provider,{value:d},L.createElement(SU.Provider,{value:f},c)))))))},lbe=function(){return y.useContext(xU)},_U=function(t){var n=y.useContext(dO);n==null&&Ms();var r=n[t];return r==null&&Ms(),r},cbe=function(){var t=y.useContext(dO);return Ao(t)},ube=function(){var t=y.useContext(hO),n=abe(t,function(r){return fU(r.domain,Number.isFinite)});return n||Ao(t)},AU=function(t){var n=y.useContext(hO);n==null&&Ms();var r=n[t];return r==null&&Ms(),r},fbe=function(){var t=y.useContext(yU);return t},dbe=function(){return y.useContext(bU)},pO=function(){return y.useContext(SU)},mO=function(){return y.useContext(wU)};function dc(e){"@babel/helpers - typeof";return dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}function hbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pbe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OU(r.key),r)}}function mbe(e,t,n){return t&&pbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vbe(e,t,n){return t=Vm(t),gbe(e,EU()?Reflect.construct(t,n||[],Vm(e).constructor):t.apply(e,n))}function gbe(e,t){if(t&&(dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ybe(e)}function ybe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EU=function(){return!!e})()}function Vm(e){return Vm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vm(e)}function bbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P_(e,t)}function P_(e,t){return P_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},P_(e,t)}function hz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hz(Object(n),!0).forEach(function(r){vO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vO(e,t,n){return t=OU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OU(e){var t=xbe(e,"string");return dc(t)=="symbol"?t:t+""}function xbe(e,t){if(dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wbe(e,t){return Ebe(e)||Abe(e,t)||_be(e,t)||Sbe()}function Sbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
511
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _be(e,t){if(e){if(typeof e=="string")return mz(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mz(e,t)}}function mz(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Abe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Ebe(e){if(Array.isArray(e))return e}function D_(){return D_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D_.apply(this,arguments)}var Obe=function(t,n){var r;return L.isValidElement(t)?r=L.cloneElement(t,n):lt(t)?r=t(n):r=L.createElement("line",D_({},n,{className:"recharts-reference-line-line"})),r},jbe=function(t,n,r,a,o,l,c,f,d){var m=o.x,h=o.y,g=o.width,x=o.height;if(r){var A=d.y,S=t.y.apply(A,{position:l});if(Qa(d,"discard")&&!t.y.isInRange(S))return null;var w=[{x:m+g,y:S},{x:m,y:S}];return f==="left"?w.reverse():w}if(n){var E=d.x,O=t.x.apply(E,{position:l});if(Qa(d,"discard")&&!t.x.isInRange(O))return null;var j=[{x:O,y:h+x},{x:O,y:h}];return c==="top"?j.reverse():j}if(a){var R=d.segment,C=R.map(function(T){return t.apply(T,{position:l})});return Qa(d,"discard")&&bye(C,function(T){return!t.isInRange(T)})?null:C}return null};function Tbe(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,o=e.yAxisId,l=e.shape,c=e.className,f=e.alwaysShow,d=lbe(),m=_U(a),h=AU(o),g=fbe();if(!d||!g)return null;Mi(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=fO({x:m.scale,y:h.scale}),A=kn(t),S=kn(n),w=r&&r.length===2,E=jbe(x,A,S,w,g,e.position,m.orientation,h.orientation,e);if(!E)return null;var O=wbe(E,2),j=O[0],R=j.x,C=j.y,T=O[1],N=T.x,D=T.y,z=Qa(e,"hidden")?"url(#".concat(d,")"):void 0,G=pz(pz({clipPath:z},mt(e,!0)),{},{x1:R,y1:C,x2:N,y2:D});return L.createElement(cn,{className:xt("recharts-reference-line",c)},Obe(l,G),rr.renderCallByParent(e,Zye({x1:R,y1:C,x2:N,y2:D})))}var gO=(function(e){function t(){return hbe(this,t),vbe(this,t,arguments)}return bbe(t,e),mbe(t,[{key:"render",value:function(){return L.createElement(Tbe,this.props)}}])})(L.Component);vO(gO,"displayName","ReferenceLine");vO(gO,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(this,arguments)}function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}function vz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vz(Object(n),!0).forEach(function(r){ug(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rbe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TU(r.key),r)}}function Nbe(e,t,n){return t&&Rbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mbe(e,t,n){return t=Gm(t),Pbe(e,jU()?Reflect.construct(t,n||[],Gm(e).constructor):t.apply(e,n))}function Pbe(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dbe(e)}function Dbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jU=function(){return!!e})()}function Gm(e){return Gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gm(e)}function kbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$_(e,t)}function $_(e,t){return $_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},$_(e,t)}function ug(e,t,n){return t=TU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TU(e){var t=$be(e,"string");return hc(t)=="symbol"?t:t+""}function $be(e,t){if(hc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zbe=function(t){var n=t.x,r=t.y,a=t.xAxis,o=t.yAxis,l=fO({x:a.scale,y:o.scale}),c=l.apply({x:n,y:r},{bandAware:!0});return Qa(t,"discard")&&!l.isInRange(c)?null:c},fg=(function(e){function t(){return Cbe(this,t),Mbe(this,t,arguments)}return kbe(t,e),Nbe(t,[{key:"render",value:function(){var r=this.props,a=r.x,o=r.y,l=r.r,c=r.alwaysShow,f=r.clipPathId,d=kn(a),m=kn(o);if(Mi(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!m)return null;var h=zbe(this.props);if(!h)return null;var g=h.x,x=h.y,A=this.props,S=A.shape,w=A.className,E=Qa(this.props,"hidden")?"url(#".concat(f,")"):void 0,O=gz(gz({clipPath:E},mt(this.props,!0)),{},{cx:g,cy:x});return L.createElement(cn,{className:xt("recharts-reference-dot",w)},t.renderDot(S,O),rr.renderCallByParent(this.props,{x:g-l,y:x-l,width:2*l,height:2*l}))}}])})(L.Component);ug(fg,"displayName","ReferenceDot");ug(fg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});ug(fg,"renderDot",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):lt(e)?n=e(t):n=L.createElement(uO,k_({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z_.apply(this,arguments)}function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(e)}function yz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yz(Object(n),!0).forEach(function(r){dg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ibe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RU(r.key),r)}}function Bbe(e,t,n){return t&&Ibe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ube(e,t,n){return t=Wm(t),qbe(e,CU()?Reflect.construct(t,n||[],Wm(e).constructor):t.apply(e,n))}function qbe(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hbe(e)}function Hbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CU=function(){return!!e})()}function Wm(e){return Wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wm(e)}function Fbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L_(e,t)}function L_(e,t){return L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},L_(e,t)}function dg(e,t,n){return t=RU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RU(e){var t=Vbe(e,"string");return pc(t)=="symbol"?t:t+""}function Vbe(e,t){if(pc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gbe=function(t,n,r,a,o){var l=o.x1,c=o.x2,f=o.y1,d=o.y2,m=o.xAxis,h=o.yAxis;if(!m||!h)return null;var g=fO({x:m.scale,y:h.scale}),x={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(f,{position:"start"}):g.y.rangeMin},A={x:n?g.x.apply(c,{position:"end"}):g.x.rangeMax,y:a?g.y.apply(d,{position:"end"}):g.y.rangeMax};return Qa(o,"discard")&&(!g.isInRange(x)||!g.isInRange(A))?null:vU(x,A)},hg=(function(e){function t(){return Lbe(this,t),Ube(this,t,arguments)}return Fbe(t,e),Bbe(t,[{key:"render",value:function(){var r=this.props,a=r.x1,o=r.x2,l=r.y1,c=r.y2,f=r.className,d=r.alwaysShow,m=r.clipPathId;Mi(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=kn(a),g=kn(o),x=kn(l),A=kn(c),S=this.props.shape;if(!h&&!g&&!x&&!A&&!S)return null;var w=Gbe(h,g,x,A,this.props);if(!w&&!S)return null;var E=Qa(this.props,"hidden")?"url(#".concat(m,")"):void 0;return L.createElement(cn,{className:xt("recharts-reference-area",f)},t.renderRect(S,bz(bz({clipPath:E},mt(this.props,!0)),w)),rr.renderCallByParent(this.props,w))}}])})(L.Component);dg(hg,"displayName","ReferenceArea");dg(hg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});dg(hg,"renderRect",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):lt(e)?n=e(t):n=L.createElement(cO,z_({},t,{className:"recharts-reference-area-rect"})),n});function NU(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function Wbe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Qye(r,n)}function Ybe(e,t,n){var r=n==="width",a=e.x,o=e.y,l=e.width,c=e.height;return t===1?{start:r?a:o,end:r?a+l:o+c}:{start:r?a+l:o+c,end:r?a:o}}function Ym(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-a)<=0}function Kbe(e,t){return NU(e,t+1)}function Zbe(e,t,n,r,a){for(var o=(r||[]).slice(),l=t.start,c=t.end,f=0,d=1,m=l,h=function(){var A=r==null?void 0:r[f];if(A===void 0)return{v:NU(r,d)};var S=f,w,E=function(){return w===void 0&&(w=n(A,S)),w},O=A.coordinate,j=f===0||Ym(e,O,E,m,c);j||(f=0,m=l,d+=1),j&&(m=O+e*(E()/2+a),f+=d)},g;d<=o.length;)if(g=h(),g)return g.v;return[]}function Xf(e){"@babel/helpers - typeof";return Xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xf(e)}function xz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xz(Object(n),!0).forEach(function(r){Xbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xbe(e,t,n){return t=Qbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qbe(e){var t=Jbe(e,"string");return Xf(t)=="symbol"?t:t+""}function Jbe(e,t){if(Xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e0e(e,t,n,r,a){for(var o=(r||[]).slice(),l=o.length,c=t.start,f=t.end,d=function(g){var x=o[g],A,S=function(){return A===void 0&&(A=n(x,g)),A};if(g===l-1){var w=e*(x.coordinate+e*S()/2-f);o[g]=x=tr(tr({},x),{},{tickCoord:w>0?x.coordinate-w*e:x.coordinate})}else o[g]=x=tr(tr({},x),{},{tickCoord:x.coordinate});var E=Ym(e,x.tickCoord,S,c,f);E&&(f=x.tickCoord-e*(S()/2+a),o[g]=tr(tr({},x),{},{isShow:!0}))},m=l-1;m>=0;m--)d(m);return o}function t0e(e,t,n,r,a,o){var l=(r||[]).slice(),c=l.length,f=t.start,d=t.end;if(o){var m=r[c-1],h=n(m,c-1),g=e*(m.coordinate+e*h/2-d);l[c-1]=m=tr(tr({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var x=Ym(e,m.tickCoord,function(){return h},f,d);x&&(d=m.tickCoord-e*(h/2+a),l[c-1]=tr(tr({},m),{},{isShow:!0}))}for(var A=o?c-1:c,S=function(O){var j=l[O],R,C=function(){return R===void 0&&(R=n(j,O)),R};if(O===0){var T=e*(j.coordinate-e*C()/2-f);l[O]=j=tr(tr({},j),{},{tickCoord:T<0?j.coordinate-T*e:j.coordinate})}else l[O]=j=tr(tr({},j),{},{tickCoord:j.coordinate});var N=Ym(e,j.tickCoord,C,f,d);N&&(f=j.tickCoord+e*(C()/2+a),l[O]=tr(tr({},j),{},{isShow:!0}))},w=0;w<A;w++)S(w);return l}function yO(e,t,n){var r=e.tick,a=e.ticks,o=e.viewBox,l=e.minTickGap,c=e.orientation,f=e.interval,d=e.tickFormatter,m=e.unit,h=e.angle;if(!a||!a.length||!r)return[];if(Me(f)||Lc.isSsr)return Kbe(a,typeof f=="number"&&Me(f)?f:0);var g=[],x=c==="top"||c==="bottom"?"width":"height",A=m&&x==="width"?of(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(j,R){var C=lt(d)?d(j.value,R):j.value;return x==="width"?Wbe(of(C,{fontSize:t,letterSpacing:n}),A,h):of(C,{fontSize:t,letterSpacing:n})[x]},w=a.length>=2?Ca(a[1].coordinate-a[0].coordinate):1,E=Ybe(o,w,x);return f==="equidistantPreserveStart"?Zbe(w,E,S,a,l):(f==="preserveStart"||f==="preserveStartEnd"?g=t0e(w,E,S,a,l,f==="preserveStartEnd"):g=e0e(w,E,S,a,l),g.filter(function(O){return O.isShow}))}var n0e=["viewBox"],r0e=["viewBox"],a0e=["ticks"];function mc(e){"@babel/helpers - typeof";return mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(e)}function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$l.apply(this,arguments)}function wz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wz(Object(n),!0).forEach(function(r){bO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y1(e,t){if(e==null)return{};var n=i0e(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function o0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PU(r.key),r)}}function s0e(e,t,n){return t&&Sz(e.prototype,t),n&&Sz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l0e(e,t,n){return t=Km(t),c0e(e,MU()?Reflect.construct(t,n||[],Km(e).constructor):t.apply(e,n))}function c0e(e,t){if(t&&(mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u0e(e)}function u0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MU=function(){return!!e})()}function Km(e){return Km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Km(e)}function f0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I_(e,t)}function I_(e,t){return I_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},I_(e,t)}function bO(e,t,n){return t=PU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PU(e){var t=d0e(e,"string");return mc(t)=="symbol"?t:t+""}function d0e(e,t){if(mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qc=(function(e){function t(n){var r;return o0e(this,t),r=l0e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return f0e(t,e),s0e(t,[{key:"shouldComponentUpdate",value:function(r,a){var o=r.viewBox,l=Y1(r,n0e),c=this.props,f=c.viewBox,d=Y1(c,r0e);return!Hl(o,f)||!Hl(l,d)||!Hl(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,o=a.x,l=a.y,c=a.width,f=a.height,d=a.orientation,m=a.tickSize,h=a.mirror,g=a.tickMargin,x,A,S,w,E,O,j=h?-1:1,R=r.tickSize||m,C=Me(r.tickCoord)?r.tickCoord:r.coordinate;switch(d){case"top":x=A=r.coordinate,w=l+ +!h*f,S=w-j*R,O=S-j*g,E=C;break;case"left":S=w=r.coordinate,A=o+ +!h*c,x=A-j*R,E=x-j*g,O=C;break;case"right":S=w=r.coordinate,A=o+ +h*c,x=A+j*R,E=x+j*g,O=C;break;default:x=A=r.coordinate,w=l+ +h*f,S=w+j*R,O=S+j*g,E=C;break}return{line:{x1:x,y1:S,x2:A,y2:w},tick:{x:E,y:O}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,o=r.mirror,l;switch(a){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,o=r.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,c=r.height,f=r.orientation,d=r.mirror,m=r.axisLine,h=Pn(Pn(Pn({},mt(this.props,!1)),mt(m,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!d||f==="bottom"&&d);h=Pn(Pn({},h),{},{x1:a,y1:o+g*c,x2:a+l,y2:o+g*c})}else{var x=+(f==="left"&&!d||f==="right"&&d);h=Pn(Pn({},h),{},{x1:a+x*l,y1:o,x2:a+x*l,y2:o+c})}return L.createElement("line",$l({},h,{className:xt("recharts-cartesian-axis-line",fa(m,"className"))}))}},{key:"renderTicks",value:function(r,a,o){var l=this,c=this.props,f=c.tickLine,d=c.stroke,m=c.tick,h=c.tickFormatter,g=c.unit,x=yO(Pn(Pn({},this.props),{},{ticks:r}),a,o),A=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),w=mt(this.props,!1),E=mt(m,!1),O=Pn(Pn({},w),{},{fill:"none"},mt(f,!1)),j=x.map(function(R,C){var T=l.getTickLineCoord(R),N=T.line,D=T.tick,z=Pn(Pn(Pn(Pn({textAnchor:A,verticalAnchor:S},w),{},{stroke:"none",fill:d},E),D),{},{index:C,payload:R,visibleTicksCount:x.length,tickFormatter:h});return L.createElement(cn,$l({className:"recharts-cartesian-axis-tick",key:"tick-".concat(R.value,"-").concat(R.coordinate,"-").concat(R.tickCoord)},am(l.props,R,C)),f&&L.createElement("line",$l({},O,N,{className:xt("recharts-cartesian-axis-tick-line",fa(f,"className"))})),m&&t.renderTickItem(m,z,"".concat(lt(h)?h(R.value,C):R.value).concat(g||"")))});return L.createElement("g",{className:"recharts-cartesian-axis-ticks"},j)}},{key:"render",value:function(){var r=this,a=this.props,o=a.axisLine,l=a.width,c=a.height,f=a.ticksGenerator,d=a.className,m=a.hide;if(m)return null;var h=this.props,g=h.ticks,x=Y1(h,a0e),A=g;return lt(f)&&(A=g&&g.length>0?f(this.props):f(x)),l<=0||c<=0||!A||!A.length?null:L.createElement(cn,{className:xt("recharts-cartesian-axis",d),ref:function(w){r.layerReference=w}},o&&this.renderAxisLine(),this.renderTicks(A,this.state.fontSize,this.state.letterSpacing),rr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,o){var l,c=xt(a.className,"recharts-cartesian-axis-tick-value");return L.isValidElement(r)?l=L.cloneElement(r,Pn(Pn({},a),{},{className:c})):lt(r)?l=r(Pn(Pn({},a),{},{className:c})):l=L.createElement(mm,$l({},a,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(y.Component);bO(qc,"displayName","CartesianAxis");bO(qc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var h0e=["x1","y1","x2","y2","key"],p0e=["offset"];function Ps(e){"@babel/helpers - typeof";return Ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ps(e)}function _z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ar(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_z(Object(n),!0).forEach(function(r){m0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_z(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m0e(e,t,n){return t=v0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v0e(e){var t=g0e(e,"string");return Ps(t)=="symbol"?t:t+""}function g0e(e,t){if(Ps(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ps(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ys(){return ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ys.apply(this,arguments)}function Az(e,t){if(e==null)return{};var n=y0e(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function y0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var b0e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,o=t.y,l=t.width,c=t.height,f=t.ry;return L.createElement("rect",{x:a,y:o,ry:f,width:l,height:c,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function DU(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(lt(e))n=e(t);else{var r=t.x1,a=t.y1,o=t.x2,l=t.y2,c=t.key,f=Az(t,h0e),d=mt(f,!1);d.offset;var m=Az(d,p0e);n=L.createElement("line",ys({},m,{x1:r,y1:a,x2:o,y2:l,fill:"none",key:c}))}return n}function x0e(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,o=e.horizontalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(c,f){var d=ar(ar({},e),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(f),index:f});return DU(a,d)});return L.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function w0e(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,o=e.verticalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(c,f){var d=ar(ar({},e),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(f),index:f});return DU(a,d)});return L.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function S0e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,o=e.width,l=e.height,c=e.horizontalPoints,f=e.horizontal,d=f===void 0?!0:f;if(!d||!t||!t.length)return null;var m=c.map(function(g){return Math.round(g+a-a)}).sort(function(g,x){return g-x});a!==m[0]&&m.unshift(0);var h=m.map(function(g,x){var A=!m[x+1],S=A?a+l-g:m[x+1]-g;if(S<=0)return null;var w=x%t.length;return L.createElement("rect",{key:"react-".concat(x),y:g,x:r,height:S,width:o,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function _0e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,o=e.x,l=e.y,c=e.width,f=e.height,d=e.verticalPoints;if(!n||!r||!r.length)return null;var m=d.map(function(g){return Math.round(g+o-o)}).sort(function(g,x){return g-x});o!==m[0]&&m.unshift(0);var h=m.map(function(g,x){var A=!m[x+1],S=A?o+c-g:m[x+1]-g;if(S<=0)return null;var w=x%r.length;return L.createElement("rect",{key:"react-".concat(x),x:g,y:l,width:S,height:f,stroke:"none",fill:r[w],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var A0e=function(t,n){var r=t.xAxis,a=t.width,o=t.height,l=t.offset;return Y8(yO(ar(ar(ar({},qc.defaultProps),r),{},{ticks:Ti(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.left,l.left+l.width,n)},E0e=function(t,n){var r=t.yAxis,a=t.width,o=t.height,l=t.offset;return Y8(yO(ar(ar(ar({},qc.defaultProps),r),{},{ticks:Ti(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.top,l.top+l.height,n)},Ml={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function kU(e){var t,n,r,a,o,l,c=pO(),f=mO(),d=dbe(),m=ar(ar({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ml.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Ml.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Ml.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Ml.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Ml.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:Ml.verticalFill,x:Me(e.x)?e.x:d.left,y:Me(e.y)?e.y:d.top,width:Me(e.width)?e.width:d.width,height:Me(e.height)?e.height:d.height}),h=m.x,g=m.y,x=m.width,A=m.height,S=m.syncWithTicks,w=m.horizontalValues,E=m.verticalValues,O=cbe(),j=ube();if(!Me(x)||x<=0||!Me(A)||A<=0||!Me(h)||h!==+h||!Me(g)||g!==+g)return null;var R=m.verticalCoordinatesGenerator||A0e,C=m.horizontalCoordinatesGenerator||E0e,T=m.horizontalPoints,N=m.verticalPoints;if((!T||!T.length)&&lt(C)){var D=w&&w.length,z=C({yAxis:j?ar(ar({},j),{},{ticks:D?w:j.ticks}):void 0,width:c,height:f,offset:d},D?!0:S);Mi(Array.isArray(z),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ps(z),"]")),Array.isArray(z)&&(T=z)}if((!N||!N.length)&&lt(R)){var G=E&&E.length,U=R({xAxis:O?ar(ar({},O),{},{ticks:G?E:O.ticks}):void 0,width:c,height:f,offset:d},G?!0:S);Mi(Array.isArray(U),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ps(U),"]")),Array.isArray(U)&&(N=U)}return L.createElement("g",{className:"recharts-cartesian-grid"},L.createElement(b0e,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),L.createElement(x0e,ys({},m,{offset:d,horizontalPoints:T,xAxis:O,yAxis:j})),L.createElement(w0e,ys({},m,{offset:d,verticalPoints:N,xAxis:O,yAxis:j})),L.createElement(S0e,ys({},m,{horizontalPoints:T})),L.createElement(_0e,ys({},m,{verticalPoints:N})))}kU.displayName="CartesianGrid";var O0e=["layout","type","stroke","connectNulls","isRange","ref"],j0e=["key"],$U;function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function zU(e,t){if(e==null)return{};var n=T0e(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function T0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bs(){return bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bs.apply(this,arguments)}function Ez(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ez(Object(n),!0).forEach(function(r){Ka(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ez(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IU(r.key),r)}}function R0e(e,t,n){return t&&Oz(e.prototype,t),n&&Oz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N0e(e,t,n){return t=Zm(t),M0e(e,LU()?Reflect.construct(t,n||[],Zm(e).constructor):t.apply(e,n))}function M0e(e,t){if(t&&(vc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P0e(e)}function P0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LU=function(){return!!e})()}function Zm(e){return Zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zm(e)}function D0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B_(e,t)}function B_(e,t){return B_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},B_(e,t)}function Ka(e,t,n){return t=IU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IU(e){var t=k0e(e,"string");return vc(t)=="symbol"?t:t+""}function k0e(e,t){if(vc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ho=(function(e){function t(){var n;C0e(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=N0e(this,t,[].concat(a)),Ka(n,"state",{isAnimationFinished:!0}),Ka(n,"id",jd("recharts-area-")),Ka(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),lt(l)&&l()}),Ka(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),lt(l)&&l()}),n}return D0e(t,e),R0e(t,[{key:"renderDots",value:function(r,a,o){var l=this.props.isAnimationActive,c=this.state.isAnimationFinished;if(l&&!c)return null;var f=this.props,d=f.dot,m=f.points,h=f.dataKey,g=mt(this.props,!1),x=mt(d,!0),A=m.map(function(w,E){var O=wo(wo(wo({key:"dot-".concat(E),r:3},g),x),{},{index:E,cx:w.x,cy:w.y,dataKey:h,value:w.value,payload:w.payload,points:m});return t.renderDotItem(d,O)}),S={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(o,")"):null};return L.createElement(cn,bs({className:"recharts-area-dots"},S),A)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,f=l[0].x,d=l[l.length-1].x,m=r*Math.abs(f-d),h=Eo(l.map(function(g){return g.y||0}));return Me(o)&&typeof o=="number"?h=Math.max(o,h):o&&Array.isArray(o)&&o.length&&(h=Math.max(Eo(o.map(function(g){return g.y||0})),h)),Me(h)?L.createElement("rect",{x:f<d?f:f-m,y:0,width:m,height:Math.floor(h+(c?parseInt("".concat(c),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,f=l[0].y,d=l[l.length-1].y,m=r*Math.abs(f-d),h=Eo(l.map(function(g){return g.x||0}));return Me(o)&&typeof o=="number"?h=Math.max(o,h):o&&Array.isArray(o)&&o.length&&(h=Math.max(Eo(o.map(function(g){return g.x||0})),h)),Me(h)?L.createElement("rect",{x:0,y:f<d?f:f-m,width:h+(c?parseInt("".concat(c),10):1),height:Math.floor(m)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,o,l){var c=this.props,f=c.layout,d=c.type,m=c.stroke,h=c.connectNulls,g=c.isRange;c.ref;var x=zU(c,O0e);return L.createElement(cn,{clipPath:o?"url(#clipPath-".concat(l,")"):null},L.createElement(cf,bs({},mt(x,!0),{points:r,connectNulls:h,type:d,baseLine:a,layout:f,stroke:"none",className:"recharts-area-area"})),m!=="none"&&L.createElement(cf,bs({},mt(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:h,fill:"none",points:r})),m!=="none"&&g&&L.createElement(cf,bs({},mt(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:h,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var o=this,l=this.props,c=l.points,f=l.baseLine,d=l.isAnimationActive,m=l.animationBegin,h=l.animationDuration,g=l.animationEasing,x=l.animationId,A=this.state,S=A.prevPoints,w=A.prevBaseLine;return L.createElement(qi,{begin:m,duration:h,isActive:d,easing:g,from:{t:0},to:{t:1},key:"area-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var O=E.t;if(S){var j=S.length/c.length,R=c.map(function(D,z){var G=Math.floor(z*j);if(S[G]){var U=S[G],P=ia(U.x,D.x),B=ia(U.y,D.y);return wo(wo({},D),{},{x:P(O),y:B(O)})}return D}),C;if(Me(f)&&typeof f=="number"){var T=ia(w,f);C=T(O)}else if(yt(f)||$c(f)){var N=ia(w,0);C=N(O)}else C=f.map(function(D,z){var G=Math.floor(z*j);if(w[G]){var U=w[G],P=ia(U.x,D.x),B=ia(U.y,D.y);return wo(wo({},D),{},{x:P(O),y:B(O)})}return D});return o.renderAreaStatically(R,C,r,a)}return L.createElement(cn,null,L.createElement("defs",null,L.createElement("clipPath",{id:"animationClipPath-".concat(a)},o.renderClipRect(O))),L.createElement(cn,{clipPath:"url(#animationClipPath-".concat(a,")")},o.renderAreaStatically(c,f,r,a)))})}},{key:"renderArea",value:function(r,a){var o=this.props,l=o.points,c=o.baseLine,f=o.isAnimationActive,d=this.state,m=d.prevPoints,h=d.prevBaseLine,g=d.totalLength;return f&&l&&l.length&&(!m&&g>0||!Rf(m,l)||!Rf(h,c))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(l,c,r,a)}},{key:"render",value:function(){var r,a=this.props,o=a.hide,l=a.dot,c=a.points,f=a.className,d=a.top,m=a.left,h=a.xAxis,g=a.yAxis,x=a.width,A=a.height,S=a.isAnimationActive,w=a.id;if(o||!c||!c.length)return null;var E=this.state.isAnimationFinished,O=c.length===1,j=xt("recharts-area",f),R=h&&h.allowDataOverflow,C=g&&g.allowDataOverflow,T=R||C,N=yt(w)?this.id:w,D=(r=mt(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},z=D.r,G=z===void 0?3:z,U=D.strokeWidth,P=U===void 0?2:U,B=Qie(l)?l:{},q=B.clipDot,W=q===void 0?!0:q,$=G*2+P;return L.createElement(cn,{className:j},R||C?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(N)},L.createElement("rect",{x:R?m:m-x/2,y:C?d:d-A/2,width:R?x:x*2,height:C?A:A*2})),!W&&L.createElement("clipPath",{id:"clipPath-dots-".concat(N)},L.createElement("rect",{x:m-$/2,y:d-$/2,width:x+$,height:A+$}))):null,O?null:this.renderArea(T,N),(l||O)&&this.renderDots(T,W,N),(!S||E)&&To.renderCallByParent(this.props,c))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(y.PureComponent);$U=Ho;Ka(Ho,"displayName","Area");Ka(Ho,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Lc.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ka(Ho,"getBaseValue",function(e,t,n,r){var a=e.layout,o=e.baseValue,l=t.props.baseValue,c=l??o;if(Me(c)&&typeof c=="number")return c;var f=a==="horizontal"?r:n,d=f.scale.domain();if(f.type==="number"){var m=Math.max(d[0],d[1]),h=Math.min(d[0],d[1]);return c==="dataMin"?h:c==="dataMax"||m<0?m:Math.max(Math.min(d[0],d[1]),0)}return c==="dataMin"?d[0]:c==="dataMax"?d[1]:d[0]});Ka(Ho,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,c=e.bandSize,f=e.dataKey,d=e.stackedData,m=e.dataStartIndex,h=e.displayedData,g=e.offset,x=t.layout,A=d&&d.length,S=$U.getBaseValue(t,n,r,a),w=x==="horizontal",E=!1,O=h.map(function(R,C){var T;A?T=d[m+C]:(T=Br(R,f),Array.isArray(T)?E=!0:T=[S,T]);var N=T[1]==null||A&&Br(R,f)==null;return w?{x:Fk({axis:r,ticks:o,bandSize:c,entry:R,index:C}),y:N?null:a.scale(T[1]),value:T,payload:R}:{x:N?null:r.scale(T[1]),y:Fk({axis:a,ticks:l,bandSize:c,entry:R,index:C}),value:T,payload:R}}),j;return A||E?j=O.map(function(R){var C=Array.isArray(R.value)?R.value[0]:null;return w?{x:R.x,y:C!=null&&R.y!=null?a.scale(C):null}:{x:C!=null?r.scale(C):null,y:R.y}}):j=w?a.scale(S):r.scale(S),wo({points:O,baseLine:j,layout:x,isRange:E},g)});Ka(Ho,"renderDotItem",function(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(lt(e))n=e(t);else{var r=xt("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,o=zU(t,j0e);n=L.createElement(uO,bs({},o,{key:a,className:r}))}return n});function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function $0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z0e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qU(r.key),r)}}function L0e(e,t,n){return t&&z0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function I0e(e,t,n){return t=Xm(t),B0e(e,BU()?Reflect.construct(t,n||[],Xm(e).constructor):t.apply(e,n))}function B0e(e,t){if(t&&(gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U0e(e)}function U0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BU=function(){return!!e})()}function Xm(e){return Xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xm(e)}function q0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U_(e,t)}function U_(e,t){return U_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},U_(e,t)}function UU(e,t,n){return t=qU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qU(e){var t=H0e(e,"string");return gc(t)=="symbol"?t:t+""}function H0e(e,t){if(gc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function q_(){return q_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q_.apply(this,arguments)}function F0e(e){var t=e.xAxisId,n=pO(),r=mO(),a=_U(t);return a==null?null:y.createElement(qc,q_({},a,{className:xt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Ti(l,!0)}}))}var pg=(function(e){function t(){return $0e(this,t),I0e(this,t,arguments)}return q0e(t,e),L0e(t,[{key:"render",value:function(){return y.createElement(F0e,this.props)}}])})(y.Component);UU(pg,"displayName","XAxis");UU(pg,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function V0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G0e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VU(r.key),r)}}function W0e(e,t,n){return t&&G0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y0e(e,t,n){return t=Qm(t),K0e(e,HU()?Reflect.construct(t,n||[],Qm(e).constructor):t.apply(e,n))}function K0e(e,t){if(t&&(yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z0e(e)}function Z0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HU=function(){return!!e})()}function Qm(e){return Qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qm(e)}function X0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H_(e,t)}function H_(e,t){return H_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},H_(e,t)}function FU(e,t,n){return t=VU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VU(e){var t=Q0e(e,"string");return yc(t)=="symbol"?t:t+""}function Q0e(e,t){if(yc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function F_(){return F_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F_.apply(this,arguments)}var J0e=function(t){var n=t.yAxisId,r=pO(),a=mO(),o=AU(n);return o==null?null:y.createElement(qc,F_({},o,{className:xt("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(c){return Ti(c,!0)}}))},mg=(function(e){function t(){return V0e(this,t),Y0e(this,t,arguments)}return X0e(t,e),W0e(t,[{key:"render",value:function(){return y.createElement(J0e,this.props)}}])})(y.Component);FU(mg,"displayName","YAxis");FU(mg,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function jz(e){return rxe(e)||nxe(e)||txe(e)||exe()}function exe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
512
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function txe(e,t){if(e){if(typeof e=="string")return V_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V_(e,t)}}function nxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rxe(e){if(Array.isArray(e))return V_(e)}function V_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var G_=function(t,n,r,a,o){var l=Ma(t,gO),c=Ma(t,fg),f=[].concat(jz(l),jz(c)),d=Ma(t,hg),m="".concat(a,"Id"),h=a[0],g=n;if(f.length&&(g=f.reduce(function(S,w){if(w.props[m]===r&&Qa(w.props,"extendDomain")&&Me(w.props[h])){var E=w.props[h];return[Math.min(S[0],E),Math.max(S[1],E)]}return S},g)),d.length){var x="".concat(h,"1"),A="".concat(h,"2");g=d.reduce(function(S,w){if(w.props[m]===r&&Qa(w.props,"extendDomain")&&Me(w.props[x])&&Me(w.props[A])){var E=w.props[x],O=w.props[A];return[Math.min(S[0],E,O),Math.max(S[1],E,O)]}return S},g)}return o&&o.length&&(g=o.reduce(function(S,w){return Me(w)?[Math.min(S[0],w),Math.max(S[1],w)]:S},g)),g},K1={exports:{}},Tz;function axe(){return Tz||(Tz=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(f,d,m){this.fn=f,this.context=d,this.once=m||!1}function o(f,d,m,h,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new a(m,h||f,g),A=n?n+d:d;return f._events[A]?f._events[A].fn?f._events[A]=[f._events[A],x]:f._events[A].push(x):(f._events[A]=x,f._eventsCount++),f}function l(f,d){--f._eventsCount===0?f._events=new r:delete f._events[d]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],m,h;if(this._eventsCount===0)return d;for(h in m=this._events)t.call(m,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},c.prototype.listeners=function(d){var m=n?n+d:d,h=this._events[m];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,x=h.length,A=new Array(x);g<x;g++)A[g]=h[g].fn;return A},c.prototype.listenerCount=function(d){var m=n?n+d:d,h=this._events[m];return h?h.fn?1:h.length:0},c.prototype.emit=function(d,m,h,g,x,A){var S=n?n+d:d;if(!this._events[S])return!1;var w=this._events[S],E=arguments.length,O,j;if(w.fn){switch(w.once&&this.removeListener(d,w.fn,void 0,!0),E){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,m),!0;case 3:return w.fn.call(w.context,m,h),!0;case 4:return w.fn.call(w.context,m,h,g),!0;case 5:return w.fn.call(w.context,m,h,g,x),!0;case 6:return w.fn.call(w.context,m,h,g,x,A),!0}for(j=1,O=new Array(E-1);j<E;j++)O[j-1]=arguments[j];w.fn.apply(w.context,O)}else{var R=w.length,C;for(j=0;j<R;j++)switch(w[j].once&&this.removeListener(d,w[j].fn,void 0,!0),E){case 1:w[j].fn.call(w[j].context);break;case 2:w[j].fn.call(w[j].context,m);break;case 3:w[j].fn.call(w[j].context,m,h);break;case 4:w[j].fn.call(w[j].context,m,h,g);break;default:if(!O)for(C=1,O=new Array(E-1);C<E;C++)O[C-1]=arguments[C];w[j].fn.apply(w[j].context,O)}}return!0},c.prototype.on=function(d,m,h){return o(this,d,m,h,!1)},c.prototype.once=function(d,m,h){return o(this,d,m,h,!0)},c.prototype.removeListener=function(d,m,h,g){var x=n?n+d:d;if(!this._events[x])return this;if(!m)return l(this,x),this;var A=this._events[x];if(A.fn)A.fn===m&&(!g||A.once)&&(!h||A.context===h)&&l(this,x);else{for(var S=0,w=[],E=A.length;S<E;S++)(A[S].fn!==m||g&&!A[S].once||h&&A[S].context!==h)&&w.push(A[S]);w.length?this._events[x]=w.length===1?w[0]:w:l(this,x)}return this},c.prototype.removeAllListeners=function(d){var m;return d?(m=n?n+d:d,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(K1)),K1.exports}var ixe=axe();const oxe=Ht(ixe);var Z1=new oxe,X1="recharts.syncMouseEvents";function Qf(e){"@babel/helpers - typeof";return Qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qf(e)}function sxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lxe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,GU(r.key),r)}}function cxe(e,t,n){return t&&lxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q1(e,t,n){return t=GU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GU(e){var t=uxe(e,"string");return Qf(t)=="symbol"?t:t+""}function uxe(e,t){if(Qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fxe=(function(){function e(){sxe(this,e),Q1(this,"activeIndex",0),Q1(this,"coordinateList",[]),Q1(this,"layout","horizontal")}return cxe(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,o=a===void 0?null:a,l=n.container,c=l===void 0?null:l,f=n.layout,d=f===void 0?null:f,m=n.offset,h=m===void 0?null:m,g=n.mouseHandlerCallback,x=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=c??this.container,this.layout=d??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=x??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),o=a.x,l=a.y,c=a.height,f=this.coordinateList[this.activeIndex].coordinate,d=((n=window)===null||n===void 0?void 0:n.scrollX)||0,m=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=o+f+d,g=l+this.offset.top+c/2+m;this.mouseHandlerCallback({pageX:h,pageY:g})}}}])})();function dxe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&Me(r)&&Me(a))return!0}return!1}function hxe(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function WU(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,o=e.endAngle,l=Kn(t,n,r,a),c=Kn(t,n,r,o);return{points:[l,c],cx:t,cy:n,radius:r,startAngle:a,endAngle:o}}function pxe(e,t,n){var r,a,o,l;if(e==="horizontal")r=t.x,o=r,a=n.top,l=n.top+n.height;else if(e==="vertical")a=t.y,l=a,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var c=t.cx,f=t.cy,d=t.innerRadius,m=t.outerRadius,h=t.angle,g=Kn(c,f,d,h),x=Kn(c,f,m,h);r=g.x,a=g.y,o=x.x,l=x.y}else return WU(t);return[{x:r,y:a},{x:o,y:l}]}function Jf(e){"@babel/helpers - typeof";return Jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jf(e)}function Cz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cz(Object(n),!0).forEach(function(r){mxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mxe(e,t,n){return t=vxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vxe(e){var t=gxe(e,"string");return Jf(t)=="symbol"?t:t+""}function gxe(e,t){if(Jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yxe(e){var t,n,r=e.element,a=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,c=e.activePayload,f=e.offset,d=e.activeTooltipIndex,m=e.tooltipAxisBandSize,h=e.layout,g=e.chartName,x=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!x||!o||!l||g!=="ScatterChart"&&a!=="axis")return null;var A,S=cf;if(g==="ScatterChart")A=l,S=bge;else if(g==="BarChart")A=hxe(h,l,f,m),S=cO;else if(h==="radial"){var w=WU(l),E=w.cx,O=w.cy,j=w.radius,R=w.startAngle,C=w.endAngle;A={cx:E,cy:O,startAngle:R,endAngle:C,innerRadius:j,outerRadius:j},S=J8}else A={points:pxe(h,l,f)},S=cf;var T=vp(vp(vp(vp({stroke:"#ccc",pointerEvents:"none"},f),A),mt(x,!1)),{},{payload:c,payloadIndex:d,className:xt("recharts-tooltip-cursor",x.className)});return y.isValidElement(x)?y.cloneElement(x,T):y.createElement(S,T)}var bxe=["item"],xxe=["children","className","width","height","style","compact","title","desc"];function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bc(e)}function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zl.apply(this,arguments)}function Rz(e,t){return _xe(e)||Sxe(e,t)||KU(e,t)||wxe()}function wxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
513
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function _xe(e){if(Array.isArray(e))return e}function Nz(e,t){if(e==null)return{};var n=Axe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Axe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Exe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oxe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZU(r.key),r)}}function jxe(e,t,n){return t&&Oxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Txe(e,t,n){return t=Jm(t),Cxe(e,YU()?Reflect.construct(t,n||[],Jm(e).constructor):t.apply(e,n))}function Cxe(e,t){if(t&&(bc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rxe(e)}function Rxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YU=function(){return!!e})()}function Jm(e){return Jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jm(e)}function Nxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W_(e,t)}function W_(e,t){return W_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},W_(e,t)}function xc(e){return Dxe(e)||Pxe(e)||KU(e)||Mxe()}function Mxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
514
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KU(e,t){if(e){if(typeof e=="string")return Y_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y_(e,t)}}function Pxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dxe(e){if(Array.isArray(e))return Y_(e)}function Y_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mz(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ze(e,t,n){return t=ZU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZU(e){var t=kxe(e,"string");return bc(t)=="symbol"?t:t+""}function kxe(e,t){if(bc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $xe={xAxis:["bottom","top"],yAxis:["left","right"]},zxe={width:"100%",height:"100%"},XU={x:0,y:0};function gp(e){return e}var Lxe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Ixe=function(t,n,r,a){var o=n.find(function(m){return m&&m.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,c=a.radius;return he(he(he({},a),Kn(a.cx,a.cy,c,l)),{},{angle:l,radius:c})}var f=o.coordinate,d=a.angle;return he(he(he({},a),Kn(a.cx,a.cy,f,d)),{},{angle:d,radius:f})}return XU},vg=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(c,f){var d=f.props.data;return d&&d.length?[].concat(xc(c),xc(d)):c},[]);return l.length>0?l:t&&t.length&&Me(a)&&Me(o)?t.slice(a,o+1):[]};function QU(e){return e==="number"?[0,"auto"]:void 0}var K_=function(t,n,r,a){var o=t.graphicalItems,l=t.tooltipAxis,c=vg(n,t);return r<0||!o||!o.length||r>=c.length?null:o.reduce(function(f,d){var m,h=(m=d.props.data)!==null&&m!==void 0?m:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var x=h===void 0?c:h;g=nm(x,l.dataKey,a)}else g=h&&h[r]||c[r];return g?[].concat(xc(f),[Z8(d,g)]):f},[])},Pz=function(t,n,r,a){var o=a||{x:t.chartX,y:t.chartY},l=Lxe(o,r),c=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,m=Qhe(l,c,d,f);if(m>=0&&d){var h=d[m]&&d[m].value,g=K_(t,n,m,h),x=Ixe(r,c,m,o);return{activeTooltipIndex:m,activeLabel:h,activePayload:g,activeCoordinate:x}}return null},Bxe=function(t,n){var r=n.axes,a=n.graphicalItems,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,h=t.children,g=t.stackOffset,x=W8(m,o);return r.reduce(function(A,S){var w,E=S.type.defaultProps!==void 0?he(he({},S.type.defaultProps),S.props):S.props,O=E.type,j=E.dataKey,R=E.allowDataOverflow,C=E.allowDuplicatedCategory,T=E.scale,N=E.ticks,D=E.includeHidden,z=E[l];if(A[z])return A;var G=vg(t.data,{graphicalItems:a.filter(function(Z){var X,oe=l in Z.props?Z.props[l]:(X=Z.type.defaultProps)===null||X===void 0?void 0:X[l];return oe===z}),dataStartIndex:f,dataEndIndex:d}),U=G.length,P,B,q;dxe(E.domain,R,O)&&(P=p_(E.domain,null,R),x&&(O==="number"||T!=="auto")&&(q=lf(G,j,"category")));var W=QU(O);if(!P||P.length===0){var $,V=($=E.domain)!==null&&$!==void 0?$:W;if(j){if(P=lf(G,j,O),O==="category"&&x){var F=qie(P);C&&F?(B=P,P=Bm(0,U)):C||(P=Yk(V,P,S).reduce(function(Z,X){return Z.indexOf(X)>=0?Z:[].concat(xc(Z),[X])},[]))}else if(O==="category")C?P=P.filter(function(Z){return Z!==""&&!yt(Z)}):P=Yk(V,P,S).reduce(function(Z,X){return Z.indexOf(X)>=0||X===""||yt(X)?Z:[].concat(xc(Z),[X])},[]);else if(O==="number"){var K=rpe(G,a.filter(function(Z){var X,oe,ge=l in Z.props?Z.props[l]:(X=Z.type.defaultProps)===null||X===void 0?void 0:X[l],Ee="hide"in Z.props?Z.props.hide:(oe=Z.type.defaultProps)===null||oe===void 0?void 0:oe.hide;return ge===z&&(D||!Ee)}),j,o,m);K&&(P=K)}x&&(O==="number"||T!=="auto")&&(q=lf(G,j,"category"))}else x?P=Bm(0,U):c&&c[z]&&c[z].hasStack&&O==="number"?P=g==="expand"?[0,1]:K8(c[z].stackGroups,f,d):P=G8(G,a.filter(function(Z){var X=l in Z.props?Z.props[l]:Z.type.defaultProps[l],oe="hide"in Z.props?Z.props.hide:Z.type.defaultProps.hide;return X===z&&(D||!oe)}),O,m,!0);if(O==="number")P=G_(h,P,z,o,N),V&&(P=p_(V,P,R));else if(O==="category"&&V){var ie=V,I=P.every(function(Z){return ie.indexOf(Z)>=0});I&&(P=ie)}}return he(he({},A),{},Ze({},z,he(he({},E),{},{axisType:o,domain:P,categoricalDomain:q,duplicateDomain:B,originalDomain:(w=E.domain)!==null&&w!==void 0?w:W,isCategorical:x,layout:m})))},{})},Uxe=function(t,n){var r=n.graphicalItems,a=n.Axis,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,h=t.children,g=vg(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:d}),x=g.length,A=W8(m,o),S=-1;return r.reduce(function(w,E){var O=E.type.defaultProps!==void 0?he(he({},E.type.defaultProps),E.props):E.props,j=O[l],R=QU("number");if(!w[j]){S++;var C;return A?C=Bm(0,x):c&&c[j]&&c[j].hasStack?(C=K8(c[j].stackGroups,f,d),C=G_(h,C,j,o)):(C=p_(R,G8(g,r.filter(function(T){var N,D,z=l in T.props?T.props[l]:(N=T.type.defaultProps)===null||N===void 0?void 0:N[l],G="hide"in T.props?T.props.hide:(D=T.type.defaultProps)===null||D===void 0?void 0:D.hide;return z===j&&!G}),"number",m),a.defaultProps.allowDataOverflow),C=G_(h,C,j,o)),he(he({},w),{},Ze({},j,he(he({axisType:o},a.defaultProps),{},{hide:!0,orientation:fa($xe,"".concat(o,".").concat(S%2),null),domain:C,originalDomain:R,isCategorical:A,layout:m})))}return w},{})},qxe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.children,h="".concat(a,"Id"),g=Ma(m,o),x={};return g&&g.length?x=Bxe(t,{axes:g,graphicalItems:l,axisType:a,axisIdKey:h,stackGroups:c,dataStartIndex:f,dataEndIndex:d}):l&&l.length&&(x=Uxe(t,{Axis:o,graphicalItems:l,axisType:a,axisIdKey:h,stackGroups:c,dataStartIndex:f,dataEndIndex:d})),x},Hxe=function(t){var n=Ao(t),r=Ti(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:$E(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Rm(n,r)}},Dz=function(t){var n=t.children,r=t.defaultShowTooltip,a=Rr(n,uc),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Fxe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ni(n&&n.type);return r&&r.indexOf("Bar")>=0})},kz=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Vxe=function(t,n){var r=t.props,a=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,c=t.yAxisMap,f=c===void 0?{}:c,d=r.width,m=r.height,h=r.children,g=r.margin||{},x=Rr(h,uc),A=Rr(h,Fl),S=Object.keys(f).reduce(function(C,T){var N=f[T],D=N.orientation;return!N.mirror&&!N.hide?he(he({},C),{},Ze({},D,C[D]+N.width)):C},{left:g.left||0,right:g.right||0}),w=Object.keys(l).reduce(function(C,T){var N=l[T],D=N.orientation;return!N.mirror&&!N.hide?he(he({},C),{},Ze({},D,fa(C,"".concat(D))+N.height)):C},{top:g.top||0,bottom:g.bottom||0}),E=he(he({},w),S),O=E.bottom;x&&(E.bottom+=x.props.height||uc.defaultProps.height),A&&n&&(E=tpe(E,a,r,n));var j=d-E.left-E.right,R=m-E.top-E.bottom;return he(he({brushBottom:O},E),{},{width:Math.max(j,0),height:Math.max(R,0)})},Gxe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Wxe=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,l=t.validateTooltipEventTypes,c=l===void 0?["axis"]:l,f=t.axisComponents,d=t.legendContent,m=t.formatAxisMap,h=t.defaultProps,g=function(E,O){var j=O.graphicalItems,R=O.stackGroups,C=O.offset,T=O.updateId,N=O.dataStartIndex,D=O.dataEndIndex,z=E.barSize,G=E.layout,U=E.barGap,P=E.barCategoryGap,B=E.maxBarSize,q=kz(G),W=q.numericAxisName,$=q.cateAxisName,V=Fxe(j),F=[];return j.forEach(function(K,ie){var I=vg(E.data,{graphicalItems:[K],dataStartIndex:N,dataEndIndex:D}),Z=K.type.defaultProps!==void 0?he(he({},K.type.defaultProps),K.props):K.props,X=Z.dataKey,oe=Z.maxBarSize,ge=Z["".concat(W,"Id")],Ee=Z["".concat($,"Id")],me={},we=f.reduce(function(tn,Nt){var ln=O["".concat(Nt.axisType,"Map")],H=Z["".concat(Nt.axisType,"Id")];ln&&ln[H]||Nt.axisType==="zAxis"||Ms();var J=ln[H];return he(he({},tn),{},Ze(Ze({},Nt.axisType,J),"".concat(Nt.axisType,"Ticks"),Ti(J)))},me),ce=we[$],_e=we["".concat($,"Ticks")],Ae=R&&R[ge]&&R[ge].hasStack&&mpe(K,R[ge].stackGroups),se=Ni(K.type).indexOf("Bar")>=0,He=Rm(ce,_e),$e=[],Je=V&&Jhe({barSize:z,stackGroups:R,totalSize:Gxe(we,$)});if(se){var We,at,Rt=yt(oe)?B:oe,ft=(We=(at=Rm(ce,_e,!0))!==null&&at!==void 0?at:Rt)!==null&&We!==void 0?We:0;$e=epe({barGap:U,barCategoryGap:P,bandSize:ft!==He?ft:He,sizeList:Je[Ee],maxBarSize:Rt}),ft!==He&&($e=$e.map(function(tn){return he(he({},tn),{},{position:he(he({},tn.position),{},{offset:tn.position.offset-ft/2})})}))}var bn=K&&K.type&&K.type.getComposedData;bn&&F.push({props:he(he({},bn(he(he({},we),{},{displayedData:I,props:E,dataKey:X,item:K,bandSize:He,barPosition:$e,offset:C,stackedData:Ae,layout:G,dataStartIndex:N,dataEndIndex:D}))),{},Ze(Ze(Ze({key:K.key||"item-".concat(ie)},W,we[W]),$,we[$]),"animationId",T)),childIndex:toe(K,E.children),item:K})}),F},x=function(E,O){var j=E.props,R=E.dataStartIndex,C=E.dataEndIndex,T=E.updateId;if(!lM({props:j}))return null;var N=j.children,D=j.layout,z=j.stackOffset,G=j.data,U=j.reverseStackOrder,P=kz(D),B=P.numericAxisName,q=P.cateAxisName,W=Ma(N,r),$=dpe(G,W,"".concat(B,"Id"),"".concat(q,"Id"),z,U),V=f.reduce(function(Z,X){var oe="".concat(X.axisType,"Map");return he(he({},Z),{},Ze({},oe,qxe(j,he(he({},X),{},{graphicalItems:W,stackGroups:X.axisType===B&&$,dataStartIndex:R,dataEndIndex:C}))))},{}),F=Vxe(he(he({},V),{},{props:j,graphicalItems:W}),O==null?void 0:O.legendBBox);Object.keys(V).forEach(function(Z){V[Z]=m(j,V[Z],F,Z.replace("Map",""),n)});var K=V["".concat(q,"Map")],ie=Hxe(K),I=g(j,he(he({},V),{},{dataStartIndex:R,dataEndIndex:C,updateId:T,graphicalItems:W,stackGroups:$,offset:F}));return he(he({formattedGraphicalItems:I,graphicalItems:W,offset:F,stackGroups:$},ie),V)},A=(function(w){function E(O){var j,R,C;return Exe(this,E),C=Txe(this,E,[O]),Ze(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ze(C,"accessibilityManager",new fxe),Ze(C,"handleLegendBBoxUpdate",function(T){if(T){var N=C.state,D=N.dataStartIndex,z=N.dataEndIndex,G=N.updateId;C.setState(he({legendBBox:T},x({props:C.props,dataStartIndex:D,dataEndIndex:z,updateId:G},he(he({},C.state),{},{legendBBox:T}))))}}),Ze(C,"handleReceiveSyncEvent",function(T,N,D){if(C.props.syncId===T){if(D===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(N)}}),Ze(C,"handleBrushChange",function(T){var N=T.startIndex,D=T.endIndex;if(N!==C.state.dataStartIndex||D!==C.state.dataEndIndex){var z=C.state.updateId;C.setState(function(){return he({dataStartIndex:N,dataEndIndex:D},x({props:C.props,dataStartIndex:N,dataEndIndex:D,updateId:z},C.state))}),C.triggerSyncEvent({dataStartIndex:N,dataEndIndex:D})}}),Ze(C,"handleMouseEnter",function(T){var N=C.getMouseInfo(T);if(N){var D=he(he({},N),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var z=C.props.onMouseEnter;lt(z)&&z(D,T)}}),Ze(C,"triggeredAfterMouseMove",function(T){var N=C.getMouseInfo(T),D=N?he(he({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(D),C.triggerSyncEvent(D);var z=C.props.onMouseMove;lt(z)&&z(D,T)}),Ze(C,"handleItemMouseEnter",function(T){C.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),Ze(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),Ze(C,"handleMouseMove",function(T){T.persist(),C.throttleTriggeredAfterMouseMove(T)}),Ze(C,"handleMouseLeave",function(T){C.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};C.setState(N),C.triggerSyncEvent(N);var D=C.props.onMouseLeave;lt(D)&&D(N,T)}),Ze(C,"handleOuterEvent",function(T){var N=eoe(T),D=fa(C.props,"".concat(N));if(N&&lt(D)){var z,G;/.*touch.*/i.test(N)?G=C.getMouseInfo(T.changedTouches[0]):G=C.getMouseInfo(T),D((z=G)!==null&&z!==void 0?z:{},T)}}),Ze(C,"handleClick",function(T){var N=C.getMouseInfo(T);if(N){var D=he(he({},N),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var z=C.props.onClick;lt(z)&&z(D,T)}}),Ze(C,"handleMouseDown",function(T){var N=C.props.onMouseDown;if(lt(N)){var D=C.getMouseInfo(T);N(D,T)}}),Ze(C,"handleMouseUp",function(T){var N=C.props.onMouseUp;if(lt(N)){var D=C.getMouseInfo(T);N(D,T)}}),Ze(C,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),Ze(C,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&C.handleMouseDown(T.changedTouches[0])}),Ze(C,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&C.handleMouseUp(T.changedTouches[0])}),Ze(C,"handleDoubleClick",function(T){var N=C.props.onDoubleClick;if(lt(N)){var D=C.getMouseInfo(T);N(D,T)}}),Ze(C,"handleContextMenu",function(T){var N=C.props.onContextMenu;if(lt(N)){var D=C.getMouseInfo(T);N(D,T)}}),Ze(C,"triggerSyncEvent",function(T){C.props.syncId!==void 0&&Z1.emit(X1,C.props.syncId,T,C.eventEmitterSymbol)}),Ze(C,"applySyncEvent",function(T){var N=C.props,D=N.layout,z=N.syncMethod,G=C.state.updateId,U=T.dataStartIndex,P=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)C.setState(he({dataStartIndex:U,dataEndIndex:P},x({props:C.props,dataStartIndex:U,dataEndIndex:P,updateId:G},C.state)));else if(T.activeTooltipIndex!==void 0){var B=T.chartX,q=T.chartY,W=T.activeTooltipIndex,$=C.state,V=$.offset,F=$.tooltipTicks;if(!V)return;if(typeof z=="function")W=z(F,T);else if(z==="value"){W=-1;for(var K=0;K<F.length;K++)if(F[K].value===T.activeLabel){W=K;break}}var ie=he(he({},V),{},{x:V.left,y:V.top}),I=Math.min(B,ie.x+ie.width),Z=Math.min(q,ie.y+ie.height),X=F[W]&&F[W].value,oe=K_(C.state,C.props.data,W),ge=F[W]?{x:D==="horizontal"?F[W].coordinate:I,y:D==="horizontal"?Z:F[W].coordinate}:XU;C.setState(he(he({},T),{},{activeLabel:X,activeCoordinate:ge,activePayload:oe,activeTooltipIndex:W}))}else C.setState(T)}),Ze(C,"renderCursor",function(T){var N,D=C.state,z=D.isTooltipActive,G=D.activeCoordinate,U=D.activePayload,P=D.offset,B=D.activeTooltipIndex,q=D.tooltipAxisBandSize,W=C.getTooltipEventType(),$=(N=T.props.active)!==null&&N!==void 0?N:z,V=C.props.layout,F=T.key||"_recharts-cursor";return L.createElement(yxe,{key:F,activeCoordinate:G,activePayload:U,activeTooltipIndex:B,chartName:n,element:T,isActive:$,layout:V,offset:P,tooltipAxisBandSize:q,tooltipEventType:W})}),Ze(C,"renderPolarAxis",function(T,N,D){var z=fa(T,"type.axisType"),G=fa(C.state,"".concat(z,"Map")),U=T.type.defaultProps,P=U!==void 0?he(he({},U),T.props):T.props,B=G&&G[P["".concat(z,"Id")]];return y.cloneElement(T,he(he({},B),{},{className:xt(z,B.className),key:T.key||"".concat(N,"-").concat(D),ticks:Ti(B,!0)}))}),Ze(C,"renderPolarGrid",function(T){var N=T.props,D=N.radialLines,z=N.polarAngles,G=N.polarRadius,U=C.state,P=U.radiusAxisMap,B=U.angleAxisMap,q=Ao(P),W=Ao(B),$=W.cx,V=W.cy,F=W.innerRadius,K=W.outerRadius;return y.cloneElement(T,{polarAngles:Array.isArray(z)?z:Ti(W,!0).map(function(ie){return ie.coordinate}),polarRadius:Array.isArray(G)?G:Ti(q,!0).map(function(ie){return ie.coordinate}),cx:$,cy:V,innerRadius:F,outerRadius:K,key:T.key||"polar-grid",radialLines:D})}),Ze(C,"renderLegend",function(){var T=C.state.formattedGraphicalItems,N=C.props,D=N.children,z=N.width,G=N.height,U=C.props.margin||{},P=z-(U.left||0)-(U.right||0),B=F8({children:D,formattedGraphicalItems:T,legendWidth:P,legendContent:d});if(!B)return null;var q=B.item,W=Nz(B,bxe);return y.cloneElement(q,he(he({},W),{},{chartWidth:z,chartHeight:G,margin:U,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),Ze(C,"renderTooltip",function(){var T,N=C.props,D=N.children,z=N.accessibilityLayer,G=Rr(D,Va);if(!G)return null;var U=C.state,P=U.isTooltipActive,B=U.activeCoordinate,q=U.activePayload,W=U.activeLabel,$=U.offset,V=(T=G.props.active)!==null&&T!==void 0?T:P;return y.cloneElement(G,{viewBox:he(he({},$),{},{x:$.left,y:$.top}),active:V,label:W,payload:V?q:[],coordinate:B,accessibilityLayer:z})}),Ze(C,"renderBrush",function(T){var N=C.props,D=N.margin,z=N.data,G=C.state,U=G.offset,P=G.dataStartIndex,B=G.dataEndIndex,q=G.updateId;return y.cloneElement(T,{key:T.key||"_recharts-brush",onChange:dp(C.handleBrushChange,T.props.onChange),data:z,x:Me(T.props.x)?T.props.x:U.left,y:Me(T.props.y)?T.props.y:U.top+U.height+U.brushBottom-(D.bottom||0),width:Me(T.props.width)?T.props.width:U.width,startIndex:P,endIndex:B,updateId:"brush-".concat(q)})}),Ze(C,"renderReferenceElement",function(T,N,D){if(!T)return null;var z=C,G=z.clipPathId,U=C.state,P=U.xAxisMap,B=U.yAxisMap,q=U.offset,W=T.type.defaultProps||{},$=T.props,V=$.xAxisId,F=V===void 0?W.xAxisId:V,K=$.yAxisId,ie=K===void 0?W.yAxisId:K;return y.cloneElement(T,{key:T.key||"".concat(N,"-").concat(D),xAxis:P[F],yAxis:B[ie],viewBox:{x:q.left,y:q.top,width:q.width,height:q.height},clipPathId:G})}),Ze(C,"renderActivePoints",function(T){var N=T.item,D=T.activePoint,z=T.basePoint,G=T.childIndex,U=T.isRange,P=[],B=N.props.key,q=N.item.type.defaultProps!==void 0?he(he({},N.item.type.defaultProps),N.item.props):N.item.props,W=q.activeDot,$=q.dataKey,V=he(he({index:G,dataKey:$,cx:D.x,cy:D.y,r:4,fill:lO(N.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},mt(W,!1)),rm(W));return P.push(E.renderActiveDot(W,V,"".concat(B,"-activePoint-").concat(G))),z?P.push(E.renderActiveDot(W,he(he({},V),{},{cx:z.x,cy:z.y}),"".concat(B,"-basePoint-").concat(G))):U&&P.push(null),P}),Ze(C,"renderGraphicChild",function(T,N,D){var z=C.filterFormatItem(T,N,D);if(!z)return null;var G=C.getTooltipEventType(),U=C.state,P=U.isTooltipActive,B=U.tooltipAxis,q=U.activeTooltipIndex,W=U.activeLabel,$=C.props.children,V=Rr($,Va),F=z.props,K=F.points,ie=F.isRange,I=F.baseLine,Z=z.item.type.defaultProps!==void 0?he(he({},z.item.type.defaultProps),z.item.props):z.item.props,X=Z.activeDot,oe=Z.hide,ge=Z.activeBar,Ee=Z.activeShape,me=!!(!oe&&P&&V&&(X||ge||Ee)),we={};G!=="axis"&&V&&V.props.trigger==="click"?we={onClick:dp(C.handleItemMouseEnter,T.props.onClick)}:G!=="axis"&&(we={onMouseLeave:dp(C.handleItemMouseLeave,T.props.onMouseLeave),onMouseEnter:dp(C.handleItemMouseEnter,T.props.onMouseEnter)});var ce=y.cloneElement(T,he(he({},z.props),we));function _e(Nt){return typeof B.dataKey=="function"?B.dataKey(Nt.payload):null}if(me)if(q>=0){var Ae,se;if(B.dataKey&&!B.allowDuplicatedCategory){var He=typeof B.dataKey=="function"?_e:"payload.".concat(B.dataKey.toString());Ae=nm(K,He,W),se=ie&&I&&nm(I,He,W)}else Ae=K==null?void 0:K[q],se=ie&&I&&I[q];if(Ee||ge){var $e=T.props.activeIndex!==void 0?T.props.activeIndex:q;return[y.cloneElement(T,he(he(he({},z.props),we),{},{activeIndex:$e})),null,null]}if(!yt(Ae))return[ce].concat(xc(C.renderActivePoints({item:z,activePoint:Ae,basePoint:se,childIndex:q,isRange:ie})))}else{var Je,We=(Je=C.getItemByXY(C.state.activeCoordinate))!==null&&Je!==void 0?Je:{graphicalItem:ce},at=We.graphicalItem,Rt=at.item,ft=Rt===void 0?T:Rt,bn=at.childIndex,tn=he(he(he({},z.props),we),{},{activeIndex:bn});return[y.cloneElement(ft,tn),null,null]}return ie?[ce,null,null]:[ce,null]}),Ze(C,"renderCustomized",function(T,N,D){return y.cloneElement(T,he(he({key:"recharts-customized-".concat(D)},C.props),C.state))}),Ze(C,"renderMap",{CartesianGrid:{handler:gp,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:gp},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:gp},YAxis:{handler:gp},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((j=O.id)!==null&&j!==void 0?j:jd("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=F6(C.triggeredAfterMouseMove,(R=O.throttleDelay)!==null&&R!==void 0?R:1e3/60),C.state={},C}return Nxe(E,w),jxe(E,[{key:"componentDidMount",value:function(){var j,R;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(R=this.props.margin.top)!==null&&R!==void 0?R:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,R=j.children,C=j.data,T=j.height,N=j.layout,D=Rr(R,Va);if(D){var z=D.props.defaultIndex;if(!(typeof z!="number"||z<0||z>this.state.tooltipTicks.length-1)){var G=this.state.tooltipTicks[z]&&this.state.tooltipTicks[z].value,U=K_(this.state,C,z,G),P=this.state.tooltipTicks[z].coordinate,B=(this.state.offset.top+T)/2,q=N==="horizontal",W=q?{x:P,y:B}:{y:P,x:B},$=this.state.formattedGraphicalItems.find(function(F){var K=F.item;return K.type.name==="Scatter"});$&&(W=he(he({},W),$.props.points[z].tooltipPosition),U=$.props.points[z].tooltipPayload);var V={activeTooltipIndex:z,isTooltipActive:!0,activeLabel:G,activePayload:U,activeCoordinate:W};this.setState(V),this.renderCursor(D),this.accessibilityManager.setIndex(z)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,R){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==R.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var C,T;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(j){$S([Rr(j.children,Va)],[Rr(this.props.children,Va)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=Rr(this.props.children,Va);if(j&&typeof j.props.shared=="boolean"){var R=j.props.shared?"axis":"item";return c.indexOf(R)>=0?R:o}return o}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var R=this.container,C=R.getBoundingClientRect(),T=qce(C),N={chartX:Math.round(j.pageX-T.left),chartY:Math.round(j.pageY-T.top)},D=C.width/R.offsetWidth||1,z=this.inRange(N.chartX,N.chartY,D);if(!z)return null;var G=this.state,U=G.xAxisMap,P=G.yAxisMap,B=this.getTooltipEventType(),q=Pz(this.state,this.props.data,this.props.layout,z);if(B!=="axis"&&U&&P){var W=Ao(U).scale,$=Ao(P).scale,V=W&&W.invert?W.invert(N.chartX):null,F=$&&$.invert?$.invert(N.chartY):null;return he(he({},N),{},{xValue:V,yValue:F},q)}return q?he(he({},N),q):null}},{key:"inRange",value:function(j,R){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,N=j/C,D=R/C;if(T==="horizontal"||T==="vertical"){var z=this.state.offset,G=N>=z.left&&N<=z.left+z.width&&D>=z.top&&D<=z.top+z.height;return G?{x:N,y:D}:null}var U=this.state,P=U.angleAxisMap,B=U.radiusAxisMap;if(P&&B){var q=Ao(P);return Xk({x:N,y:D},q)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,R=this.getTooltipEventType(),C=Rr(j,Va),T={};C&&R==="axis"&&(C.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var N=rm(this.props,this.handleOuterEvent);return he(he({},N),T)}},{key:"addListener",value:function(){Z1.on(X1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Z1.removeListener(X1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,R,C){for(var T=this.state.formattedGraphicalItems,N=0,D=T.length;N<D;N++){var z=T[N];if(z.item===j||z.props.key===j.key||R===Ni(z.item.type)&&C===z.childIndex)return z}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,R=this.state.offset,C=R.left,T=R.top,N=R.height,D=R.width;return L.createElement("defs",null,L.createElement("clipPath",{id:j},L.createElement("rect",{x:C,y:T,height:N,width:D})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(R,C){var T=Rz(C,2),N=T[0],D=T[1];return he(he({},R),{},Ze({},N,D.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(R,C){var T=Rz(C,2),N=T[0],D=T[1];return he(he({},R),{},Ze({},N,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var R;return(R=this.state.xAxisMap)===null||R===void 0||(R=R[j])===null||R===void 0?void 0:R.scale}},{key:"getYScaleByAxisId",value:function(j){var R;return(R=this.state.yAxisMap)===null||R===void 0||(R=R[j])===null||R===void 0?void 0:R.scale}},{key:"getItemByXY",value:function(j){var R=this.state,C=R.formattedGraphicalItems,T=R.activeItem;if(C&&C.length)for(var N=0,D=C.length;N<D;N++){var z=C[N],G=z.props,U=z.item,P=U.type.defaultProps!==void 0?he(he({},U.type.defaultProps),U.props):U.props,B=Ni(U.type);if(B==="Bar"){var q=(G.data||[]).find(function(F){return cge(j,F)});if(q)return{graphicalItem:z,payload:q}}else if(B==="RadialBar"){var W=(G.data||[]).find(function(F){return Xk(j,F)});if(W)return{graphicalItem:z,payload:W}}else if(sg(z,T)||lg(z,T)||Wf(z,T)){var $=Jge({graphicalItem:z,activeTooltipItem:T,itemData:P.data}),V=P.activeIndex===void 0?$:P.activeIndex;return{graphicalItem:he(he({},z),{},{childIndex:V}),payload:Wf(z,T)?P.data[$]:z.props.data[$]}}}return null}},{key:"render",value:function(){var j=this;if(!lM(this))return null;var R=this.props,C=R.children,T=R.className,N=R.width,D=R.height,z=R.style,G=R.compact,U=R.title,P=R.desc,B=Nz(R,xxe),q=mt(B,!1);if(G)return L.createElement(dz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement(LS,zl({},q,{width:N,height:D,title:U,desc:P}),this.renderClipPath(),uM(C,this.renderMap)));if(this.props.accessibilityLayer){var W,$;q.tabIndex=(W=this.props.tabIndex)!==null&&W!==void 0?W:0,q.role=($=this.props.role)!==null&&$!==void 0?$:"application",q.onKeyDown=function(F){j.accessibilityManager.keyboardEvent(F)},q.onFocus=function(){j.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return L.createElement(dz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement("div",zl({className:xt("recharts-wrapper",T),style:he({position:"relative",cursor:"default",width:N,height:D},z)},V,{ref:function(K){j.container=K}}),L.createElement(LS,zl({},q,{width:N,height:D,title:U,desc:P,style:zxe}),this.renderClipPath(),uM(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(y.Component);Ze(A,"displayName",n),Ze(A,"defaultProps",he({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Ze(A,"getDerivedStateFromProps",function(w,E){var O=w.dataKey,j=w.data,R=w.children,C=w.width,T=w.height,N=w.layout,D=w.stackOffset,z=w.margin,G=E.dataStartIndex,U=E.dataEndIndex;if(E.updateId===void 0){var P=Dz(w);return he(he(he({},P),{},{updateId:0},x(he(he({props:w},P),{},{updateId:0}),E)),{},{prevDataKey:O,prevData:j,prevWidth:C,prevHeight:T,prevLayout:N,prevStackOffset:D,prevMargin:z,prevChildren:R})}if(O!==E.prevDataKey||j!==E.prevData||C!==E.prevWidth||T!==E.prevHeight||N!==E.prevLayout||D!==E.prevStackOffset||!Hl(z,E.prevMargin)){var B=Dz(w),q={chartX:E.chartX,chartY:E.chartY,isTooltipActive:E.isTooltipActive},W=he(he({},Pz(E,j,N)),{},{updateId:E.updateId+1}),$=he(he(he({},B),q),W);return he(he(he({},$),x(he({props:w},$),E)),{},{prevDataKey:O,prevData:j,prevWidth:C,prevHeight:T,prevLayout:N,prevStackOffset:D,prevMargin:z,prevChildren:R})}if(!$S(R,E.prevChildren)){var V,F,K,ie,I=Rr(R,uc),Z=I&&(V=(F=I.props)===null||F===void 0?void 0:F.startIndex)!==null&&V!==void 0?V:G,X=I&&(K=(ie=I.props)===null||ie===void 0?void 0:ie.endIndex)!==null&&K!==void 0?K:U,oe=Z!==G||X!==U,ge=!yt(j),Ee=ge&&!oe?E.updateId:E.updateId+1;return he(he({updateId:Ee},x(he(he({props:w},E),{},{updateId:Ee,dataStartIndex:Z,dataEndIndex:X}),E)),{},{prevChildren:R,dataStartIndex:Z,dataEndIndex:X})}return null}),Ze(A,"renderActiveDot",function(w,E,O){var j;return y.isValidElement(w)?j=y.cloneElement(w,E):lt(w)?j=w(E):j=L.createElement(uO,E),L.createElement(cn,{className:"recharts-active-dot",key:O},j)});var S=y.forwardRef(function(E,O){return L.createElement(A,zl({},E,{ref:O}))});return S.displayName=A.displayName,S},Yxe=Wxe({chartName:"AreaChart",GraphicalChild:Ho,axisComponents:[{axisType:"xAxis",AxisComp:pg},{axisType:"yAxis",AxisComp:mg}],formatAxisMap:Kye});const Kxe={light:"",dark:".dark"},JU=y.createContext(null);function eq(){const e=y.useContext(JU);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const tq=y.forwardRef(({id:e,className:t,children:n,config:r,...a},o)=>{const l=y.useId(),c=`chart-${e||l.replace(/:/g,"")}`;return v.jsx(JU.Provider,{value:{config:r},children:v.jsxs("div",{"data-chart":c,ref:o,className:be("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...a,children:[v.jsx(Zxe,{id:c,config:r}),v.jsx(kce,{children:n})]})})});tq.displayName="Chart";const Zxe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?v.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Kxe).map(([r,a])=>`
515
- ${a} [data-chart=${e}] {
516
- ${n.map(([o,l])=>{var f;const c=((f=l.theme)==null?void 0:f[r])||l.color;return c?` --color-${o}: ${c};`:null}).join(`
517
- `)}
518
- }
519
- `).join(`
520
- `)}}):null},Xxe=Va,Qxe=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:c,labelClassName:f,formatter:d,color:m,nameKey:h,labelKey:g},x)=>{const{config:A}=eq(),S=y.useMemo(()=>{var C;if(a||!(t!=null&&t.length))return null;const[E]=t,O=`${g||(E==null?void 0:E.dataKey)||(E==null?void 0:E.name)||"value"}`,j=Z_(A,E,O),R=!g&&typeof l=="string"?((C=A[l])==null?void 0:C.label)||l:j==null?void 0:j.label;return c?v.jsx("div",{className:be("font-medium",f),children:c(R,t)}):R?v.jsx("div",{className:be("font-medium",f),children:R}):null},[l,c,t,a,f,A,g]);if(!e||!(t!=null&&t.length))return null;const w=t.length===1&&r!=="dot";return v.jsxs("div",{ref:x,className:be("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:S,v.jsx("div",{className:"grid gap-1.5",children:t.filter(E=>E.type!=="none").map((E,O)=>{const j=`${h||E.name||E.dataKey||"value"}`,R=Z_(A,E,j),C=m||E.payload.fill||E.color;return v.jsx("div",{className:be("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:d&&(E==null?void 0:E.value)!==void 0&&E.name?d(E.value,E.name,E,O,E.payload):v.jsxs(v.Fragment,{children:[R!=null&&R.icon?v.jsx(R.icon,{}):!o&&v.jsx("div",{className:be("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":C,"--color-border":C}}),v.jsxs("div",{className:be("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[v.jsxs("div",{className:"grid gap-1.5",children:[w?S:null,v.jsx("span",{className:"text-muted-foreground",children:(R==null?void 0:R.label)||E.name})]}),E.value&&v.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:E.value.toLocaleString()})]})]})},E.dataKey)})})]})});Qxe.displayName="ChartTooltip";const Jxe=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:l}=eq();return n!=null&&n.length?v.jsx("div",{ref:o,className:be("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.filter(c=>c.type!=="none").map(c=>{const f=`${a||c.dataKey||"value"}`,d=Z_(l,c,f);return v.jsxs("div",{className:be("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[d!=null&&d.icon&&!t?v.jsx(d.icon,{}):v.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),d==null?void 0:d.label]},c.value)})}):null});Jxe.displayName="ChartLegend";function Z_(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let a=n;return n in t&&typeof t[n]=="string"?a=t[n]:r&&n in r&&typeof r[n]=="string"&&(a=r[n]),a in e?e[a]:e[n]}const $z={cpu:{label:"CPU",color:"#60a5fa"},mem:{label:"RAM",color:"#a78bfa"}},zz={"1h":"1h","6h":"6h","24h":"24h","7d":"7d"};function Lz(e,t){const n=new Date(e);return t==="7d"?`${n.getMonth()+1}/${n.getDate()}`:`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function ewe(){const[e,t]=y.useState([]),[n,r]=y.useState([]),[a,o]=y.useState(null),[l,c]=y.useState("24h"),[f,d]=y.useState([]),[m,h]=y.useState(!1),{setNode:g}=HA();y.useEffect(()=>(g(v.jsx("span",{className:"text-sm font-medium",children:"Mac Resources"})),()=>g(null)),[g]);const x=y.useCallback(R=>{R.type==="agents:listed"&&t(R.sessions??[])},[]),{send:A,connected:S}=lE(x);y.useEffect(()=>{if(!S)return;A({type:"agents:list"});const R=setInterval(()=>A({type:"agents:list"}),1e4);return()=>clearInterval(R)},[S,A]),y.useEffect(()=>{fetch("/api/v1/agents",{credentials:"include"}).then(R=>R.ok?R.json():[]).then(r)},[]);const w=e.map(R=>R.agentName).filter(Boolean),E=[...new Set([...w,...n])],O=new Set(w);y.useEffect(()=>{!a&&E.length>0&&o(E[0])},[E.join(",")]),y.useEffect(()=>{a&&(h(!0),fetch(`/api/v1/agents/${encodeURIComponent(a)}/resources?range=${l}`,{credentials:"include"}).then(R=>R.ok?R.json():[]).then(d).finally(()=>h(!1)))},[a,l]);const j=f.map(R=>({time:R.recorded_at,cpu:Math.round(R.cpu_percent*10)/10,mem:Math.round(R.mem_percent*10)/10}));return v.jsxs("div",{className:"flex h-full min-h-0",children:[v.jsxs("aside",{className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[v.jsx("span",{className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Macs"}),E.length===0?v.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:S?"No agents yet.":"Connecting…"}):E.map(R=>{const C=O.has(R),T=a===R;return v.jsxs("button",{onClick:()=>o(R),className:["flex items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent transition-colors",T?"bg-accent font-medium":""].join(" "),children:[v.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${C?"bg-emerald-400":"bg-muted-foreground/40"}`}),v.jsx("span",{className:"truncate min-w-0",children:R})]},R)})]}),v.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:a?v.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h2",{className:"text-base font-semibold",children:a}),v.jsx(yB,{value:l,onValueChange:R=>c(R),children:v.jsx(fE,{children:Object.keys(zz).map(R=>v.jsx(Jp,{value:R,children:zz[R]},R))})})]}),m?v.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading…"}):j.length===0?v.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"No data yet for this range. Data is collected every minute while the agent is connected."}):v.jsxs("div",{className:"flex flex-col gap-6",children:[v.jsx(Iz,{title:"CPU %",color:"cpu",data:j,dataKey:"cpu",range:l,formatTick:Lz}),v.jsx(Iz,{title:"RAM %",color:"mem",data:j,dataKey:"mem",range:l,formatTick:Lz})]})]}):v.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-muted-foreground",children:[v.jsx(v5,{className:"h-8 w-8"}),v.jsx("p",{className:"text-sm",children:"Select a Mac to view resource history."})]})})]})}function Iz({title:e,color:t,data:n,dataKey:r,range:a,formatTick:o}){var m;const l=Math.min(n.length,a==="7d"?7:a==="24h"?8:6),c=Math.max(1,Math.floor(n.length/l)),f=n.filter((h,g)=>g%c===0).map(h=>h.time),d=(m=n[n.length-1])==null?void 0:m.time;return d&&!f.includes(d)&&f.push(d),v.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:t==="cpu"?"#60a5fa":"#a78bfa"}}),v.jsx("span",{className:"text-sm font-medium",children:e})]}),v.jsx(tq,{config:$z,className:"h-[220px] w-full",children:v.jsxs(Yxe,{data:n,margin:{top:8,right:24,bottom:24,left:8},children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:`fill-${r}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[v.jsx("stop",{offset:"5%",stopColor:t==="cpu"?"#60a5fa":"#a78bfa",stopOpacity:.3}),v.jsx("stop",{offset:"95%",stopColor:t==="cpu"?"#60a5fa":"#a78bfa",stopOpacity:0})]})}),v.jsx(kU,{strokeDasharray:"3 3",vertical:!1,className:"stroke-border"}),v.jsx(pg,{dataKey:"time",ticks:f,tickFormatter:h=>o(h,a),tick:{fontSize:11},tickLine:!1,axisLine:!1,dy:6,padding:{left:16,right:16}}),v.jsx(mg,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:h=>`${h}%`,tick:{fontSize:11},tickLine:!1,axisLine:!1,width:40,dx:-4,padding:{top:16,bottom:0}}),v.jsx(Xxe,{content:({active:h,payload:g})=>{if(!h||!(g!=null&&g.length))return null;const A=new Date(g[0].payload.time).toLocaleString("ko-KR",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}),S=g[0].value;return v.jsxs("div",{className:"rounded-lg border bg-background px-3 py-2 shadow-md text-xs",children:[v.jsxs("p",{className:"mb-1",children:["Date: ",A]}),v.jsxs("p",{children:[$z[r].label,": ",S,"%"]})]})}}),v.jsx(Ho,{type:"monotone",dataKey:r,stroke:t==="cpu"?"#60a5fa":"#a78bfa",strokeWidth:1.5,fill:`url(#fill-${r})`,dot:!1,isAnimationActive:!1})]})})]})}const twe=ri({teamName:On().min(1),logo:oE(File).nullable().optional()}),nwe=ri({displayName:On().min(1),avatar:oE(File).nullable().optional()}),rwe=ri({currentPassword:On().min(1),newPassword:On().min(8),confirmPassword:On()}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function awe(){const{resolvedTheme:e}=wc(),t=e==="dark"?"/logo-dark.svg":"/logo.svg",{user:n}=UA(),r=(n==null?void 0:n.role)==="Admin",a=(n==null?void 0:n.role)==="Admin"||(n==null?void 0:n.role)==="Developer",[o,l]=y.useState(null),c=y.useRef(null),f=Ci({resolver:Ri(twe),mode:"onBlur",defaultValues:{teamName:"",logo:null}});y.useEffect(()=>{r&&fetch("/api/v1/settings",{credentials:"include"}).then(P=>P.ok?P.json():null).then(P=>{P&&(f.reset({teamName:P.team_name,logo:null}),l(P.logo_url))})},[r]);async function d(P){const B=new FormData;B.append("team_name",P.teamName),P.logo&&B.append("logo",P.logo);try{if(!(await fetch("/api/v1/settings",{method:"PATCH",credentials:"include",body:B})).ok){Et.error("Failed to update workspace");return}Et.success("Workspace updated")}catch{Et.error("Failed to update workspace")}}const[m,h]=y.useState(null),g=y.useRef(null),x=Ci({resolver:Ri(nwe),mode:"onBlur",defaultValues:{displayName:"",avatar:null}});y.useEffect(()=>{n&&(x.reset({displayName:n.displayName??"",avatar:null}),h(n.avatarUrl??null))},[n]);async function A(P){const B=new FormData;B.append("display_name",P.displayName),P.avatar&&B.append("avatar",P.avatar);try{if(!(await fetch("/api/v1/profile",{method:"PATCH",credentials:"include",body:B})).ok){Et.error("Failed to update profile");return}Et.success("Profile updated")}catch{Et.error("Failed to update profile")}}const S=Ci({resolver:Ri(rwe),mode:"onBlur"});async function w(P){try{const B=await fetch("/api/v1/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.currentPassword,newPassword:P.newPassword})});if(!B.ok){const q=await B.json();S.setError("root",{message:q.error??"Failed to change password"});return}S.reset(),Et.success("Password changed")}catch{S.setError("root",{message:"Network error"})}}const[E,O]=y.useState([]),[j,R]=y.useState({}),[C,T]=y.useState({}),[N,D]=y.useState({});y.useEffect(()=>{a&&fetch("/api/v1/apps",{credentials:"include"}).then(P=>P.ok?P.json():null).then(P=>{if(!P)return;O(P.items);const B={};P.items.forEach(q=>{B[q.id]=q.name}),R(B)})},[a]);async function z(P){D(B=>({...B,[P]:!0}));try{if(!(await fetch(`/api/v1/apps/${P}`,{method:"DELETE",credentials:"include"})).ok){Et.error("Failed to delete app");return}O(q=>q.filter(W=>W.id!==P)),Et.success("App deleted")}catch{Et.error("Failed to delete app")}finally{D(B=>({...B,[P]:!1}))}}async function G(P){T(B=>({...B,[P]:!0}));try{if(!(await fetch(`/api/v1/apps/${P}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j[P]})})).ok){Et.error("Failed to update app");return}Et.success("App updated")}catch{Et.error("Failed to update app")}finally{T(B=>({...B,[P]:!1}))}}const U=KA({control:x.control,name:"displayName"});return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:"Settings"}),r&&v.jsxs($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Workspace"})}),v.jsx(Ta,{children:v.jsxs("form",{onSubmit:f.handleSubmit(d),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"team-name",children:"Team name"}),v.jsx(rn,{id:"team-name",placeholder:"My QA Team",...f.register("teamName")}),f.formState.errors.teamName&&v.jsx("p",{className:"text-sm text-destructive",children:f.formState.errors.teamName.message})]}),v.jsx(Ja,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Tt,{children:["Logo ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(Hp,{name:"logo",control:f.control,render:({field:P})=>v.jsxs("div",{className:"relative w-16 h-16",children:[v.jsx("img",{src:o??t,alt:"logo",className:"w-16 h-16 rounded-lg object-contain"}),v.jsx("button",{type:"button",onClick:()=>{var B;return(B=c.current)==null?void 0:B.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(rS,{className:"w-3 h-3"})}),v.jsx("input",{ref:c,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:B=>{var W;const q=(W=B.target.files)==null?void 0:W[0];if(q&&q.size>2*1024*1024){Et.error("Image must be 2MB or less");return}q&&(P.onChange(q),l(URL.createObjectURL(q)))}})]})})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:f.formState.isSubmitting,children:f.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Profile"})}),v.jsx(Ta,{children:v.jsxs("form",{onSubmit:x.handleSubmit(A),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"display-name",children:"Nickname"}),v.jsx(rn,{id:"display-name",placeholder:"Your name",...x.register("displayName")}),x.formState.errors.displayName&&v.jsx("p",{className:"text-sm text-destructive",children:x.formState.errors.displayName.message})]}),v.jsx(Ja,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Tt,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(Hp,{name:"avatar",control:x.control,render:({field:P})=>{var B;return v.jsxs("div",{className:"relative w-14 h-14",children:[m?v.jsx("img",{src:m,alt:"avatar",className:"w-14 h-14 rounded-full object-cover border"}):v.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const q=qA(U||(n==null?void 0:n.email)||"");return{backgroundColor:q.bg,color:q.fg}})(),children:((B=U==null?void 0:U[0])==null?void 0:B.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var q;return(q=g.current)==null?void 0:q.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(rS,{className:"w-3 h-3"})}),v.jsx("input",{ref:g,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:q=>{var $;const W=($=q.target.files)==null?void 0:$[0];if(W&&W.size>2*1024*1024){Et.error("Image must be 2MB or less");return}W&&(P.onChange(W),h(URL.createObjectURL(W)))}})]})}})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:x.formState.isSubmitting,children:x.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Password"})}),v.jsx(Ta,{children:v.jsxs("form",{onSubmit:S.handleSubmit(w),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"current-password",children:"Current password"}),v.jsx(rn,{id:"current-password",type:"password",...S.register("currentPassword")}),S.formState.errors.currentPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.currentPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"new-password",children:"New password"}),v.jsx(rn,{id:"new-password",type:"password",...S.register("newPassword")}),S.formState.errors.newPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.newPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"confirm-password",children:"Confirm new password"}),v.jsx(rn,{id:"confirm-password",type:"password",...S.register("confirmPassword")}),S.formState.errors.confirmPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.confirmPassword.message})]}),S.formState.errors.root&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.root.message}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:S.formState.isSubmitting,children:S.formState.isSubmitting?"Saving…":"Change password"})})]})})]}),a&&E.length>0&&v.jsxs($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Apps"})}),v.jsx(Ta,{children:v.jsx("div",{className:"flex flex-col divide-y divide-border",children:E.map(P=>v.jsxs("div",{className:"flex flex-col gap-2 py-4 first:pt-0 last:pb-0",children:[v.jsx(Tt,{htmlFor:`app-${P.id}`,children:"App Name"}),v.jsx(rn,{id:`app-${P.id}`,value:j[P.id]??"",onChange:B=>R(q=>({...q,[P.id]:B.target.value}))}),v.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:P.bundle_id_key}),v.jsx(Xl,{tone:P.platform==="ios"?"ios":P.platform==="android"?"android":void 0,variant:P.platform==="both"?"secondary":void 0,className:"capitalize",children:P.platform})]}),v.jsxs("div",{className:"flex items-center justify-end gap-2",children:[v.jsx(ct,{size:"sm",variant:"outline",disabled:C[P.id],onClick:()=>G(P.id),children:C[P.id]?"Saving…":"Save"}),v.jsxs(Pv,{children:[v.jsx(Sre,{asChild:!0,children:v.jsx(ct,{size:"sm",variant:"destructive",disabled:N[P.id],children:N[P.id]?"Deleting…":"Delete"})}),v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Delete app?"}),v.jsxs(Ad,{children:["This will permanently delete ",v.jsx("strong",{children:P.name})," and all its builds. This action cannot be undone."]})]}),v.jsxs(Sd,{children:[v.jsx(Ed,{className:"w-24",children:"Cancel"}),v.jsx(Dv,{className:be(rv({variant:"destructive"}),"w-24"),onClick:()=>z(P.id),children:"Delete"})]})]})]})]})]})]},P.id))})})]})]})}const xO=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:"relative w-full overflow-auto",children:v.jsx("table",{ref:n,className:be("w-full caption-bottom text-sm",e),...t})}));xO.displayName="Table";const wO=y.forwardRef(({className:e,...t},n)=>v.jsx("thead",{ref:n,className:be("[&_tr]:border-b",e),...t}));wO.displayName="TableHeader";const SO=y.forwardRef(({className:e,...t},n)=>v.jsx("tbody",{ref:n,className:be("[&_tr:last-child]:border-0",e),...t}));SO.displayName="TableBody";const iwe=y.forwardRef(({className:e,...t},n)=>v.jsx("tfoot",{ref:n,className:be("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));iwe.displayName="TableFooter";const Wl=y.forwardRef(({className:e,...t},n)=>v.jsx("tr",{ref:n,className:be("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Wl.displayName="TableRow";const ja=y.forwardRef(({className:e,...t},n)=>v.jsx("th",{ref:n,className:be("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ja.displayName="TableHead";const oa=y.forwardRef(({className:e,...t},n)=>v.jsx("td",{ref:n,className:be("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));oa.displayName="TableCell";const owe=y.forwardRef(({className:e,...t},n)=>v.jsx("caption",{ref:n,className:be("mt-4 text-sm text-muted-foreground",e),...t}));owe.displayName="TableCaption";const swe=ri({email:On().email(),role:On().min(1)}),lwe=ri({token:On(),emailSent:kte()});function cwe(){const[e,t]=y.useState([]),[n,r]=y.useState({}),[a,o]=y.useState(""),[l,c]=y.useState(!1),[f,d]=y.useState(null),{register:m,handleSubmit:h,control:g,reset:x,formState:{errors:A,isSubmitting:S}}=Ci({resolver:Ri(swe),mode:"onBlur",defaultValues:{email:"",role:"QA"}});function w(){fetch("/api/v1/team/members",{credentials:"include"}).then(T=>T.json()).then(t)}y.useEffect(()=>{w()},[]);async function E(T){try{const N=await fetch("/api/v1/team/invite",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:T.email,role:T.role})});if(!N.ok)throw new Error(`Server error: ${N.status}`);const D=lwe.parse(await N.json()),z=`${location.origin}/invite?token=${D.token}`;o(z),navigator.clipboard.writeText(z).catch(()=>{}),D.emailSent?Et.success(`Invite email sent to ${T.email}`):Et.warning("Invite link copied — email could not be sent. Check your SMTP settings.")}catch{Et.error("Failed to create invite link")}}function O(T){c(T),T||(o(""),x())}async function j(T,N){await fetch(`/api/v1/team/members/${T}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:N})}),w()}async function R(T){const z=(await(await fetch(`/api/v1/team/members/${T}/send-reset`,{method:"POST",credentials:"include"})).json()).emailSent?"Sent":"No SMTP";r(G=>({...G,[T]:z})),setTimeout(()=>r(G=>{const U={...G};return delete U[T],U}),3e3)}async function C(T){await fetch(`/api/v1/team/members/${T}`,{method:"DELETE",credentials:"include"}),d(null),w()}return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsx(Pv,{open:f!==null,onOpenChange:T=>{T||d(null)},children:v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Remove this member?"}),v.jsx(Ad,{children:"This member will lose access to the team immediately."})]}),v.jsxs(Sd,{children:[v.jsx(Ed,{children:"Cancel"}),v.jsx(Dv,{className:"bg-destructive/10 text-destructive hover:bg-destructive/20 border-0",onClick:()=>f!==null&&C(f),children:"Remove"})]})]})}),v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),v.jsxs(yd,{open:l,onOpenChange:O,children:[v.jsx(Mv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(xV,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),v.jsxs(Mc,{className:"sm:max-w-md",children:[v.jsx(bd,{children:v.jsx(Pc,{children:"Invite team member"})}),a?v.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Invite link copied to clipboard:"}),v.jsx("code",{className:"rounded bg-muted px-3 py-2 text-xs break-all",children:a}),v.jsx(ct,{onClick:()=>c(!1),children:"Done"})]}):v.jsxs("form",{onSubmit:h(E),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"invite-email",children:"Email"}),v.jsx(rn,{id:"invite-email",type:"email",...m("email")}),A.email&&v.jsx("p",{className:"text-sm text-destructive",children:A.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{children:"Role"}),v.jsx(Hp,{name:"role",control:g,render:({field:T})=>v.jsxs(Mo,{value:T.value,onValueChange:T.onChange,children:[v.jsx(zi,{children:v.jsx(Po,{})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"Admin",children:"Admin"}),v.jsx(Ct,{value:"Developer",children:"Developer"}),v.jsx(Ct,{value:"QA",children:"QA"}),v.jsx(Ct,{value:"Viewer",children:"Viewer"})]})]})})]}),v.jsx(ct,{type:"submit",disabled:S,children:S?"Creating link…":"Generate invite link"})]})]})]})]}),v.jsxs($r,{children:[v.jsx(zr,{children:v.jsxs(Lr,{children:["Members (",e.length,")"]})}),v.jsx(Ta,{className:"px-4 pt-0 pb-2",children:v.jsxs(xO,{children:[v.jsx(wO,{children:v.jsxs(Wl,{children:[v.jsx(ja,{children:"Nickname"}),v.jsx(ja,{children:"Email"}),v.jsx(ja,{children:"Role"}),v.jsx(ja,{children:"Joined"}),v.jsx(ja,{className:"w-10"})]})}),v.jsx(SO,{children:e.map(T=>v.jsxs(Wl,{className:"hover:bg-transparent",children:[v.jsx(oa,{className:"font-medium",children:T.display_name||"—"}),v.jsx(oa,{className:"text-muted-foreground text-sm",children:T.email}),v.jsx(oa,{children:v.jsxs(Mo,{value:T.role,onValueChange:N=>j(T.id,N),children:[v.jsx(zi,{className:"h-7 w-28",children:v.jsx(Po,{})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"Admin",children:"Admin"}),v.jsx(Ct,{value:"Developer",children:"Developer"}),v.jsx(Ct,{value:"QA",children:"QA"}),v.jsx(Ct,{value:"Viewer",children:"Viewer"})]})]})}),v.jsx(oa,{className:"text-muted-foreground text-sm",children:new Date(T.joined_at).toLocaleDateString()}),v.jsx(oa,{children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(ct,{variant:"secondary",size:"nav",onClick:()=>R(T.id),children:n[T.id]??"Reset pwd"}),v.jsx(ct,{variant:"destructive",size:"nav",onClick:()=>d(T.id),children:"Remove"})]})})]},T.id))})]})})]})]})}async function uwe(){const e=window.location.protocol==="https:"?"wss":"ws";if(["localhost","127.0.0.1","[::1]"].includes(window.location.hostname))try{const n=await fetch("/api/v1/relay/host",{credentials:"include"});if(n.ok){const{lanHost:r,port:a}=await n.json();if(r)return`${e}://${r}:${a}`}}catch{}return`${e}://${window.location.host}`}const fwe=ri({name:On().min(1),expiresDays:On().refine(e=>{const t=parseInt(e,10);return!isNaN(t)&&t>=1&&t<=365},{message:"Must be between 1 and 365"})});function dwe(){const[e,t]=y.useState([]),[n,r]=y.useState(!1),[a,o]=y.useState(""),[l,c]=y.useState("api"),[f,d]=y.useState(""),[m,h]=y.useState(null),{register:g,handleSubmit:x,reset:A,formState:{errors:S,isSubmitting:w}}=Ci({resolver:Ri(fwe),mode:"onBlur",defaultValues:{name:"",expiresDays:"30"}});function E(){fetch("/api/v1/tokens",{credentials:"include"}).then(T=>T.json()).then(t)}y.useEffect(()=>{E()},[]);async function O(T){try{const N=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:T.name,expires_in_days:parseInt(T.expiresDays,10),...l==="agent"?{scope:"agent"}:{}})});if(!N.ok){const z=await N.json().catch(()=>null);Et.error((z==null?void 0:z.error)??"Failed to create token");return}const D=await N.json();l==="agent"&&d(await uwe()),Et.success("Token created"),o(D.token),E()}catch{Et.error("Network error")}}function j(T){r(T),T||(o(""),c("api"),d(""),A())}async function R(T){try{return(await fetch(`/api/v1/tokens/${T}`,{method:"DELETE",credentials:"include"})).ok?(Et.success("Token revoked"),E(),!0):(Et.error("Failed to revoke token"),!1)}catch{return Et.error("Network error"),!1}}function C(T){return T.expires_at&&new Date(T.expires_at)<new Date}return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),v.jsxs(yd,{open:n,onOpenChange:j,children:[v.jsx(Mv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(g5,{className:"mr-2 h-4 w-4"}),"New token"]})}),v.jsxs(Mc,{className:"sm:max-w-md",children:[v.jsx(bd,{children:v.jsx(Pc,{children:"Create token"})}),a?v.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),v.jsx("code",{className:"rounded bg-muted px-3 py-2 text-xs break-all font-mono",children:a}),l==="agent"&&f&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Run this on the agent Mac to connect it to this relay:"}),v.jsx("code",{className:"rounded bg-muted px-3 py-2 text-xs break-all font-mono",children:`tapflow agent start --relay ${f} --token ${a}`})]}),v.jsx(ct,{onClick:()=>{navigator.clipboard.writeText(a).then(()=>{Et.success("Token copied to clipboard"),r(!1)}).catch(()=>Et.error("Failed to copy — copy manually"))},children:"Copy & close"})]}):v.jsxs("form",{onSubmit:x(O),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"token-name",children:"Name"}),v.jsx(rn,{id:"token-name",placeholder:"e.g. ci-deploy",...g("name")}),S.name&&v.jsx("p",{className:"text-sm text-destructive",children:S.name.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{htmlFor:"expires",children:"Expires in (days)"}),v.jsx(rn,{id:"expires",type:"number",...g("expiresDays")}),S.expiresDays&&v.jsx("p",{className:"text-sm text-destructive",children:S.expiresDays.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Tt,{children:"Type"}),v.jsxs(Mo,{value:l,onValueChange:T=>c(T),children:[v.jsx(zi,{children:v.jsx(Po,{})}),v.jsxs(Li,{children:[v.jsx(Ct,{value:"api",children:"API — CI uploads & API access"}),v.jsx(Ct,{value:"agent",children:"Agent — connect remote device agents (Admin only)"})]})]})]}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scope: ",v.jsx(Xl,{variant:"secondary",children:l==="agent"?"agent":"view, builds:write"})]}),v.jsx(ct,{type:"submit",disabled:w,children:w?"Creating…":"Create token"})]})]})]})]}),v.jsxs($r,{children:[v.jsxs(zr,{children:[v.jsx(Lr,{children:"Active tokens"}),v.jsxs(Os,{children:["Use these tokens with ",v.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),v.jsx(Ta,{className:"px-4 pt-0 pb-2",children:v.jsxs(xO,{children:[v.jsx(wO,{children:v.jsxs(Wl,{children:[v.jsx(ja,{children:"Name"}),v.jsx(ja,{children:"Scope"}),v.jsx(ja,{children:"Last used"}),v.jsx(ja,{children:"Expires"}),v.jsx(ja,{className:"w-10"})]})}),v.jsx(SO,{children:e.length===0?v.jsx(Wl,{children:v.jsx(oa,{colSpan:5,className:"h-20 text-center text-muted-foreground",children:"No tokens yet."})}):e.map(T=>v.jsxs(Wl,{className:"hover:bg-transparent",children:[v.jsx(oa,{className:"font-medium",children:T.name}),v.jsx(oa,{children:v.jsx(Xl,{variant:"secondary",children:T.scope})}),v.jsx(oa,{className:"text-muted-foreground text-sm",children:T.last_used_at?new Date(T.last_used_at).toLocaleDateString():"Never"}),v.jsx(oa,{children:T.expires_at?v.jsx("span",{className:C(T)?"text-destructive text-sm":"text-muted-foreground text-sm",children:C(T)?"Expired":new Date(T.expires_at).toLocaleDateString()}):v.jsx("span",{className:"text-muted-foreground text-sm",children:"Never"})}),v.jsx(oa,{children:v.jsx(ct,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>h(T.id),children:v.jsx(yV,{className:"h-4 w-4"})})})]},T.id))})]})})]}),v.jsx(Pv,{open:m!==null,onOpenChange:T=>{T||h(null)},children:v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Revoke token?"}),v.jsx(Ad,{children:"Any active API calls using this token will immediately fail."})]}),v.jsxs(Sd,{children:[v.jsx(Ed,{children:"Cancel"}),v.jsx(ct,{variant:"destructive",onClick:async()=>{if(m===null)return;await R(m)&&h(null)},children:"Revoke"})]})]})})]})}function hwe({code:e,message:t}){return v.jsx("div",{className:"flex min-h-svh items-center justify-center bg-background p-4",children:v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx("span",{className:"text-lg font-semibold tracking-tight text-foreground",children:e}),v.jsx("span",{className:"h-6 w-px bg-border","aria-hidden":"true"}),v.jsx("span",{className:"text-sm text-muted-foreground",children:t})]})})}function pwe(){return v.jsx(hwe,{code:404,message:"page not found"})}function mwe(){const{resolvedTheme:e}=wc();return v.jsxs(n7,{children:[v.jsxs(NF,{children:[v.jsx(yr,{path:"/login",element:v.jsx(mne,{})}),v.jsx(yr,{path:"/setup",element:v.jsx(gne,{})}),v.jsx(yr,{path:"/invite",element:v.jsx(bne,{})}),v.jsx(yr,{path:"/reset-password",element:v.jsx(wne,{})}),v.jsxs(yr,{element:v.jsx(vX,{}),children:[v.jsx(yr,{index:!0,element:v.jsx(r5,{to:"/app-center",replace:!0})}),v.jsx(yr,{path:"/app-center",element:v.jsx(jre,{})}),v.jsx(yr,{path:"/app-center/build",element:v.jsx(Qae,{})}),v.jsx(yr,{path:"/mac-resources",element:v.jsx(ewe,{})}),v.jsx(yr,{path:"/settings/default",element:v.jsx(awe,{})}),v.jsx(yr,{path:"/settings/team",element:v.jsx(cwe,{})}),v.jsx(yr,{path:"/settings/tokens",element:v.jsx(dwe,{})})]}),v.jsx(yr,{path:"*",element:v.jsx(pwe,{})})]}),v.jsx(L7,{position:"bottom-right",richColors:!0,theme:e})]})}w9.createRoot(document.getElementById("root")).render(v.jsx(y.StrictMode,{children:v.jsx(E9,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:v.jsx(mwe,{})})}));