hermium 0.1.9 → 0.2.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 (209) hide show
  1. package/README.md +56 -0
  2. package/bin/hermium.mjs +185 -164
  3. package/dist/api.mjs +3513 -0
  4. package/dist/public/assets/css/index-Dfs9RUU9.css +1 -0
  5. package/dist/public/assets/css/styles-B8p6jk5Z.css +1 -0
  6. package/dist/public/assets/js/ChatInputBlock-Bw7AL70H.js +1 -0
  7. package/dist/public/assets/js/MarkdownMessage-8d7Y6VL-.js +1 -0
  8. package/dist/public/assets/js/base-ui-BvQbAt_1.js +1 -0
  9. package/dist/public/assets/js/chat._sessionId-BG6lVraH.js +1 -0
  10. package/dist/public/assets/js/chat.index-D2zdMPTT.js +1 -0
  11. package/dist/public/assets/js/index-C0AK45FU.js +60 -0
  12. package/dist/public/assets/js/index-Cx5En4FK.js +1 -0
  13. package/dist/public/assets/js/memory-CeSRdTkW.js +3 -0
  14. package/dist/public/assets/js/router-8uDKazL-.js +1 -0
  15. package/dist/public/assets/js/settings-Bc3Y5zXO.js +1 -0
  16. package/dist/public/assets/js/skills-DZv7sA_5.js +1 -0
  17. package/dist/public/assets/js/theme-CPkdkpaj.js +1 -0
  18. package/dist/public/assets/js/usage-DXQsT9_b.js +1 -0
  19. package/dist/public/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  20. package/dist/public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  21. package/dist/public/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  22. package/dist/public/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  23. package/dist/public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  24. package/dist/public/favicon.ico +0 -0
  25. package/dist/public/logo.png +0 -0
  26. package/package.json +1 -1
  27. package/dist/public/assets/IconAlertCircle-BHkmI3j7.js +0 -1
  28. package/dist/public/assets/IconAlertTriangle-wCJudlVg.js +0 -1
  29. package/dist/public/assets/IconCheck-CFuEh_p7.js +0 -1
  30. package/dist/public/assets/IconLoader2-BIx3OuF9.js +0 -1
  31. package/dist/public/assets/IconRefresh-Dgm93w3T.js +0 -1
  32. package/dist/public/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
  33. package/dist/public/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
  34. package/dist/public/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
  35. package/dist/public/assets/index-Bbz3abmO.js +0 -14
  36. package/dist/public/assets/index-CWUaRwcE.js +0 -1
  37. package/dist/public/assets/index-CinLq3cd.js +0 -1
  38. package/dist/public/assets/index-CrQs9n6q.js +0 -29
  39. package/dist/public/assets/index-CtacpN3I.js +0 -1
  40. package/dist/public/assets/index-DY7aE-9s.js +0 -2
  41. package/dist/public/assets/index-DkYGodJj.js +0 -94
  42. package/dist/public/assets/index-DvDLadUx.js +0 -1
  43. package/dist/public/assets/index-U6RcWedt.js +0 -1
  44. package/dist/public/assets/index-_6iFZ0fh.js +0 -1
  45. package/dist/public/assets/index-enFS26SU.js +0 -1
  46. package/dist/public/assets/input-eNcwlDHp.js +0 -1
  47. package/dist/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  48. package/dist/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  49. package/dist/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  50. package/dist/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  51. package/dist/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  52. package/dist/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  53. package/dist/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  54. package/dist/public/assets/queries-iHRgZzw2.js +0 -1
  55. package/dist/public/assets/styles-KcflDlA_.css +0 -1
  56. package/dist/public/assets/switch-B1DcZLwL.js +0 -1
  57. package/dist/public/assets/syntax-highlighter-DWPF-A_h.js +0 -6
  58. package/dist/public/assets/textarea-Di_syYTS.js +0 -1
  59. package/dist/public/favicon.png +0 -0
  60. package/dist/public/nous-logo.png +0 -0
  61. package/dist/server/index.mjs +0 -244
  62. package/dist/web-server/__23tanstack-start-plugin-adapters-Cwee5PKy.mjs +0 -6
  63. package/dist/web-server/_chunks/ssr-renderer.mjs +0 -22
  64. package/dist/web-server/_libs/babel__runtime.mjs +0 -237
  65. package/dist/web-server/_libs/bail.mjs +0 -8
  66. package/dist/web-server/_libs/base-ui__react.mjs +0 -9554
  67. package/dist/web-server/_libs/base-ui__utils.mjs +0 -1101
  68. package/dist/web-server/_libs/ccount.mjs +0 -16
  69. package/dist/web-server/_libs/character-entities-legacy.mjs +0 -111
  70. package/dist/web-server/_libs/character-entities.mjs +0 -2130
  71. package/dist/web-server/_libs/character-reference-invalid.mjs +0 -33
  72. package/dist/web-server/_libs/class-variance-authority.mjs +0 -44
  73. package/dist/web-server/_libs/clsx.mjs +0 -16
  74. package/dist/web-server/_libs/comma-separated-tokens.mjs +0 -31
  75. package/dist/web-server/_libs/cookie-es.mjs +0 -44
  76. package/dist/web-server/_libs/croner.mjs +0 -1
  77. package/dist/web-server/_libs/crossws.mjs +0 -1
  78. package/dist/web-server/_libs/decode-named-character-reference+[...].mjs +0 -8
  79. package/dist/web-server/_libs/devlop.mjs +0 -8
  80. package/dist/web-server/_libs/escape-string-regexp.mjs +0 -9
  81. package/dist/web-server/_libs/estree-util-is-identifier-name.mjs +0 -11
  82. package/dist/web-server/_libs/extend.mjs +0 -97
  83. package/dist/web-server/_libs/fault.mjs +0 -1
  84. package/dist/web-server/_libs/floating-ui__core.mjs +0 -663
  85. package/dist/web-server/_libs/floating-ui__dom.mjs +0 -624
  86. package/dist/web-server/_libs/floating-ui__react-dom.mjs +0 -279
  87. package/dist/web-server/_libs/floating-ui__utils.mjs +0 -322
  88. package/dist/web-server/_libs/format.mjs +0 -1
  89. package/dist/web-server/_libs/h3.mjs +0 -408
  90. package/dist/web-server/_libs/hast-util-parse-selector.mjs +0 -39
  91. package/dist/web-server/_libs/hast-util-to-jsx-runtime.mjs +0 -388
  92. package/dist/web-server/_libs/hast-util-whitespace.mjs +0 -10
  93. package/dist/web-server/_libs/hastscript.mjs +0 -200
  94. package/dist/web-server/_libs/highlight.js.mjs +0 -1
  95. package/dist/web-server/_libs/hookable.mjs +0 -1
  96. package/dist/web-server/_libs/html-url-attributes.mjs +0 -26
  97. package/dist/web-server/_libs/inline-style-parser.mjs +0 -142
  98. package/dist/web-server/_libs/is-alphabetical.mjs +0 -7
  99. package/dist/web-server/_libs/is-alphanumerical.mjs +0 -8
  100. package/dist/web-server/_libs/is-decimal.mjs +0 -7
  101. package/dist/web-server/_libs/is-hexadecimal.mjs +0 -7
  102. package/dist/web-server/_libs/is-plain-obj.mjs +0 -10
  103. package/dist/web-server/_libs/isbot.mjs +0 -21
  104. package/dist/web-server/_libs/longest-streak.mjs +0 -25
  105. package/dist/web-server/_libs/lowlight.mjs +0 -1
  106. package/dist/web-server/_libs/markdown-table.mjs +0 -142
  107. package/dist/web-server/_libs/mdast-util-find-and-replace.mjs +0 -109
  108. package/dist/web-server/_libs/mdast-util-from-markdown.mjs +0 -717
  109. package/dist/web-server/_libs/mdast-util-gfm-autolink-literal+[...].mjs +0 -156
  110. package/dist/web-server/_libs/mdast-util-gfm-footnote.mjs +0 -117
  111. package/dist/web-server/_libs/mdast-util-gfm-strikethrough.mjs +0 -54
  112. package/dist/web-server/_libs/mdast-util-gfm-table.mjs +0 -157
  113. package/dist/web-server/_libs/mdast-util-gfm-task-list-item.mjs +0 -77
  114. package/dist/web-server/_libs/mdast-util-gfm.mjs +0 -29
  115. package/dist/web-server/_libs/mdast-util-phrasing.mjs +0 -30
  116. package/dist/web-server/_libs/mdast-util-to-hast.mjs +0 -710
  117. package/dist/web-server/_libs/mdast-util-to-markdown.mjs +0 -798
  118. package/dist/web-server/_libs/mdast-util-to-string.mjs +0 -38
  119. package/dist/web-server/_libs/micromark-core-commonmark.mjs +0 -2259
  120. package/dist/web-server/_libs/micromark-extension-gfm-autolink-literal+[...].mjs +0 -344
  121. package/dist/web-server/_libs/micromark-extension-gfm-footnote+[...].mjs +0 -279
  122. package/dist/web-server/_libs/micromark-extension-gfm-strikethrough+[...].mjs +0 -98
  123. package/dist/web-server/_libs/micromark-extension-gfm-table.mjs +0 -491
  124. package/dist/web-server/_libs/micromark-extension-gfm-tagfilter+[...].mjs +0 -1
  125. package/dist/web-server/_libs/micromark-extension-gfm-task-list-item+[...].mjs +0 -77
  126. package/dist/web-server/_libs/micromark-extension-gfm.mjs +0 -18
  127. package/dist/web-server/_libs/micromark-factory-destination.mjs +0 -94
  128. package/dist/web-server/_libs/micromark-factory-label.mjs +0 -63
  129. package/dist/web-server/_libs/micromark-factory-space.mjs +0 -24
  130. package/dist/web-server/_libs/micromark-factory-title.mjs +0 -65
  131. package/dist/web-server/_libs/micromark-factory-whitespace.mjs +0 -22
  132. package/dist/web-server/_libs/micromark-util-character.mjs +0 -44
  133. package/dist/web-server/_libs/micromark-util-chunked.mjs +0 -36
  134. package/dist/web-server/_libs/micromark-util-classify-character+[...].mjs +0 -12
  135. package/dist/web-server/_libs/micromark-util-combine-extensions+[...].mjs +0 -41
  136. package/dist/web-server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +0 -19
  137. package/dist/web-server/_libs/micromark-util-decode-string.mjs +0 -21
  138. package/dist/web-server/_libs/micromark-util-encode.mjs +0 -1
  139. package/dist/web-server/_libs/micromark-util-html-tag-name.mjs +0 -69
  140. package/dist/web-server/_libs/micromark-util-normalize-identifier+[...].mjs +0 -6
  141. package/dist/web-server/_libs/micromark-util-resolve-all.mjs +0 -15
  142. package/dist/web-server/_libs/micromark-util-sanitize-uri.mjs +0 -41
  143. package/dist/web-server/_libs/micromark-util-subtokenize.mjs +0 -346
  144. package/dist/web-server/_libs/micromark.mjs +0 -906
  145. package/dist/web-server/_libs/ocache.mjs +0 -1
  146. package/dist/web-server/_libs/ohash.mjs +0 -1
  147. package/dist/web-server/_libs/parse-entities.mjs +0 -245
  148. package/dist/web-server/_libs/property-information.mjs +0 -1210
  149. package/dist/web-server/_libs/react-dom.mjs +0 -10779
  150. package/dist/web-server/_libs/react-markdown.mjs +0 -147
  151. package/dist/web-server/_libs/react-syntax-highlighter.mjs +0 -941
  152. package/dist/web-server/_libs/react.mjs +0 -513
  153. package/dist/web-server/_libs/refractor.mjs +0 -2425
  154. package/dist/web-server/_libs/remark-gfm.mjs +0 -20
  155. package/dist/web-server/_libs/remark-parse.mjs +0 -19
  156. package/dist/web-server/_libs/remark-rehype.mjs +0 -21
  157. package/dist/web-server/_libs/reselect.mjs +0 -1
  158. package/dist/web-server/_libs/rou3.mjs +0 -8
  159. package/dist/web-server/_libs/seroval-plugins.mjs +0 -58
  160. package/dist/web-server/_libs/seroval.mjs +0 -1775
  161. package/dist/web-server/_libs/space-separated-tokens.mjs +0 -11
  162. package/dist/web-server/_libs/srvx.mjs +0 -781
  163. package/dist/web-server/_libs/style-to-js.mjs +0 -72
  164. package/dist/web-server/_libs/style-to-object.mjs +0 -38
  165. package/dist/web-server/_libs/tabler__icons-react.mjs +0 -230
  166. package/dist/web-server/_libs/tanstack__history.mjs +0 -204
  167. package/dist/web-server/_libs/tanstack__query-core.mjs +0 -2552
  168. package/dist/web-server/_libs/tanstack__react-query.mjs +0 -190
  169. package/dist/web-server/_libs/tanstack__react-router.mjs +0 -1120
  170. package/dist/web-server/_libs/tanstack__react-store.mjs +0 -2
  171. package/dist/web-server/_libs/tanstack__router-core.mjs +0 -4288
  172. package/dist/web-server/_libs/tanstack__store.mjs +0 -1
  173. package/dist/web-server/_libs/trim-lines.mjs +0 -41
  174. package/dist/web-server/_libs/trough.mjs +0 -85
  175. package/dist/web-server/_libs/ufo.mjs +0 -54
  176. package/dist/web-server/_libs/unctx.mjs +0 -1
  177. package/dist/web-server/_libs/ungap__structured-clone.mjs +0 -224
  178. package/dist/web-server/_libs/unified.mjs +0 -661
  179. package/dist/web-server/_libs/unist-util-is.mjs +0 -100
  180. package/dist/web-server/_libs/unist-util-position.mjs +0 -27
  181. package/dist/web-server/_libs/unist-util-stringify-position.mjs +0 -27
  182. package/dist/web-server/_libs/unist-util-visit-parents.mjs +0 -83
  183. package/dist/web-server/_libs/unist-util-visit.mjs +0 -24
  184. package/dist/web-server/_libs/unstorage.mjs +0 -1
  185. package/dist/web-server/_libs/use-sync-external-store.mjs +0 -139
  186. package/dist/web-server/_libs/vfile-message.mjs +0 -138
  187. package/dist/web-server/_libs/vfile.mjs +0 -467
  188. package/dist/web-server/_libs/zod.mjs +0 -3915
  189. package/dist/web-server/_libs/zustand.mjs +0 -343
  190. package/dist/web-server/_libs/zwitch.mjs +0 -1
  191. package/dist/web-server/_ssr/index-0n2Z3BPQ.mjs +0 -369
  192. package/dist/web-server/_ssr/index-6itDALOw.mjs +0 -339
  193. package/dist/web-server/_ssr/index-BIRTrOmp.mjs +0 -449
  194. package/dist/web-server/_ssr/index-BPzfADac.mjs +0 -66
  195. package/dist/web-server/_ssr/index-BQE3bF14.mjs +0 -1870
  196. package/dist/web-server/_ssr/index-C5HpvlUP.mjs +0 -190
  197. package/dist/web-server/_ssr/index-C_ZxnypN.mjs +0 -213
  198. package/dist/web-server/_ssr/index-Ca8JFH8f.mjs +0 -612
  199. package/dist/web-server/_ssr/index-DNVESZiA.mjs +0 -513
  200. package/dist/web-server/_ssr/index.mjs +0 -1558
  201. package/dist/web-server/_ssr/input-CqXjTRQg.mjs +0 -20
  202. package/dist/web-server/_ssr/queries-3H_19mUt.mjs +0 -16
  203. package/dist/web-server/_ssr/router-sbsNus0Y.mjs +0 -2093
  204. package/dist/web-server/_ssr/start-HYkvq4Ni.mjs +0 -4
  205. package/dist/web-server/_ssr/switch-usf2F1UM.mjs +0 -33
  206. package/dist/web-server/_ssr/syntax-highlighter-5vezNTce.mjs +0 -62
  207. package/dist/web-server/_ssr/textarea-DfRheWY0.mjs +0 -18
  208. package/dist/web-server/_tanstack-start-manifest_v-DqW-pKEH.mjs +0 -4
  209. package/dist/web-server/index.mjs +0 -597
@@ -1,94 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-U6RcWedt.js","assets/queries-iHRgZzw2.js","assets/IconLoader2-BIx3OuF9.js","assets/index-CtacpN3I.js","assets/IconRefresh-Dgm93w3T.js","assets/index-DY7aE-9s.js","assets/switch-B1DcZLwL.js","assets/IconAlertCircle-BHkmI3j7.js","assets/index-CrQs9n6q.js","assets/index-CWUaRwcE.js","assets/IconCheck-CFuEh_p7.js","assets/index-enFS26SU.js","assets/input-eNcwlDHp.js","assets/IconAlertTriangle-wCJudlVg.js","assets/index-CinLq3cd.js","assets/textarea-Di_syYTS.js","assets/index-Bbz3abmO.js"])))=>i.map(i=>d[i]);
2
- function wT(e,t){for(var r=0;r<t.length;r++){const s=t[r];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const c=Object.getOwnPropertyDescriptor(s,a);c&&Object.defineProperty(e,a,c.get?c:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function RT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kh={exports:{}},Za={};var Zb;function ET(){if(Zb)return Za;Zb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,c){var u=null;if(c!==void 0&&(u=""+c),a.key!==void 0&&(u=""+a.key),"key"in a){c={};for(var f in a)f!=="key"&&(c[f]=a[f])}else c=a;return a=c.ref,{$$typeof:e,type:s,key:u,ref:a!==void 0?a:null,props:c}}return Za.Fragment=t,Za.jsx=r,Za.jsxs=r,Za}var Vb;function _T(){return Vb||(Vb=1,kh.exports=ET()),kh.exports}var k=_T(),Nh={exports:{}},Be={};var qb;function TT(){if(qb)return Be;qb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(z){return z===null||typeof z!="object"?null:(z=v&&z[v]||z["@@iterator"],typeof z=="function"?z:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function R(z,G,re){this.props=z,this.context=G,this.refs=x,this.updater=re||S}R.prototype.isReactComponent={},R.prototype.setState=function(z,G){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,G,"setState")},R.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function O(){}O.prototype=R.prototype;function A(z,G,re){this.props=z,this.context=G,this.refs=x,this.updater=re||S}var M=A.prototype=new O;M.constructor=A,E(M,R.prototype),M.isPureReactComponent=!0;var N=Array.isArray;function D(){}var j={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function H(z,G,re){var ie=re.ref;return{$$typeof:e,type:z,key:G,ref:ie!==void 0?ie:null,props:re}}function Y(z,G){return H(z.type,G,z.props)}function W(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function $(z){var G={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(re){return G[re]})}var K=/\/+/g;function q(z,G){return typeof z=="object"&&z!==null&&z.key!=null?$(""+z.key):G.toString(36)}function Z(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(D,D):(z.status="pending",z.then(function(G){z.status==="pending"&&(z.status="fulfilled",z.value=G)},function(G){z.status==="pending"&&(z.status="rejected",z.reason=G)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function I(z,G,re,ie,he){var de=typeof z;(de==="undefined"||de==="boolean")&&(z=null);var ge=!1;if(z===null)ge=!0;else switch(de){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(z.$$typeof){case e:case t:ge=!0;break;case m:return ge=z._init,I(ge(z._payload),G,re,ie,he)}}if(ge)return he=he(z),ge=ie===""?"."+q(z,0):ie,N(he)?(re="",ge!=null&&(re=ge.replace(K,"$&/")+"/"),I(he,G,re,"",function(ke){return ke})):he!=null&&(W(he)&&(he=Y(he,re+(he.key==null||z&&z.key===he.key?"":(""+he.key).replace(K,"$&/")+"/")+ge)),G.push(he)),1;ge=0;var me=ie===""?".":ie+":";if(N(z))for(var ye=0;ye<z.length;ye++)ie=z[ye],de=me+q(ie,ye),ge+=I(ie,G,re,de,he);else if(ye=b(z),typeof ye=="function")for(z=ye.call(z),ye=0;!(ie=z.next()).done;)ie=ie.value,de=me+q(ie,ye++),ge+=I(ie,G,re,de,he);else if(de==="object"){if(typeof z.then=="function")return I(Z(z),G,re,ie,he);throw G=String(z),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ge}function B(z,G,re){if(z==null)return z;var ie=[],he=0;return I(z,ie,"","",function(de){return G.call(re,de,he++)}),ie}function ee(z){if(z._status===-1){var G=z._result;G=G(),G.then(function(re){(z._status===0||z._status===-1)&&(z._status=1,z._result=re)},function(re){(z._status===0||z._status===-1)&&(z._status=2,z._result=re)}),z._status===-1&&(z._status=0,z._result=G)}if(z._status===1)return z._result.default;throw z._result}var ne=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},le={map:B,forEach:function(z,G,re){B(z,function(){G.apply(this,arguments)},re)},count:function(z){var G=0;return B(z,function(){G++}),G},toArray:function(z){return B(z,function(G){return G})||[]},only:function(z){if(!W(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Be.Activity=y,Be.Children=le,Be.Component=R,Be.Fragment=r,Be.Profiler=a,Be.PureComponent=A,Be.StrictMode=s,Be.Suspense=p,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Be.__COMPILER_RUNTIME={__proto__:null,c:function(z){return j.H.useMemoCache(z)}},Be.cache=function(z){return function(){return z.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(z,G,re){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ie=E({},z.props),he=z.key;if(G!=null)for(de in G.key!==void 0&&(he=""+G.key),G)!L.call(G,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&G.ref===void 0||(ie[de]=G[de]);var de=arguments.length-2;if(de===1)ie.children=re;else if(1<de){for(var ge=Array(de),me=0;me<de;me++)ge[me]=arguments[me+2];ie.children=ge}return H(z.type,he,ie)},Be.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:c,_context:z},z},Be.createElement=function(z,G,re){var ie,he={},de=null;if(G!=null)for(ie in G.key!==void 0&&(de=""+G.key),G)L.call(G,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(he[ie]=G[ie]);var ge=arguments.length-2;if(ge===1)he.children=re;else if(1<ge){for(var me=Array(ge),ye=0;ye<ge;ye++)me[ye]=arguments[ye+2];he.children=me}if(z&&z.defaultProps)for(ie in ge=z.defaultProps,ge)he[ie]===void 0&&(he[ie]=ge[ie]);return H(z,de,he)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(z){return{$$typeof:f,render:z}},Be.isValidElement=W,Be.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:ee}},Be.memo=function(z,G){return{$$typeof:h,type:z,compare:G===void 0?null:G}},Be.startTransition=function(z){var G=j.T,re={};j.T=re;try{var ie=z(),he=j.S;he!==null&&he(re,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(D,ne)}catch(de){ne(de)}finally{G!==null&&re.types!==null&&(G.types=re.types),j.T=G}},Be.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Be.use=function(z){return j.H.use(z)},Be.useActionState=function(z,G,re){return j.H.useActionState(z,G,re)},Be.useCallback=function(z,G){return j.H.useCallback(z,G)},Be.useContext=function(z){return j.H.useContext(z)},Be.useDebugValue=function(){},Be.useDeferredValue=function(z,G){return j.H.useDeferredValue(z,G)},Be.useEffect=function(z,G){return j.H.useEffect(z,G)},Be.useEffectEvent=function(z){return j.H.useEffectEvent(z)},Be.useId=function(){return j.H.useId()},Be.useImperativeHandle=function(z,G,re){return j.H.useImperativeHandle(z,G,re)},Be.useInsertionEffect=function(z,G){return j.H.useInsertionEffect(z,G)},Be.useLayoutEffect=function(z,G){return j.H.useLayoutEffect(z,G)},Be.useMemo=function(z,G){return j.H.useMemo(z,G)},Be.useOptimistic=function(z,G){return j.H.useOptimistic(z,G)},Be.useReducer=function(z,G,re){return j.H.useReducer(z,G,re)},Be.useRef=function(z){return j.H.useRef(z)},Be.useState=function(z){return j.H.useState(z)},Be.useSyncExternalStore=function(z,G,re){return j.H.useSyncExternalStore(z,G,re)},Be.useTransition=function(){return j.H.useTransition()},Be.version="19.2.6",Be}var Yb;function yl(){return Yb||(Yb=1,Nh.exports=TT()),Nh.exports}var _=yl();const xr=RT(_),u1=wT({__proto__:null,default:xr},[_]);var Ph={exports:{}},Va={},jh={exports:{}},Lh={};var Gb;function CT(){return Gb||(Gb=1,(function(e){function t(I,B){var ee=I.length;I.push(B);e:for(;0<ee;){var ne=ee-1>>>1,le=I[ne];if(0<a(le,B))I[ne]=B,I[ee]=le,ee=ne;else break e}}function r(I){return I.length===0?null:I[0]}function s(I){if(I.length===0)return null;var B=I[0],ee=I.pop();if(ee!==B){I[0]=ee;e:for(var ne=0,le=I.length,z=le>>>1;ne<z;){var G=2*(ne+1)-1,re=I[G],ie=G+1,he=I[ie];if(0>a(re,ee))ie<le&&0>a(he,re)?(I[ne]=he,I[ie]=ee,ne=ie):(I[ne]=re,I[G]=ee,ne=G);else if(ie<le&&0>a(he,ee))I[ne]=he,I[ie]=ee,ne=ie;else break e}}return B}function a(I,B){var ee=I.sortIndex-B.sortIndex;return ee!==0?ee:I.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],h=[],m=1,y=null,v=3,b=!1,S=!1,E=!1,x=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function M(I){for(var B=r(h);B!==null;){if(B.callback===null)s(h);else if(B.startTime<=I)s(h),B.sortIndex=B.expirationTime,t(p,B);else break;B=r(h)}}function N(I){if(E=!1,M(I),!S)if(r(p)!==null)S=!0,D||(D=!0,$());else{var B=r(h);B!==null&&Z(N,B.startTime-I)}}var D=!1,j=-1,L=5,H=-1;function Y(){return x?!0:!(e.unstable_now()-H<L)}function W(){if(x=!1,D){var I=e.unstable_now();H=I;var B=!0;try{e:{S=!1,E&&(E=!1,O(j),j=-1),b=!0;var ee=v;try{t:{for(M(I),y=r(p);y!==null&&!(y.expirationTime>I&&Y());){var ne=y.callback;if(typeof ne=="function"){y.callback=null,v=y.priorityLevel;var le=ne(y.expirationTime<=I);if(I=e.unstable_now(),typeof le=="function"){y.callback=le,M(I),B=!0;break t}y===r(p)&&s(p),M(I)}else s(p);y=r(p)}if(y!==null)B=!0;else{var z=r(h);z!==null&&Z(N,z.startTime-I),B=!1}}break e}finally{y=null,v=ee,b=!1}B=void 0}}finally{B?$():D=!1}}}var $;if(typeof A=="function")$=function(){A(W)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,q=K.port2;K.port1.onmessage=W,$=function(){q.postMessage(null)}}else $=function(){R(W,0)};function Z(I,B){j=R(function(){I(e.unstable_now())},B)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(I){switch(v){case 1:case 2:case 3:var B=3;break;default:B=v}var ee=v;v=B;try{return I()}finally{v=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(I,B){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var ee=v;v=I;try{return B()}finally{v=ee}},e.unstable_scheduleCallback=function(I,B,ee){var ne=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ne+ee:ne):ee=ne,I){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=ee+le,I={id:m++,callback:B,priorityLevel:I,startTime:ee,expirationTime:le,sortIndex:-1},ee>ne?(I.sortIndex=ee,t(h,I),r(p)===null&&I===r(h)&&(E?(O(j),j=-1):E=!0,Z(N,ee-ne))):(I.sortIndex=le,t(p,I),S||b||(S=!0,D||(D=!0,$()))),I},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(I){var B=v;return function(){var ee=v;v=B;try{return I.apply(this,arguments)}finally{v=ee}}}})(Lh)),Lh}var Kb;function OT(){return Kb||(Kb=1,jh.exports=CT()),jh.exports}var Ih={exports:{}},hn={};var Qb;function MT(){if(Qb)return hn;Qb=1;var e=yl();function t(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function c(p,h,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:p,containerInfo:h,implementation:m}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,hn.createPortal=function(p,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return c(p,h,null,m)},hn.flushSync=function(p){var h=u.T,m=s.p;try{if(u.T=null,s.p=2,p)return p()}finally{u.T=h,s.p=m,s.d.f()}},hn.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(p,h))},hn.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},hn.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var m=h.as,y=f(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?s.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):m==="script"&&s.d.X(p,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},hn.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);s.d.M(p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(p)},hn.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,y=f(m,h.crossOrigin);s.d.L(p,m,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},hn.preloadModule=function(p,h){if(typeof p=="string")if(h){var m=f(h.as,h.crossOrigin);s.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(p)},hn.requestFormReset=function(p){s.d.r(p)},hn.unstable_batchedUpdates=function(p,h){return p(h)},hn.useFormState=function(p,h,m){return u.H.useFormState(p,h,m)},hn.useFormStatus=function(){return u.H.useHostTransitionStatus()},hn.version="19.2.6",hn}var Xb;function f1(){if(Xb)return Ih.exports;Xb=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(),Ih.exports=MT(),Ih.exports}var Jb;function AT(){if(Jb)return Va;Jb=1;var e=OT(),t=yl(),r=f1();function s(n){var o="https://react.dev/errors/"+n;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)o+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var o=n,i=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(i=o.return),n=o.return;while(n)}return o.tag===3?i:null}function u(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function f(n){if(n.tag===31){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(s(188))}function h(n){var o=n.alternate;if(!o){if(o=c(n),o===null)throw Error(s(188));return o!==n?null:n}for(var i=n,l=o;;){var d=i.return;if(d===null)break;var g=d.alternate;if(g===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===i)return p(d),n;if(g===l)return p(d),o;g=g.sibling}throw Error(s(188))}if(i.return!==l.return)i=d,l=g;else{for(var w=!1,C=d.child;C;){if(C===i){w=!0,i=d,l=g;break}if(C===l){w=!0,l=d,i=g;break}C=C.sibling}if(!w){for(C=g.child;C;){if(C===i){w=!0,i=g,l=d;break}if(C===l){w=!0,l=g,i=d;break}C=C.sibling}if(!w)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?n:o}function m(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n;for(n=n.child;n!==null;){if(o=m(n),o!==null)return o;n=n.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Y=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function $(n){return n===null||typeof n!="object"?null:(n=W&&n[W]||n["@@iterator"],typeof n=="function"?n:null)}var K=Symbol.for("react.client.reference");function q(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===K?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case R:return"Profiler";case x:return"StrictMode";case N:return"Suspense";case D:return"SuspenseList";case H:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case A:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case M:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case j:return o=n.displayName||null,o!==null?o:q(n.type)||"Memo";case L:o=n._payload,n=n._init;try{return q(n(o))}catch{}}return null}var Z=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ne=[],le=-1;function z(n){return{current:n}}function G(n){0>le||(n.current=ne[le],ne[le]=null,le--)}function re(n,o){le++,ne[le]=n.current,n.current=o}var ie=z(null),he=z(null),de=z(null),ge=z(null);function me(n,o){switch(re(de,o),re(he,n),re(ie,null),o.nodeType){case 9:case 11:n=(n=o.documentElement)&&(n=n.namespaceURI)?hb(n):0;break;default:if(n=o.tagName,o=o.namespaceURI)o=hb(o),n=pb(o,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}G(ie),re(ie,n)}function ye(){G(ie),G(he),G(de)}function ke(n){n.memoizedState!==null&&re(ge,n);var o=ie.current,i=pb(o,n.type);o!==i&&(re(he,n),re(ie,i))}function He(n){he.current===n&&(G(ie),G(he)),ge.current===n&&(G(ge),Ba._currentValue=ee)}var Se,Pe;function Ze(n){if(Se===void 0)try{throw Error()}catch(i){var o=i.stack.trim().match(/\n( *(at )?)/);Se=o&&o[1]||"",Pe=-1<i.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+Se+n+Pe}var Ge=!1;function Me(n,o){if(!n||Ge)return"";Ge=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(o){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(te){var J=te}Reflect.construct(n,[],ae)}else{try{ae.call()}catch(te){J=te}n.call(ae.prototype)}}else{try{throw Error()}catch(te){J=te}(ae=n())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=l.DetermineComponentFrameRoot(),w=g[0],C=g[1];if(w&&C){var U=w.split(`
5
- `),X=C.split(`
6
- `);for(d=l=0;l<U.length&&!U[l].includes("DetermineComponentFrameRoot");)l++;for(;d<X.length&&!X[d].includes("DetermineComponentFrameRoot");)d++;if(l===U.length||d===X.length)for(l=U.length-1,d=X.length-1;1<=l&&0<=d&&U[l]!==X[d];)d--;for(;1<=l&&0<=d;l--,d--)if(U[l]!==X[d]){if(l!==1||d!==1)do if(l--,d--,0>d||U[l]!==X[d]){var oe=`
7
- `+U[l].replace(" at new "," at ");return n.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",n.displayName)),oe}while(1<=l&&0<=d);break}}}finally{Ge=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?Ze(i):""}function Te(n,o){switch(n.tag){case 26:case 27:case 5:return Ze(n.type);case 16:return Ze("Lazy");case 13:return n.child!==o&&o!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return Me(n.type,!1);case 11:return Me(n.type.render,!1);case 1:return Me(n.type,!0);case 31:return Ze("Activity");default:return""}}function Ae(n){try{var o="",i=null;do o+=Te(n,i),i=n,n=n.return;while(n);return o}catch(l){return`
8
- Error generating stack: `+l.message+`
9
- `+l.stack}}var be=Object.prototype.hasOwnProperty,Ce=e.unstable_scheduleCallback,ce=e.unstable_cancelCallback,xe=e.unstable_shouldYield,ue=e.unstable_requestPaint,pe=e.unstable_now,ve=e.unstable_getCurrentPriorityLevel,Ne=e.unstable_ImmediatePriority,Fe=e.unstable_UserBlockingPriority,Ct=e.unstable_NormalPriority,Dt=e.unstable_LowPriority,Ht=e.unstable_IdlePriority,Le=e.log,Ue=e.unstable_setDisableYieldValue,lt=null,xt=null;function dn(n){if(typeof Le=="function"&&Ue(n),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(lt,n)}catch{}}var jt=Math.clz32?Math.clz32:Ft,hr=Math.log,it=Math.LN2;function Ft(n){return n>>>=0,n===0?32:31-(hr(n)/it|0)|0}var tn=256,$t=262144,Rn=4194304;function Zt(n){var o=n&42;if(o!==0)return o;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Yn(n,o,i){var l=n.pendingLanes;if(l===0)return 0;var d=0,g=n.suspendedLanes,w=n.pingedLanes;n=n.warmLanes;var C=l&134217727;return C!==0?(l=C&~g,l!==0?d=Zt(l):(w&=C,w!==0?d=Zt(w):i||(i=C&~n,i!==0&&(d=Zt(i))))):(C=l&~g,C!==0?d=Zt(C):w!==0?d=Zt(w):i||(i=l&~n,i!==0&&(d=Zt(i)))),d===0?0:o!==0&&o!==d&&(o&g)===0&&(g=d&-d,i=o&-o,g>=i||g===32&&(i&4194048)!==0)?o:d}function Gn(n,o){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&o)===0}function Fs(n,o){switch(n){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 $s(){var n=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),n}function ts(n){for(var o=[],i=0;31>i;i++)o.push(n);return o}function zr(n,o){n.pendingLanes|=o,o!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Rf(n,o,i,l,d,g){var w=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var C=n.entanglements,U=n.expirationTimes,X=n.hiddenUpdates;for(i=w&~i;0<i;){var oe=31-jt(i),ae=1<<oe;C[oe]=0,U[oe]=-1;var J=X[oe];if(J!==null)for(X[oe]=null,oe=0;oe<J.length;oe++){var te=J[oe];te!==null&&(te.lane&=-536870913)}i&=~ae}l!==0&&Zs(n,l,0),g!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=g&~(w&~o))}function Zs(n,o,i){n.pendingLanes|=o,n.suspendedLanes&=~o;var l=31-jt(o);n.entangledLanes|=o,n.entanglements[l]=n.entanglements[l]|1073741824|i&261930}function Wi(n,o){var i=n.entangledLanes|=o;for(n=n.entanglements;i;){var l=31-jt(i),d=1<<l;d&o|n[l]&o&&(n[l]|=o),i&=~d}}function Ml(n,o){var i=o&-o;return i=(i&42)!==0?1:ea(i),(i&(n.suspendedLanes|o))!==0?0:i}function ea(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Dr(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Al(){var n=B.p;return n!==0?n:(n=window.event,n===void 0?32:Lb(n.type))}function zl(n,o){var i=B.p;try{return B.p=n,o()}finally{B.p=i}}var pr=Math.random().toString(36).slice(2),nn="__reactFiber$"+pr,En="__reactProps$"+pr,Vs="__reactContainer$"+pr,Ef="__reactEvents$"+pr,fE="__reactListeners$"+pr,dE="__reactHandles$"+pr,eg="__reactResources$"+pr,ta="__reactMarker$"+pr;function _f(n){delete n[nn],delete n[En],delete n[Ef],delete n[fE],delete n[dE]}function qs(n){var o=n[nn];if(o)return o;for(var i=n.parentNode;i;){if(o=i[Vs]||i[nn]){if(i=o.alternate,o.child!==null||i!==null&&i.child!==null)for(n=xb(n);n!==null;){if(i=n[nn])return i;n=xb(n)}return o}n=i,i=n.parentNode}return null}function Ys(n){if(n=n[nn]||n[Vs]){var o=n.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return n}return null}function na(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n.stateNode;throw Error(s(33))}function Gs(n){var o=n[eg];return o||(o=n[eg]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Jt(n){n[ta]=!0}var tg=new Set,ng={};function ns(n,o){Ks(n,o),Ks(n+"Capture",o)}function Ks(n,o){for(ng[n]=o,n=0;n<o.length;n++)tg.add(o[n])}var hE=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]*$"),rg={},og={};function pE(n){return be.call(og,n)?!0:be.call(rg,n)?!1:hE.test(n)?og[n]=!0:(rg[n]=!0,!1)}function Dl(n,o,i){if(pE(o))if(i===null)n.removeAttribute(o);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(o);return;case"boolean":var l=o.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(o);return}}n.setAttribute(o,""+i)}}function kl(n,o,i){if(i===null)n.removeAttribute(o);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttribute(o,""+i)}}function kr(n,o,i,l){if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(o,i,""+l)}}function Kn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function sg(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function mE(n,o,i){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,o);if(!n.hasOwnProperty(o)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,g=l.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return d.call(this)},set:function(w){i=""+w,g.call(this,w)}}),Object.defineProperty(n,o,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(w){i=""+w},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Tf(n){if(!n._valueTracker){var o=sg(n)?"checked":"value";n._valueTracker=mE(n,o,""+n[o])}}function ig(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var i=o.getValue(),l="";return n&&(l=sg(n)?n.checked?"true":"false":n.value),n=l,n!==i?(o.setValue(n),!0):!1}function Nl(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var gE=/[\n"\\]/g;function Qn(n){return n.replace(gE,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Cf(n,o,i,l,d,g,w,C){n.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.type=w:n.removeAttribute("type"),o!=null?w==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+Kn(o)):n.value!==""+Kn(o)&&(n.value=""+Kn(o)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),o!=null?Of(n,w,Kn(o)):i!=null?Of(n,w,Kn(i)):l!=null&&n.removeAttribute("value"),d==null&&g!=null&&(n.defaultChecked=!!g),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?n.name=""+Kn(C):n.removeAttribute("name")}function ag(n,o,i,l,d,g,w,C){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),o!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||o!=null)){Tf(n);return}i=i!=null?""+Kn(i):"",o=o!=null?""+Kn(o):i,C||o===n.value||(n.value=o),n.defaultValue=o}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=C?n.checked:!!l,n.defaultChecked=!!l,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.name=w),Tf(n)}function Of(n,o,i){o==="number"&&Nl(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function Qs(n,o,i,l){if(n=n.options,o){o={};for(var d=0;d<i.length;d++)o["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=o.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&l&&(n[i].defaultSelected=!0)}else{for(i=""+Kn(i),o=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}o!==null||n[d].disabled||(o=n[d])}o!==null&&(o.selected=!0)}}function lg(n,o,i){if(o!=null&&(o=""+Kn(o),o!==n.value&&(n.value=o),i==null)){n.defaultValue!==o&&(n.defaultValue=o);return}n.defaultValue=i!=null?""+Kn(i):""}function cg(n,o,i,l){if(o==null){if(l!=null){if(i!=null)throw Error(s(92));if(Z(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),o=i}i=Kn(o),n.defaultValue=i,l=n.textContent,l===i&&l!==""&&l!==null&&(n.value=l),Tf(n)}function Xs(n,o){if(o){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=o;return}}n.textContent=o}var yE=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 ug(n,o,i){var l=o.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="":l?n.setProperty(o,i):typeof i!="number"||i===0||yE.has(o)?o==="float"?n.cssFloat=i:n[o]=(""+i).trim():n[o]=i+"px"}function fg(n,o,i){if(o!=null&&typeof o!="object")throw Error(s(62));if(n=n.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||o!=null&&o.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in o)l=o[d],o.hasOwnProperty(d)&&i[d]!==l&&ug(n,d,l)}else for(var g in o)o.hasOwnProperty(g)&&ug(n,g,o[g])}function Mf(n){if(n.indexOf("-")===-1)return!1;switch(n){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 vE=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"]]),bE=/^[\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 Pl(n){return bE.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Nr(){}var Af=null;function zf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Js=null,Ws=null;function dg(n){var o=Ys(n);if(o&&(n=o.stateNode)){var i=n[En]||null;e:switch(n=o.stateNode,o.type){case"input":if(Cf(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),o=i.name,i.type==="radio"&&o!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Qn(""+o)+'"][type="radio"]'),o=0;o<i.length;o++){var l=i[o];if(l!==n&&l.form===n.form){var d=l[En]||null;if(!d)throw Error(s(90));Cf(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(o=0;o<i.length;o++)l=i[o],l.form===n.form&&ig(l)}break e;case"textarea":lg(n,i.value,i.defaultValue);break e;case"select":o=i.value,o!=null&&Qs(n,!!i.multiple,o,!1)}}}var Df=!1;function hg(n,o,i){if(Df)return n(o,i);Df=!0;try{var l=n(o);return l}finally{if(Df=!1,(Js!==null||Ws!==null)&&(wc(),Js&&(o=Js,n=Ws,Ws=Js=null,dg(o),n)))for(o=0;o<n.length;o++)dg(n[o])}}function ra(n,o){var i=n.stateNode;if(i===null)return null;var l=i[En]||null;if(l===null)return null;i=l[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(s(231,o,typeof i));return i}var Pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kf=!1;if(Pr)try{var oa={};Object.defineProperty(oa,"passive",{get:function(){kf=!0}}),window.addEventListener("test",oa,oa),window.removeEventListener("test",oa,oa)}catch{kf=!1}var uo=null,Nf=null,jl=null;function pg(){if(jl)return jl;var n,o=Nf,i=o.length,l,d="value"in uo?uo.value:uo.textContent,g=d.length;for(n=0;n<i&&o[n]===d[n];n++);var w=i-n;for(l=1;l<=w&&o[i-l]===d[g-l];l++);return jl=d.slice(n,1<l?1-l:void 0)}function Ll(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function Il(){return!0}function mg(){return!1}function _n(n){function o(i,l,d,g,w){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var C in n)n.hasOwnProperty(C)&&(i=n[C],this[C]=i?i(g):g[C]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Il:mg,this.isPropagationStopped=mg,this}return y(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Il)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Il)},persist:function(){},isPersistent:Il}),o}var rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ul=_n(rs),sa=y({},rs,{view:0,detail:0}),SE=_n(sa),Pf,jf,ia,Bl=y({},sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:If,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ia&&(ia&&n.type==="mousemove"?(Pf=n.screenX-ia.screenX,jf=n.screenY-ia.screenY):jf=Pf=0,ia=n),Pf)},movementY:function(n){return"movementY"in n?n.movementY:jf}}),gg=_n(Bl),xE=y({},Bl,{dataTransfer:0}),wE=_n(xE),RE=y({},sa,{relatedTarget:0}),Lf=_n(RE),EE=y({},rs,{animationName:0,elapsedTime:0,pseudoElement:0}),_E=_n(EE),TE=y({},rs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),CE=_n(TE),OE=y({},rs,{data:0}),yg=_n(OE),ME={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AE={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"},zE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DE(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=zE[n])?!!o[n]:!1}function If(){return DE}var kE=y({},sa,{key:function(n){if(n.key){var o=ME[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=Ll(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?AE[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:If,charCode:function(n){return n.type==="keypress"?Ll(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ll(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),NE=_n(kE),PE=y({},Bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vg=_n(PE),jE=y({},sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:If}),LE=_n(jE),IE=y({},rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),UE=_n(IE),BE=y({},Bl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),HE=_n(BE),FE=y({},rs,{newState:0,oldState:0}),$E=_n(FE),ZE=[9,13,27,32],Uf=Pr&&"CompositionEvent"in window,aa=null;Pr&&"documentMode"in document&&(aa=document.documentMode);var VE=Pr&&"TextEvent"in window&&!aa,bg=Pr&&(!Uf||aa&&8<aa&&11>=aa),Sg=" ",xg=!1;function wg(n,o){switch(n){case"keyup":return ZE.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ei=!1;function qE(n,o){switch(n){case"compositionend":return Rg(o);case"keypress":return o.which!==32?null:(xg=!0,Sg);case"textInput":return n=o.data,n===Sg&&xg?null:n;default:return null}}function YE(n,o){if(ei)return n==="compositionend"||!Uf&&wg(n,o)?(n=pg(),jl=Nf=uo=null,ei=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return bg&&o.locale!=="ko"?null:o.data;default:return null}}var GE={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 Eg(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!GE[n.type]:o==="textarea"}function _g(n,o,i,l){Js?Ws?Ws.push(l):Ws=[l]:Js=l,o=Mc(o,"onChange"),0<o.length&&(i=new Ul("onChange","change",null,i,l),n.push({event:i,listeners:o}))}var la=null,ca=null;function KE(n){ab(n,0)}function Hl(n){var o=na(n);if(ig(o))return n}function Tg(n,o){if(n==="change")return o}var Cg=!1;if(Pr){var Bf;if(Pr){var Hf="oninput"in document;if(!Hf){var Og=document.createElement("div");Og.setAttribute("oninput","return;"),Hf=typeof Og.oninput=="function"}Bf=Hf}else Bf=!1;Cg=Bf&&(!document.documentMode||9<document.documentMode)}function Mg(){la&&(la.detachEvent("onpropertychange",Ag),ca=la=null)}function Ag(n){if(n.propertyName==="value"&&Hl(ca)){var o=[];_g(o,ca,n,zf(n)),hg(KE,o)}}function QE(n,o,i){n==="focusin"?(Mg(),la=o,ca=i,la.attachEvent("onpropertychange",Ag)):n==="focusout"&&Mg()}function XE(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Hl(ca)}function JE(n,o){if(n==="click")return Hl(o)}function WE(n,o){if(n==="input"||n==="change")return Hl(o)}function e_(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var Ln=typeof Object.is=="function"?Object.is:e_;function ua(n,o){if(Ln(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var i=Object.keys(n),l=Object.keys(o);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!be.call(o,d)||!Ln(n[d],o[d]))return!1}return!0}function zg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Dg(n,o){var i=zg(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=o&&l>=o)return{node:i,offset:o-n};n=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=zg(i)}}function kg(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?kg(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function Ng(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var o=Nl(n.document);o instanceof n.HTMLIFrameElement;){try{var i=typeof o.contentWindow.location.href=="string"}catch{i=!1}if(i)n=o.contentWindow;else break;o=Nl(n.document)}return o}function Ff(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}var t_=Pr&&"documentMode"in document&&11>=document.documentMode,ti=null,$f=null,fa=null,Zf=!1;function Pg(n,o,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Zf||ti==null||ti!==Nl(l)||(l=ti,"selectionStart"in l&&Ff(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),fa&&ua(fa,l)||(fa=l,l=Mc($f,"onSelect"),0<l.length&&(o=new Ul("onSelect","select",null,o,i),n.push({event:o,listeners:l}),o.target=ti)))}function os(n,o){var i={};return i[n.toLowerCase()]=o.toLowerCase(),i["Webkit"+n]="webkit"+o,i["Moz"+n]="moz"+o,i}var ni={animationend:os("Animation","AnimationEnd"),animationiteration:os("Animation","AnimationIteration"),animationstart:os("Animation","AnimationStart"),transitionrun:os("Transition","TransitionRun"),transitionstart:os("Transition","TransitionStart"),transitioncancel:os("Transition","TransitionCancel"),transitionend:os("Transition","TransitionEnd")},Vf={},jg={};Pr&&(jg=document.createElement("div").style,"AnimationEvent"in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),"TransitionEvent"in window||delete ni.transitionend.transition);function ss(n){if(Vf[n])return Vf[n];if(!ni[n])return n;var o=ni[n],i;for(i in o)if(o.hasOwnProperty(i)&&i in jg)return Vf[n]=o[i];return n}var Lg=ss("animationend"),Ig=ss("animationiteration"),Ug=ss("animationstart"),n_=ss("transitionrun"),r_=ss("transitionstart"),o_=ss("transitioncancel"),Bg=ss("transitionend"),Hg=new Map,qf="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(" ");qf.push("scrollEnd");function lr(n,o){Hg.set(n,o),ns(o,[n])}var Fl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Xn=[],ri=0,Yf=0;function $l(){for(var n=ri,o=Yf=ri=0;o<n;){var i=Xn[o];Xn[o++]=null;var l=Xn[o];Xn[o++]=null;var d=Xn[o];Xn[o++]=null;var g=Xn[o];if(Xn[o++]=null,l!==null&&d!==null){var w=l.pending;w===null?d.next=d:(d.next=w.next,w.next=d),l.pending=d}g!==0&&Fg(i,d,g)}}function Zl(n,o,i,l){Xn[ri++]=n,Xn[ri++]=o,Xn[ri++]=i,Xn[ri++]=l,Yf|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function Gf(n,o,i,l){return Zl(n,o,i,l),Vl(n)}function is(n,o){return Zl(n,null,null,o),Vl(n)}function Fg(n,o,i){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i);for(var d=!1,g=n.return;g!==null;)g.childLanes|=i,l=g.alternate,l!==null&&(l.childLanes|=i),g.tag===22&&(n=g.stateNode,n===null||n._visibility&1||(d=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,d&&o!==null&&(d=31-jt(i),n=g.hiddenUpdates,l=n[d],l===null?n[d]=[o]:l.push(o),o.lane=i|536870912),g):null}function Vl(n){if(50<ka)throw ka=0,rh=null,Error(s(185));for(var o=n.return;o!==null;)n=o,o=n.return;return n.tag===3?n.stateNode:null}var oi={};function s_(n,o,i,l){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(n,o,i,l){return new s_(n,o,i,l)}function Kf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function jr(n,o){var i=n.alternate;return i===null?(i=In(n.tag,o,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=o,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,o=n.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function $g(n,o){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=o,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,o=i.dependencies,n.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),n}function ql(n,o,i,l,d,g){var w=0;if(l=n,typeof n=="function")Kf(n)&&(w=1);else if(typeof n=="string")w=uT(n,i,ie.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case H:return n=In(31,i,o,d),n.elementType=H,n.lanes=g,n;case E:return as(i.children,d,g,o);case x:w=8,d|=24;break;case R:return n=In(12,i,o,d|2),n.elementType=R,n.lanes=g,n;case N:return n=In(13,i,o,d),n.elementType=N,n.lanes=g,n;case D:return n=In(19,i,o,d),n.elementType=D,n.lanes=g,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:w=10;break e;case O:w=9;break e;case M:w=11;break e;case j:w=14;break e;case L:w=16,l=null;break e}w=29,i=Error(s(130,n===null?"null":typeof n,"")),l=null}return o=In(w,i,o,d),o.elementType=n,o.type=l,o.lanes=g,o}function as(n,o,i,l){return n=In(7,n,l,o),n.lanes=i,n}function Qf(n,o,i){return n=In(6,n,null,o),n.lanes=i,n}function Zg(n){var o=In(18,null,null,0);return o.stateNode=n,o}function Xf(n,o,i){return o=In(4,n.children!==null?n.children:[],n.key,o),o.lanes=i,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}var Vg=new WeakMap;function Jn(n,o){if(typeof n=="object"&&n!==null){var i=Vg.get(n);return i!==void 0?i:(o={value:n,source:o,stack:Ae(o)},Vg.set(n,o),o)}return{value:n,source:o,stack:Ae(o)}}var si=[],ii=0,Yl=null,da=0,Wn=[],er=0,fo=null,mr=1,gr="";function Lr(n,o){si[ii++]=da,si[ii++]=Yl,Yl=n,da=o}function qg(n,o,i){Wn[er++]=mr,Wn[er++]=gr,Wn[er++]=fo,fo=n;var l=mr;n=gr;var d=32-jt(l)-1;l&=~(1<<d),i+=1;var g=32-jt(o)+d;if(30<g){var w=d-d%5;g=(l&(1<<w)-1).toString(32),l>>=w,d-=w,mr=1<<32-jt(o)+d|i<<d|l,gr=g+n}else mr=1<<g|i<<d|l,gr=n}function Jf(n){n.return!==null&&(Lr(n,1),qg(n,1,0))}function Wf(n){for(;n===Yl;)Yl=si[--ii],si[ii]=null,da=si[--ii],si[ii]=null;for(;n===fo;)fo=Wn[--er],Wn[er]=null,gr=Wn[--er],Wn[er]=null,mr=Wn[--er],Wn[er]=null}function Yg(n,o){Wn[er++]=mr,Wn[er++]=gr,Wn[er++]=fo,mr=o.id,gr=o.overflow,fo=n}var rn=null,bt=null,et=!1,ho=null,tr=!1,ed=Error(s(519));function po(n){var o=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ha(Jn(o,n)),ed}function Gg(n){var o=n.stateNode,i=n.type,l=n.memoizedProps;switch(o[nn]=n,o[En]=l,i){case"dialog":Qe("cancel",o),Qe("close",o);break;case"iframe":case"object":case"embed":Qe("load",o);break;case"video":case"audio":for(i=0;i<Pa.length;i++)Qe(Pa[i],o);break;case"source":Qe("error",o);break;case"img":case"image":case"link":Qe("error",o),Qe("load",o);break;case"details":Qe("toggle",o);break;case"input":Qe("invalid",o),ag(o,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Qe("invalid",o);break;case"textarea":Qe("invalid",o),cg(o,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||o.textContent===""+i||l.suppressHydrationWarning===!0||fb(o.textContent,i)?(l.popover!=null&&(Qe("beforetoggle",o),Qe("toggle",o)),l.onScroll!=null&&Qe("scroll",o),l.onScrollEnd!=null&&Qe("scrollend",o),l.onClick!=null&&(o.onclick=Nr),o=!0):o=!1,o||po(n,!0)}function Kg(n){for(rn=n.return;rn;)switch(rn.tag){case 5:case 31:case 13:tr=!1;return;case 27:case 3:tr=!0;return;default:rn=rn.return}}function ai(n){if(n!==rn)return!1;if(!et)return Kg(n),et=!0,!1;var o=n.tag,i;if((i=o!==3&&o!==27)&&((i=o===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||vh(n.type,n.memoizedProps)),i=!i),i&&bt&&po(n),Kg(n),o===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));bt=Sb(n)}else if(o===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));bt=Sb(n)}else o===27?(o=bt,Oo(n.type)?(n=Rh,Rh=null,bt=n):bt=o):bt=rn?rr(n.stateNode.nextSibling):null;return!0}function ls(){bt=rn=null,et=!1}function td(){var n=ho;return n!==null&&(Mn===null?Mn=n:Mn.push.apply(Mn,n),ho=null),n}function ha(n){ho===null?ho=[n]:ho.push(n)}var nd=z(null),cs=null,Ir=null;function mo(n,o,i){re(nd,o._currentValue),o._currentValue=i}function Ur(n){n._currentValue=nd.current,G(nd)}function rd(n,o,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,l!==null&&(l.childLanes|=o)):l!==null&&(l.childLanes&o)!==o&&(l.childLanes|=o),n===i)break;n=n.return}}function od(n,o,i,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var g=d.dependencies;if(g!==null){var w=d.child;g=g.firstContext;e:for(;g!==null;){var C=g;g=d;for(var U=0;U<o.length;U++)if(C.context===o[U]){g.lanes|=i,C=g.alternate,C!==null&&(C.lanes|=i),rd(g.return,i,n),l||(w=null);break e}g=C.next}}else if(d.tag===18){if(w=d.return,w===null)throw Error(s(341));w.lanes|=i,g=w.alternate,g!==null&&(g.lanes|=i),rd(w,i,n),w=null}else w=d.child;if(w!==null)w.return=d;else for(w=d;w!==null;){if(w===n){w=null;break}if(d=w.sibling,d!==null){d.return=w.return,w=d;break}w=w.return}d=w}}function li(n,o,i,l){n=null;for(var d=o,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var w=d.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var C=d.type;Ln(d.pendingProps.value,w.value)||(n!==null?n.push(C):n=[C])}}else if(d===ge.current){if(w=d.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(Ba):n=[Ba])}d=d.return}n!==null&&od(o,n,i,l),o.flags|=262144}function Gl(n){for(n=n.firstContext;n!==null;){if(!Ln(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function us(n){cs=n,Ir=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function on(n){return Qg(cs,n)}function Kl(n,o){return cs===null&&us(n),Qg(n,o)}function Qg(n,o){var i=o._currentValue;if(o={context:o,memoizedValue:i,next:null},Ir===null){if(n===null)throw Error(s(308));Ir=o,n.dependencies={lanes:0,firstContext:o},n.flags|=524288}else Ir=Ir.next=o;return i}var i_=typeof AbortController<"u"?AbortController:function(){var n=[],o=this.signal={aborted:!1,addEventListener:function(i,l){n.push(l)}};this.abort=function(){o.aborted=!0,n.forEach(function(i){return i()})}},a_=e.unstable_scheduleCallback,l_=e.unstable_NormalPriority,Lt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sd(){return{controller:new i_,data:new Map,refCount:0}}function pa(n){n.refCount--,n.refCount===0&&a_(l_,function(){n.controller.abort()})}var ma=null,id=0,ci=0,ui=null;function c_(n,o){if(ma===null){var i=ma=[];id=0,ci=ch(),ui={status:"pending",value:void 0,then:function(l){i.push(l)}}}return id++,o.then(Xg,Xg),o}function Xg(){if(--id===0&&ma!==null){ui!==null&&(ui.status="fulfilled");var n=ma;ma=null,ci=0,ui=null;for(var o=0;o<n.length;o++)(0,n[o])()}}function u_(n,o){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){l.status="fulfilled",l.value=o;for(var d=0;d<i.length;d++)(0,i[d])(o)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var Jg=I.S;I.S=function(n,o){Pv=pe(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&c_(n,o),Jg!==null&&Jg(n,o)};var fs=z(null);function ad(){var n=fs.current;return n!==null?n:gt.pooledCache}function Ql(n,o){o===null?re(fs,fs.current):re(fs,o.pool)}function Wg(){var n=ad();return n===null?null:{parent:Lt._currentValue,pool:n}}var fi=Error(s(460)),ld=Error(s(474)),Xl=Error(s(542)),Jl={then:function(){}};function ey(n){return n=n.status,n==="fulfilled"||n==="rejected"}function ty(n,o,i){switch(i=n[i],i===void 0?n.push(o):i!==o&&(o.then(Nr,Nr),o=i),o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,ry(n),n;default:if(typeof o.status=="string")o.then(Nr,Nr);else{if(n=gt,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=o,n.status="pending",n.then(function(l){if(o.status==="pending"){var d=o;d.status="fulfilled",d.value=l}},function(l){if(o.status==="pending"){var d=o;d.status="rejected",d.reason=l}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,ry(n),n}throw hs=o,fi}}function ds(n){try{var o=n._init;return o(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(hs=i,fi):i}}var hs=null;function ny(){if(hs===null)throw Error(s(459));var n=hs;return hs=null,n}function ry(n){if(n===fi||n===Xl)throw Error(s(483))}var di=null,ga=0;function Wl(n){var o=ga;return ga+=1,di===null&&(di=[]),ty(di,n,o)}function ya(n,o){o=o.props.ref,n.ref=o!==void 0?o:null}function ec(n,o){throw o.$$typeof===v?Error(s(525)):(n=Object.prototype.toString.call(o),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n)))}function oy(n){function o(V,F){if(n){var Q=V.deletions;Q===null?(V.deletions=[F],V.flags|=16):Q.push(F)}}function i(V,F){if(!n)return null;for(;F!==null;)o(V,F),F=F.sibling;return null}function l(V){for(var F=new Map;V!==null;)V.key!==null?F.set(V.key,V):F.set(V.index,V),V=V.sibling;return F}function d(V,F){return V=jr(V,F),V.index=0,V.sibling=null,V}function g(V,F,Q){return V.index=Q,n?(Q=V.alternate,Q!==null?(Q=Q.index,Q<F?(V.flags|=67108866,F):Q):(V.flags|=67108866,F)):(V.flags|=1048576,F)}function w(V){return n&&V.alternate===null&&(V.flags|=67108866),V}function C(V,F,Q,se){return F===null||F.tag!==6?(F=Qf(Q,V.mode,se),F.return=V,F):(F=d(F,Q),F.return=V,F)}function U(V,F,Q,se){var Oe=Q.type;return Oe===E?oe(V,F,Q.props.children,se,Q.key):F!==null&&(F.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===L&&ds(Oe)===F.type)?(F=d(F,Q.props),ya(F,Q),F.return=V,F):(F=ql(Q.type,Q.key,Q.props,null,V.mode,se),ya(F,Q),F.return=V,F)}function X(V,F,Q,se){return F===null||F.tag!==4||F.stateNode.containerInfo!==Q.containerInfo||F.stateNode.implementation!==Q.implementation?(F=Xf(Q,V.mode,se),F.return=V,F):(F=d(F,Q.children||[]),F.return=V,F)}function oe(V,F,Q,se,Oe){return F===null||F.tag!==7?(F=as(Q,V.mode,se,Oe),F.return=V,F):(F=d(F,Q),F.return=V,F)}function ae(V,F,Q){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Qf(""+F,V.mode,Q),F.return=V,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case b:return Q=ql(F.type,F.key,F.props,null,V.mode,Q),ya(Q,F),Q.return=V,Q;case S:return F=Xf(F,V.mode,Q),F.return=V,F;case L:return F=ds(F),ae(V,F,Q)}if(Z(F)||$(F))return F=as(F,V.mode,Q,null),F.return=V,F;if(typeof F.then=="function")return ae(V,Wl(F),Q);if(F.$$typeof===A)return ae(V,Kl(V,F),Q);ec(V,F)}return null}function J(V,F,Q,se){var Oe=F!==null?F.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Oe!==null?null:C(V,F,""+Q,se);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return Q.key===Oe?U(V,F,Q,se):null;case S:return Q.key===Oe?X(V,F,Q,se):null;case L:return Q=ds(Q),J(V,F,Q,se)}if(Z(Q)||$(Q))return Oe!==null?null:oe(V,F,Q,se,null);if(typeof Q.then=="function")return J(V,F,Wl(Q),se);if(Q.$$typeof===A)return J(V,F,Kl(V,Q),se);ec(V,Q)}return null}function te(V,F,Q,se,Oe){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return V=V.get(Q)||null,C(F,V,""+se,Oe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case b:return V=V.get(se.key===null?Q:se.key)||null,U(F,V,se,Oe);case S:return V=V.get(se.key===null?Q:se.key)||null,X(F,V,se,Oe);case L:return se=ds(se),te(V,F,Q,se,Oe)}if(Z(se)||$(se))return V=V.get(Q)||null,oe(F,V,se,Oe,null);if(typeof se.then=="function")return te(V,F,Q,Wl(se),Oe);if(se.$$typeof===A)return te(V,F,Q,Kl(F,se),Oe);ec(F,se)}return null}function we(V,F,Q,se){for(var Oe=null,rt=null,Ee=F,Ve=F=0,Je=null;Ee!==null&&Ve<Q.length;Ve++){Ee.index>Ve?(Je=Ee,Ee=null):Je=Ee.sibling;var ot=J(V,Ee,Q[Ve],se);if(ot===null){Ee===null&&(Ee=Je);break}n&&Ee&&ot.alternate===null&&o(V,Ee),F=g(ot,F,Ve),rt===null?Oe=ot:rt.sibling=ot,rt=ot,Ee=Je}if(Ve===Q.length)return i(V,Ee),et&&Lr(V,Ve),Oe;if(Ee===null){for(;Ve<Q.length;Ve++)Ee=ae(V,Q[Ve],se),Ee!==null&&(F=g(Ee,F,Ve),rt===null?Oe=Ee:rt.sibling=Ee,rt=Ee);return et&&Lr(V,Ve),Oe}for(Ee=l(Ee);Ve<Q.length;Ve++)Je=te(Ee,V,Ve,Q[Ve],se),Je!==null&&(n&&Je.alternate!==null&&Ee.delete(Je.key===null?Ve:Je.key),F=g(Je,F,Ve),rt===null?Oe=Je:rt.sibling=Je,rt=Je);return n&&Ee.forEach(function(ko){return o(V,ko)}),et&&Lr(V,Ve),Oe}function De(V,F,Q,se){if(Q==null)throw Error(s(151));for(var Oe=null,rt=null,Ee=F,Ve=F=0,Je=null,ot=Q.next();Ee!==null&&!ot.done;Ve++,ot=Q.next()){Ee.index>Ve?(Je=Ee,Ee=null):Je=Ee.sibling;var ko=J(V,Ee,ot.value,se);if(ko===null){Ee===null&&(Ee=Je);break}n&&Ee&&ko.alternate===null&&o(V,Ee),F=g(ko,F,Ve),rt===null?Oe=ko:rt.sibling=ko,rt=ko,Ee=Je}if(ot.done)return i(V,Ee),et&&Lr(V,Ve),Oe;if(Ee===null){for(;!ot.done;Ve++,ot=Q.next())ot=ae(V,ot.value,se),ot!==null&&(F=g(ot,F,Ve),rt===null?Oe=ot:rt.sibling=ot,rt=ot);return et&&Lr(V,Ve),Oe}for(Ee=l(Ee);!ot.done;Ve++,ot=Q.next())ot=te(Ee,V,Ve,ot.value,se),ot!==null&&(n&&ot.alternate!==null&&Ee.delete(ot.key===null?Ve:ot.key),F=g(ot,F,Ve),rt===null?Oe=ot:rt.sibling=ot,rt=ot);return n&&Ee.forEach(function(xT){return o(V,xT)}),et&&Lr(V,Ve),Oe}function ht(V,F,Q,se){if(typeof Q=="object"&&Q!==null&&Q.type===E&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:e:{for(var Oe=Q.key;F!==null;){if(F.key===Oe){if(Oe=Q.type,Oe===E){if(F.tag===7){i(V,F.sibling),se=d(F,Q.props.children),se.return=V,V=se;break e}}else if(F.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===L&&ds(Oe)===F.type){i(V,F.sibling),se=d(F,Q.props),ya(se,Q),se.return=V,V=se;break e}i(V,F);break}else o(V,F);F=F.sibling}Q.type===E?(se=as(Q.props.children,V.mode,se,Q.key),se.return=V,V=se):(se=ql(Q.type,Q.key,Q.props,null,V.mode,se),ya(se,Q),se.return=V,V=se)}return w(V);case S:e:{for(Oe=Q.key;F!==null;){if(F.key===Oe)if(F.tag===4&&F.stateNode.containerInfo===Q.containerInfo&&F.stateNode.implementation===Q.implementation){i(V,F.sibling),se=d(F,Q.children||[]),se.return=V,V=se;break e}else{i(V,F);break}else o(V,F);F=F.sibling}se=Xf(Q,V.mode,se),se.return=V,V=se}return w(V);case L:return Q=ds(Q),ht(V,F,Q,se)}if(Z(Q))return we(V,F,Q,se);if($(Q)){if(Oe=$(Q),typeof Oe!="function")throw Error(s(150));return Q=Oe.call(Q),De(V,F,Q,se)}if(typeof Q.then=="function")return ht(V,F,Wl(Q),se);if(Q.$$typeof===A)return ht(V,F,Kl(V,Q),se);ec(V,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,F!==null&&F.tag===6?(i(V,F.sibling),se=d(F,Q),se.return=V,V=se):(i(V,F),se=Qf(Q,V.mode,se),se.return=V,V=se),w(V)):i(V,F)}return function(V,F,Q,se){try{ga=0;var Oe=ht(V,F,Q,se);return di=null,Oe}catch(Ee){if(Ee===fi||Ee===Xl)throw Ee;var rt=In(29,Ee,null,V.mode);return rt.lanes=se,rt.return=V,rt}}}var ps=oy(!0),sy=oy(!1),go=!1;function cd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ud(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function yo(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function vo(n,o,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(at&2)!==0){var d=l.pending;return d===null?o.next=o:(o.next=d.next,d.next=o),l.pending=o,o=Vl(n),Fg(n,null,i),o}return Zl(n,l,o,i),Vl(n)}function va(n,o,i){if(o=o.updateQueue,o!==null&&(o=o.shared,(i&4194048)!==0)){var l=o.lanes;l&=n.pendingLanes,i|=l,o.lanes=i,Wi(n,i)}}function fd(n,o){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var w={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?d=g=w:g=g.next=w,i=i.next}while(i!==null);g===null?d=g=o:g=g.next=o}else d=g=o;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:l.shared,callbacks:l.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=o:n.next=o,i.lastBaseUpdate=o}var dd=!1;function ba(){if(dd){var n=ui;if(n!==null)throw n}}function Sa(n,o,i,l){dd=!1;var d=n.updateQueue;go=!1;var g=d.firstBaseUpdate,w=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var U=C,X=U.next;U.next=null,w===null?g=X:w.next=X,w=U;var oe=n.alternate;oe!==null&&(oe=oe.updateQueue,C=oe.lastBaseUpdate,C!==w&&(C===null?oe.firstBaseUpdate=X:C.next=X,oe.lastBaseUpdate=U))}if(g!==null){var ae=d.baseState;w=0,oe=X=U=null,C=g;do{var J=C.lane&-536870913,te=J!==C.lane;if(te?(Xe&J)===J:(l&J)===J){J!==0&&J===ci&&(dd=!0),oe!==null&&(oe=oe.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var we=n,De=C;J=o;var ht=i;switch(De.tag){case 1:if(we=De.payload,typeof we=="function"){ae=we.call(ht,ae,J);break e}ae=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=De.payload,J=typeof we=="function"?we.call(ht,ae,J):we,J==null)break e;ae=y({},ae,J);break e;case 2:go=!0}}J=C.callback,J!==null&&(n.flags|=64,te&&(n.flags|=8192),te=d.callbacks,te===null?d.callbacks=[J]:te.push(J))}else te={lane:J,tag:C.tag,payload:C.payload,callback:C.callback,next:null},oe===null?(X=oe=te,U=ae):oe=oe.next=te,w|=J;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;te=C,C=te.next,te.next=null,d.lastBaseUpdate=te,d.shared.pending=null}}while(!0);oe===null&&(U=ae),d.baseState=U,d.firstBaseUpdate=X,d.lastBaseUpdate=oe,g===null&&(d.shared.lanes=0),Ro|=w,n.lanes=w,n.memoizedState=ae}}function iy(n,o){if(typeof n!="function")throw Error(s(191,n));n.call(o)}function ay(n,o){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)iy(i[n],o)}var hi=z(null),tc=z(0);function ly(n,o){n=Gr,re(tc,n),re(hi,o),Gr=n|o.baseLanes}function hd(){re(tc,Gr),re(hi,hi.current)}function pd(){Gr=tc.current,G(hi),G(tc)}var Un=z(null),nr=null;function bo(n){var o=n.alternate;re(kt,kt.current&1),re(Un,n),nr===null&&(o===null||hi.current!==null||o.memoizedState!==null)&&(nr=n)}function md(n){re(kt,kt.current),re(Un,n),nr===null&&(nr=n)}function cy(n){n.tag===22?(re(kt,kt.current),re(Un,n),nr===null&&(nr=n)):So()}function So(){re(kt,kt.current),re(Un,Un.current)}function Bn(n){G(Un),nr===n&&(nr=null),G(kt)}var kt=z(0);function nc(n){for(var o=n;o!==null;){if(o.tag===13){var i=o.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||xh(i)||wh(i)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Br=0,$e=null,ft=null,It=null,rc=!1,pi=!1,ms=!1,oc=0,xa=0,mi=null,f_=0;function Ot(){throw Error(s(321))}function gd(n,o){if(o===null)return!1;for(var i=0;i<o.length&&i<n.length;i++)if(!Ln(n[i],o[i]))return!1;return!0}function yd(n,o,i,l,d,g){return Br=g,$e=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=n===null||n.memoizedState===null?qy:Dd,ms=!1,g=i(l,d),ms=!1,pi&&(g=fy(o,i,l,d)),uy(n),g}function uy(n){I.H=Ea;var o=ft!==null&&ft.next!==null;if(Br=0,It=ft=$e=null,rc=!1,xa=0,mi=null,o)throw Error(s(300));n===null||Ut||(n=n.dependencies,n!==null&&Gl(n)&&(Ut=!0))}function fy(n,o,i,l){$e=n;var d=0;do{if(pi&&(mi=null),xa=0,pi=!1,25<=d)throw Error(s(301));if(d+=1,It=ft=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}I.H=Yy,g=o(i,l)}while(pi);return g}function d_(){var n=I.H,o=n.useState()[0];return o=typeof o.then=="function"?wa(o):o,n=n.useState()[0],(ft!==null?ft.memoizedState:null)!==n&&($e.flags|=1024),o}function vd(){var n=oc!==0;return oc=0,n}function bd(n,o,i){o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~i}function Sd(n){if(rc){for(n=n.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}rc=!1}Br=0,It=ft=$e=null,pi=!1,xa=oc=0,mi=null}function yn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?$e.memoizedState=It=n:It=It.next=n,It}function Nt(){if(ft===null){var n=$e.alternate;n=n!==null?n.memoizedState:null}else n=ft.next;var o=It===null?$e.memoizedState:It.next;if(o!==null)It=o,ft=n;else{if(n===null)throw $e.alternate===null?Error(s(467)):Error(s(310));ft=n,n={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},It===null?$e.memoizedState=It=n:It=It.next=n}return It}function sc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wa(n){var o=xa;return xa+=1,mi===null&&(mi=[]),n=ty(mi,n,o),o=$e,(It===null?o.memoizedState:It.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?qy:Dd),n}function ic(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return wa(n);if(n.$$typeof===A)return on(n)}throw Error(s(438,String(n)))}function xd(n){var o=null,i=$e.updateQueue;if(i!==null&&(o=i.memoCache),o==null){var l=$e.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(o={data:l.data.map(function(d){return d.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),i===null&&(i=sc(),$e.updateQueue=i),i.memoCache=o,i=o.data[o.index],i===void 0)for(i=o.data[o.index]=Array(n),l=0;l<n;l++)i[l]=Y;return o.index++,i}function Hr(n,o){return typeof o=="function"?o(n):o}function ac(n){var o=Nt();return wd(o,ft,n)}function wd(n,o,i){var l=n.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var d=n.baseQueue,g=l.pending;if(g!==null){if(d!==null){var w=d.next;d.next=g.next,g.next=w}o.baseQueue=d=g,l.pending=null}if(g=n.baseState,d===null)n.memoizedState=g;else{o=d.next;var C=w=null,U=null,X=o,oe=!1;do{var ae=X.lane&-536870913;if(ae!==X.lane?(Xe&ae)===ae:(Br&ae)===ae){var J=X.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ae===ci&&(oe=!0);else if((Br&J)===J){X=X.next,J===ci&&(oe=!0);continue}else ae={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},U===null?(C=U=ae,w=g):U=U.next=ae,$e.lanes|=J,Ro|=J;ae=X.action,ms&&i(g,ae),g=X.hasEagerState?X.eagerState:i(g,ae)}else J={lane:ae,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},U===null?(C=U=J,w=g):U=U.next=J,$e.lanes|=ae,Ro|=ae;X=X.next}while(X!==null&&X!==o);if(U===null?w=g:U.next=C,!Ln(g,n.memoizedState)&&(Ut=!0,oe&&(i=ui,i!==null)))throw i;n.memoizedState=g,n.baseState=w,n.baseQueue=U,l.lastRenderedState=g}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function Rd(n){var o=Nt(),i=o.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=n;var l=i.dispatch,d=i.pending,g=o.memoizedState;if(d!==null){i.pending=null;var w=d=d.next;do g=n(g,w.action),w=w.next;while(w!==d);Ln(g,o.memoizedState)||(Ut=!0),o.memoizedState=g,o.baseQueue===null&&(o.baseState=g),i.lastRenderedState=g}return[g,l]}function dy(n,o,i){var l=$e,d=Nt(),g=et;if(g){if(i===void 0)throw Error(s(407));i=i()}else i=o();var w=!Ln((ft||d).memoizedState,i);if(w&&(d.memoizedState=i,Ut=!0),d=d.queue,Td(my.bind(null,l,d,n),[n]),d.getSnapshot!==o||w||It!==null&&It.memoizedState.tag&1){if(l.flags|=2048,gi(9,{destroy:void 0},py.bind(null,l,d,i,o),null),gt===null)throw Error(s(349));g||(Br&127)!==0||hy(l,o,i)}return i}function hy(n,o,i){n.flags|=16384,n={getSnapshot:o,value:i},o=$e.updateQueue,o===null?(o=sc(),$e.updateQueue=o,o.stores=[n]):(i=o.stores,i===null?o.stores=[n]:i.push(n))}function py(n,o,i,l){o.value=i,o.getSnapshot=l,gy(o)&&yy(n)}function my(n,o,i){return i(function(){gy(o)&&yy(n)})}function gy(n){var o=n.getSnapshot;n=n.value;try{var i=o();return!Ln(n,i)}catch{return!0}}function yy(n){var o=is(n,2);o!==null&&An(o,n,2)}function Ed(n){var o=yn();if(typeof n=="function"){var i=n;if(n=i(),ms){dn(!0);try{i()}finally{dn(!1)}}}return o.memoizedState=o.baseState=n,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:n},o}function vy(n,o,i,l){return n.baseState=i,wd(n,ft,typeof l=="function"?l:Hr)}function h_(n,o,i,l,d){if(uc(n))throw Error(s(485));if(n=o.action,n!==null){var g={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};I.T!==null?i(!0):g.isTransition=!1,l(g),i=o.pending,i===null?(g.next=o.pending=g,by(o,g)):(g.next=i.next,o.pending=i.next=g)}}function by(n,o){var i=o.action,l=o.payload,d=n.state;if(o.isTransition){var g=I.T,w={};I.T=w;try{var C=i(d,l),U=I.S;U!==null&&U(w,C),Sy(n,o,C)}catch(X){_d(n,o,X)}finally{g!==null&&w.types!==null&&(g.types=w.types),I.T=g}}else try{g=i(d,l),Sy(n,o,g)}catch(X){_d(n,o,X)}}function Sy(n,o,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){xy(n,o,l)},function(l){return _d(n,o,l)}):xy(n,o,i)}function xy(n,o,i){o.status="fulfilled",o.value=i,wy(o),n.state=i,o=n.pending,o!==null&&(i=o.next,i===o?n.pending=null:(i=i.next,o.next=i,by(n,i)))}function _d(n,o,i){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do o.status="rejected",o.reason=i,wy(o),o=o.next;while(o!==l)}n.action=null}function wy(n){n=n.listeners;for(var o=0;o<n.length;o++)(0,n[o])()}function Ry(n,o){return o}function Ey(n,o){if(et){var i=gt.formState;if(i!==null){e:{var l=$e;if(et){if(bt){t:{for(var d=bt,g=tr;d.nodeType!==8;){if(!g){d=null;break t}if(d=rr(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){bt=rr(d.nextSibling),l=d.data==="F!";break e}}po(l)}l=!1}l&&(o=i[0])}}return i=yn(),i.memoizedState=i.baseState=o,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ry,lastRenderedState:o},i.queue=l,i=$y.bind(null,$e,l),l.dispatch=i,l=Ed(!1),g=zd.bind(null,$e,!1,l.queue),l=yn(),d={state:o,dispatch:null,action:n,pending:null},l.queue=d,i=h_.bind(null,$e,d,g,i),d.dispatch=i,l.memoizedState=n,[o,i,!1]}function _y(n){var o=Nt();return Ty(o,ft,n)}function Ty(n,o,i){if(o=wd(n,o,Ry)[0],n=ac(Hr)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var l=wa(o)}catch(w){throw w===fi?Xl:w}else l=o;o=Nt();var d=o.queue,g=d.dispatch;return i!==o.memoizedState&&($e.flags|=2048,gi(9,{destroy:void 0},p_.bind(null,d,i),null)),[l,g,n]}function p_(n,o){n.action=o}function Cy(n){var o=Nt(),i=ft;if(i!==null)return Ty(o,i,n);Nt(),o=o.memoizedState,i=Nt();var l=i.queue.dispatch;return i.memoizedState=n,[o,l,!1]}function gi(n,o,i,l){return n={tag:n,create:i,deps:l,inst:o,next:null},o=$e.updateQueue,o===null&&(o=sc(),$e.updateQueue=o),i=o.lastEffect,i===null?o.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,o.lastEffect=n),n}function Oy(){return Nt().memoizedState}function lc(n,o,i,l){var d=yn();$e.flags|=n,d.memoizedState=gi(1|o,{destroy:void 0},i,l===void 0?null:l)}function cc(n,o,i,l){var d=Nt();l=l===void 0?null:l;var g=d.memoizedState.inst;ft!==null&&l!==null&&gd(l,ft.memoizedState.deps)?d.memoizedState=gi(o,g,i,l):($e.flags|=n,d.memoizedState=gi(1|o,g,i,l))}function My(n,o){lc(8390656,8,n,o)}function Td(n,o){cc(2048,8,n,o)}function m_(n){$e.flags|=4;var o=$e.updateQueue;if(o===null)o=sc(),$e.updateQueue=o,o.events=[n];else{var i=o.events;i===null?o.events=[n]:i.push(n)}}function Ay(n){var o=Nt().memoizedState;return m_({ref:o,nextImpl:n}),function(){if((at&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}function zy(n,o){return cc(4,2,n,o)}function Dy(n,o){return cc(4,4,n,o)}function ky(n,o){if(typeof o=="function"){n=n();var i=o(n);return function(){typeof i=="function"?i():o(null)}}if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function Ny(n,o,i){i=i!=null?i.concat([n]):null,cc(4,4,ky.bind(null,o,n),i)}function Cd(){}function Py(n,o){var i=Nt();o=o===void 0?null:o;var l=i.memoizedState;return o!==null&&gd(o,l[1])?l[0]:(i.memoizedState=[n,o],n)}function jy(n,o){var i=Nt();o=o===void 0?null:o;var l=i.memoizedState;if(o!==null&&gd(o,l[1]))return l[0];if(l=n(),ms){dn(!0);try{n()}finally{dn(!1)}}return i.memoizedState=[l,o],l}function Od(n,o,i){return i===void 0||(Br&1073741824)!==0&&(Xe&261930)===0?n.memoizedState=o:(n.memoizedState=i,n=Lv(),$e.lanes|=n,Ro|=n,i)}function Ly(n,o,i,l){return Ln(i,o)?i:hi.current!==null?(n=Od(n,i,l),Ln(n,o)||(Ut=!0),n):(Br&42)===0||(Br&1073741824)!==0&&(Xe&261930)===0?(Ut=!0,n.memoizedState=i):(n=Lv(),$e.lanes|=n,Ro|=n,o)}function Iy(n,o,i,l,d){var g=B.p;B.p=g!==0&&8>g?g:8;var w=I.T,C={};I.T=C,zd(n,!1,o,i);try{var U=d(),X=I.S;if(X!==null&&X(C,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var oe=u_(U,l);Ra(n,o,oe,$n(n))}else Ra(n,o,l,$n(n))}catch(ae){Ra(n,o,{then:function(){},status:"rejected",reason:ae},$n())}finally{B.p=g,w!==null&&C.types!==null&&(w.types=C.types),I.T=w}}function g_(){}function Md(n,o,i,l){if(n.tag!==5)throw Error(s(476));var d=Uy(n).queue;Iy(n,d,o,ee,i===null?g_:function(){return By(n),i(l)})}function Uy(n){var o=n.memoizedState;if(o!==null)return o;o={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:ee},next:null};var i={};return o.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:i},next:null},n.memoizedState=o,n=n.alternate,n!==null&&(n.memoizedState=o),o}function By(n){var o=Uy(n);o.next===null&&(o=n.alternate.memoizedState),Ra(n,o.next.queue,{},$n())}function Ad(){return on(Ba)}function Hy(){return Nt().memoizedState}function Fy(){return Nt().memoizedState}function y_(n){for(var o=n.return;o!==null;){switch(o.tag){case 24:case 3:var i=$n();n=yo(i);var l=vo(o,n,i);l!==null&&(An(l,o,i),va(l,o,i)),o={cache:sd()},n.payload=o;return}o=o.return}}function v_(n,o,i){var l=$n();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},uc(n)?Zy(o,i):(i=Gf(n,o,i,l),i!==null&&(An(i,n,l),Vy(i,o,l)))}function $y(n,o,i){var l=$n();Ra(n,o,i,l)}function Ra(n,o,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(uc(n))Zy(o,d);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null))try{var w=o.lastRenderedState,C=g(w,i);if(d.hasEagerState=!0,d.eagerState=C,Ln(C,w))return Zl(n,o,d,0),gt===null&&$l(),!1}catch{}if(i=Gf(n,o,d,l),i!==null)return An(i,n,l),Vy(i,o,l),!0}return!1}function zd(n,o,i,l){if(l={lane:2,revertLane:ch(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},uc(n)){if(o)throw Error(s(479))}else o=Gf(n,i,l,2),o!==null&&An(o,n,2)}function uc(n){var o=n.alternate;return n===$e||o!==null&&o===$e}function Zy(n,o){pi=rc=!0;var i=n.pending;i===null?o.next=o:(o.next=i.next,i.next=o),n.pending=o}function Vy(n,o,i){if((i&4194048)!==0){var l=o.lanes;l&=n.pendingLanes,i|=l,o.lanes=i,Wi(n,i)}}var Ea={readContext:on,use:ic,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot,useHostTransitionStatus:Ot,useFormState:Ot,useActionState:Ot,useOptimistic:Ot,useMemoCache:Ot,useCacheRefresh:Ot};Ea.useEffectEvent=Ot;var qy={readContext:on,use:ic,useCallback:function(n,o){return yn().memoizedState=[n,o===void 0?null:o],n},useContext:on,useEffect:My,useImperativeHandle:function(n,o,i){i=i!=null?i.concat([n]):null,lc(4194308,4,ky.bind(null,o,n),i)},useLayoutEffect:function(n,o){return lc(4194308,4,n,o)},useInsertionEffect:function(n,o){lc(4,2,n,o)},useMemo:function(n,o){var i=yn();o=o===void 0?null:o;var l=n();if(ms){dn(!0);try{n()}finally{dn(!1)}}return i.memoizedState=[l,o],l},useReducer:function(n,o,i){var l=yn();if(i!==void 0){var d=i(o);if(ms){dn(!0);try{i(o)}finally{dn(!1)}}}else d=o;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=v_.bind(null,$e,n),[l.memoizedState,n]},useRef:function(n){var o=yn();return n={current:n},o.memoizedState=n},useState:function(n){n=Ed(n);var o=n.queue,i=$y.bind(null,$e,o);return o.dispatch=i,[n.memoizedState,i]},useDebugValue:Cd,useDeferredValue:function(n,o){var i=yn();return Od(i,n,o)},useTransition:function(){var n=Ed(!1);return n=Iy.bind(null,$e,n.queue,!0,!1),yn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,o,i){var l=$e,d=yn();if(et){if(i===void 0)throw Error(s(407));i=i()}else{if(i=o(),gt===null)throw Error(s(349));(Xe&127)!==0||hy(l,o,i)}d.memoizedState=i;var g={value:i,getSnapshot:o};return d.queue=g,My(my.bind(null,l,g,n),[n]),l.flags|=2048,gi(9,{destroy:void 0},py.bind(null,l,g,i,o),null),i},useId:function(){var n=yn(),o=gt.identifierPrefix;if(et){var i=gr,l=mr;i=(l&~(1<<32-jt(l)-1)).toString(32)+i,o="_"+o+"R_"+i,i=oc++,0<i&&(o+="H"+i.toString(32)),o+="_"}else i=f_++,o="_"+o+"r_"+i.toString(32)+"_";return n.memoizedState=o},useHostTransitionStatus:Ad,useFormState:Ey,useActionState:Ey,useOptimistic:function(n){var o=yn();o.memoizedState=o.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=i,o=zd.bind(null,$e,!0,i),i.dispatch=o,[n,o]},useMemoCache:xd,useCacheRefresh:function(){return yn().memoizedState=y_.bind(null,$e)},useEffectEvent:function(n){var o=yn(),i={impl:n};return o.memoizedState=i,function(){if((at&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},Dd={readContext:on,use:ic,useCallback:Py,useContext:on,useEffect:Td,useImperativeHandle:Ny,useInsertionEffect:zy,useLayoutEffect:Dy,useMemo:jy,useReducer:ac,useRef:Oy,useState:function(){return ac(Hr)},useDebugValue:Cd,useDeferredValue:function(n,o){var i=Nt();return Ly(i,ft.memoizedState,n,o)},useTransition:function(){var n=ac(Hr)[0],o=Nt().memoizedState;return[typeof n=="boolean"?n:wa(n),o]},useSyncExternalStore:dy,useId:Hy,useHostTransitionStatus:Ad,useFormState:_y,useActionState:_y,useOptimistic:function(n,o){var i=Nt();return vy(i,ft,n,o)},useMemoCache:xd,useCacheRefresh:Fy};Dd.useEffectEvent=Ay;var Yy={readContext:on,use:ic,useCallback:Py,useContext:on,useEffect:Td,useImperativeHandle:Ny,useInsertionEffect:zy,useLayoutEffect:Dy,useMemo:jy,useReducer:Rd,useRef:Oy,useState:function(){return Rd(Hr)},useDebugValue:Cd,useDeferredValue:function(n,o){var i=Nt();return ft===null?Od(i,n,o):Ly(i,ft.memoizedState,n,o)},useTransition:function(){var n=Rd(Hr)[0],o=Nt().memoizedState;return[typeof n=="boolean"?n:wa(n),o]},useSyncExternalStore:dy,useId:Hy,useHostTransitionStatus:Ad,useFormState:Cy,useActionState:Cy,useOptimistic:function(n,o){var i=Nt();return ft!==null?vy(i,ft,n,o):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:xd,useCacheRefresh:Fy};Yy.useEffectEvent=Ay;function kd(n,o,i,l){o=n.memoizedState,i=i(l,o),i=i==null?o:y({},o,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var Nd={enqueueSetState:function(n,o,i){n=n._reactInternals;var l=$n(),d=yo(l);d.payload=o,i!=null&&(d.callback=i),o=vo(n,d,l),o!==null&&(An(o,n,l),va(o,n,l))},enqueueReplaceState:function(n,o,i){n=n._reactInternals;var l=$n(),d=yo(l);d.tag=1,d.payload=o,i!=null&&(d.callback=i),o=vo(n,d,l),o!==null&&(An(o,n,l),va(o,n,l))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var i=$n(),l=yo(i);l.tag=2,o!=null&&(l.callback=o),o=vo(n,l,i),o!==null&&(An(o,n,i),va(o,n,i))}};function Gy(n,o,i,l,d,g,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,g,w):o.prototype&&o.prototype.isPureReactComponent?!ua(i,l)||!ua(d,g):!0}function Ky(n,o,i,l){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(i,l),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(i,l),o.state!==n&&Nd.enqueueReplaceState(o,o.state,null)}function gs(n,o){var i=o;if("ref"in o){i={};for(var l in o)l!=="ref"&&(i[l]=o[l])}if(n=n.defaultProps){i===o&&(i=y({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function Qy(n){Fl(n)}function Xy(n){console.error(n)}function Jy(n){Fl(n)}function fc(n,o){try{var i=n.onUncaughtError;i(o.value,{componentStack:o.stack})}catch(l){setTimeout(function(){throw l})}}function Wy(n,o,i){try{var l=n.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Pd(n,o,i){return i=yo(i),i.tag=3,i.payload={element:null},i.callback=function(){fc(n,o)},i}function ev(n){return n=yo(n),n.tag=3,n}function tv(n,o,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=l.value;n.payload=function(){return d(g)},n.callback=function(){Wy(o,i,l)}}var w=i.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){Wy(o,i,l),typeof d!="function"&&(Eo===null?Eo=new Set([this]):Eo.add(this));var C=l.stack;this.componentDidCatch(l.value,{componentStack:C!==null?C:""})})}function b_(n,o,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(o=i.alternate,o!==null&&li(o,i,d,!0),i=Un.current,i!==null){switch(i.tag){case 31:case 13:return nr===null?Rc():i.alternate===null&&Mt===0&&(Mt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===Jl?i.flags|=16384:(o=i.updateQueue,o===null?i.updateQueue=new Set([l]):o.add(l),ih(n,l,d)),!1;case 22:return i.flags|=65536,l===Jl?i.flags|=16384:(o=i.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=o):(i=o.retryQueue,i===null?o.retryQueue=new Set([l]):i.add(l)),ih(n,l,d)),!1}throw Error(s(435,i.tag))}return ih(n,l,d),Rc(),!1}if(et)return o=Un.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=d,l!==ed&&(n=Error(s(422),{cause:l}),ha(Jn(n,i)))):(l!==ed&&(o=Error(s(423),{cause:l}),ha(Jn(o,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=Jn(l,i),d=Pd(n.stateNode,l,d),fd(n,d),Mt!==4&&(Mt=2)),!1;var g=Error(s(520),{cause:l});if(g=Jn(g,i),Da===null?Da=[g]:Da.push(g),Mt!==4&&(Mt=2),o===null)return!0;l=Jn(l,i),i=o;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=Pd(i.stateNode,l,n),fd(i,n),!1;case 1:if(o=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Eo===null||!Eo.has(g))))return i.flags|=65536,d&=-d,i.lanes|=d,d=ev(d),tv(d,n,i,l),fd(i,d),!1}i=i.return}while(i!==null);return!1}var jd=Error(s(461)),Ut=!1;function sn(n,o,i,l){o.child=n===null?sy(o,null,i,l):ps(o,n.child,i,l)}function nv(n,o,i,l,d){i=i.render;var g=o.ref;if("ref"in l){var w={};for(var C in l)C!=="ref"&&(w[C]=l[C])}else w=l;return us(o),l=yd(n,o,i,w,g,d),C=vd(),n!==null&&!Ut?(bd(n,o,d),Fr(n,o,d)):(et&&C&&Jf(o),o.flags|=1,sn(n,o,l,d),o.child)}function rv(n,o,i,l,d){if(n===null){var g=i.type;return typeof g=="function"&&!Kf(g)&&g.defaultProps===void 0&&i.compare===null?(o.tag=15,o.type=g,ov(n,o,g,l,d)):(n=ql(i.type,null,l,o,o.mode,d),n.ref=o.ref,n.return=o,o.child=n)}if(g=n.child,!Zd(n,d)){var w=g.memoizedProps;if(i=i.compare,i=i!==null?i:ua,i(w,l)&&n.ref===o.ref)return Fr(n,o,d)}return o.flags|=1,n=jr(g,l),n.ref=o.ref,n.return=o,o.child=n}function ov(n,o,i,l,d){if(n!==null){var g=n.memoizedProps;if(ua(g,l)&&n.ref===o.ref)if(Ut=!1,o.pendingProps=l=g,Zd(n,d))(n.flags&131072)!==0&&(Ut=!0);else return o.lanes=n.lanes,Fr(n,o,d)}return Ld(n,o,i,l,d)}function sv(n,o,i,l){var d=l.children,g=n!==null?n.memoizedState:null;if(n===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((o.flags&128)!==0){if(g=g!==null?g.baseLanes|i:i,n!==null){for(l=o.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~g}else l=0,o.child=null;return iv(n,o,g,i,l)}if((i&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ql(o,g!==null?g.cachePool:null),g!==null?ly(o,g):hd(),cy(o);else return l=o.lanes=536870912,iv(n,o,g!==null?g.baseLanes|i:i,i,l)}else g!==null?(Ql(o,g.cachePool),ly(o,g),So(),o.memoizedState=null):(n!==null&&Ql(o,null),hd(),So());return sn(n,o,d,i),o.child}function _a(n,o){return n!==null&&n.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function iv(n,o,i,l,d){var g=ad();return g=g===null?null:{parent:Lt._currentValue,pool:g},o.memoizedState={baseLanes:i,cachePool:g},n!==null&&Ql(o,null),hd(),cy(o),n!==null&&li(n,o,l,!0),o.childLanes=d,null}function dc(n,o){return o=pc({mode:o.mode,children:o.children},n.mode),o.ref=n.ref,n.child=o,o.return=n,o}function av(n,o,i){return ps(o,n.child,null,i),n=dc(o,o.pendingProps),n.flags|=2,Bn(o),o.memoizedState=null,n}function S_(n,o,i){var l=o.pendingProps,d=(o.flags&128)!==0;if(o.flags&=-129,n===null){if(et){if(l.mode==="hidden")return n=dc(o,l),o.lanes=536870912,_a(null,n);if(md(o),(n=bt)?(n=bb(n,tr),n=n!==null&&n.data==="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:fo!==null?{id:mr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},i=Zg(n),i.return=o,o.child=i,rn=o,bt=null)):n=null,n===null)throw po(o);return o.lanes=536870912,null}return dc(o,l)}var g=n.memoizedState;if(g!==null){var w=g.dehydrated;if(md(o),d)if(o.flags&256)o.flags&=-257,o=av(n,o,i);else if(o.memoizedState!==null)o.child=n.child,o.flags|=128,o=null;else throw Error(s(558));else if(Ut||li(n,o,i,!1),d=(i&n.childLanes)!==0,Ut||d){if(l=gt,l!==null&&(w=Ml(l,i),w!==0&&w!==g.retryLane))throw g.retryLane=w,is(n,w),An(l,n,w),jd;Rc(),o=av(n,o,i)}else n=g.treeContext,bt=rr(w.nextSibling),rn=o,et=!0,ho=null,tr=!1,n!==null&&Yg(o,n),o=dc(o,l),o.flags|=4096;return o}return n=jr(n.child,{mode:l.mode,children:l.children}),n.ref=o.ref,o.child=n,n.return=o,n}function hc(n,o){var i=o.ref;if(i===null)n!==null&&n.ref!==null&&(o.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(n===null||n.ref!==i)&&(o.flags|=4194816)}}function Ld(n,o,i,l,d){return us(o),i=yd(n,o,i,l,void 0,d),l=vd(),n!==null&&!Ut?(bd(n,o,d),Fr(n,o,d)):(et&&l&&Jf(o),o.flags|=1,sn(n,o,i,d),o.child)}function lv(n,o,i,l,d,g){return us(o),o.updateQueue=null,i=fy(o,l,i,d),uy(n),l=vd(),n!==null&&!Ut?(bd(n,o,g),Fr(n,o,g)):(et&&l&&Jf(o),o.flags|=1,sn(n,o,i,g),o.child)}function cv(n,o,i,l,d){if(us(o),o.stateNode===null){var g=oi,w=i.contextType;typeof w=="object"&&w!==null&&(g=on(w)),g=new i(l,g),o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Nd,o.stateNode=g,g._reactInternals=o,g=o.stateNode,g.props=l,g.state=o.memoizedState,g.refs={},cd(o),w=i.contextType,g.context=typeof w=="object"&&w!==null?on(w):oi,g.state=o.memoizedState,w=i.getDerivedStateFromProps,typeof w=="function"&&(kd(o,i,w,l),g.state=o.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&Nd.enqueueReplaceState(g,g.state,null),Sa(o,l,g,d),ba(),g.state=o.memoizedState),typeof g.componentDidMount=="function"&&(o.flags|=4194308),l=!0}else if(n===null){g=o.stateNode;var C=o.memoizedProps,U=gs(i,C);g.props=U;var X=g.context,oe=i.contextType;w=oi,typeof oe=="object"&&oe!==null&&(w=on(oe));var ae=i.getDerivedStateFromProps;oe=typeof ae=="function"||typeof g.getSnapshotBeforeUpdate=="function",C=o.pendingProps!==C,oe||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(C||X!==w)&&Ky(o,g,l,w),go=!1;var J=o.memoizedState;g.state=J,Sa(o,l,g,d),ba(),X=o.memoizedState,C||J!==X||go?(typeof ae=="function"&&(kd(o,i,ae,l),X=o.memoizedState),(U=go||Gy(o,i,U,l,J,X,w))?(oe||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(o.flags|=4194308)):(typeof g.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=l,o.memoizedState=X),g.props=l,g.state=X,g.context=w,l=U):(typeof g.componentDidMount=="function"&&(o.flags|=4194308),l=!1)}else{g=o.stateNode,ud(n,o),w=o.memoizedProps,oe=gs(i,w),g.props=oe,ae=o.pendingProps,J=g.context,X=i.contextType,U=oi,typeof X=="object"&&X!==null&&(U=on(X)),C=i.getDerivedStateFromProps,(X=typeof C=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==ae||J!==U)&&Ky(o,g,l,U),go=!1,J=o.memoizedState,g.state=J,Sa(o,l,g,d),ba();var te=o.memoizedState;w!==ae||J!==te||go||n!==null&&n.dependencies!==null&&Gl(n.dependencies)?(typeof C=="function"&&(kd(o,i,C,l),te=o.memoizedState),(oe=go||Gy(o,i,oe,l,J,te,U)||n!==null&&n.dependencies!==null&&Gl(n.dependencies))?(X||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(l,te,U),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(l,te,U)),typeof g.componentDidUpdate=="function"&&(o.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(o.flags|=1024),o.memoizedProps=l,o.memoizedState=te),g.props=l,g.state=te,g.context=U,l=oe):(typeof g.componentDidUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&J===n.memoizedState||(o.flags|=1024),l=!1)}return g=l,hc(n,o),l=(o.flags&128)!==0,g||l?(g=o.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:g.render(),o.flags|=1,n!==null&&l?(o.child=ps(o,n.child,null,d),o.child=ps(o,null,i,d)):sn(n,o,i,d),o.memoizedState=g.state,n=o.child):n=Fr(n,o,d),n}function uv(n,o,i,l){return ls(),o.flags|=256,sn(n,o,i,l),o.child}var Id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ud(n){return{baseLanes:n,cachePool:Wg()}}function Bd(n,o,i){return n=n!==null?n.childLanes&~i:0,o&&(n|=Fn),n}function fv(n,o,i){var l=o.pendingProps,d=!1,g=(o.flags&128)!==0,w;if((w=g)||(w=n!==null&&n.memoizedState===null?!1:(kt.current&2)!==0),w&&(d=!0,o.flags&=-129),w=(o.flags&32)!==0,o.flags&=-33,n===null){if(et){if(d?bo(o):So(),(n=bt)?(n=bb(n,tr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:fo!==null?{id:mr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},i=Zg(n),i.return=o,o.child=i,rn=o,bt=null)):n=null,n===null)throw po(o);return wh(n)?o.lanes=32:o.lanes=536870912,null}var C=l.children;return l=l.fallback,d?(So(),d=o.mode,C=pc({mode:"hidden",children:C},d),l=as(l,d,i,null),C.return=o,l.return=o,C.sibling=l,o.child=C,l=o.child,l.memoizedState=Ud(i),l.childLanes=Bd(n,w,i),o.memoizedState=Id,_a(null,l)):(bo(o),Hd(o,C))}var U=n.memoizedState;if(U!==null&&(C=U.dehydrated,C!==null)){if(g)o.flags&256?(bo(o),o.flags&=-257,o=Fd(n,o,i)):o.memoizedState!==null?(So(),o.child=n.child,o.flags|=128,o=null):(So(),C=l.fallback,d=o.mode,l=pc({mode:"visible",children:l.children},d),C=as(C,d,i,null),C.flags|=2,l.return=o,C.return=o,l.sibling=C,o.child=l,ps(o,n.child,null,i),l=o.child,l.memoizedState=Ud(i),l.childLanes=Bd(n,w,i),o.memoizedState=Id,o=_a(null,l));else if(bo(o),wh(C)){if(w=C.nextSibling&&C.nextSibling.dataset,w)var X=w.dgst;w=X,l=Error(s(419)),l.stack="",l.digest=w,ha({value:l,source:null,stack:null}),o=Fd(n,o,i)}else if(Ut||li(n,o,i,!1),w=(i&n.childLanes)!==0,Ut||w){if(w=gt,w!==null&&(l=Ml(w,i),l!==0&&l!==U.retryLane))throw U.retryLane=l,is(n,l),An(w,n,l),jd;xh(C)||Rc(),o=Fd(n,o,i)}else xh(C)?(o.flags|=192,o.child=n.child,o=null):(n=U.treeContext,bt=rr(C.nextSibling),rn=o,et=!0,ho=null,tr=!1,n!==null&&Yg(o,n),o=Hd(o,l.children),o.flags|=4096);return o}return d?(So(),C=l.fallback,d=o.mode,U=n.child,X=U.sibling,l=jr(U,{mode:"hidden",children:l.children}),l.subtreeFlags=U.subtreeFlags&65011712,X!==null?C=jr(X,C):(C=as(C,d,i,null),C.flags|=2),C.return=o,l.return=o,l.sibling=C,o.child=l,_a(null,l),l=o.child,C=n.child.memoizedState,C===null?C=Ud(i):(d=C.cachePool,d!==null?(U=Lt._currentValue,d=d.parent!==U?{parent:U,pool:U}:d):d=Wg(),C={baseLanes:C.baseLanes|i,cachePool:d}),l.memoizedState=C,l.childLanes=Bd(n,w,i),o.memoizedState=Id,_a(n.child,l)):(bo(o),i=n.child,n=i.sibling,i=jr(i,{mode:"visible",children:l.children}),i.return=o,i.sibling=null,n!==null&&(w=o.deletions,w===null?(o.deletions=[n],o.flags|=16):w.push(n)),o.child=i,o.memoizedState=null,i)}function Hd(n,o){return o=pc({mode:"visible",children:o},n.mode),o.return=n,n.child=o}function pc(n,o){return n=In(22,n,null,o),n.lanes=0,n}function Fd(n,o,i){return ps(o,n.child,null,i),n=Hd(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function dv(n,o,i){n.lanes|=o;var l=n.alternate;l!==null&&(l.lanes|=o),rd(n.return,o,i)}function $d(n,o,i,l,d,g){var w=n.memoizedState;w===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:g}:(w.isBackwards=o,w.rendering=null,w.renderingStartTime=0,w.last=l,w.tail=i,w.tailMode=d,w.treeForkCount=g)}function hv(n,o,i){var l=o.pendingProps,d=l.revealOrder,g=l.tail;l=l.children;var w=kt.current,C=(w&2)!==0;if(C?(w=w&1|2,o.flags|=128):w&=1,re(kt,w),sn(n,o,l,i),l=et?da:0,!C&&n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&dv(n,i,o);else if(n.tag===19)dv(n,i,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(i=o.child,d=null;i!==null;)n=i.alternate,n!==null&&nc(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=o.child,o.child=null):(d=i.sibling,i.sibling=null),$d(o,!1,d,i,g,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=o.child,o.child=null;d!==null;){if(n=d.alternate,n!==null&&nc(n)===null){o.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}$d(o,!0,i,null,g,l);break;case"together":$d(o,!1,null,null,void 0,l);break;default:o.memoizedState=null}return o.child}function Fr(n,o,i){if(n!==null&&(o.dependencies=n.dependencies),Ro|=o.lanes,(i&o.childLanes)===0)if(n!==null){if(li(n,o,i,!1),(i&o.childLanes)===0)return null}else return null;if(n!==null&&o.child!==n.child)throw Error(s(153));if(o.child!==null){for(n=o.child,i=jr(n,n.pendingProps),o.child=i,i.return=o;n.sibling!==null;)n=n.sibling,i=i.sibling=jr(n,n.pendingProps),i.return=o;i.sibling=null}return o.child}function Zd(n,o){return(n.lanes&o)!==0?!0:(n=n.dependencies,!!(n!==null&&Gl(n)))}function x_(n,o,i){switch(o.tag){case 3:me(o,o.stateNode.containerInfo),mo(o,Lt,n.memoizedState.cache),ls();break;case 27:case 5:ke(o);break;case 4:me(o,o.stateNode.containerInfo);break;case 10:mo(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,md(o),null;break;case 13:var l=o.memoizedState;if(l!==null)return l.dehydrated!==null?(bo(o),o.flags|=128,null):(i&o.child.childLanes)!==0?fv(n,o,i):(bo(o),n=Fr(n,o,i),n!==null?n.sibling:null);bo(o);break;case 19:var d=(n.flags&128)!==0;if(l=(i&o.childLanes)!==0,l||(li(n,o,i,!1),l=(i&o.childLanes)!==0),d){if(l)return hv(n,o,i);o.flags|=128}if(d=o.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),re(kt,kt.current),l)break;return null;case 22:return o.lanes=0,sv(n,o,i,o.pendingProps);case 24:mo(o,Lt,n.memoizedState.cache)}return Fr(n,o,i)}function pv(n,o,i){if(n!==null)if(n.memoizedProps!==o.pendingProps)Ut=!0;else{if(!Zd(n,i)&&(o.flags&128)===0)return Ut=!1,x_(n,o,i);Ut=(n.flags&131072)!==0}else Ut=!1,et&&(o.flags&1048576)!==0&&qg(o,da,o.index);switch(o.lanes=0,o.tag){case 16:e:{var l=o.pendingProps;if(n=ds(o.elementType),o.type=n,typeof n=="function")Kf(n)?(l=gs(n,l),o.tag=1,o=cv(null,o,n,l,i)):(o.tag=0,o=Ld(null,o,n,l,i));else{if(n!=null){var d=n.$$typeof;if(d===M){o.tag=11,o=nv(null,o,n,l,i);break e}else if(d===j){o.tag=14,o=rv(null,o,n,l,i);break e}}throw o=q(n)||n,Error(s(306,o,""))}}return o;case 0:return Ld(n,o,o.type,o.pendingProps,i);case 1:return l=o.type,d=gs(l,o.pendingProps),cv(n,o,l,d,i);case 3:e:{if(me(o,o.stateNode.containerInfo),n===null)throw Error(s(387));l=o.pendingProps;var g=o.memoizedState;d=g.element,ud(n,o),Sa(o,l,null,i);var w=o.memoizedState;if(l=w.cache,mo(o,Lt,l),l!==g.cache&&od(o,[Lt],i,!0),ba(),l=w.element,g.isDehydrated)if(g={element:l,isDehydrated:!1,cache:w.cache},o.updateQueue.baseState=g,o.memoizedState=g,o.flags&256){o=uv(n,o,l,i);break e}else if(l!==d){d=Jn(Error(s(424)),o),ha(d),o=uv(n,o,l,i);break e}else for(n=o.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,bt=rr(n.firstChild),rn=o,et=!0,ho=null,tr=!0,i=sy(o,null,l,i),o.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ls(),l===d){o=Fr(n,o,i);break e}sn(n,o,l,i)}o=o.child}return o;case 26:return hc(n,o),n===null?(i=_b(o.type,null,o.pendingProps,null))?o.memoizedState=i:et||(i=o.type,n=o.pendingProps,l=Ac(de.current).createElement(i),l[nn]=o,l[En]=n,an(l,i,n),Jt(l),o.stateNode=l):o.memoizedState=_b(o.type,n.memoizedProps,o.pendingProps,n.memoizedState),null;case 27:return ke(o),n===null&&et&&(l=o.stateNode=wb(o.type,o.pendingProps,de.current),rn=o,tr=!0,d=bt,Oo(o.type)?(Rh=d,bt=rr(l.firstChild)):bt=d),sn(n,o,o.pendingProps.children,i),hc(n,o),n===null&&(o.flags|=4194304),o.child;case 5:return n===null&&et&&((d=l=bt)&&(l=X_(l,o.type,o.pendingProps,tr),l!==null?(o.stateNode=l,rn=o,bt=rr(l.firstChild),tr=!1,d=!0):d=!1),d||po(o)),ke(o),d=o.type,g=o.pendingProps,w=n!==null?n.memoizedProps:null,l=g.children,vh(d,g)?l=null:w!==null&&vh(d,w)&&(o.flags|=32),o.memoizedState!==null&&(d=yd(n,o,d_,null,null,i),Ba._currentValue=d),hc(n,o),sn(n,o,l,i),o.child;case 6:return n===null&&et&&((n=i=bt)&&(i=J_(i,o.pendingProps,tr),i!==null?(o.stateNode=i,rn=o,bt=null,n=!0):n=!1),n||po(o)),null;case 13:return fv(n,o,i);case 4:return me(o,o.stateNode.containerInfo),l=o.pendingProps,n===null?o.child=ps(o,null,l,i):sn(n,o,l,i),o.child;case 11:return nv(n,o,o.type,o.pendingProps,i);case 7:return sn(n,o,o.pendingProps,i),o.child;case 8:return sn(n,o,o.pendingProps.children,i),o.child;case 12:return sn(n,o,o.pendingProps.children,i),o.child;case 10:return l=o.pendingProps,mo(o,o.type,l.value),sn(n,o,l.children,i),o.child;case 9:return d=o.type._context,l=o.pendingProps.children,us(o),d=on(d),l=l(d),o.flags|=1,sn(n,o,l,i),o.child;case 14:return rv(n,o,o.type,o.pendingProps,i);case 15:return ov(n,o,o.type,o.pendingProps,i);case 19:return hv(n,o,i);case 31:return S_(n,o,i);case 22:return sv(n,o,i,o.pendingProps);case 24:return us(o),l=on(Lt),n===null?(d=ad(),d===null&&(d=gt,g=sd(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=i),d=g),o.memoizedState={parent:l,cache:d},cd(o),mo(o,Lt,d)):((n.lanes&i)!==0&&(ud(n,o),Sa(o,null,null,i),ba()),d=n.memoizedState,g=o.memoizedState,d.parent!==l?(d={parent:l,cache:l},o.memoizedState=d,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=d),mo(o,Lt,l)):(l=g.cache,mo(o,Lt,l),l!==d.cache&&od(o,[Lt],i,!0))),sn(n,o,o.pendingProps.children,i),o.child;case 29:throw o.pendingProps}throw Error(s(156,o.tag))}function $r(n){n.flags|=4}function Vd(n,o,i,l,d){if((o=(n.mode&32)!==0)&&(o=!1),o){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(Hv())n.flags|=8192;else throw hs=Jl,ld}else n.flags&=-16777217}function mv(n,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Ab(o))if(Hv())n.flags|=8192;else throw hs=Jl,ld}function mc(n,o){o!==null&&(n.flags|=4),n.flags&16384&&(o=n.tag!==22?$s():536870912,n.lanes|=o,Si|=o)}function Ta(n,o){if(!et)switch(n.tailMode){case"hidden":o=n.tail;for(var i=null;o!==null;)o.alternate!==null&&(i=o),o=o.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function St(n){var o=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(o)for(var d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=i,o}function w_(n,o,i){var l=o.pendingProps;switch(Wf(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(o),null;case 1:return St(o),null;case 3:return i=o.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),o.memoizedState.cache!==l&&(o.flags|=2048),Ur(Lt),ye(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(ai(o)?$r(o):n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,td())),St(o),null;case 26:var d=o.type,g=o.memoizedState;return n===null?($r(o),g!==null?(St(o),mv(o,g)):(St(o),Vd(o,d,null,l,i))):g?g!==n.memoizedState?($r(o),St(o),mv(o,g)):(St(o),o.flags&=-16777217):(n=n.memoizedProps,n!==l&&$r(o),St(o),Vd(o,d,n,l,i)),null;case 27:if(He(o),i=de.current,d=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==l&&$r(o);else{if(!l){if(o.stateNode===null)throw Error(s(166));return St(o),null}n=ie.current,ai(o)?Gg(o):(n=wb(d,l,i),o.stateNode=n,$r(o))}return St(o),null;case 5:if(He(o),d=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==l&&$r(o);else{if(!l){if(o.stateNode===null)throw Error(s(166));return St(o),null}if(g=ie.current,ai(o))Gg(o);else{var w=Ac(de.current);switch(g){case 1:g=w.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=w.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=w.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=w.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=w.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof l.is=="string"?w.createElement("select",{is:l.is}):w.createElement("select"),l.multiple?g.multiple=!0:l.size&&(g.size=l.size);break;default:g=typeof l.is=="string"?w.createElement(d,{is:l.is}):w.createElement(d)}}g[nn]=o,g[En]=l;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)g.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=g;e:switch(an(g,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&$r(o)}}return St(o),Vd(o,o.type,n===null?null:n.memoizedProps,o.pendingProps,i),null;case 6:if(n&&o.stateNode!=null)n.memoizedProps!==l&&$r(o);else{if(typeof l!="string"&&o.stateNode===null)throw Error(s(166));if(n=de.current,ai(o)){if(n=o.stateNode,i=o.memoizedProps,l=null,d=rn,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[nn]=o,n=!!(n.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||fb(n.nodeValue,i)),n||po(o,!0)}else n=Ac(n).createTextNode(l),n[nn]=o,o.stateNode=n}return St(o),null;case 31:if(i=o.memoizedState,n===null||n.memoizedState!==null){if(l=ai(o),i!==null){if(n===null){if(!l)throw Error(s(318));if(n=o.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[nn]=o}else ls(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;St(o),n=!1}else i=td(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return o.flags&256?(Bn(o),o):(Bn(o),null);if((o.flags&128)!==0)throw Error(s(558))}return St(o),null;case 13:if(l=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=ai(o),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(s(318));if(d=o.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[nn]=o}else ls(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;St(o),d=!1}else d=td(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return o.flags&256?(Bn(o),o):(Bn(o),null)}return Bn(o),(o.flags&128)!==0?(o.lanes=i,o):(i=l!==null,n=n!==null&&n.memoizedState!==null,i&&(l=o.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==d&&(l.flags|=2048)),i!==n&&i&&(o.child.flags|=8192),mc(o,o.updateQueue),St(o),null);case 4:return ye(),n===null&&hh(o.stateNode.containerInfo),St(o),null;case 10:return Ur(o.type),St(o),null;case 19:if(G(kt),l=o.memoizedState,l===null)return St(o),null;if(d=(o.flags&128)!==0,g=l.rendering,g===null)if(d)Ta(l,!1);else{if(Mt!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(g=nc(n),g!==null){for(o.flags|=128,Ta(l,!1),n=g.updateQueue,o.updateQueue=n,mc(o,n),o.subtreeFlags=0,n=i,i=o.child;i!==null;)$g(i,n),i=i.sibling;return re(kt,kt.current&1|2),et&&Lr(o,l.treeForkCount),o.child}n=n.sibling}l.tail!==null&&pe()>Sc&&(o.flags|=128,d=!0,Ta(l,!1),o.lanes=4194304)}else{if(!d)if(n=nc(g),n!==null){if(o.flags|=128,d=!0,n=n.updateQueue,o.updateQueue=n,mc(o,n),Ta(l,!0),l.tail===null&&l.tailMode==="hidden"&&!g.alternate&&!et)return St(o),null}else 2*pe()-l.renderingStartTime>Sc&&i!==536870912&&(o.flags|=128,d=!0,Ta(l,!1),o.lanes=4194304);l.isBackwards?(g.sibling=o.child,o.child=g):(n=l.last,n!==null?n.sibling=g:o.child=g,l.last=g)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=pe(),n.sibling=null,i=kt.current,re(kt,d?i&1|2:i&1),et&&Lr(o,l.treeForkCount),n):(St(o),null);case 22:case 23:return Bn(o),pd(),l=o.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(o.flags|=8192):l&&(o.flags|=8192),l?(i&536870912)!==0&&(o.flags&128)===0&&(St(o),o.subtreeFlags&6&&(o.flags|=8192)):St(o),i=o.updateQueue,i!==null&&mc(o,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),l=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),l!==i&&(o.flags|=2048),n!==null&&G(fs),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),o.memoizedState.cache!==i&&(o.flags|=2048),Ur(Lt),St(o),null;case 25:return null;case 30:return null}throw Error(s(156,o.tag))}function R_(n,o){switch(Wf(o),o.tag){case 1:return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return Ur(Lt),ye(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 26:case 27:case 5:return He(o),null;case 31:if(o.memoizedState!==null){if(Bn(o),o.alternate===null)throw Error(s(340));ls()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 13:if(Bn(o),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(s(340));ls()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return G(kt),null;case 4:return ye(),null;case 10:return Ur(o.type),null;case 22:case 23:return Bn(o),pd(),n!==null&&G(fs),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 24:return Ur(Lt),null;case 25:return null;default:return null}}function gv(n,o){switch(Wf(o),o.tag){case 3:Ur(Lt),ye();break;case 26:case 27:case 5:He(o);break;case 4:ye();break;case 31:o.memoizedState!==null&&Bn(o);break;case 13:Bn(o);break;case 19:G(kt);break;case 10:Ur(o.type);break;case 22:case 23:Bn(o),pd(),n!==null&&G(fs);break;case 24:Ur(Lt)}}function Ca(n,o){try{var i=o.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var d=l.next;i=d;do{if((i.tag&n)===n){l=void 0;var g=i.create,w=i.inst;l=g(),w.destroy=l}i=i.next}while(i!==d)}}catch(C){ut(o,o.return,C)}}function xo(n,o,i){try{var l=o.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var g=d.next;l=g;do{if((l.tag&n)===n){var w=l.inst,C=w.destroy;if(C!==void 0){w.destroy=void 0,d=o;var U=i,X=C;try{X()}catch(oe){ut(d,U,oe)}}}l=l.next}while(l!==g)}}catch(oe){ut(o,o.return,oe)}}function yv(n){var o=n.updateQueue;if(o!==null){var i=n.stateNode;try{ay(o,i)}catch(l){ut(n,n.return,l)}}}function vv(n,o,i){i.props=gs(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(l){ut(n,o,l)}}function Oa(n,o){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof i=="function"?n.refCleanup=i(l):i.current=l}}catch(d){ut(n,o,d)}}function yr(n,o){var i=n.ref,l=n.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){ut(n,o,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){ut(n,o,d)}else i.current=null}function bv(n){var o=n.type,i=n.memoizedProps,l=n.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(d){ut(n,n.return,d)}}function qd(n,o,i){try{var l=n.stateNode;V_(l,n.type,i,o),l[En]=o}catch(d){ut(n,n.return,d)}}function Sv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Oo(n.type)||n.tag===4}function Yd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Sv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Oo(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Gd(n,o,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,o?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,o):(o=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,o.appendChild(n),i=i._reactRootContainer,i!=null||o.onclick!==null||(o.onclick=Nr));else if(l!==4&&(l===27&&Oo(n.type)&&(i=n.stateNode,o=null),n=n.child,n!==null))for(Gd(n,o,i),n=n.sibling;n!==null;)Gd(n,o,i),n=n.sibling}function gc(n,o,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,o?i.insertBefore(n,o):i.appendChild(n);else if(l!==4&&(l===27&&Oo(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(gc(n,o,i),n=n.sibling;n!==null;)gc(n,o,i),n=n.sibling}function xv(n){var o=n.stateNode,i=n.memoizedProps;try{for(var l=n.type,d=o.attributes;d.length;)o.removeAttributeNode(d[0]);an(o,l,i),o[nn]=n,o[En]=i}catch(g){ut(n,n.return,g)}}var Zr=!1,Bt=!1,Kd=!1,wv=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function E_(n,o){if(n=n.containerInfo,gh=Lc,n=Ng(n),Ff(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,g=l.focusNode;l=l.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var w=0,C=-1,U=-1,X=0,oe=0,ae=n,J=null;t:for(;;){for(var te;ae!==i||d!==0&&ae.nodeType!==3||(C=w+d),ae!==g||l!==0&&ae.nodeType!==3||(U=w+l),ae.nodeType===3&&(w+=ae.nodeValue.length),(te=ae.firstChild)!==null;)J=ae,ae=te;for(;;){if(ae===n)break t;if(J===i&&++X===d&&(C=w),J===g&&++oe===l&&(U=w),(te=ae.nextSibling)!==null)break;ae=J,J=ae.parentNode}ae=te}i=C===-1||U===-1?null:{start:C,end:U}}else i=null}i=i||{start:0,end:0}}else i=null;for(yh={focusedElem:n,selectionRange:i},Lc=!1,Wt=o;Wt!==null;)if(o=Wt,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,Wt=n;else for(;Wt!==null;){switch(o=Wt,g=o.alternate,n=o.flags,o.tag){case 0:if((n&4)!==0&&(n=o.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)d=n[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&g!==null){n=void 0,i=o,d=g.memoizedProps,g=g.memoizedState,l=i.stateNode;try{var we=gs(i.type,d);n=l.getSnapshotBeforeUpdate(we,g),l.__reactInternalSnapshotBeforeUpdate=n}catch(De){ut(i,i.return,De)}}break;case 3:if((n&1024)!==0){if(n=o.stateNode.containerInfo,i=n.nodeType,i===9)Sh(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Sh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=o.sibling,n!==null){n.return=o.return,Wt=n;break}Wt=o.return}}function Rv(n,o,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:qr(n,i),l&4&&Ca(5,i);break;case 1:if(qr(n,i),l&4)if(n=i.stateNode,o===null)try{n.componentDidMount()}catch(w){ut(i,i.return,w)}else{var d=gs(i.type,o.memoizedProps);o=o.memoizedState;try{n.componentDidUpdate(d,o,n.__reactInternalSnapshotBeforeUpdate)}catch(w){ut(i,i.return,w)}}l&64&&yv(i),l&512&&Oa(i,i.return);break;case 3:if(qr(n,i),l&64&&(n=i.updateQueue,n!==null)){if(o=null,i.child!==null)switch(i.child.tag){case 27:case 5:o=i.child.stateNode;break;case 1:o=i.child.stateNode}try{ay(n,o)}catch(w){ut(i,i.return,w)}}break;case 27:o===null&&l&4&&xv(i);case 26:case 5:qr(n,i),o===null&&l&4&&bv(i),l&512&&Oa(i,i.return);break;case 12:qr(n,i);break;case 31:qr(n,i),l&4&&Tv(n,i);break;case 13:qr(n,i),l&4&&Cv(n,i),l&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=k_.bind(null,i),W_(n,i))));break;case 22:if(l=i.memoizedState!==null||Zr,!l){o=o!==null&&o.memoizedState!==null||Bt,d=Zr;var g=Bt;Zr=l,(Bt=o)&&!g?Yr(n,i,(i.subtreeFlags&8772)!==0):qr(n,i),Zr=d,Bt=g}break;case 30:break;default:qr(n,i)}}function Ev(n){var o=n.alternate;o!==null&&(n.alternate=null,Ev(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&_f(o)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var wt=null,Tn=!1;function Vr(n,o,i){for(i=i.child;i!==null;)_v(n,o,i),i=i.sibling}function _v(n,o,i){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(lt,i)}catch{}switch(i.tag){case 26:Bt||yr(i,o),Vr(n,o,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Bt||yr(i,o);var l=wt,d=Tn;Oo(i.type)&&(wt=i.stateNode,Tn=!1),Vr(n,o,i),La(i.stateNode),wt=l,Tn=d;break;case 5:Bt||yr(i,o);case 6:if(l=wt,d=Tn,wt=null,Vr(n,o,i),wt=l,Tn=d,wt!==null)if(Tn)try{(wt.nodeType===9?wt.body:wt.nodeName==="HTML"?wt.ownerDocument.body:wt).removeChild(i.stateNode)}catch(g){ut(i,o,g)}else try{wt.removeChild(i.stateNode)}catch(g){ut(i,o,g)}break;case 18:wt!==null&&(Tn?(n=wt,yb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Oi(n)):yb(wt,i.stateNode));break;case 4:l=wt,d=Tn,wt=i.stateNode.containerInfo,Tn=!0,Vr(n,o,i),wt=l,Tn=d;break;case 0:case 11:case 14:case 15:xo(2,i,o),Bt||xo(4,i,o),Vr(n,o,i);break;case 1:Bt||(yr(i,o),l=i.stateNode,typeof l.componentWillUnmount=="function"&&vv(i,o,l)),Vr(n,o,i);break;case 21:Vr(n,o,i);break;case 22:Bt=(l=Bt)||i.memoizedState!==null,Vr(n,o,i),Bt=l;break;default:Vr(n,o,i)}}function Tv(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Oi(n)}catch(i){ut(o,o.return,i)}}}function Cv(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Oi(n)}catch(i){ut(o,o.return,i)}}function __(n){switch(n.tag){case 31:case 13:case 19:var o=n.stateNode;return o===null&&(o=n.stateNode=new wv),o;case 22:return n=n.stateNode,o=n._retryCache,o===null&&(o=n._retryCache=new wv),o;default:throw Error(s(435,n.tag))}}function yc(n,o){var i=__(n);o.forEach(function(l){if(!i.has(l)){i.add(l);var d=N_.bind(null,n,l);l.then(d,d)}})}function Cn(n,o){var i=o.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],g=n,w=o,C=w;e:for(;C!==null;){switch(C.tag){case 27:if(Oo(C.type)){wt=C.stateNode,Tn=!1;break e}break;case 5:wt=C.stateNode,Tn=!1;break e;case 3:case 4:wt=C.stateNode.containerInfo,Tn=!0;break e}C=C.return}if(wt===null)throw Error(s(160));_v(g,w,d),wt=null,Tn=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)Ov(o,n),o=o.sibling}var cr=null;function Ov(n,o){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Cn(o,n),On(n),l&4&&(xo(3,n,n.return),Ca(3,n),xo(5,n,n.return));break;case 1:Cn(o,n),On(n),l&512&&(Bt||i===null||yr(i,i.return)),l&64&&Zr&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var d=cr;if(Cn(o,n),On(n),l&512&&(Bt||i===null||yr(i,i.return)),l&4){var g=i!==null?i.memoizedState:null;if(l=n.memoizedState,i===null)if(l===null)if(n.stateNode===null){e:{l=n.type,i=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":g=d.getElementsByTagName("title")[0],(!g||g[ta]||g[nn]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(l),d.head.insertBefore(g,d.querySelector("head > title"))),an(g,l,i),g[nn]=n,Jt(g),l=g;break e;case"link":var w=Ob("link","href",d).get(l+(i.href||""));if(w){for(var C=0;C<w.length;C++)if(g=w[C],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){w.splice(C,1);break t}}g=d.createElement(l),an(g,l,i),d.head.appendChild(g);break;case"meta":if(w=Ob("meta","content",d).get(l+(i.content||""))){for(C=0;C<w.length;C++)if(g=w[C],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){w.splice(C,1);break t}}g=d.createElement(l),an(g,l,i),d.head.appendChild(g);break;default:throw Error(s(468,l))}g[nn]=n,Jt(g),l=g}n.stateNode=l}else Mb(d,n.type,n.stateNode);else n.stateNode=Cb(d,l,n.memoizedProps);else g!==l?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,l===null?Mb(d,n.type,n.stateNode):Cb(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&qd(n,n.memoizedProps,i.memoizedProps)}break;case 27:Cn(o,n),On(n),l&512&&(Bt||i===null||yr(i,i.return)),i!==null&&l&4&&qd(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Cn(o,n),On(n),l&512&&(Bt||i===null||yr(i,i.return)),n.flags&32){d=n.stateNode;try{Xs(d,"")}catch(we){ut(n,n.return,we)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,qd(n,d,i!==null?i.memoizedProps:d)),l&1024&&(Kd=!0);break;case 6:if(Cn(o,n),On(n),l&4){if(n.stateNode===null)throw Error(s(162));l=n.memoizedProps,i=n.stateNode;try{i.nodeValue=l}catch(we){ut(n,n.return,we)}}break;case 3:if(kc=null,d=cr,cr=zc(o.containerInfo),Cn(o,n),cr=d,On(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Oi(o.containerInfo)}catch(we){ut(n,n.return,we)}Kd&&(Kd=!1,Mv(n));break;case 4:l=cr,cr=zc(n.stateNode.containerInfo),Cn(o,n),On(n),cr=l;break;case 12:Cn(o,n),On(n);break;case 31:Cn(o,n),On(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,yc(n,l)));break;case 13:Cn(o,n),On(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(bc=pe()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,yc(n,l)));break;case 22:d=n.memoizedState!==null;var U=i!==null&&i.memoizedState!==null,X=Zr,oe=Bt;if(Zr=X||d,Bt=oe||U,Cn(o,n),Bt=oe,Zr=X,On(n),l&8192)e:for(o=n.stateNode,o._visibility=d?o._visibility&-2:o._visibility|1,d&&(i===null||U||Zr||Bt||ys(n)),i=null,o=n;;){if(o.tag===5||o.tag===26){if(i===null){U=i=o;try{if(g=U.stateNode,d)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{C=U.stateNode;var ae=U.memoizedProps.style,J=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;C.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(we){ut(U,U.return,we)}}}else if(o.tag===6){if(i===null){U=o;try{U.stateNode.nodeValue=d?"":U.memoizedProps}catch(we){ut(U,U.return,we)}}}else if(o.tag===18){if(i===null){U=o;try{var te=U.stateNode;d?vb(te,!0):vb(U.stateNode,!1)}catch(we){ut(U,U.return,we)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===n)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break e;for(;o.sibling===null;){if(o.return===null||o.return===n)break e;i===o&&(i=null),o=o.return}i===o&&(i=null),o.sibling.return=o.return,o=o.sibling}l&4&&(l=n.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,yc(n,i))));break;case 19:Cn(o,n),On(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,yc(n,l)));break;case 30:break;case 21:break;default:Cn(o,n),On(n)}}function On(n){var o=n.flags;if(o&2){try{for(var i,l=n.return;l!==null;){if(Sv(l)){i=l;break}l=l.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var d=i.stateNode,g=Yd(n);gc(n,g,d);break;case 5:var w=i.stateNode;i.flags&32&&(Xs(w,""),i.flags&=-33);var C=Yd(n);gc(n,C,w);break;case 3:case 4:var U=i.stateNode.containerInfo,X=Yd(n);Gd(n,X,U);break;default:throw Error(s(161))}}catch(oe){ut(n,n.return,oe)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function Mv(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var o=n;Mv(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),n=n.sibling}}function qr(n,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Rv(n,o.alternate,o),o=o.sibling}function ys(n){for(n=n.child;n!==null;){var o=n;switch(o.tag){case 0:case 11:case 14:case 15:xo(4,o,o.return),ys(o);break;case 1:yr(o,o.return);var i=o.stateNode;typeof i.componentWillUnmount=="function"&&vv(o,o.return,i),ys(o);break;case 27:La(o.stateNode);case 26:case 5:yr(o,o.return),ys(o);break;case 22:o.memoizedState===null&&ys(o);break;case 30:ys(o);break;default:ys(o)}n=n.sibling}}function Yr(n,o,i){for(i=i&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var l=o.alternate,d=n,g=o,w=g.flags;switch(g.tag){case 0:case 11:case 15:Yr(d,g,i),Ca(4,g);break;case 1:if(Yr(d,g,i),l=g,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(X){ut(l,l.return,X)}if(l=g,d=l.updateQueue,d!==null){var C=l.stateNode;try{var U=d.shared.hiddenCallbacks;if(U!==null)for(d.shared.hiddenCallbacks=null,d=0;d<U.length;d++)iy(U[d],C)}catch(X){ut(l,l.return,X)}}i&&w&64&&yv(g),Oa(g,g.return);break;case 27:xv(g);case 26:case 5:Yr(d,g,i),i&&l===null&&w&4&&bv(g),Oa(g,g.return);break;case 12:Yr(d,g,i);break;case 31:Yr(d,g,i),i&&w&4&&Tv(d,g);break;case 13:Yr(d,g,i),i&&w&4&&Cv(d,g);break;case 22:g.memoizedState===null&&Yr(d,g,i),Oa(g,g.return);break;case 30:break;default:Yr(d,g,i)}o=o.sibling}}function Qd(n,o){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(n=o.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&pa(i))}function Xd(n,o){n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(o.refCount++,n!=null&&pa(n))}function ur(n,o,i,l){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Av(n,o,i,l),o=o.sibling}function Av(n,o,i,l){var d=o.flags;switch(o.tag){case 0:case 11:case 15:ur(n,o,i,l),d&2048&&Ca(9,o);break;case 1:ur(n,o,i,l);break;case 3:ur(n,o,i,l),d&2048&&(n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(o.refCount++,n!=null&&pa(n)));break;case 12:if(d&2048){ur(n,o,i,l),n=o.stateNode;try{var g=o.memoizedProps,w=g.id,C=g.onPostCommit;typeof C=="function"&&C(w,o.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){ut(o,o.return,U)}}else ur(n,o,i,l);break;case 31:ur(n,o,i,l);break;case 13:ur(n,o,i,l);break;case 23:break;case 22:g=o.stateNode,w=o.alternate,o.memoizedState!==null?g._visibility&2?ur(n,o,i,l):Ma(n,o):g._visibility&2?ur(n,o,i,l):(g._visibility|=2,yi(n,o,i,l,(o.subtreeFlags&10256)!==0||!1)),d&2048&&Qd(w,o);break;case 24:ur(n,o,i,l),d&2048&&Xd(o.alternate,o);break;default:ur(n,o,i,l)}}function yi(n,o,i,l,d){for(d=d&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var g=n,w=o,C=i,U=l,X=w.flags;switch(w.tag){case 0:case 11:case 15:yi(g,w,C,U,d),Ca(8,w);break;case 23:break;case 22:var oe=w.stateNode;w.memoizedState!==null?oe._visibility&2?yi(g,w,C,U,d):Ma(g,w):(oe._visibility|=2,yi(g,w,C,U,d)),d&&X&2048&&Qd(w.alternate,w);break;case 24:yi(g,w,C,U,d),d&&X&2048&&Xd(w.alternate,w);break;default:yi(g,w,C,U,d)}o=o.sibling}}function Ma(n,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var i=n,l=o,d=l.flags;switch(l.tag){case 22:Ma(i,l),d&2048&&Qd(l.alternate,l);break;case 24:Ma(i,l),d&2048&&Xd(l.alternate,l);break;default:Ma(i,l)}o=o.sibling}}var Aa=8192;function vi(n,o,i){if(n.subtreeFlags&Aa)for(n=n.child;n!==null;)zv(n,o,i),n=n.sibling}function zv(n,o,i){switch(n.tag){case 26:vi(n,o,i),n.flags&Aa&&n.memoizedState!==null&&fT(i,cr,n.memoizedState,n.memoizedProps);break;case 5:vi(n,o,i);break;case 3:case 4:var l=cr;cr=zc(n.stateNode.containerInfo),vi(n,o,i),cr=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Aa,Aa=16777216,vi(n,o,i),Aa=l):vi(n,o,i));break;default:vi(n,o,i)}}function Dv(n){var o=n.alternate;if(o!==null&&(n=o.child,n!==null)){o.child=null;do o=n.sibling,n.sibling=null,n=o;while(n!==null)}}function za(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var i=0;i<o.length;i++){var l=o[i];Wt=l,Nv(l,n)}Dv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)kv(n),n=n.sibling}function kv(n){switch(n.tag){case 0:case 11:case 15:za(n),n.flags&2048&&xo(9,n,n.return);break;case 3:za(n);break;case 12:za(n);break;case 22:var o=n.stateNode;n.memoizedState!==null&&o._visibility&2&&(n.return===null||n.return.tag!==13)?(o._visibility&=-3,vc(n)):za(n);break;default:za(n)}}function vc(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var i=0;i<o.length;i++){var l=o[i];Wt=l,Nv(l,n)}Dv(n)}for(n=n.child;n!==null;){switch(o=n,o.tag){case 0:case 11:case 15:xo(8,o,o.return),vc(o);break;case 22:i=o.stateNode,i._visibility&2&&(i._visibility&=-3,vc(o));break;default:vc(o)}n=n.sibling}}function Nv(n,o){for(;Wt!==null;){var i=Wt;switch(i.tag){case 0:case 11:case 15:xo(8,i,o);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:pa(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Wt=l;else e:for(i=n;Wt!==null;){l=Wt;var d=l.sibling,g=l.return;if(Ev(l),l===i){Wt=null;break e}if(d!==null){d.return=g,Wt=d;break e}Wt=g}}}var T_={getCacheForType:function(n){var o=on(Lt),i=o.data.get(n);return i===void 0&&(i=n(),o.data.set(n,i)),i},cacheSignal:function(){return on(Lt).controller.signal}},C_=typeof WeakMap=="function"?WeakMap:Map,at=0,gt=null,Ke=null,Xe=0,ct=0,Hn=null,wo=!1,bi=!1,Jd=!1,Gr=0,Mt=0,Ro=0,vs=0,Wd=0,Fn=0,Si=0,Da=null,Mn=null,eh=!1,bc=0,Pv=0,Sc=1/0,xc=null,Eo=null,Vt=0,_o=null,xi=null,Kr=0,th=0,nh=null,jv=null,ka=0,rh=null;function $n(){return(at&2)!==0&&Xe!==0?Xe&-Xe:I.T!==null?ch():Al()}function Lv(){if(Fn===0)if((Xe&536870912)===0||et){var n=$t;$t<<=1,($t&3932160)===0&&($t=262144),Fn=n}else Fn=536870912;return n=Un.current,n!==null&&(n.flags|=32),Fn}function An(n,o,i){(n===gt&&(ct===2||ct===9)||n.cancelPendingCommit!==null)&&(wi(n,0),To(n,Xe,Fn,!1)),zr(n,i),((at&2)===0||n!==gt)&&(n===gt&&((at&2)===0&&(vs|=i),Mt===4&&To(n,Xe,Fn,!1)),vr(n))}function Iv(n,o,i){if((at&6)!==0)throw Error(s(327));var l=!i&&(o&127)===0&&(o&n.expiredLanes)===0||Gn(n,o),d=l?A_(n,o):sh(n,o,!0),g=l;do{if(d===0){bi&&!l&&To(n,o,0,!1);break}else{if(i=n.current.alternate,g&&!O_(i)){d=sh(n,o,!1),g=!1;continue}if(d===2){if(g=o,n.errorRecoveryDisabledLanes&g)var w=0;else w=n.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){o=w;e:{var C=n;d=Da;var U=C.current.memoizedState.isDehydrated;if(U&&(wi(C,w).flags|=256),w=sh(C,w,!1),w!==2){if(Jd&&!U){C.errorRecoveryDisabledLanes|=g,vs|=g,d=4;break e}g=Mn,Mn=d,g!==null&&(Mn===null?Mn=g:Mn.push.apply(Mn,g))}d=w}if(g=!1,d!==2)continue}}if(d===1){wi(n,0),To(n,o,0,!0);break}e:{switch(l=n,g=d,g){case 0:case 1:throw Error(s(345));case 4:if((o&4194048)!==o)break;case 6:To(l,o,Fn,!wo);break e;case 2:Mn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((o&62914560)===o&&(d=bc+300-pe(),10<d)){if(To(l,o,Fn,!wo),Yn(l,0,!0)!==0)break e;Kr=o,l.timeoutHandle=mb(Uv.bind(null,l,i,Mn,xc,eh,o,Fn,vs,Si,wo,g,"Throttled",-0,0),d);break e}Uv(l,i,Mn,xc,eh,o,Fn,vs,Si,wo,g,null,-0,0)}}break}while(!0);vr(n)}function Uv(n,o,i,l,d,g,w,C,U,X,oe,ae,J,te){if(n.timeoutHandle=-1,ae=o.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nr},zv(o,g,ae);var we=(g&62914560)===g?bc-pe():(g&4194048)===g?Pv-pe():0;if(we=dT(ae,we),we!==null){Kr=g,n.cancelPendingCommit=we(Yv.bind(null,n,o,g,i,l,d,w,C,U,oe,ae,null,J,te)),To(n,g,w,!X);return}}Yv(n,o,g,i,l,d,w,C,U)}function O_(n){for(var o=n;;){var i=o.tag;if((i===0||i===11||i===15)&&o.flags&16384&&(i=o.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],g=d.getSnapshot;d=d.value;try{if(!Ln(g(),d))return!1}catch{return!1}}if(i=o.child,o.subtreeFlags&16384&&i!==null)i.return=o,o=i;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function To(n,o,i,l){o&=~Wd,o&=~vs,n.suspendedLanes|=o,n.pingedLanes&=~o,l&&(n.warmLanes|=o),l=n.expirationTimes;for(var d=o;0<d;){var g=31-jt(d),w=1<<g;l[g]=-1,d&=~w}i!==0&&Zs(n,i,o)}function wc(){return(at&6)===0?(Na(0),!1):!0}function oh(){if(Ke!==null){if(ct===0)var n=Ke.return;else n=Ke,Ir=cs=null,Sd(n),di=null,ga=0,n=Ke;for(;n!==null;)gv(n.alternate,n),n=n.return;Ke=null}}function wi(n,o){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,G_(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Kr=0,oh(),gt=n,Ke=i=jr(n.current,null),Xe=o,ct=0,Hn=null,wo=!1,bi=Gn(n,o),Jd=!1,Si=Fn=Wd=vs=Ro=Mt=0,Mn=Da=null,eh=!1,(o&8)!==0&&(o|=o&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=o;0<l;){var d=31-jt(l),g=1<<d;o|=n[d],l&=~g}return Gr=o,$l(),i}function Bv(n,o){$e=null,I.H=Ea,o===fi||o===Xl?(o=ny(),ct=3):o===ld?(o=ny(),ct=4):ct=o===jd?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Hn=o,Ke===null&&(Mt=1,fc(n,Jn(o,n.current)))}function Hv(){var n=Un.current;return n===null?!0:(Xe&4194048)===Xe?nr===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?n===nr:!1}function Fv(){var n=I.H;return I.H=Ea,n===null?Ea:n}function $v(){var n=I.A;return I.A=T_,n}function Rc(){Mt=4,wo||(Xe&4194048)!==Xe&&Un.current!==null||(bi=!0),(Ro&134217727)===0&&(vs&134217727)===0||gt===null||To(gt,Xe,Fn,!1)}function sh(n,o,i){var l=at;at|=2;var d=Fv(),g=$v();(gt!==n||Xe!==o)&&(xc=null,wi(n,o)),o=!1;var w=Mt;e:do try{if(ct!==0&&Ke!==null){var C=Ke,U=Hn;switch(ct){case 8:oh(),w=6;break e;case 3:case 2:case 9:case 6:Un.current===null&&(o=!0);var X=ct;if(ct=0,Hn=null,Ri(n,C,U,X),i&&bi){w=0;break e}break;default:X=ct,ct=0,Hn=null,Ri(n,C,U,X)}}M_(),w=Mt;break}catch(oe){Bv(n,oe)}while(!0);return o&&n.shellSuspendCounter++,Ir=cs=null,at=l,I.H=d,I.A=g,Ke===null&&(gt=null,Xe=0,$l()),w}function M_(){for(;Ke!==null;)Zv(Ke)}function A_(n,o){var i=at;at|=2;var l=Fv(),d=$v();gt!==n||Xe!==o?(xc=null,Sc=pe()+500,wi(n,o)):bi=Gn(n,o);e:do try{if(ct!==0&&Ke!==null){o=Ke;var g=Hn;t:switch(ct){case 1:ct=0,Hn=null,Ri(n,o,g,1);break;case 2:case 9:if(ey(g)){ct=0,Hn=null,Vv(o);break}o=function(){ct!==2&&ct!==9||gt!==n||(ct=7),vr(n)},g.then(o,o);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:ey(g)?(ct=0,Hn=null,Vv(o)):(ct=0,Hn=null,Ri(n,o,g,7));break;case 5:var w=null;switch(Ke.tag){case 26:w=Ke.memoizedState;case 5:case 27:var C=Ke;if(w?Ab(w):C.stateNode.complete){ct=0,Hn=null;var U=C.sibling;if(U!==null)Ke=U;else{var X=C.return;X!==null?(Ke=X,Ec(X)):Ke=null}break t}}ct=0,Hn=null,Ri(n,o,g,5);break;case 6:ct=0,Hn=null,Ri(n,o,g,6);break;case 8:oh(),Mt=6;break e;default:throw Error(s(462))}}z_();break}catch(oe){Bv(n,oe)}while(!0);return Ir=cs=null,I.H=l,I.A=d,at=i,Ke!==null?0:(gt=null,Xe=0,$l(),Mt)}function z_(){for(;Ke!==null&&!xe();)Zv(Ke)}function Zv(n){var o=pv(n.alternate,n,Gr);n.memoizedProps=n.pendingProps,o===null?Ec(n):Ke=o}function Vv(n){var o=n,i=o.alternate;switch(o.tag){case 15:case 0:o=lv(i,o,o.pendingProps,o.type,void 0,Xe);break;case 11:o=lv(i,o,o.pendingProps,o.type.render,o.ref,Xe);break;case 5:Sd(o);default:gv(i,o),o=Ke=$g(o,Gr),o=pv(i,o,Gr)}n.memoizedProps=n.pendingProps,o===null?Ec(n):Ke=o}function Ri(n,o,i,l){Ir=cs=null,Sd(o),di=null,ga=0;var d=o.return;try{if(b_(n,d,o,i,Xe)){Mt=1,fc(n,Jn(i,n.current)),Ke=null;return}}catch(g){if(d!==null)throw Ke=d,g;Mt=1,fc(n,Jn(i,n.current)),Ke=null;return}o.flags&32768?(et||l===1?n=!0:bi||(Xe&536870912)!==0?n=!1:(wo=n=!0,(l===2||l===9||l===3||l===6)&&(l=Un.current,l!==null&&l.tag===13&&(l.flags|=16384))),qv(o,n)):Ec(o)}function Ec(n){var o=n;do{if((o.flags&32768)!==0){qv(o,wo);return}n=o.return;var i=w_(o.alternate,o,Gr);if(i!==null){Ke=i;return}if(o=o.sibling,o!==null){Ke=o;return}Ke=o=n}while(o!==null);Mt===0&&(Mt=5)}function qv(n,o){do{var i=R_(n.alternate,n);if(i!==null){i.flags&=32767,Ke=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!o&&(n=n.sibling,n!==null)){Ke=n;return}Ke=n=i}while(n!==null);Mt=6,Ke=null}function Yv(n,o,i,l,d,g,w,C,U){n.cancelPendingCommit=null;do _c();while(Vt!==0);if((at&6)!==0)throw Error(s(327));if(o!==null){if(o===n.current)throw Error(s(177));if(g=o.lanes|o.childLanes,g|=Yf,Rf(n,i,g,w,C,U),n===gt&&(Ke=gt=null,Xe=0),xi=o,_o=n,Kr=i,th=g,nh=d,jv=l,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,P_(Ct,function(){return Jv(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||l){l=I.T,I.T=null,d=B.p,B.p=2,w=at,at|=4;try{E_(n,o,i)}finally{at=w,B.p=d,I.T=l}}Vt=1,Gv(),Kv(),Qv()}}function Gv(){if(Vt===1){Vt=0;var n=_o,o=xi,i=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||i){i=I.T,I.T=null;var l=B.p;B.p=2;var d=at;at|=4;try{Ov(o,n);var g=yh,w=Ng(n.containerInfo),C=g.focusedElem,U=g.selectionRange;if(w!==C&&C&&C.ownerDocument&&kg(C.ownerDocument.documentElement,C)){if(U!==null&&Ff(C)){var X=U.start,oe=U.end;if(oe===void 0&&(oe=X),"selectionStart"in C)C.selectionStart=X,C.selectionEnd=Math.min(oe,C.value.length);else{var ae=C.ownerDocument||document,J=ae&&ae.defaultView||window;if(J.getSelection){var te=J.getSelection(),we=C.textContent.length,De=Math.min(U.start,we),ht=U.end===void 0?De:Math.min(U.end,we);!te.extend&&De>ht&&(w=ht,ht=De,De=w);var V=Dg(C,De),F=Dg(C,ht);if(V&&F&&(te.rangeCount!==1||te.anchorNode!==V.node||te.anchorOffset!==V.offset||te.focusNode!==F.node||te.focusOffset!==F.offset)){var Q=ae.createRange();Q.setStart(V.node,V.offset),te.removeAllRanges(),De>ht?(te.addRange(Q),te.extend(F.node,F.offset)):(Q.setEnd(F.node,F.offset),te.addRange(Q))}}}}for(ae=[],te=C;te=te.parentNode;)te.nodeType===1&&ae.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<ae.length;C++){var se=ae[C];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Lc=!!gh,yh=gh=null}finally{at=d,B.p=l,I.T=i}}n.current=o,Vt=2}}function Kv(){if(Vt===2){Vt=0;var n=_o,o=xi,i=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||i){i=I.T,I.T=null;var l=B.p;B.p=2;var d=at;at|=4;try{Rv(n,o.alternate,o)}finally{at=d,B.p=l,I.T=i}}Vt=3}}function Qv(){if(Vt===4||Vt===3){Vt=0,ue();var n=_o,o=xi,i=Kr,l=jv;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Vt=5:(Vt=0,xi=_o=null,Xv(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(Eo=null),Dr(i),o=o.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(lt,o,void 0,(o.current.flags&128)===128)}catch{}if(l!==null){o=I.T,d=B.p,B.p=2,I.T=null;try{for(var g=n.onRecoverableError,w=0;w<l.length;w++){var C=l[w];g(C.value,{componentStack:C.stack})}}finally{I.T=o,B.p=d}}(Kr&3)!==0&&_c(),vr(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===rh?ka++:(ka=0,rh=n):ka=0,Na(0)}}function Xv(n,o){(n.pooledCacheLanes&=o)===0&&(o=n.pooledCache,o!=null&&(n.pooledCache=null,pa(o)))}function _c(){return Gv(),Kv(),Qv(),Jv()}function Jv(){if(Vt!==5)return!1;var n=_o,o=th;th=0;var i=Dr(Kr),l=I.T,d=B.p;try{B.p=32>i?32:i,I.T=null,i=nh,nh=null;var g=_o,w=Kr;if(Vt=0,xi=_o=null,Kr=0,(at&6)!==0)throw Error(s(331));var C=at;if(at|=4,kv(g.current),Av(g,g.current,w,i),at=C,Na(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(lt,g)}catch{}return!0}finally{B.p=d,I.T=l,Xv(n,o)}}function Wv(n,o,i){o=Jn(i,o),o=Pd(n.stateNode,o,2),n=vo(n,o,2),n!==null&&(zr(n,2),vr(n))}function ut(n,o,i){if(n.tag===3)Wv(n,n,i);else for(;o!==null;){if(o.tag===3){Wv(o,n,i);break}else if(o.tag===1){var l=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Eo===null||!Eo.has(l))){n=Jn(i,n),i=ev(2),l=vo(o,i,2),l!==null&&(tv(i,l,o,n),zr(l,2),vr(l));break}}o=o.return}}function ih(n,o,i){var l=n.pingCache;if(l===null){l=n.pingCache=new C_;var d=new Set;l.set(o,d)}else d=l.get(o),d===void 0&&(d=new Set,l.set(o,d));d.has(i)||(Jd=!0,d.add(i),n=D_.bind(null,n,o,i),o.then(n,n))}function D_(n,o,i){var l=n.pingCache;l!==null&&l.delete(o),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,gt===n&&(Xe&i)===i&&(Mt===4||Mt===3&&(Xe&62914560)===Xe&&300>pe()-bc?(at&2)===0&&wi(n,0):Wd|=i,Si===Xe&&(Si=0)),vr(n)}function eb(n,o){o===0&&(o=$s()),n=is(n,o),n!==null&&(zr(n,o),vr(n))}function k_(n){var o=n.memoizedState,i=0;o!==null&&(i=o.retryLane),eb(n,i)}function N_(n,o){var i=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(o),eb(n,i)}function P_(n,o){return Ce(n,o)}var Tc=null,Ei=null,ah=!1,Cc=!1,lh=!1,Co=0;function vr(n){n!==Ei&&n.next===null&&(Ei===null?Tc=Ei=n:Ei=Ei.next=n),Cc=!0,ah||(ah=!0,L_())}function Na(n,o){if(!lh&&Cc){lh=!0;do for(var i=!1,l=Tc;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var g=0;else{var w=l.suspendedLanes,C=l.pingedLanes;g=(1<<31-jt(42|n)+1)-1,g&=d&~(w&~C),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,ob(l,g))}else g=Xe,g=Yn(l,l===gt?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(g&3)===0||Gn(l,g)||(i=!0,ob(l,g));l=l.next}while(i);lh=!1}}function j_(){tb()}function tb(){Cc=ah=!1;var n=0;Co!==0&&Y_()&&(n=Co);for(var o=pe(),i=null,l=Tc;l!==null;){var d=l.next,g=nb(l,o);g===0?(l.next=null,i===null?Tc=d:i.next=d,d===null&&(Ei=i)):(i=l,(n!==0||(g&3)!==0)&&(Cc=!0)),l=d}Vt!==0&&Vt!==5||Na(n),Co!==0&&(Co=0)}function nb(n,o){for(var i=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,g=n.pendingLanes&-62914561;0<g;){var w=31-jt(g),C=1<<w,U=d[w];U===-1?((C&i)===0||(C&l)!==0)&&(d[w]=Fs(C,o)):U<=o&&(n.expiredLanes|=C),g&=~C}if(o=gt,i=Xe,i=Yn(n,n===o?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,i===0||n===o&&(ct===2||ct===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&ce(l),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Gn(n,i)){if(o=i&-i,o===n.callbackPriority)return o;switch(l!==null&&ce(l),Dr(i)){case 2:case 8:i=Fe;break;case 32:i=Ct;break;case 268435456:i=Ht;break;default:i=Ct}return l=rb.bind(null,n),i=Ce(i,l),n.callbackPriority=o,n.callbackNode=i,o}return l!==null&&l!==null&&ce(l),n.callbackPriority=2,n.callbackNode=null,2}function rb(n,o){if(Vt!==0&&Vt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(_c()&&n.callbackNode!==i)return null;var l=Xe;return l=Yn(n,n===gt?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(Iv(n,l,o),nb(n,pe()),n.callbackNode!=null&&n.callbackNode===i?rb.bind(null,n):null)}function ob(n,o){if(_c())return null;Iv(n,o,!0)}function L_(){K_(function(){(at&6)!==0?Ce(Ne,j_):tb()})}function ch(){if(Co===0){var n=ci;n===0&&(n=tn,tn<<=1,(tn&261888)===0&&(tn=256)),Co=n}return Co}function sb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Pl(""+n)}function ib(n,o){var i=o.ownerDocument.createElement("input");return i.name=o.name,i.value=o.value,n.id&&i.setAttribute("form",n.id),o.parentNode.insertBefore(i,o),n=new FormData(n),i.parentNode.removeChild(i),n}function I_(n,o,i,l,d){if(o==="submit"&&i&&i.stateNode===d){var g=sb((d[En]||null).action),w=l.submitter;w&&(o=(o=w[En]||null)?sb(o.formAction):w.getAttribute("formAction"),o!==null&&(g=o,w=null));var C=new Ul("action","action",null,l,d);n.push({event:C,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Co!==0){var U=w?ib(d,w):new FormData(d);Md(i,{pending:!0,data:U,method:d.method,action:g},null,U)}}else typeof g=="function"&&(C.preventDefault(),U=w?ib(d,w):new FormData(d),Md(i,{pending:!0,data:U,method:d.method,action:g},g,U))},currentTarget:d}]})}}for(var uh=0;uh<qf.length;uh++){var fh=qf[uh],U_=fh.toLowerCase(),B_=fh[0].toUpperCase()+fh.slice(1);lr(U_,"on"+B_)}lr(Lg,"onAnimationEnd"),lr(Ig,"onAnimationIteration"),lr(Ug,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(n_,"onTransitionRun"),lr(r_,"onTransitionStart"),lr(o_,"onTransitionCancel"),lr(Bg,"onTransitionEnd"),Ks("onMouseEnter",["mouseout","mouseover"]),Ks("onMouseLeave",["mouseout","mouseover"]),Ks("onPointerEnter",["pointerout","pointerover"]),Ks("onPointerLeave",["pointerout","pointerover"]),ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ns("onBeforeInput",["compositionend","keypress","textInput","paste"]),ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pa="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(" "),H_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pa));function ab(n,o){o=(o&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],d=l.event;l=l.listeners;e:{var g=void 0;if(o)for(var w=l.length-1;0<=w;w--){var C=l[w],U=C.instance,X=C.currentTarget;if(C=C.listener,U!==g&&d.isPropagationStopped())break e;g=C,d.currentTarget=X;try{g(d)}catch(oe){Fl(oe)}d.currentTarget=null,g=U}else for(w=0;w<l.length;w++){if(C=l[w],U=C.instance,X=C.currentTarget,C=C.listener,U!==g&&d.isPropagationStopped())break e;g=C,d.currentTarget=X;try{g(d)}catch(oe){Fl(oe)}d.currentTarget=null,g=U}}}}function Qe(n,o){var i=o[Ef];i===void 0&&(i=o[Ef]=new Set);var l=n+"__bubble";i.has(l)||(lb(o,n,2,!1),i.add(l))}function dh(n,o,i){var l=0;o&&(l|=4),lb(i,n,l,o)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function hh(n){if(!n[Oc]){n[Oc]=!0,tg.forEach(function(i){i!=="selectionchange"&&(H_.has(i)||dh(i,!1,n),dh(i,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Oc]||(o[Oc]=!0,dh("selectionchange",!1,o))}}function lb(n,o,i,l){switch(Lb(o)){case 2:var d=mT;break;case 8:d=gT;break;default:d=Oh}i=d.bind(null,o,i,n),d=void 0,!kf||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(o,i,{capture:!0,passive:d}):n.addEventListener(o,i,!0):d!==void 0?n.addEventListener(o,i,{passive:d}):n.addEventListener(o,i,!1)}function ph(n,o,i,l,d){var g=l;if((o&1)===0&&(o&2)===0&&l!==null)e:for(;;){if(l===null)return;var w=l.tag;if(w===3||w===4){var C=l.stateNode.containerInfo;if(C===d)break;if(w===4)for(w=l.return;w!==null;){var U=w.tag;if((U===3||U===4)&&w.stateNode.containerInfo===d)return;w=w.return}for(;C!==null;){if(w=qs(C),w===null)return;if(U=w.tag,U===5||U===6||U===26||U===27){l=g=w;continue e}C=C.parentNode}}l=l.return}hg(function(){var X=g,oe=zf(i),ae=[];e:{var J=Hg.get(n);if(J!==void 0){var te=Ul,we=n;switch(n){case"keypress":if(Ll(i)===0)break e;case"keydown":case"keyup":te=NE;break;case"focusin":we="focus",te=Lf;break;case"focusout":we="blur",te=Lf;break;case"beforeblur":case"afterblur":te=Lf;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=gg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=wE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=LE;break;case Lg:case Ig:case Ug:te=_E;break;case Bg:te=UE;break;case"scroll":case"scrollend":te=SE;break;case"wheel":te=HE;break;case"copy":case"cut":case"paste":te=CE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=vg;break;case"toggle":case"beforetoggle":te=$E}var De=(o&4)!==0,ht=!De&&(n==="scroll"||n==="scrollend"),V=De?J!==null?J+"Capture":null:J;De=[];for(var F=X,Q;F!==null;){var se=F;if(Q=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||Q===null||V===null||(se=ra(F,V),se!=null&&De.push(ja(F,se,Q))),ht)break;F=F.return}0<De.length&&(J=new te(J,we,null,i,oe),ae.push({event:J,listeners:De}))}}if((o&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",te=n==="mouseout"||n==="pointerout",J&&i!==Af&&(we=i.relatedTarget||i.fromElement)&&(qs(we)||we[Vs]))break e;if((te||J)&&(J=oe.window===oe?oe:(J=oe.ownerDocument)?J.defaultView||J.parentWindow:window,te?(we=i.relatedTarget||i.toElement,te=X,we=we?qs(we):null,we!==null&&(ht=c(we),De=we.tag,we!==ht||De!==5&&De!==27&&De!==6)&&(we=null)):(te=null,we=X),te!==we)){if(De=gg,se="onMouseLeave",V="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(De=vg,se="onPointerLeave",V="onPointerEnter",F="pointer"),ht=te==null?J:na(te),Q=we==null?J:na(we),J=new De(se,F+"leave",te,i,oe),J.target=ht,J.relatedTarget=Q,se=null,qs(oe)===X&&(De=new De(V,F+"enter",we,i,oe),De.target=Q,De.relatedTarget=ht,se=De),ht=se,te&&we)t:{for(De=F_,V=te,F=we,Q=0,se=V;se;se=De(se))Q++;se=0;for(var Oe=F;Oe;Oe=De(Oe))se++;for(;0<Q-se;)V=De(V),Q--;for(;0<se-Q;)F=De(F),se--;for(;Q--;){if(V===F||F!==null&&V===F.alternate){De=V;break t}V=De(V),F=De(F)}De=null}else De=null;te!==null&&cb(ae,J,te,De,!1),we!==null&&ht!==null&&cb(ae,ht,we,De,!0)}}e:{if(J=X?na(X):window,te=J.nodeName&&J.nodeName.toLowerCase(),te==="select"||te==="input"&&J.type==="file")var rt=Tg;else if(Eg(J))if(Cg)rt=WE;else{rt=XE;var Ee=QE}else te=J.nodeName,!te||te.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?X&&Mf(X.elementType)&&(rt=Tg):rt=JE;if(rt&&(rt=rt(n,X))){_g(ae,rt,i,oe);break e}Ee&&Ee(n,J,X),n==="focusout"&&X&&J.type==="number"&&X.memoizedProps.value!=null&&Of(J,"number",J.value)}switch(Ee=X?na(X):window,n){case"focusin":(Eg(Ee)||Ee.contentEditable==="true")&&(ti=Ee,$f=X,fa=null);break;case"focusout":fa=$f=ti=null;break;case"mousedown":Zf=!0;break;case"contextmenu":case"mouseup":case"dragend":Zf=!1,Pg(ae,i,oe);break;case"selectionchange":if(t_)break;case"keydown":case"keyup":Pg(ae,i,oe)}var Ve;if(Uf)e:{switch(n){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else ei?wg(n,i)&&(Je="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Je="onCompositionStart");Je&&(bg&&i.locale!=="ko"&&(ei||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&ei&&(Ve=pg()):(uo=oe,Nf="value"in uo?uo.value:uo.textContent,ei=!0)),Ee=Mc(X,Je),0<Ee.length&&(Je=new yg(Je,n,null,i,oe),ae.push({event:Je,listeners:Ee}),Ve?Je.data=Ve:(Ve=Rg(i),Ve!==null&&(Je.data=Ve)))),(Ve=VE?qE(n,i):YE(n,i))&&(Je=Mc(X,"onBeforeInput"),0<Je.length&&(Ee=new yg("onBeforeInput","beforeinput",null,i,oe),ae.push({event:Ee,listeners:Je}),Ee.data=Ve)),I_(ae,n,X,i,oe)}ab(ae,o)})}function ja(n,o,i){return{instance:n,listener:o,currentTarget:i}}function Mc(n,o){for(var i=o+"Capture",l=[];n!==null;){var d=n,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=ra(n,i),d!=null&&l.unshift(ja(n,d,g)),d=ra(n,o),d!=null&&l.push(ja(n,d,g))),n.tag===3)return l;n=n.return}return[]}function F_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function cb(n,o,i,l,d){for(var g=o._reactName,w=[];i!==null&&i!==l;){var C=i,U=C.alternate,X=C.stateNode;if(C=C.tag,U!==null&&U===l)break;C!==5&&C!==26&&C!==27||X===null||(U=X,d?(X=ra(i,g),X!=null&&w.unshift(ja(i,X,U))):d||(X=ra(i,g),X!=null&&w.push(ja(i,X,U)))),i=i.return}w.length!==0&&n.push({event:o,listeners:w})}var $_=/\r\n?/g,Z_=/\u0000|\uFFFD/g;function ub(n){return(typeof n=="string"?n:""+n).replace($_,`
10
- `).replace(Z_,"")}function fb(n,o){return o=ub(o),ub(n)===o}function dt(n,o,i,l,d,g){switch(i){case"children":typeof l=="string"?o==="body"||o==="textarea"&&l===""||Xs(n,l):(typeof l=="number"||typeof l=="bigint")&&o!=="body"&&Xs(n,""+l);break;case"className":kl(n,"class",l);break;case"tabIndex":kl(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":kl(n,i,l);break;case"style":fg(n,l,g);break;case"data":if(o!=="object"){kl(n,"data",l);break}case"src":case"href":if(l===""&&(o!=="a"||i!=="href")){n.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Pl(""+l),n.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(i,"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 g=="function"&&(i==="formAction"?(o!=="input"&&dt(n,o,"name",d.name,d,null),dt(n,o,"formEncType",d.formEncType,d,null),dt(n,o,"formMethod",d.formMethod,d,null),dt(n,o,"formTarget",d.formTarget,d,null)):(dt(n,o,"encType",d.encType,d,null),dt(n,o,"method",d.method,d,null),dt(n,o,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Pl(""+l),n.setAttribute(i,l);break;case"onClick":l!=null&&(n.onclick=Nr);break;case"onScroll":l!=null&&Qe("scroll",n);break;case"onScrollEnd":l!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}i=Pl(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""+l):n.removeAttribute(i);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":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":l===!0?n.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,l):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(i,l):n.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(i):n.setAttribute(i,l);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),Dl(n,"popover",l);break;case"xlinkActuate":kr(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":kr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":kr(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":kr(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":kr(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":kr(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":kr(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":kr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":kr(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Dl(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=vE.get(i)||i,Dl(n,i,l))}}function mh(n,o,i,l,d,g){switch(i){case"style":fg(n,l,g);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"children":typeof l=="string"?Xs(n,l):(typeof l=="number"||typeof l=="bigint")&&Xs(n,""+l);break;case"onScroll":l!=null&&Qe("scroll",n);break;case"onScrollEnd":l!=null&&Qe("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Nr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ng.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),o=i.slice(2,d?i.length-7:void 0),g=n[En]||null,g=g!=null?g[i]:null,typeof g=="function"&&n.removeEventListener(o,g,d),typeof l=="function")){typeof g!="function"&&g!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(o,l,d);break e}i in n?n[i]=l:l===!0?n.setAttribute(i,""):Dl(n,i,l)}}}function an(n,o,i){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",n),Qe("load",n);var l=!1,d=!1,g;for(g in i)if(i.hasOwnProperty(g)){var w=i[g];if(w!=null)switch(g){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:dt(n,o,g,w,i,null)}}d&&dt(n,o,"srcSet",i.srcSet,i,null),l&&dt(n,o,"src",i.src,i,null);return;case"input":Qe("invalid",n);var C=g=w=d=null,U=null,X=null;for(l in i)if(i.hasOwnProperty(l)){var oe=i[l];if(oe!=null)switch(l){case"name":d=oe;break;case"type":w=oe;break;case"checked":U=oe;break;case"defaultChecked":X=oe;break;case"value":g=oe;break;case"defaultValue":C=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(s(137,o));break;default:dt(n,o,l,oe,i,null)}}ag(n,g,C,U,X,w,d,!1);return;case"select":Qe("invalid",n),l=w=g=null;for(d in i)if(i.hasOwnProperty(d)&&(C=i[d],C!=null))switch(d){case"value":g=C;break;case"defaultValue":w=C;break;case"multiple":l=C;default:dt(n,o,d,C,i,null)}o=g,i=w,n.multiple=!!l,o!=null?Qs(n,!!l,o,!1):i!=null&&Qs(n,!!l,i,!0);return;case"textarea":Qe("invalid",n),g=d=l=null;for(w in i)if(i.hasOwnProperty(w)&&(C=i[w],C!=null))switch(w){case"value":l=C;break;case"defaultValue":d=C;break;case"children":g=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(s(91));break;default:dt(n,o,w,C,i,null)}cg(n,l,d,g);return;case"option":for(U in i)i.hasOwnProperty(U)&&(l=i[U],l!=null)&&(U==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":dt(n,o,U,l,i,null));return;case"dialog":Qe("beforetoggle",n),Qe("toggle",n),Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":Qe("load",n);break;case"video":case"audio":for(l=0;l<Pa.length;l++)Qe(Pa[l],n);break;case"image":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"embed":case"source":case"link":Qe("error",n),Qe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in i)if(i.hasOwnProperty(X)&&(l=i[X],l!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:dt(n,o,X,l,i,null)}return;default:if(Mf(o)){for(oe in i)i.hasOwnProperty(oe)&&(l=i[oe],l!==void 0&&mh(n,o,oe,l,i,void 0));return}}for(C in i)i.hasOwnProperty(C)&&(l=i[C],l!=null&&dt(n,o,C,l,i,null))}function V_(n,o,i,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,w=null,C=null,U=null,X=null,oe=null;for(te in i){var ae=i[te];if(i.hasOwnProperty(te)&&ae!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":U=ae;default:l.hasOwnProperty(te)||dt(n,o,te,null,l,ae)}}for(var J in l){var te=l[J];if(ae=i[J],l.hasOwnProperty(J)&&(te!=null||ae!=null))switch(J){case"type":g=te;break;case"name":d=te;break;case"checked":X=te;break;case"defaultChecked":oe=te;break;case"value":w=te;break;case"defaultValue":C=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(s(137,o));break;default:te!==ae&&dt(n,o,J,te,l,ae)}}Cf(n,w,C,U,X,oe,g,d);return;case"select":te=w=C=J=null;for(g in i)if(U=i[g],i.hasOwnProperty(g)&&U!=null)switch(g){case"value":break;case"multiple":te=U;default:l.hasOwnProperty(g)||dt(n,o,g,null,l,U)}for(d in l)if(g=l[d],U=i[d],l.hasOwnProperty(d)&&(g!=null||U!=null))switch(d){case"value":J=g;break;case"defaultValue":C=g;break;case"multiple":w=g;default:g!==U&&dt(n,o,d,g,l,U)}o=C,i=w,l=te,J!=null?Qs(n,!!i,J,!1):!!l!=!!i&&(o!=null?Qs(n,!!i,o,!0):Qs(n,!!i,i?[]:"",!1));return;case"textarea":te=J=null;for(C in i)if(d=i[C],i.hasOwnProperty(C)&&d!=null&&!l.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:dt(n,o,C,null,l,d)}for(w in l)if(d=l[w],g=i[w],l.hasOwnProperty(w)&&(d!=null||g!=null))switch(w){case"value":J=d;break;case"defaultValue":te=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==g&&dt(n,o,w,d,l,g)}lg(n,J,te);return;case"option":for(var we in i)J=i[we],i.hasOwnProperty(we)&&J!=null&&!l.hasOwnProperty(we)&&(we==="selected"?n.selected=!1:dt(n,o,we,null,l,J));for(U in l)J=l[U],te=i[U],l.hasOwnProperty(U)&&J!==te&&(J!=null||te!=null)&&(U==="selected"?n.selected=J&&typeof J!="function"&&typeof J!="symbol":dt(n,o,U,J,l,te));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 De in i)J=i[De],i.hasOwnProperty(De)&&J!=null&&!l.hasOwnProperty(De)&&dt(n,o,De,null,l,J);for(X in l)if(J=l[X],te=i[X],l.hasOwnProperty(X)&&J!==te&&(J!=null||te!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(s(137,o));break;default:dt(n,o,X,J,l,te)}return;default:if(Mf(o)){for(var ht in i)J=i[ht],i.hasOwnProperty(ht)&&J!==void 0&&!l.hasOwnProperty(ht)&&mh(n,o,ht,void 0,l,J);for(oe in l)J=l[oe],te=i[oe],!l.hasOwnProperty(oe)||J===te||J===void 0&&te===void 0||mh(n,o,oe,J,l,te);return}}for(var V in i)J=i[V],i.hasOwnProperty(V)&&J!=null&&!l.hasOwnProperty(V)&&dt(n,o,V,null,l,J);for(ae in l)J=l[ae],te=i[ae],!l.hasOwnProperty(ae)||J===te||J==null&&te==null||dt(n,o,ae,J,l,te)}function db(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function q_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,o=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],g=d.transferSize,w=d.initiatorType,C=d.duration;if(g&&C&&db(w)){for(w=0,C=d.responseEnd,l+=1;l<i.length;l++){var U=i[l],X=U.startTime;if(X>C)break;var oe=U.transferSize,ae=U.initiatorType;oe&&db(ae)&&(U=U.responseEnd,w+=oe*(U<C?1:(C-X)/(U-X)))}if(--l,o+=8*(g+w)/(d.duration/1e3),n++,10<n)break}}if(0<n)return o/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var gh=null,yh=null;function Ac(n){return n.nodeType===9?n:n.ownerDocument}function hb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function pb(n,o){if(n===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&o==="foreignObject"?0:n}function vh(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var bh=null;function Y_(){var n=window.event;return n&&n.type==="popstate"?n===bh?!1:(bh=n,!0):(bh=null,!1)}var mb=typeof setTimeout=="function"?setTimeout:void 0,G_=typeof clearTimeout=="function"?clearTimeout:void 0,gb=typeof Promise=="function"?Promise:void 0,K_=typeof queueMicrotask=="function"?queueMicrotask:typeof gb<"u"?function(n){return gb.resolve(null).then(n).catch(Q_)}:mb;function Q_(n){setTimeout(function(){throw n})}function Oo(n){return n==="head"}function yb(n,o){var i=o,l=0;do{var d=i.nextSibling;if(n.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(l===0){n.removeChild(d),Oi(o);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")La(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,La(i);for(var g=i.firstChild;g;){var w=g.nextSibling,C=g.nodeName;g[ta]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=w}}else i==="body"&&La(n.ownerDocument.body);i=d}while(i);Oi(o)}function vb(n,o){var i=n;n=0;do{var l=i.nextSibling;if(i.nodeType===1?o?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(o?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=l}while(i)}function Sh(n){var o=n.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var i=o;switch(o=o.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Sh(i),_f(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function X_(n,o,i,l){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==o.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[ta])switch(o){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(g!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(o==="input"&&n.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;if(n=rr(n.nextSibling),n===null)break}return null}function J_(n,o,i){if(o==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=rr(n.nextSibling),n===null))return null;return n}function bb(n,o){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=rr(n.nextSibling),n===null))return null;return n}function xh(n){return n.data==="$?"||n.data==="$~"}function wh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function W_(n,o){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=o;else if(n.data!=="$?"||i.readyState!=="loading")o();else{var l=function(){o(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function rr(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return n}var Rh=null;function Sb(n){n=n.nextSibling;for(var o=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(o===0)return rr(n.nextSibling);o--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||o++}n=n.nextSibling}return null}function xb(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(o===0)return n;o--}else i!=="/$"&&i!=="/&"||o++}n=n.previousSibling}return null}function wb(n,o,i){switch(o=Ac(i),n){case"html":if(n=o.documentElement,!n)throw Error(s(452));return n;case"head":if(n=o.head,!n)throw Error(s(453));return n;case"body":if(n=o.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function La(n){for(var o=n.attributes;o.length;)n.removeAttributeNode(o[0]);_f(n)}var or=new Map,Rb=new Set;function zc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Qr=B.d;B.d={f:eT,r:tT,D:nT,C:rT,L:oT,m:sT,X:aT,S:iT,M:lT};function eT(){var n=Qr.f(),o=wc();return n||o}function tT(n){var o=Ys(n);o!==null&&o.tag===5&&o.type==="form"?By(o):Qr.r(n)}var _i=typeof document>"u"?null:document;function Eb(n,o,i){var l=_i;if(l&&typeof o=="string"&&o){var d=Qn(o);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Rb.has(d)||(Rb.add(d),n={rel:n,crossOrigin:i,href:o},l.querySelector(d)===null&&(o=l.createElement("link"),an(o,"link",n),Jt(o),l.head.appendChild(o)))}}function nT(n){Qr.D(n),Eb("dns-prefetch",n,null)}function rT(n,o){Qr.C(n,o),Eb("preconnect",n,o)}function oT(n,o,i){Qr.L(n,o,i);var l=_i;if(l&&n&&o){var d='link[rel="preload"][as="'+Qn(o)+'"]';o==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+Qn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+Qn(i.imageSizes)+'"]')):d+='[href="'+Qn(n)+'"]';var g=d;switch(o){case"style":g=Ti(n);break;case"script":g=Ci(n)}or.has(g)||(n=y({rel:"preload",href:o==="image"&&i&&i.imageSrcSet?void 0:n,as:o},i),or.set(g,n),l.querySelector(d)!==null||o==="style"&&l.querySelector(Ia(g))||o==="script"&&l.querySelector(Ua(g))||(o=l.createElement("link"),an(o,"link",n),Jt(o),l.head.appendChild(o)))}}function sT(n,o){Qr.m(n,o);var i=_i;if(i&&n){var l=o&&typeof o.as=="string"?o.as:"script",d='link[rel="modulepreload"][as="'+Qn(l)+'"][href="'+Qn(n)+'"]',g=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Ci(n)}if(!or.has(g)&&(n=y({rel:"modulepreload",href:n},o),or.set(g,n),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ua(g)))return}l=i.createElement("link"),an(l,"link",n),Jt(l),i.head.appendChild(l)}}}function iT(n,o,i){Qr.S(n,o,i);var l=_i;if(l&&n){var d=Gs(l).hoistableStyles,g=Ti(n);o=o||"default";var w=d.get(g);if(!w){var C={loading:0,preload:null};if(w=l.querySelector(Ia(g)))C.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":o},i),(i=or.get(g))&&Eh(n,i);var U=w=l.createElement("link");Jt(U),an(U,"link",n),U._p=new Promise(function(X,oe){U.onload=X,U.onerror=oe}),U.addEventListener("load",function(){C.loading|=1}),U.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Dc(w,o,l)}w={type:"stylesheet",instance:w,count:1,state:C},d.set(g,w)}}}function aT(n,o){Qr.X(n,o);var i=_i;if(i&&n){var l=Gs(i).hoistableScripts,d=Ci(n),g=l.get(d);g||(g=i.querySelector(Ua(d)),g||(n=y({src:n,async:!0},o),(o=or.get(d))&&_h(n,o),g=i.createElement("script"),Jt(g),an(g,"link",n),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(d,g))}}function lT(n,o){Qr.M(n,o);var i=_i;if(i&&n){var l=Gs(i).hoistableScripts,d=Ci(n),g=l.get(d);g||(g=i.querySelector(Ua(d)),g||(n=y({src:n,async:!0,type:"module"},o),(o=or.get(d))&&_h(n,o),g=i.createElement("script"),Jt(g),an(g,"link",n),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(d,g))}}function _b(n,o,i,l){var d=(d=de.current)?zc(d):null;if(!d)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(o=Ti(i.href),i=Gs(d).hoistableStyles,l=i.get(o),l||(l={type:"style",instance:null,count:0,state:null},i.set(o,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Ti(i.href);var g=Gs(d).hoistableStyles,w=g.get(n);if(w||(d=d.ownerDocument||d,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,w),(g=d.querySelector(Ia(n)))&&!g._p&&(w.instance=g,w.state.loading=5),or.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},or.set(n,i),g||cT(d,n,i,w.state))),o&&l===null)throw Error(s(528,""));return w}if(o&&l!==null)throw Error(s(529,""));return null;case"script":return o=i.async,i=i.src,typeof i=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Ci(i),i=Gs(d).hoistableScripts,l=i.get(o),l||(l={type:"script",instance:null,count:0,state:null},i.set(o,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function Ti(n){return'href="'+Qn(n)+'"'}function Ia(n){return'link[rel="stylesheet"]['+n+"]"}function Tb(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function cT(n,o,i,l){n.querySelector('link[rel="preload"][as="style"]['+o+"]")?l.loading=1:(o=n.createElement("link"),l.preload=o,o.addEventListener("load",function(){return l.loading|=1}),o.addEventListener("error",function(){return l.loading|=2}),an(o,"link",i),Jt(o),n.head.appendChild(o))}function Ci(n){return'[src="'+Qn(n)+'"]'}function Ua(n){return"script[async]"+n}function Cb(n,o,i){if(o.count++,o.instance===null)switch(o.type){case"style":var l=n.querySelector('style[data-href~="'+Qn(i.href)+'"]');if(l)return o.instance=l,Jt(l),l;var d=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Jt(l),an(l,"style",d),Dc(l,i.precedence,n),o.instance=l;case"stylesheet":d=Ti(i.href);var g=n.querySelector(Ia(d));if(g)return o.state.loading|=4,o.instance=g,Jt(g),g;l=Tb(i),(d=or.get(d))&&Eh(l,d),g=(n.ownerDocument||n).createElement("link"),Jt(g);var w=g;return w._p=new Promise(function(C,U){w.onload=C,w.onerror=U}),an(g,"link",l),o.state.loading|=4,Dc(g,i.precedence,n),o.instance=g;case"script":return g=Ci(i.src),(d=n.querySelector(Ua(g)))?(o.instance=d,Jt(d),d):(l=i,(d=or.get(g))&&(l=y({},i),_h(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),Jt(d),an(d,"link",l),n.head.appendChild(d),o.instance=d);case"void":return null;default:throw Error(s(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(l=o.instance,o.state.loading|=4,Dc(l,i.precedence,n));return o.instance}function Dc(n,o,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,g=d,w=0;w<l.length;w++){var C=l[w];if(C.dataset.precedence===o)g=C;else if(g!==d)break}g?g.parentNode.insertBefore(n,g.nextSibling):(o=i.nodeType===9?i.head:i,o.insertBefore(n,o.firstChild))}function Eh(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.title==null&&(n.title=o.title)}function _h(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.integrity==null&&(n.integrity=o.integrity)}var kc=null;function Ob(n,o,i){if(kc===null){var l=new Map,d=kc=new Map;d.set(i,l)}else d=kc,l=d.get(i),l||(l=new Map,d.set(i,l));if(l.has(n))return l;for(l.set(n,null),i=i.getElementsByTagName(n),d=0;d<i.length;d++){var g=i[d];if(!(g[ta]||g[nn]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(o)||"";w=n+w;var C=l.get(w);C?C.push(g):l.set(w,[g])}}return l}function Mb(n,o,i){n=n.ownerDocument||n,n.head.insertBefore(i,o==="title"?n.querySelector("head > title"):null)}function uT(n,o,i){if(i===1||o.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(n=o.disabled,typeof o.precedence=="string"&&n==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Ab(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function fT(n,o,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Ti(l.href),g=o.querySelector(Ia(d));if(g){o=g._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(n.count++,n=Nc.bind(n),o.then(n,n)),i.state.loading|=4,i.instance=g,Jt(g);return}g=o.ownerDocument||o,l=Tb(l),(d=or.get(d))&&Eh(l,d),g=g.createElement("link"),Jt(g);var w=g;w._p=new Promise(function(C,U){w.onload=C,w.onerror=U}),an(g,"link",l),i.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,o),(o=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Nc.bind(n),o.addEventListener("load",i),o.addEventListener("error",i))}}var Th=0;function dT(n,o){return n.stylesheets&&n.count===0&&jc(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var l=setTimeout(function(){if(n.stylesheets&&jc(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},6e4+o);0<n.imgBytes&&Th===0&&(Th=62500*q_());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&jc(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>Th?50:800)+o);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function Nc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Pc=null;function jc(n,o){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Pc=new Map,o.forEach(hT,n),Pc=null,Nc.call(n))}function hT(n,o){if(!(o.state.loading&4)){var i=Pc.get(n);if(i)var l=i.get(null);else{i=new Map,Pc.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var w=d[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(i.set(w.dataset.precedence,w),l=w)}l&&i.set(null,l)}d=o.instance,w=d.getAttribute("data-precedence"),g=i.get(w)||l,g===l&&i.set(null,d),i.set(w,d),this.count++,l=Nc.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),g?g.parentNode.insertBefore(d,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),o.state.loading|=4}}var Ba={$$typeof:A,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function pT(n,o,i,l,d,g,w,C,U){this.tag=1,this.containerInfo=n,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=ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ts(0),this.hiddenUpdates=ts(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function zb(n,o,i,l,d,g,w,C,U,X,oe,ae){return n=new pT(n,o,i,w,U,X,oe,ae,C),o=1,g===!0&&(o|=24),g=In(3,null,null,o),n.current=g,g.stateNode=n,o=sd(),o.refCount++,n.pooledCache=o,o.refCount++,g.memoizedState={element:l,isDehydrated:i,cache:o},cd(g),n}function Db(n){return n?(n=oi,n):oi}function kb(n,o,i,l,d,g){d=Db(d),l.context===null?l.context=d:l.pendingContext=d,l=yo(o),l.payload={element:i},g=g===void 0?null:g,g!==null&&(l.callback=g),i=vo(n,l,o),i!==null&&(An(i,n,o),va(i,n,o))}function Nb(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<o?i:o}}function Ch(n,o){Nb(n,o),(n=n.alternate)&&Nb(n,o)}function Pb(n){if(n.tag===13||n.tag===31){var o=is(n,67108864);o!==null&&An(o,n,67108864),Ch(n,67108864)}}function jb(n){if(n.tag===13||n.tag===31){var o=$n();o=ea(o);var i=is(n,o);i!==null&&An(i,n,o),Ch(n,o)}}var Lc=!0;function mT(n,o,i,l){var d=I.T;I.T=null;var g=B.p;try{B.p=2,Oh(n,o,i,l)}finally{B.p=g,I.T=d}}function gT(n,o,i,l){var d=I.T;I.T=null;var g=B.p;try{B.p=8,Oh(n,o,i,l)}finally{B.p=g,I.T=d}}function Oh(n,o,i,l){if(Lc){var d=Mh(l);if(d===null)ph(n,o,l,Ic,i),Ib(n,l);else if(vT(d,n,o,i,l))l.stopPropagation();else if(Ib(n,l),o&4&&-1<yT.indexOf(n)){for(;d!==null;){var g=Ys(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Zt(g.pendingLanes);if(w!==0){var C=g;for(C.pendingLanes|=2,C.entangledLanes|=2;w;){var U=1<<31-jt(w);C.entanglements[1]|=U,w&=~U}vr(g),(at&6)===0&&(Sc=pe()+500,Na(0))}}break;case 31:case 13:C=is(g,2),C!==null&&An(C,g,2),wc(),Ch(g,2)}if(g=Mh(l),g===null&&ph(n,o,l,Ic,i),g===d)break;d=g}d!==null&&l.stopPropagation()}else ph(n,o,l,null,i)}}function Mh(n){return n=zf(n),Ah(n)}var Ic=null;function Ah(n){if(Ic=null,n=qs(n),n!==null){var o=c(n);if(o===null)n=null;else{var i=o.tag;if(i===13){if(n=u(o),n!==null)return n;n=null}else if(i===31){if(n=f(o),n!==null)return n;n=null}else if(i===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}return Ic=n,null}function Lb(n){switch(n){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(ve()){case Ne:return 2;case Fe:return 8;case Ct:case Dt:return 32;case Ht:return 268435456;default:return 32}default:return 32}}var zh=!1,Mo=null,Ao=null,zo=null,Ha=new Map,Fa=new Map,Do=[],yT="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 Ib(n,o){switch(n){case"focusin":case"focusout":Mo=null;break;case"dragenter":case"dragleave":Ao=null;break;case"mouseover":case"mouseout":zo=null;break;case"pointerover":case"pointerout":Ha.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fa.delete(o.pointerId)}}function $a(n,o,i,l,d,g){return n===null||n.nativeEvent!==g?(n={blockedOn:o,domEventName:i,eventSystemFlags:l,nativeEvent:g,targetContainers:[d]},o!==null&&(o=Ys(o),o!==null&&Pb(o)),n):(n.eventSystemFlags|=l,o=n.targetContainers,d!==null&&o.indexOf(d)===-1&&o.push(d),n)}function vT(n,o,i,l,d){switch(o){case"focusin":return Mo=$a(Mo,n,o,i,l,d),!0;case"dragenter":return Ao=$a(Ao,n,o,i,l,d),!0;case"mouseover":return zo=$a(zo,n,o,i,l,d),!0;case"pointerover":var g=d.pointerId;return Ha.set(g,$a(Ha.get(g)||null,n,o,i,l,d)),!0;case"gotpointercapture":return g=d.pointerId,Fa.set(g,$a(Fa.get(g)||null,n,o,i,l,d)),!0}return!1}function Ub(n){var o=qs(n.target);if(o!==null){var i=c(o);if(i!==null){if(o=i.tag,o===13){if(o=u(i),o!==null){n.blockedOn=o,zl(n.priority,function(){jb(i)});return}}else if(o===31){if(o=f(i),o!==null){n.blockedOn=o,zl(n.priority,function(){jb(i)});return}}else if(o===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Uc(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var i=Mh(n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);Af=l,i.target.dispatchEvent(l),Af=null}else return o=Ys(i),o!==null&&Pb(o),n.blockedOn=i,!1;o.shift()}return!0}function Bb(n,o,i){Uc(n)&&i.delete(o)}function bT(){zh=!1,Mo!==null&&Uc(Mo)&&(Mo=null),Ao!==null&&Uc(Ao)&&(Ao=null),zo!==null&&Uc(zo)&&(zo=null),Ha.forEach(Bb),Fa.forEach(Bb)}function Bc(n,o){n.blockedOn===o&&(n.blockedOn=null,zh||(zh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,bT)))}var Hc=null;function Hb(n){Hc!==n&&(Hc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hc===n&&(Hc=null);for(var o=0;o<n.length;o+=3){var i=n[o],l=n[o+1],d=n[o+2];if(typeof l!="function"){if(Ah(l||i)===null)continue;break}var g=Ys(i);g!==null&&(n.splice(o,3),o-=3,Md(g,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function Oi(n){function o(U){return Bc(U,n)}Mo!==null&&Bc(Mo,n),Ao!==null&&Bc(Ao,n),zo!==null&&Bc(zo,n),Ha.forEach(o),Fa.forEach(o);for(var i=0;i<Do.length;i++){var l=Do[i];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Do.length&&(i=Do[0],i.blockedOn===null);)Ub(i),i.blockedOn===null&&Do.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],g=i[l+1],w=d[En]||null;if(typeof g=="function")w||Hb(i);else if(w){var C=null;if(g&&g.hasAttribute("formAction")){if(d=g,w=g[En]||null)C=w.formAction;else if(Ah(d)!==null)continue}else C=w.action;typeof C=="function"?i[l+1]=C:(i.splice(l,3),l-=3),Hb(i)}}}function Fb(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(w){return d=w})},focusReset:"manual",scroll:"manual"})}function o(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),d!==null&&(d(),d=null)}}}function Dh(n){this._internalRoot=n}Fc.prototype.render=Dh.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(s(409));var i=o.current,l=$n();kb(i,l,n,o,null,null)},Fc.prototype.unmount=Dh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;kb(n.current,2,null,n,null,null),wc(),o[Vs]=null}};function Fc(n){this._internalRoot=n}Fc.prototype.unstable_scheduleHydration=function(n){if(n){var o=Al();n={blockedOn:null,target:n,priority:o};for(var i=0;i<Do.length&&o!==0&&o<Do[i].priority;i++);Do.splice(i,0,n),i===0&&Ub(n)}};var $b=t.version;if($b!=="19.2.6")throw Error(s(527,$b,"19.2.6"));B.findDOMNode=function(n){var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=h(o),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var ST={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$c.isDisabled&&$c.supportsFiber)try{lt=$c.inject(ST),xt=$c}catch{}}return Va.createRoot=function(n,o){if(!a(n))throw Error(s(299));var i=!1,l="",d=Qy,g=Xy,w=Jy;return o!=null&&(o.unstable_strictMode===!0&&(i=!0),o.identifierPrefix!==void 0&&(l=o.identifierPrefix),o.onUncaughtError!==void 0&&(d=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(w=o.onRecoverableError)),o=zb(n,1,!1,null,null,i,l,null,d,g,w,Fb),n[Vs]=o.current,hh(n),new Dh(o)},Va.hydrateRoot=function(n,o,i){if(!a(n))throw Error(s(299));var l=!1,d="",g=Qy,w=Xy,C=Jy,U=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(w=i.onCaughtError),i.onRecoverableError!==void 0&&(C=i.onRecoverableError),i.formState!==void 0&&(U=i.formState)),o=zb(n,1,!0,o,i??null,l,d,U,g,w,C,Fb),o.context=Db(null),i=o.current,l=$n(),l=ea(l),d=yo(l),d.callback=null,vo(i,d,l),i=l,o.current.lanes=i,zr(o,i),vr(o),n[Vs]=o.current,hh(n),new Fc(o)},Va.version="19.2.6",Va}var Wb;function zT(){if(Wb)return Ph.exports;Wb=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(),Ph.exports=AT(),Ph.exports}var DT=zT(),kT="__TSS_CONTEXT",vp=Symbol.for("TSS_SERVER_FUNCTION"),NT="application/x-tss-framed",Xr={JSON:0,CHUNK:1,END:2,ERROR:3},PT=/;\s*v=(\d+)/;function jT(e){const t=e.match(PT);return t?parseInt(t[1],10):void 0}function LT(e){const t=jT(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var d1=()=>window.__TSS_START_OPTIONS__;const h1=!1;function ol(e){return e[e.length-1]}function IT(e){return typeof e=="function"}function Lo(e,t){return IT(e)?e(t):e}const p1=Object.prototype.hasOwnProperty,e0=Object.prototype.propertyIsEnumerable;function m1(e){for(const t in e)if(p1.call(e,t))return!0;return!1}const UT=()=>Object.create(null),bs=(e,t)=>Io(e,t,UT);function Io(e,t,r=()=>({}),s=0){if(e===t)return e;if(s>500)return t;const a=t,c=r0(e)&&r0(a);if(!c&&!(Hi(e)&&Hi(a)))return a;const u=c?e:t0(e);if(!u)return a;const f=c?a:t0(a);if(!f)return a;const p=u.length,h=f.length,m=c?new Array(h):r();let y=0;for(let v=0;v<h;v++){const b=c?v:f[v],S=e[b],E=a[b];if(S===E){m[b]=S,(c?v<p:p1.call(e,b))&&y++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){m[b]=E;continue}const x=Io(S,E,r,s+1);m[b]=x,x===S&&y++}return p===h&&y===p?e:m}function t0(e){const t=Object.getOwnPropertyNames(e);for(const a of t)if(!e0.call(e,a))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const s=t;for(const a of r){if(!e0.call(e,a))return!1;s.push(a)}return s}function Hi(e){if(!n0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!n0(r)||!r.hasOwnProperty("isPrototypeOf"))}function n0(e){return Object.prototype.toString.call(e)==="[object Object]"}function r0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zn(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let s=0,a=e.length;s<a;s++)if(!zn(e[s],t[s],r))return!1;return!0}if(Hi(e)&&Hi(t)){const s=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!s||t[u]!==void 0)&&!zn(e[u],t[u],r))return!1;return!0}let a=0;if(!s)a=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&a++;let c=0;for(const u in t)if((!s||t[u]!==void 0)&&(c++,c>a||!zn(e[u],t[u],r)))return!1;return a===c}return!1}function Os(e){let t,r;const s=new Promise((a,c)=>{t=a,r=c});return s.status="pending",s.resolve=a=>{s.status="resolved",s.value=a,t(a),e?.(a)},s.reject=a=>{s.status="rejected",r(a)},s}function BT(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function sl(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function HT(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function o0(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return HT(t)}const FT=["http:","https:","mailto:","tel:"];function Ru(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}const $T={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},ZT=/[&><\u2028\u2029]/g;function VT(e){return e.replace(ZT,t=>$T[t])}function qa(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,s="",a;for(;(a=t.exec(e))!==null;)s+=o0(e.slice(r,a.index))+a[0],r=t.lastIndex;s=s+o0(r?e.slice(r):e);let c=!1;return s.startsWith("//")&&(c=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:c}}function qT(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function YT(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function kn(){throw new Error("Invariant failed")}function il(e){const t=new Map;let r,s;const a=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,s&&(s.next=c,c.prev=s)):(c.next.prev=void 0,r=c.next,c.next=void 0,s&&(c.prev=s,s.next=c)),s=c)};return{get(c){const u=t.get(c);if(u)return a(u),u.value},set(c,u){if(t.size>=e&&r){const p=r;t.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===s&&(s=void 0)}const f=t.get(c);if(f)f.value=u,a(f);else{const p={key:c,value:u,prev:s};s&&(s.next=p),s=p,r||(r=p),t.set(c,p)}},clear(){t.clear(),r=void 0,s=void 0}}}const Uo=4,g1=5;function GT(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function y1(e,t,r=new Uint16Array(6)){const s=e.indexOf("/",t),a=s===-1?e.length:s,c=e.substring(t,a);if(!c||!c.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=a,r[4]=a,r[5]=a,r;if(c==="$"){const f=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=f,r[4]=f,r[5]=f,r}if(c.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=a,r[4]=a,r[5]=a,r;const u=GT(c);if(u){const[f,p]=u,h=c.charCodeAt(f+1);if(h===45){if(f+2<c.length&&c.charCodeAt(f+2)===36){const m=f+3,y=p;if(m<y)return r[0]=3,r[1]=t+f,r[2]=t+m,r[3]=t+y,r[4]=t+p+1,r[5]=a,r}}else if(h===36){const m=f+1,y=f+2;return y===p?(r[0]=2,r[1]=t+f,r[2]=t+m,r[3]=t+y,r[4]=t+p+1,r[5]=e.length,r):(r[0]=1,r[1]=t+f,r[2]=t+y,r[3]=t+p,r[4]=t+p+1,r[5]=a,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=a,r[4]=a,r[5]=a,r}function Ku(e,t,r,s,a,c,u){u?.(r);let f=s;{const p=r.fullPath??r.from,h=p.length,m=r.options?.caseSensitive??e,y=r.options?.params?.parse??r.options?.parseParams;for(;f<h;){const b=y1(p,f,t);let S;const E=f,x=b[5];switch(f=x+1,c++,b[0]){case 0:{const R=p.substring(b[2],b[3]);if(m){const O=a.static?.get(R);if(O)S=O;else{a.static??=new Map;const A=xs(r.fullPath??r.from);A.parent=a,A.depth=c,S=A,a.static.set(R,A)}}else{const O=R.toLowerCase(),A=a.staticInsensitive?.get(O);if(A)S=A;else{a.staticInsensitive??=new Map;const M=xs(r.fullPath??r.from);M.parent=a,M.depth=c,S=M,a.staticInsensitive.set(O,M)}}break}case 1:{const R=p.substring(E,b[1]),O=p.substring(b[4],x),A=m&&!!(R||O),M=R?A?R:R.toLowerCase():void 0,N=O?A?O:O.toLowerCase():void 0,D=!y&&a.dynamic?.find(j=>!j.parse&&j.caseSensitive===A&&j.prefix===M&&j.suffix===N);if(D)S=D;else{const j=Bh(1,r.fullPath??r.from,A,M,N);S=j,j.depth=c,j.parent=a,a.dynamic??=[],a.dynamic.push(j)}break}case 3:{const R=p.substring(E,b[1]),O=p.substring(b[4],x),A=m&&!!(R||O),M=R?A?R:R.toLowerCase():void 0,N=O?A?O:O.toLowerCase():void 0,D=!y&&a.optional?.find(j=>!j.parse&&j.caseSensitive===A&&j.prefix===M&&j.suffix===N);if(D)S=D;else{const j=Bh(3,r.fullPath??r.from,A,M,N);S=j,j.parent=a,j.depth=c,a.optional??=[],a.optional.push(j)}break}case 2:{const R=p.substring(E,b[1]),O=p.substring(b[4],x),A=m&&!!(R||O),M=R?A?R:R.toLowerCase():void 0,N=O?A?O:O.toLowerCase():void 0,D=Bh(2,r.fullPath??r.from,A,M,N);S=D,D.parent=a,D.depth=c,a.wildcard??=[],a.wildcard.push(D)}}a=S}if(y&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const b=xs(r.fullPath??r.from);b.kind=g1,b.parent=a,c++,b.depth=c,a.pathless??=[],a.pathless.push(b),a=b}const v=(r.path||!r.children)&&!r.isRoot;if(v&&p.endsWith("/")){const b=xs(r.fullPath??r.from);b.kind=Uo,b.parent=a,c++,b.depth=c,a.index=b,a=b}a.parse=y??null,v&&!a.route&&(a.route=r,a.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Ku(e,t,p,f,a,c,u)}function Uh(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Po(e){if(e.pathless)for(const t of e.pathless)Po(t);if(e.static)for(const t of e.static.values())Po(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Po(t);if(e.dynamic?.length){e.dynamic.sort(Uh);for(const t of e.dynamic)Po(t)}if(e.optional?.length){e.optional.sort(Uh);for(const t of e.optional)Po(t)}if(e.wildcard?.length){e.wildcard.sort(Uh);for(const t of e.wildcard)Po(t)}}function xs(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function Bh(e,t,r,s,a){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,caseSensitive:r,prefix:s,suffix:a}}function KT(e,t){const r=xs("/"),s=new Uint16Array(6);for(const a of e)Ku(!1,s,a,1,r,0);Po(r),t.masksTree=r,t.flatCache=il(1e3)}function QT(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const s=Qp(e,t.masksTree);return t.flatCache.set(e,s),s}function XT(e,t,r,s,a){e||="/",s||="/";const c=t?`case\0${e}`:e;let u=a.singleCache.get(c);return u||(u=xs("/"),Ku(t,new Uint16Array(6),{from:e},1,u,0),a.singleCache.set(c,u)),Qp(s,u,r)}function JT(e,t,r=!1){const s=r?e:`nofuzz\0${e}`,a=t.matchCache.get(s);if(a!==void 0)return a;e||="/";let c;try{c=Qp(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=b1(c.route)),t.matchCache.set(s,c),c}function WT(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function eC(e,t=!1,r){const s=xs(e.fullPath),a=new Uint16Array(6),c={},u={};let f=0;return Ku(t,a,e,1,s,0,p=>{if(r?.(p,f),p.id in c&&kn(),c[p.id]=p,f!==0&&p.path){const h=WT(p.fullPath);(!u[h]||p.fullPath.endsWith("/"))&&(u[h]=p)}f++}),Po(s),{processedTree:{segmentTree:s,singleCache:il(1e3),matchCache:il(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function Qp(e,t,r=!1){const s=e.split("/"),a=nC(e,s,t,r);if(!a)return null;const[c]=v1(e,s,a);return{route:a.node.route,rawParams:c}}function v1(e,t,r){const s=tC(r.node);let a=null;const c=Object.create(null);let u=r.extract?.part??0,f=r.extract?.node??0,p=r.extract?.path??0,h=r.extract?.segment??0;for(;f<s.length;u++,f++,p++,h++){const m=s[f];if(m.kind===Uo)break;if(m.kind===g1){h--,u--,p--;continue}const y=t[u],v=p;if(y&&(p+=y.length),m.kind===1){a??=r.node.fullPath.split("/");const b=a[h],S=m.prefix?.length??0;if(b.charCodeAt(S)===123){const E=m.suffix?.length??0,x=b.substring(S+2,b.length-E-1),R=y.substring(S,y.length-E);c[x]=decodeURIComponent(R)}else{const E=b.substring(1);c[E]=decodeURIComponent(y)}}else if(m.kind===3){if(r.skipped&1<<f){u--,p=v-1;continue}a??=r.node.fullPath.split("/");const b=a[h],S=m.prefix?.length??0,E=m.suffix?.length??0,x=b.substring(S+3,b.length-E-1),R=m.suffix||m.prefix?y.substring(S,y.length-E):y;R&&(c[x]=decodeURIComponent(R))}else if(m.kind===2){const b=m,S=e.substring(v+(b.prefix?.length??0),e.length-(b.suffix?.length??0)),E=decodeURIComponent(S);c["*"]=E,c._splat=E;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:f,path:p,segment:h}]}function b1(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function tC(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function nC(e,t,r,s){if(e==="/"&&r.index)return{node:r.index,skipped:0};const a=!ol(t),c=a&&e!=="/",u=t.length-(a?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,h=null;for(;f.length;){const m=f.pop(),{node:y,index:v,skipped:b,depth:S,statics:E,dynamics:x,optionals:R}=m;let{extract:O,rawParams:A}=m;if(y.kind===2&&y.route&&!Vc(h,m))continue;if(y.parse){if(!s0(e,t,m))continue;A=m.rawParams,O=m.extract}s&&y.route&&y.kind!==Uo&&Vc(p,m)&&(p=m);const M=v===u;if(M&&(y.route&&(!c||y.kind===Uo||y.kind===2)&&Vc(h,m)&&(h=m),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const N=M?void 0:t[v];let D;if(M&&y.index){const j={node:y.index,index:v,skipped:b,depth:S+1,statics:E,dynamics:x,optionals:R,extract:O,rawParams:A};let L=!0;if(y.index.parse&&(s0(e,t,j)||(L=!1)),L){if(!x&&!R&&!b&&rC(E,u))return j;Vc(h,j)&&(h=j)}}if(y.wildcard)for(let j=y.wildcard.length-1;j>=0;j--){const L=y.wildcard[j],{prefix:H,suffix:Y}=L;if(!(H&&(M||!(L.caseSensitive?N:D??=N.toLowerCase()).startsWith(H)))){if(Y){if(M)continue;const W=t.slice(v).join("/").slice(-Y.length);if((L.caseSensitive?W:W.toLowerCase())!==Y)continue}f.push({node:L,index:u,skipped:b,depth:S+1,statics:E,dynamics:x,optionals:R,extract:O,rawParams:A})}}if(y.optional){const j=b|1<<S,L=S+1;for(let H=y.optional.length-1;H>=0;H--){const Y=y.optional[H];f.push({node:Y,index:v,skipped:j,depth:L,statics:E,dynamics:x,optionals:R,extract:O,rawParams:A})}if(!M)for(let H=y.optional.length-1;H>=0;H--){const Y=y.optional[H],{prefix:W,suffix:$}=Y;if(W||$){const K=Y.caseSensitive?N:D??=N.toLowerCase();if(W&&!K.startsWith(W)||$&&!K.endsWith($))continue}f.push({node:Y,index:v+1,skipped:b,depth:L,statics:E,dynamics:x,optionals:R+Zc(u,v),extract:O,rawParams:A})}}if(!M&&y.dynamic&&N)for(let j=y.dynamic.length-1;j>=0;j--){const L=y.dynamic[j],{prefix:H,suffix:Y}=L;if(H||Y){const W=L.caseSensitive?N:D??=N.toLowerCase();if(H&&!W.startsWith(H)||Y&&!W.endsWith(Y))continue}f.push({node:L,index:v+1,skipped:b,depth:S+1,statics:E,dynamics:x+Zc(u,v),optionals:R,extract:O,rawParams:A})}if(!M&&y.staticInsensitive){const j=y.staticInsensitive.get(D??=N.toLowerCase());j&&f.push({node:j,index:v+1,skipped:b,depth:S+1,statics:E+Zc(u,v),dynamics:x,optionals:R,extract:O,rawParams:A})}if(!M&&y.static){const j=y.static.get(N);j&&f.push({node:j,index:v+1,skipped:b,depth:S+1,statics:E+Zc(u,v),dynamics:x,optionals:R,extract:O,rawParams:A})}if(y.pathless){const j=S+1;for(let L=y.pathless.length-1;L>=0;L--){const H=y.pathless[L];f.push({node:H,index:v,skipped:b,depth:j,statics:E,dynamics:x,optionals:R,extract:O,rawParams:A})}}}if(h)return h;if(s&&p){let m=p.index;for(let v=0;v<p.index;v++)m+=t[v].length;const y=m===e.length?"/":e.slice(m);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(y),p}return null}function Zc(e,t){return 2**(e-t-1)}function rC(e,t){return e===2**(t-1)-1}function s0(e,t,r){let s,a;try{[s,a]=v1(e,t,r)}catch{return null}if(r.rawParams=s,r.extract=a,!r.node.parse)return!0;try{if(r.node.parse(s)===!1)return null}catch{}return!0}function Vc(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Uo)>(e.node.kind===Uo)||t.node.kind===Uo==(e.node.kind===Uo)&&t.depth>e.depth))):!0}function hu(e){return Xp(e.filter(t=>t!==void 0).join("/"))}function Xp(e){return e.replace(/\/{2,}/g,"/")}function S1(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Wr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function x1(e){return Wr(S1(e))}function Eu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function oC(e,t,r){return Eu(e,r)===Eu(t,r)}function sC({base:e,to:t,trailingSlash:r="never",cache:s}){const a=t.startsWith("/"),c=!a&&t===".";let u;if(s){u=a?t:c?e:e+"\0"+t;const h=s.get(u);if(h)return h}let f;if(c)f=e.split("/");else if(a)f=t.split("/");else{for(f=e.split("/");f.length>1&&ol(f)==="";)f.pop();const h=t.split("/");for(let m=0,y=h.length;m<y;m++){const v=h[m];v===""?m?m===y-1&&f.push(v):f=[v]:v===".."?f.pop():v==="."||f.push(v)}}f.length>1&&(ol(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));const p=Xp(f.join("/"))||"/";return u&&s&&s.set(u,p),p}function iC(e){const t=new Map(e.map(a=>[encodeURIComponent(a),a])),r=Array.from(t.keys()).map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(r,"g");return a=>a.replace(s,c=>t.get(c)??c)}function Hh(e,t,r){const s=t[e];return typeof s!="string"?s:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(a=>a0(a,r)).join("/"):a0(s,r)}function i0({path:e,params:t,decoder:r,...s}){let a=!1;const c=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:a};if(!e.includes("$"))return{interpolatedPath:e,usedParams:c,isMissingParams:a};const u=e.length;let f=0,p,h="";for(;f<u;){const m=f;p=y1(e,m,p);const y=p[5];if(f=y+1,m===y)continue;const v=p[0];if(v===0){h+="/"+e.substring(m,y);continue}if(v===2){const b=t._splat;c._splat=b,c["*"]=b;const S=e.substring(m,p[1]),E=e.substring(p[4],y);if(!b){a=!0,(S||E)&&(h+="/"+S+E);continue}const x=Hh("_splat",t,r);h+="/"+S+x+E;continue}if(v===1){const b=e.substring(p[2],p[3]);!a&&!(b in t)&&(a=!0),c[b]=t[b];const S=e.substring(m,p[1]),E=e.substring(p[4],y),x=Hh(b,t,r)??"undefined";h+="/"+S+x+E;continue}if(v===3){const b=e.substring(p[2],p[3]),S=t[b];if(S==null)continue;c[b]=S;const E=e.substring(m,p[1]),x=e.substring(p[4],y),R=Hh(b,t,r)??"";h+="/"+E+R+x;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:c,interpolatedPath:h||"/",isMissingParams:a}}function a0(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function en(e){return e?.isNotFound===!0}function aC(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const lC="tsr-scroll-restoration-v1_3";function cC(){const e=aC();if(!e)return null;let t={};try{const s=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Hi(s)&&(t=s)}catch{}return{get state(){return t},set:s=>{t=Lo(s,t)||t},persist:()=>{try{e.setItem(lC,JSON.stringify(t))}catch{}}}}const l0=cC(),uC=e=>e.state.__TSR_key||e.href;function fC(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}let qc=!1;const Ya="window",c0="data-scroll-restoration-id";function dC(e,t){if(!l0)return;const r=l0;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,qc=!1;const s=e.options.getScrollRestorationKey||uC,a=new Map;window.history.scrollRestoration="manual";const c=f=>{if(!(qc||!e.isScrollRestoring))if(f.target===document||f.target===window)a.set(Ya,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=f.target;a.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},u=f=>{if(!e.isScrollRestoring||!f||a.size===0||!r)return;const p=r.state[f]||={};for(const[h,m]of a){let y;if(h===Ya)y=Ya;else if(h.isConnected){const v=h.getAttribute(c0);y=v?`[${c0}="${v}"]`:fC(h)}y&&(p[y]=m)}};document.addEventListener("scroll",c,!0),e.subscribe("onBeforeLoad",f=>{u(f.fromLocation?s(f.fromLocation):void 0),a.clear()}),window.addEventListener("pagehide",()=>{u(s(e.stores.resolvedLocation.get()??e.stores.location.get())),r.persist()}),e.subscribe("onRendered",f=>{const p=s(f.toLocation),h=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors;if(a.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){qc=!0;try{const y=e.isScrollRestoring?r.state[p]:void 0;let v=!1;if(y)for(const b in y){const S=y[b];if(!Hi(S))continue;const{scrollX:E,scrollY:x}=S;if(!(!Number.isFinite(E)||!Number.isFinite(x))){if(b===Ya)window.scrollTo({top:x,left:E,behavior:h}),v=!0;else if(b){let R;try{R=document.querySelector(b)}catch{continue}R&&(R.scrollLeft=E,R.scrollTop=x,v=!0)}}}if(!v){const b=e.history.location.hash.slice(1);if(b){const S=window.history.state?.__hashScrollIntoViewOptions??!0;if(S){const E=document.getElementById(b);E&&E.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:h};if(window.scrollTo(S),m)for(const E of m){if(E===Ya)continue;const x=typeof E=="function"?E():document.querySelector(E);x&&x.scrollTo(S)}}}}finally{qc=!1}e.isScrollRestoring&&r.set(y=>(y[p]||={},y))}})}function w1(e,t=String){const r=new URLSearchParams;for(const s in e){const a=e[s];a!==void 0&&r.set(s,t(a))}return r.toString()}function Fh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function hC(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[s,a]of t.entries()){const c=r[s];c==null?r[s]=Fh(a):Array.isArray(c)?c.push(Fh(a)):r[s]=[c,Fh(a)]}return r}const pC=gC(JSON.parse),mC=yC(JSON.stringify,JSON.parse);function gC(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=hC(t);for(const s in r){const a=r[s];if(typeof a=="string")try{r[s]=e(a)}catch{}}return r}}function yC(e,t){const r=typeof t=="function";function s(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(r&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const c=w1(a,s);return c?`?${c}`:""}}const Ts="__root__";function R1(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function Dn(e){return e instanceof Response&&!!e.options}function vC(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return R1(e)}function bC(e){return{input:({url:t})=>{for(const r of e)t=bp(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=E1(e[r],t);return t}}}function SC(e){const t=x1(e.basepath),r=`/${t}`,s=`${r}/`,a=e.caseSensitive?r:r.toLowerCase(),c=e.caseSensitive?s:s.toLowerCase();return{input:({url:u})=>{const f=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return f===a?u.pathname="/":f.startsWith(c)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=hu(["/",t,u.pathname]),u)}}function bp(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function E1(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function xC(e,t){const{createMutableStore:r,createReadonlyStore:s,batch:a,init:c}=t,u=new Map,f=new Map,p=new Map,h=r(e.status),m=r(e.loadedAt),y=r(e.isLoading),v=r(e.isTransitioning),b=r(e.location),S=r(e.resolvedLocation),E=r(e.statusCode),x=r(e.redirect),R=r([]),O=r([]),A=r([]),M=s(()=>$h(u,R.get())),N=s(()=>$h(f,O.get())),D=s(()=>$h(p,A.get())),j=s(()=>R.get()[0]),L=s(()=>R.get().some(B=>u.get(B)?.get().status==="pending")),H=s(()=>({locationHref:b.get().href,resolvedLocationHref:S.get()?.href,status:h.get()})),Y=s(()=>({status:h.get(),loadedAt:m.get(),isLoading:y.get(),isTransitioning:v.get(),matches:M.get(),location:b.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:x.get()})),W=il(64);function $(B){let ee=W.get(B);return ee||(ee=s(()=>{const ne=R.get();for(const le of ne){const z=u.get(le);if(z&&z.routeId===B)return z.get()}}),W.set(B,ee)),ee}const K={status:h,loadedAt:m,isLoading:y,isTransitioning:v,location:b,resolvedLocation:S,statusCode:E,redirect:x,matchesId:R,pendingIds:O,cachedIds:A,matches:M,pendingMatches:N,cachedMatches:D,firstId:j,hasPending:L,matchRouteDeps:H,matchStores:u,pendingMatchStores:f,cachedMatchStores:p,__store:Y,getRouteMatchStore:$,setMatches:q,setPending:Z,setCached:I};q(e.matches),c?.(K);function q(B){Zh(B,u,R,r,a)}function Z(B){Zh(B,f,O,r,a)}function I(B){Zh(B,p,A,r,a)}return K}function $h(e,t){const r=[];for(const s of t){const a=e.get(s);a&&r.push(a.get())}return r}function Zh(e,t,r,s,a){const c=e.map(f=>f.id),u=new Set(c);a(()=>{for(const f of t.keys())u.has(f)||t.delete(f);for(const f of e){const p=t.get(f.id);if(!p){const h=s(f);h.routeId=f.routeId,t.set(f.id,h);continue}p.routeId=f.routeId,p.get()!==f&&p.set(f)}YT(r.get(),c)||r.set(c)})}const Sp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},wC=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Qu=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Cs=(e,t,r=!0)=>{const s={...e.router.options.context??{}},a=r?t:t-1;for(let c=0;c<=a;c++){const u=e.matches[c];if(!u)continue;const f=e.router.getMatch(u.id);f&&Object.assign(s,f.__routeContext,f.__beforeLoadContext)}return s},u0=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,s=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),a=s>=0?s:0;let c=r?e.matches.findIndex(u=>u.routeId===r):e.firstBadMatchIndex??e.matches.length-1;c<0&&(c=a);for(let u=c;u>=0;u--){const f=e.matches[u];if(e.router.looseRoutesById[f.routeId].options.notFoundComponent)return u}return r?c:a},Bo=(e,t,r)=>{if(!(!Dn(r)&&!en(r)))throw Dn(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,s=>({...s,status:Dn(r)?"redirected":en(r)?"notFound":s.status==="pending"?"success":s.status,context:Cs(e,t.index),isFetching:!1,error:r})),en(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Dn(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},_1=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},f0=(e,t,r)=>{const s=Cs(e,r);e.updateMatch(t,a=>({...a,context:s}))},Ga=(e,t,r,s)=>{const{id:a,routeId:c}=e.matches[t],u=e.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=s,e.firstBadMatchIndex??=t,Bo(e,e.router.getMatch(a),r);try{u.options.onError?.(r)}catch(f){r=f,Bo(e,e.router.getMatch(a),r)}e.updateMatch(a,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Dn(r)&&!en(r)&&(e.serialError??=r)},T1=(e,t,r,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;const a=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Qu(e,t)&&(r.options.loader||r.options.beforeLoad||O1(r))&&typeof a=="number"&&a!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const c=setTimeout(()=>{Sp(e)},a);s._nonReactive.pendingTimeout=c}},RC=(e,t,r)=>{const s=e.router.getMatch(t);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;T1(e,t,r,s);const a=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&Bo(e,c,c.error)};return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(a):a()},EC=(e,t,r,s)=>{const a=e.router.getMatch(t);let c=a._nonReactive.loadPromise;a._nonReactive.loadPromise=Os(()=>{c?.resolve(),c=void 0});const{paramsError:u,searchError:f}=a;u&&Ga(e,r,u,"PARSE_PARAMS"),f&&Ga(e,r,f,"VALIDATE_SEARCH"),T1(e,t,s,a);const p=new AbortController;let h=!1;const m=()=>{h||(h=!0,e.updateMatch(t,M=>({...M,isFetching:"beforeLoad",fetchCount:M.fetchCount+1,abortController:p})))},y=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,M=>({...M,isFetching:!1}))};if(!s.options.beforeLoad){e.router.batch(()=>{m(),y()});return}a._nonReactive.beforeLoadPromise=Os();const v={...Cs(e,r,!1),...a.__routeContext},{search:b,params:S,cause:E}=a,x=Qu(e,t),R={search:b,abortController:p,params:S,preload:x,context:v,location:e.location,navigate:M=>e.router.navigate({...M,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":E,matches:e.matches,routeId:s.id,...e.router.options.additionalContext},O=M=>{if(M===void 0){e.router.batch(()=>{m(),y()});return}(Dn(M)||en(M))&&(m(),Ga(e,r,M,"BEFORE_LOAD")),e.router.batch(()=>{m(),e.updateMatch(t,N=>({...N,__beforeLoadContext:M})),y()})};let A;try{if(A=s.options.beforeLoad(R),sl(A))return m(),A.catch(M=>{Ga(e,r,M,"BEFORE_LOAD")}).then(O)}catch(M){m(),Ga(e,r,M,"BEFORE_LOAD")}O(A)},_C=(e,t)=>{const{id:r,routeId:s}=e.matches[t],a=e.router.looseRoutesById[s],c=()=>f(),u=()=>EC(e,r,t,a),f=()=>{if(_1(e,r))return;const p=RC(e,r,a);return sl(p)?p.then(u):u()};return c()},TC=(e,t,r)=>{const s=e.router.getMatch(t);if(!s||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const a={ssr:e.router.options.ssr,matches:e.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([r.options.head?.(a),r.options.scripts?.(a),r.options.headers?.(a)]).then(([c,u,f])=>({meta:c?.meta,links:c?.links,headScripts:c?.scripts,headers:f,scripts:u,styles:c?.styles}))},C1=(e,t,r,s,a)=>{const c=t[s-1],{params:u,loaderDeps:f,abortController:p,cause:h}=e.router.getMatch(r),m=Cs(e,s),y=Qu(e,r);return{params:u,deps:f,preload:!!y,parentMatchPromise:c,abortController:p,context:m,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),cause:y?"preload":h,route:a,...e.router.options.additionalContext}},d0=async(e,t,r,s,a)=>{try{const c=e.router.getMatch(r);try{(!(h1??e.router.isServer)||c.ssr===!0)&&al(a);const u=a.options.loader,f=typeof u=="function"?u:u?.handler,p=f?.(C1(e,t,r,s,a)),h=!!f&&sl(p);if((h||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(r,y=>({...y,isFetching:"loader"})),f){const y=h?await p:p;Bo(e,e.router.getMatch(r),y),y!==void 0&&e.updateMatch(r,v=>({...v,loaderData:y}))}a._lazyPromise&&await a._lazyPromise;const m=c._nonReactive.minPendingPromise;m&&await m,a._componentsPromise&&await a._componentsPromise,e.updateMatch(r,y=>({...y,error:void 0,context:Cs(e,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let f=u;if(f?.name==="AbortError"){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,h=>({...h,status:h.status==="pending"?"success":h.status,isFetching:!1,context:Cs(e,s)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,en(u)&&await a.options.notFoundComponent?.preload?.(),Bo(e,e.router.getMatch(r),u);try{a.options.onError?.(u)}catch(h){f=h,Bo(e,e.router.getMatch(r),h)}!Dn(f)&&!en(f)&&await al(a,["errorComponent"]),e.updateMatch(r,h=>({...h,error:f,context:Cs(e,s),status:"error",isFetching:!1}))}}catch(c){const u=e.router.getMatch(r);u&&(u._nonReactive.loaderPromise=void 0),Bo(e,u,c)}},CC=async(e,t,r)=>{async function s(b,S,E,x,R){const O=Date.now()-S.updatedAt,A=b?R.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:R.options.staleTime??e.router.options.defaultStaleTime??0,M=R.options.shouldReload,N=typeof M=="function"?M(C1(e,t,a,r,R)):M,{status:D,invalid:j}=x,L=O>=A&&(!!e.forceStaleReload||x.cause==="enter"||E!==void 0&&E!==x.id);u=D==="success"&&(j||(N??L)),b&&R.options.preload===!1||(u&&!e.sync&&m?(f=!0,(async()=>{try{await d0(e,t,a,r,R);const H=e.router.getMatch(a);H._nonReactive.loaderPromise?.resolve(),H._nonReactive.loadPromise?.resolve(),H._nonReactive.loaderPromise=void 0,H._nonReactive.loadPromise=void 0}catch(H){Dn(H)&&await e.router.navigate(H.options)}})()):D!=="success"||u?await d0(e,t,a,r,R):f0(e,a,r))}const{id:a,routeId:c}=e.matches[r];let u=!1,f=!1;const p=e.router.looseRoutesById[c],h=p.options.loader,m=((typeof h=="function"?void 0:h?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(_1(e,a)){if(!e.router.getMatch(a))return e.matches[r];f0(e,a,r)}else{const b=e.router.getMatch(a),S=e.router.stores.matchesId.get()[r],E=(S&&e.router.stores.matchStores.get(S)||null)?.routeId===c?S:e.router.stores.matches.get().find(R=>R.routeId===c)?.id,x=Qu(e,a);if(b._nonReactive.loaderPromise){if(b.status==="success"&&!e.sync&&!b.preload&&m)return b;await b._nonReactive.loaderPromise;const R=e.router.getMatch(a),O=R._nonReactive.error||R.error;O&&Bo(e,R,O),R.status==="pending"&&await s(x,b,E,R,p)}else{const R=x&&!e.router.stores.matchStores.has(a),O=e.router.getMatch(a);O._nonReactive.loaderPromise=Os(),R!==O.preload&&e.updateMatch(a,A=>({...A,preload:R})),await s(x,b,E,O,p)}}const y=e.router.getMatch(a);f||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,f||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const v=f?y.isFetching:!1;return v!==y.isFetching||y.invalid!==!1?(e.updateMatch(a,b=>({...b,isFetching:v,invalid:!1})),e.router.getMatch(a)):y};async function h0(e){const t=e,r=[];wC(t.router)&&Sp(t);let s;for(let v=0;v<t.matches.length;v++){try{const b=_C(t,v);sl(b)&&await b}catch(b){if(Dn(b))throw b;if(en(b))s=b;else if(!t.preload)throw b;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const a=t.firstBadMatchIndex??t.matches.length,c=s&&!t.preload?u0(t,s):void 0,u=s&&t.preload?0:c!==void 0?Math.min(c+1,a):a;let f,p;for(let v=0;v<u;v++)r.push(CC(t,r,v));try{await Promise.all(r)}catch{const v=await Promise.allSettled(r);for(const b of v){if(b.status!=="rejected")continue;const S=b.reason;if(Dn(S))throw S;en(S)?f??=S:p??=S}if(p!==void 0)throw p}const h=f??(s&&!t.preload?s:void 0);let m=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!h&&s&&t.preload)return t.matches;if(h){const v=u0(t,h);v===void 0&&kn();const b=t.matches[v],S=t.router.looseRoutesById[b.routeId],E=t.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&E&&(S.options.notFoundComponent=E),h.routeId=b.routeId;const x=b.routeId===t.router.routeTree.id;t.updateMatch(b.id,R=>({...R,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:h},isFetching:!1})),m=v,await al(S,["notFoundComponent"])}else if(!t.preload){const v=t.matches[0];v.globalNotFound||t.router.getMatch(v.id)?.globalNotFound&&t.updateMatch(v.id,b=>({...b,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const v=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await al(v,["errorComponent"])}for(let v=0;v<=m;v++){const{id:b,routeId:S}=t.matches[v],E=t.router.looseRoutesById[S];try{const x=TC(t,b,E);if(x){const R=await x;t.updateMatch(b,O=>({...O,...R}))}}catch(x){console.error(`Error executing head for route ${S}:`,x)}}const y=Sp(t);if(sl(y)&&await y,h)throw h;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function p0(e,t){const r=t.map(s=>e.options[s]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function al(e,t=pu){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(s=>{const{id:a,...c}=s.options;Object.assign(e.options,c),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===pu?(()=>{if(e._componentsPromise===void 0){const s=p0(e,pu);s?e._componentsPromise=s.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():p0(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function O1(e){for(const t of pu)if(e.options[t]?.preload)return!0;return!1}const pu=["component","errorComponent","pendingComponent","notFoundComponent"];var Fo="__TSR_index",m0="popstate",g0="beforeunload";function OC(e){let t=e.getLocation();const r=new Set,s=u=>{t=e.getLocation(),r.forEach(f=>f({location:t,action:u}))},a=u=>{e.notifyOnIndexChange??!0?s(u):t=e.getLocation()},c=async({task:u,navigateOpts:f,...p})=>{if(f?.ignoreBlocker??!1){u();return}const h=e.getBlockers?.()??[],m=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&h.length&&m)for(const y of h){const v=_u(p.path,p.state);if(await y.blockerFn({currentLocation:t,nextLocation:v,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,f,p)=>{const h=t.state[Fo];f=y0(h+1,f),c({task:()=>{e.pushState(u,f),s({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:f})},replace:(u,f,p)=>{const h=t.state[Fo];f=y0(h,f),c({task:()=>{e.replaceState(u,f),s({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:f})},go:(u,f)=>{c({task:()=>{e.go(u),a({type:"GO",index:u})},navigateOpts:f,type:"GO"})},back:u=>{c({task:()=>{e.back(u?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{e.forward(u?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[Fo]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s}}function y0(e,t){t||(t={});const r=Jp();return{...t,key:r,__TSR_key:r,[Fo]:e}}function MC(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,s=t.history.replaceState;let a=[];const c=()=>a,u=L=>a=L,f=(L=>L),p=(()=>_u(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const L=Jp();t.history.replaceState({[Fo]:0,key:L,__TSR_key:L},"")}let h=p(),m,y=!1,v=!1,b=!1,S=!1;const E=()=>h;let x,R;const O=()=>{x&&(j._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),j._ignoreSubscribers=!1,x=void 0,R=void 0,m=void 0)},A=(L,H,Y)=>{const W=f(H);R||(m=h),h=_u(H,Y),x={href:W,state:Y,isPush:x?.isPush||L==="push"},R||(R=Promise.resolve().then(()=>O()))},M=L=>{h=p(),j.notify({type:L})},N=async()=>{if(v){v=!1;return}const L=p(),H=L.state[Fo]-h.state[Fo],Y=H===1,W=H===-1,$=!Y&&!W||y;y=!1;const K=$?"GO":W?"BACK":"FORWARD",q=$?{type:"GO",index:H}:{type:W?"BACK":"FORWARD"};if(b)b=!1;else{const Z=c();if(typeof document<"u"&&Z.length){for(const I of Z)if(await I.blockerFn({currentLocation:h,nextLocation:L,action:K})){v=!0,t.history.go(1),j.notify(q);return}}}h=p(),j.notify(q)},D=L=>{if(S){S=!1;return}let H=!1;const Y=c();if(typeof document<"u"&&Y.length)for(const W of Y){const $=W.enableBeforeUnload??!0;if($===!0){H=!0;break}if(typeof $=="function"&&$()===!0){H=!0;break}}if(H)return L.preventDefault(),L.returnValue=""},j=OC({getLocation:E,getLength:()=>t.history.length,pushState:(L,H)=>A("push",L,H),replaceState:(L,H)=>A("replace",L,H),back:L=>(L&&(b=!0),S=!0,t.history.back()),forward:L=>{L&&(b=!0),S=!0,t.history.forward()},go:L=>{y=!0,t.history.go(L)},createHref:L=>f(L),flush:O,destroy:()=>{t.history.pushState=r,t.history.replaceState=s,t.removeEventListener(g0,D,{capture:!0}),t.removeEventListener(m0,N)},onBlocked:()=>{m&&h!==m&&(h=m)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(g0,D,{capture:!0}),t.addEventListener(m0,N),t.history.pushState=function(...L){const H=r.apply(t.history,L);return j._ignoreSubscribers||M("PUSH"),H},t.history.replaceState=function(...L){const H=s.apply(t.history,L);return j._ignoreSubscribers||M("REPLACE"),H},j}function AC(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function _u(e,t){const r=AC(e),s=r.indexOf("#"),a=r.indexOf("?"),c=Jp();return{href:r,pathname:r.substring(0,s>0?a>0?Math.min(s,a):s:a>0?a:r.length),hash:s>-1?r.substring(s):"",search:a>-1?r.slice(a,s===-1?void 0:s):"",state:t||{[Fo]:0,key:c,__TSR_key:c}}}function Jp(){return(Math.random()+1).toString(36).substring(7)}function zC(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function ki(e,t){const r=t,s=e;return{fromLocation:r,toLocation:s,pathChanged:r?.pathname!==s.pathname,hrefChanged:r?.href!==s.href,hashChanged:r?.hash!==s.hash}}var DC=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=r=>r(),this.update=r=>{const s=this.options,a=this.basepath??s?.basepath??"/",c=this.basepath===void 0,u=s?.rewrite;if(this.options={...s,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=iC(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=MC()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=il(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=xC(NC(this.latestLocation),m),dC(this)}let f=!1;const p=this.options.basepath??"/",h=this.options.rewrite;if(c||a!==p||u!==h){this.basepath=p;const m=[],y=x1(p);y&&y!=="/"&&m.push(SC({basepath:p})),h&&m.push(h),this.rewrite=m.length===0?void 0:m.length===1?m[0]:bC(m),this.history&&this.updateLatestLocation(),f=!0}f&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=eC(this.routeTree,this.options.caseSensitive,(s,a)=>{s.init({originalIndex:a})});return this.options.routeMasks&&KT(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,s)=>{const a={eventType:r,fn:s};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=r=>{this.subscribers.forEach(s=>{s.eventType===r.type&&s.fn(r)})},this.parseLocation=(r,s)=>{const a=({pathname:p,search:h,hash:m,href:y,state:v})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const R=this.options.parseSearch(h),O=this.options.stringifySearch(R);return{href:p+O+m,publicHref:p+O+m,pathname:qa(p).path,external:!1,searchStr:O,search:bs(s?.search,R),hash:qa(m.slice(1)).path,state:Io(s?.state,v)}}const b=new URL(y,this.origin),S=bp(this.rewrite,b),E=this.options.parseSearch(S.search),x=this.options.stringifySearch(E);return S.search=x,{href:S.href.replace(S.origin,""),publicHref:y,pathname:qa(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:x,search:bs(s?.search,E),hash:qa(S.hash.slice(1)).path,state:Io(s?.state,v)}},c=a(r),{__tempLocation:u,__tempKey:f}=c.state;if(u&&(!f||f===this.tempLocationKey)){const p=a(u);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(r,s)=>sC({base:r,to:s.includes("//")?Xp(s):s,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,s,a)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:s},a):this.matchRoutesInternal(r,s),this.getMatchedRoutes=r=>PC({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const s=this.getMatch(r);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const s=this.stores.matchStores.get(r)?.get();s&&(s.status==="pending"||s.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const s=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(u);c.from;const p=c.unsafeRelative==="path"?u.pathname:c.from??f.fullPath,h=c.to?`${c.to}`:void 0,m=f.search,y=Object.assign(Object.create(null),f.params),v=h?.charCodeAt(0)===47?"/":this.resolvePathWithBase(p,"."),b=h?this.resolvePathWithBase(v,h):v,S=c.params===!1||c.params===null?Object.create(null):(c.params??!0)===!0?y:Object.assign(y,Lo(c.params,y)),E=this.routesByPath[Wr(b)];let x;if(E)x=this.getRouteBranch(E);else if(b.includes("$"))x=[];else{const W=this.getMatchedRoutes(b);x=W.matchedRoutes,this.options.notFoundRoute&&(!W.foundRoute||W.foundRoute.path!=="/"&&W.routeParams["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&m1(S))for(const W of x){const $=W.options.params?.stringify??W.options.stringifyParams;if($)try{Object.assign(S,$(S))}catch{}}const R=r.leaveParams?b:qa(i0({path:b,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=m;if(r._includeValidateSearch&&this.options.search?.strict){const W={};x.forEach($=>{if($.options.validateSearch)try{Object.assign(W,mu($.options.validateSearch,{...W,...O}))}catch{}}),O=W}O=jC({search:O,dest:c,destRoutes:x,_includeValidateSearch:r._includeValidateSearch}),O=bs(m,O);const A=this.options.stringifySearch(O),M=c.hash===!0?u.hash:c.hash?Lo(c.hash,u.hash):void 0,N=M?`#${M}`:"";let D=c.state===!0?u.state:c.state?Lo(c.state,u.state):{};D=Io(u.state,D);const j=`${R}${A}${N}`;let L,H,Y=!1;if(this.rewrite){const W=new URL(j,this.origin),$=E1(this.rewrite,W);L=W.href.replace(W.origin,""),$.origin!==this.origin?(H=$.href,Y=!0):H=$.pathname+$.search+$.hash}else L=qT(j),H=L;return{publicHref:H,href:L,pathname:R,search:O,searchStr:A,state:D,hash:M??"",external:Y,unmaskOnReload:c.unmaskOnReload}},a=(c={},u)=>{const f=s(c);let p=u?s(u):void 0;if(!p){const h=Object.create(null);if(this.options.routeMasks){const m=QT(f.pathname,this.processedTree);if(m){Object.assign(h,m.rawParams);const{from:y,params:v,...b}=m.route,S=v===!1||v===null?Object.create(null):(v??!0)===!0?h:Object.assign(h,Lo(v,h));u={from:r.from,...b,params:S},p=s(u)}}}return p&&(f.maskedLocation=p),f};return r.mask?a(r,{from:r.from,...r.mask}):a(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:s,...a})=>{const c=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const h=zn(a.state,this.latestLocation.state);return p.forEach(m=>{delete a.state[m]}),h},u=Wr(this.latestLocation.href)===Wr(a.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=Os(()=>{f?.resolve(),f=void 0}),u&&c())this.load();else{let{maskedLocation:p,hashScrollIntoView:h,...m}=a;p&&(m={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:s})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:s,hashScrollIntoView:a,viewTransition:c,ignoreBlocker:u,href:f,...p}={})=>{if(f){const y=this.history.location.state.__TSR_index,v=_u(f,{__TSR_index:r?y:y+1}),b=new URL(v.pathname,this.origin);p.to=bp(this.rewrite,b).pathname,p.search=this.options.parseSearch(v.search),p.hash=v.hash.slice(1)}const h=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const m=this.commitLocation({...h,viewTransition:c,replace:r,resetScroll:s,hashScrollIntoView:a,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:r,reloadDocument:s,href:a,publicHref:c,...u})=>{let f=!1;if(a)try{new URL(`${a}`),f=!0}catch{}if(f&&!s&&(s=!0),s){if(r!==void 0||!a){const h=this.buildLocation({to:r,...u});a=a??h.publicHref,c=c??h.publicHref}const p=!f&&c?c:a;if(Ru(p,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const h=this.history.getBlockers?.()??[];for(const m of h)if(m?.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...u,href:a,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),s=this.stores.cachedMatches.get().filter(a=>!r.some(c=>c.id===a.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(s)})},this.load=async r=>{let s,a,c;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(c=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const h=this.latestLocation,m=ki(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await h0({router:this,sync:r?.sync,forceStaleReload:u.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=null,v=null,b=null,S=null;this.batch(()=>{const E=this.stores.pendingMatches.get(),x=E.length,R=this.stores.matches.get();y=x?R.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const O=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&O.add(M.routeId);const A=new Set;for(const M of this.stores.matchStores.values())M.routeId&&A.add(M.routeId);v=x?R.filter(M=>!O.has(M.routeId)):null,b=x?E.filter(M=>!A.has(M.routeId)):null,S=x?E.filter(M=>A.has(M.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(E),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...y.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[E,x]of[[v,"onLeave"],[b,"onEnter"],[S,"onStay"]])if(E)for(const R of E)this.looseRoutesById[R.routeId].options[x]?.(R)})})}})}catch(h){Dn(h)?(s=h,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):en(h)&&(a=h);const m=s?s.status:a?404:this.stores.matches.get().some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(s)})}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let f;this.hasNotFoundMatch()?f=404:this.stores.matches.get().some(p=>p.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.set(f)},this.startViewTransition=r=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),f=typeof s.types=="function"?s.types(ki(c,u)):s.types;if(f===!1){r();return}a={update:r,types:f}}else a=r;document.startViewTransition(a)}else r()},this.updateMatch=(r,s)=>{this.startTransition(()=>{const a=this.stores.pendingMatchStores.get(r);if(a){a.set(s);return}const c=this.stores.matchStores.get(r);if(c){c.set(s);return}const u=this.stores.cachedMatchStores.get(r);if(u){const f=s(u.get());f.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(h=>h!==r)):u.set(f)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const s=a=>r?.filter?.(a)??!0?{...a,invalid:!0,...r?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(s)),this.stores.setCached(this.stores.cachedMatches.get().map(s)),this.stores.setPending(this.stores.pendingMatches.get().map(s))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const s=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const a=r.options._builtLocation??this.buildLocation(r.options),c=this.getParsedLocationHref(a);r.options.href=c,r.headers.set("Location",c)}else if(s)try{const a=new URL(s);if(this.origin&&a.origin===this.origin){const c=a.pathname+a.search+a.hash;r.options.href=c,r.headers.set("Location",c)}}catch{}if(r.options.href&&!r.options._builtLocation&&Ru(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const s=r?.filter;s!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(a=>!s(a))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),s=a=>{const c=this.looseRoutesById[a.routeId];if(!c.options.loader)return!0;const u=(a.preload?c.options.preloadGcTime??this.options.defaultPreloadGcTime:c.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:r-a.updatedAt>=u};this.clearCache({filter:s})},this.loadRouteChunk=al,this.preloadRoute=async r=>{const s=r._builtLocation??this.buildLocation(r);let a=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...c,...this.stores.cachedIds.get()]),f=a.filter(p=>!u.has(p.id));if(f.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...f])}try{return a=await h0({router:this,matches:a,location:s,preload:!0,updateMatch:(p,h)=>{c.has(p)?a=a.map(m=>m.id===p?h(m):m):this.updateMatch(p,h)}}),a}catch(p){if(Dn(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:s});en(p)||console.error(p);return}},this.matchRoute=(r,s)=>{const a={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(a);if(s?.pending&&this.stores.status.get()!=="pending")return!1;const u=(s?.pending===void 0?!this.stores.isLoading.get():s.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),f=XT(c.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,u.pathname,this.processedTree);return!f||r.params&&!zn(f.rawParams,r.params,{partial:!0})?!1:s?.includeSearch??!0?zn(u.search,c.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??mC,parseSearch:e.parseSearch??pC,protocolAllowlist:e.protocolAllowlist??FT}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=b1(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const r=this.getMatchedRoutes(e.pathname),{foundRoute:s,routeParams:a}=r;let{matchedRoutes:c}=r,u=!1;(s?s.path!=="/"&&a["**"]:Wr(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const f=u?IC(this.options.notFoundMode,c):void 0,p=new Array(c.length),h=new Map;for(const m of this.stores.matchStores.values())m.routeId&&h.set(m.routeId,m.get());for(let m=0;m<c.length;m++){const y=c[m],v=p[m-1];let b,S,E;{const $=v?.search??e.search,K=v?._strictSearch??void 0;try{const q=mu(y.options.validateSearch,{...$})??void 0;b={...$,...q},S={...K,...q},E=void 0}catch(q){let Z=q;if(q instanceof Tu||(Z=new Tu(q.message,{cause:q})),t?.throwOnError)throw Z;b=$,S={},E=Z}}const x=y.options.loaderDeps?.({search:b})??"",R=x?JSON.stringify(x):"",{interpolatedPath:O,usedParams:A}=i0({path:y.fullPath,params:a,decoder:this.pathParamsDecoder,server:this.isServer}),M=y.id+O+R,N=this.getMatch(M),D=h.get(y.id),j=N?._strictParams??A;let L;if(!N)try{v0(y,j)}catch($){if(en($)||Dn($)?L=$:L=new kC($.message,{cause:$}),t?.throwOnError)throw L}Object.assign(a,j);const H=D?"stay":"enter";let Y;if(N)Y={...N,cause:H,params:D?.params??a,_strictParams:j,search:bs(D?D.search:N.search,b),_strictSearch:S};else{const $=y.options.loader||y.options.beforeLoad||y.lazyFn||O1(y)?"pending":"success";Y={id:M,ssr:y.options.ssr,index:m,routeId:y.id,params:D?.params??a,_strictParams:j,pathname:O,updatedAt:Date.now(),search:D?bs(D.search,b):b,_strictSearch:S,searchError:void 0,status:$,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:Os()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:H,loaderDeps:D?Io(D.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:y.options.staticData||{},fullPath:y.fullPath}}t?.preload||(Y.globalNotFound=f===y.id),Y.searchError=E;const W=this.getParentContext(v);Y.context={...W,...Y.__routeContext,...Y.__beforeLoadContext},p[m]=Y}for(let m=0;m<p.length;m++){const y=p[m],v=this.looseRoutesById[y.routeId],b=this.getMatch(y.id),S=h.get(y.routeId);if(y.params=S?bs(S.params,a):a,!b){const E=p[m-1],x=this.getParentContext(E);if(v.options.context){const R={deps:y.loaderDeps,params:y.params,context:x??{},location:e,navigate:O=>this.navigate({...O,_fromLocation:e}),buildLocation:this.buildLocation,cause:y.cause,abortController:y.abortController,preload:!!y.preload,matches:p,routeId:v.id};y.__routeContext=v.options.context(R)??void 0}y.context={...x,...y.__routeContext,...y.__beforeLoadContext}}}return p}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:r}=this.getMatchedRoutes(e.pathname),s=ol(t),a={...e.search};for(const h of t)try{Object.assign(a,mu(h.options.validateSearch,a))}catch{}const c=ol(this.stores.matchesId.get()),u=c&&this.stores.matchStores.get(c)?.get(),f=u&&u.routeId===s.id&&u.pathname===e.pathname;let p;if(f)p=u.params;else{const h=Object.assign(Object.create(null),r);for(const m of t)try{v0(m,h)}catch{}p=h}return{matchedRoutes:t,fullPath:s.fullPath,search:a,params:p}}},Tu=class extends Error{},kC=class extends Error{};function NC(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function mu(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Tu("Async validation not supported");if(r.issues)throw new Tu(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function PC({pathname:e,routesById:t,processedTree:r}){const s=Object.create(null),a=Wr(e);let c;const u=JT(a,r,!0);return u&&(c=u.route,Object.assign(s,u.rawParams)),{matchedRoutes:u?.branch||[t.__root__],routeParams:s,foundRoute:c}}function jC({search:e,dest:t,destRoutes:r,_includeValidateSearch:s}){return LC(r)(e,t,s??!1)}function LC(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const a of e){if("search"in a.options)a.options.search?.middlewares&&t.middlewares.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){const c=({search:u,next:f})=>{let p=u;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(p=a.options.preSearchFilters.reduce((m,y)=>y(m),u));const h=f(p);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((m,y)=>y(m),h):h};t.middlewares.push(c)}if(a.options.validateSearch){const c=({search:u,next:f})=>{const p=f(u);if(!t._includeValidateSearch)return p;try{return{...p,...mu(a.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(c)}}const r=({search:a})=>{const c=t.dest;return c.search?c.search===!0?a:Lo(c.search,a):{}};t.middlewares.push(r);const s=(a,c,u)=>{if(a>=u.length)return c;const f=u[a];return f({search:c,next:h=>s(a+1,h,u)})};return function(c,u,f){return t.dest=u,t._includeValidateSearch=f,s(0,c,t.middlewares)}}function IC(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const s=t[r];if(s.children)return s.id}return Ts}function v0(e,t){const r=e.options.params?.parse??e.options.parseParams;if(r){const s=r(t);if(s===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,s)}}const Sr=Symbol.for("TSR_DEFERRED_PROMISE");function UC(e,t){const r=e;return r[Sr]||(r[Sr]={status:"pending"},r.then(s=>{r[Sr].status="success",r[Sr].data=s}).catch(s=>{r[Sr].status="error",r[Sr].error={data:zC(s),__isServerError:!0}})),r}const BC="Error preloading route! ☝️";function b0(e,t){if(e)return typeof e=="string"?e:e[t]}function HC(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function FC(e){if(e.tag!=="link")return;const t=e.attrs?.rel,r=e.attrs?.href;if(typeof r=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return r}function $C(e,t){const r=FC(t);return!!r&&e?.inlineCss?.styles[r]!==void 0}var M1=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const r=this.options,s=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Ts:this.parentRoute||kn();let a=s?Ts:r?.path;a&&a!=="/"&&(a=S1(a));const c=r?.id||a;let u=s?Ts:hu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);a==="__root__"&&(a="/"),u!=="__root__"&&(u=hu(["/",u]));const f=u==="__root__"?"/":hu([this.parentRoute.fullPath,a]);this._path=a,this._id=u,this._fullPath=f,this._to=Wr(f)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>R1({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},ZC=class extends M1{constructor(e){super(e)}};function VC(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const s=document.getElementById(t.hash);s&&s.scrollIntoView(r)}}}var qC=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(qC||{}),eo=Symbol.asyncIterator,A1=Symbol.hasInstance,Ni=Symbol.isConcatSpreadable,to=Symbol.iterator,z1=Symbol.match,D1=Symbol.matchAll,k1=Symbol.replace,N1=Symbol.search,P1=Symbol.species,j1=Symbol.split,L1=Symbol.toPrimitive,Pi=Symbol.toStringTag,I1=Symbol.unscopables,U1={[eo]:0,[A1]:1,[Ni]:2,[to]:3,[z1]:4,[D1]:5,[k1]:6,[N1]:7,[P1]:8,[j1]:9,[L1]:10,[Pi]:11,[I1]:12},YC={0:eo,1:A1,2:Ni,3:to,4:z1,5:D1,6:k1,7:N1,8:P1,9:j1,10:L1,11:Pi,12:I1},P=void 0,GC={2:!0,3:!1,1:P,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},KC={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},QC={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function st(e,t,r,s,a,c,u,f,p,h,m,y){return{t:e,i:t,s:r,c:s,m:a,p:c,e:u,a:f,f:p,b:h,o:m,l:y}}function Yo(e){return st(2,P,e,P,P,P,P,P,P,P,P,P)}var B1=Yo(2),H1=Yo(3),XC=Yo(1),JC=Yo(0),WC=Yo(4),eO=Yo(5),tO=Yo(6),nO=Yo(7);function rO(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
11
- `:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return P}}function Go(e){let t="",r=0,s;for(let a=0,c=e.length;a<c;a++)s=rO(e[a]),s&&(t+=e.slice(r,a)+s,r=a+1);return r===0?t=e:t+=e.slice(r),t}function oO(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
12
- `;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function Ko(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,oO)}var Yc="__SEROVAL_REFS__",F1=new Map,zi=new Map;function $1(e){return F1.has(e)}function sO(e){return zi.has(e)}function iO(e){if($1(e))return F1.get(e);throw new LO(e)}function aO(e){if(sO(e))return zi.get(e);throw new IO(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Yc,{value:zi,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Yc,{value:zi,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Yc,{value:zi,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Yc,{value:zi,configurable:!0,writable:!1,enumerable:!1});function Wp(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function lO(e){let t=KC[Wp(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Z1(e,t){let r=lO(e),s=Object.getOwnPropertyNames(e);for(let a=0,c=s.length,u;a<c;a++)u=s[a],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function V1(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function cO(e){switch(e){case Number.POSITIVE_INFINITY:return eO;case Number.NEGATIVE_INFINITY:return tO}return e!==e?nO:Object.is(e,-0)?WC:st(0,P,e,P,P,P,P,P,P,P,P,P)}function q1(e){return st(1,P,Go(e),P,P,P,P,P,P,P,P,P)}function uO(e){return st(3,P,""+e,P,P,P,P,P,P,P,P,P)}function fO(e){return st(4,e,P,P,P,P,P,P,P,P,P,P)}function dO(e,t){let r=t.valueOf();return st(5,e,r!==r?"":t.toISOString(),P,P,P,P,P,P,P,P,P)}function hO(e,t){return st(6,e,P,Go(t.source),t.flags,P,P,P,P,P,P,P)}function pO(e,t){return st(17,e,U1[t],P,P,P,P,P,P,P,P,P)}function mO(e,t){return st(18,e,Go(iO(t)),P,P,P,P,P,P,P,P,P)}function gO(e,t,r){return st(25,e,r,Go(t),P,P,P,P,P,P,P,P)}function yO(e,t,r){return st(9,e,P,P,P,P,P,r,P,P,V1(t),P)}function vO(e,t){return st(21,e,P,P,P,P,P,P,t,P,P,P)}function bO(e,t,r){return st(15,e,P,t.constructor.name,P,P,P,P,r,t.byteOffset,P,t.length)}function SO(e,t,r){return st(16,e,P,t.constructor.name,P,P,P,P,r,t.byteOffset,P,t.byteLength)}function xO(e,t,r){return st(20,e,P,P,P,P,P,P,r,t.byteOffset,P,t.byteLength)}function wO(e,t,r){return st(13,e,Wp(t),P,Go(t.message),r,P,P,P,P,P,P)}function RO(e,t,r){return st(14,e,Wp(t),P,Go(t.message),r,P,P,P,P,P,P)}function EO(e,t){return st(7,e,P,P,P,P,P,t,P,P,P,P)}function _O(e,t){return st(28,P,P,P,P,P,P,[e,t],P,P,P,P)}function TO(e,t){return st(30,P,P,P,P,P,P,[e,t],P,P,P,P)}function CO(e,t,r){return st(31,e,P,P,P,P,P,r,t,P,P,P)}function OO(e,t){return st(32,e,P,P,P,P,P,P,t,P,P,P)}function MO(e,t){return st(33,e,P,P,P,P,P,P,t,P,P,P)}function AO(e,t){return st(34,e,P,P,P,P,P,P,t,P,P,P)}function zO(e,t,r,s){return st(35,e,r,P,P,P,P,t,P,P,P,s)}var DO={parsing:1,serialization:2,deserialization:3};function kO(e){return`Seroval Error (step: ${DO[e]})`}var NO=(e,t)=>kO(e),Y1=class extends Error{constructor(e,t){super(NO(e)),this.cause=t}},S0=class extends Y1{constructor(e){super("parsing",e)}},PO=class extends Y1{constructor(e){super("deserialization",e)}};function oo(e){return`Seroval Error (specific: ${e})`}var Xu=class extends Error{constructor(t){super(oo(1)),this.value=t}},G1=class extends Error{constructor(e){super(oo(2))}},jO=class extends Error{constructor(e){super(oo(3))}},vl=class extends Error{constructor(e){super(oo(4))}},LO=class extends Error{constructor(e){super(oo(5)),this.value=e}},IO=class extends Error{constructor(e){super(oo(6))}},UO=class extends Error{constructor(e){super(oo(7))}},so=class extends Error{constructor(e){super(oo(8))}},BO=class extends Error{constructor(e){super(oo(9))}},HO=class{constructor(e,t){this.value=e,this.replacement=t}},Ju=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},FO=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},$O=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Ju.toString();FO.toString();$O.toString();var ZO=()=>{let e=[],t=[],r=!0,s=!1,a=0,c=(p,h,m)=>{for(m=0;m<a;m++)t[m]&&t[m][h](p)},u=(p,h,m,y)=>{for(h=0,m=e.length;h<m;h++)y=e[h],!r&&h===m-1?p[s?"return":"throw"](y):p.next(y)},f=(p,h)=>(r&&(h=a++,t[h]=p),u(p),()=>{r&&(t[h]=t[a],t[a--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>f(p),next:p=>{r&&(e.push(p),c(p,"next"))},throw:p=>{r&&(e.push(p),c(p,"throw"),r=!1,s=!1,t.length=0)},return:p=>{r&&(e.push(p),c(p,"return"),r=!1,s=!0,t.length=0)}}},VO=e=>t=>()=>{let r=0,s={[e]:()=>s,next:()=>{if(r>t.d)return{done:!0,value:void 0};let a=r++,c=t.v[a];if(a===t.t)throw c;return{done:a===t.d,value:c}}};return s},qO=(e,t)=>r=>()=>{let s=0,a=-1,c=!1,u=[],f=[],p=(m=0,y=f.length)=>{for(;m<y;m++)f[m].s({done:!0,value:void 0})};r.on({next:m=>{let y=f.shift();y&&y.s({done:!1,value:m}),u.push(m)},throw:m=>{let y=f.shift();y&&y.f(m),p(),a=u.length,c=!0,u.push(m)},return:m=>{let y=f.shift();y&&y.s({done:!0,value:m}),p(),a=u.length,u.push(m)}});let h={[e]:()=>h,next:()=>{if(a===-1){let v=s++;if(v>=u.length){let b=t();return f.push(b),b.p}return{done:!1,value:u[v]}}if(s>a)return{done:!0,value:void 0};let m=s++,y=u[m];if(m!==a)return{done:!1,value:y};if(c)throw y;return{done:!0,value:y}}};return h},K1=e=>{let t=atob(e),r=t.length,s=new Uint8Array(r);for(let a=0;a<r;a++)s[a]=t.charCodeAt(a);return s.buffer};K1.toString();function YO(e){return"__SEROVAL_SEQUENCE__"in e}function Q1(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function GO(e){let t=[],r=-1,s=-1,a=e[to]();for(;;)try{let c=a.next();if(t.push(c.value),c.done){s=t.length-1;break}}catch(c){r=t.length,t.push(c)}return Q1(t,r,s)}var KO=VO(to);function QO(e){return KO(e)}var XO={},JO={},WO={0:{},1:{},2:{},3:{},4:{},5:{}};function eM(e){return"__SEROVAL_STREAM__"in e}function js(){return ZO()}function tM(e){let t=js(),r=e[eo]();async function s(){try{let a=await r.next();a.done?t.return(a.value):(t.next(a.value),await s())}catch(a){t.throw(a)}}return s().catch(()=>{}),t}var nM=qO(eo,Ju);function rM(e){return nM(e)}async function oM(e){try{return[1,await e]}catch(t){return[0,t]}}function sM(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function gu(e,t){e.marked.add(t)}function iM(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function Wu(e,t){let r=e.refs.get(t);return r!=null?(gu(e,r),{type:1,value:fO(r)}):{type:0,value:iM(e,t)}}function em(e,t){let r=Wu(e,t);return r.type===1?r:$1(t)?{type:2,value:mO(r.value,t)}:r}function ws(e,t){let r=em(e,t);if(r.type!==0)return r.value;if(t in U1)return pO(r.value,t);throw new Xu(t)}function ef(e,t){let r=Wu(e,WO[t]);return r.type===1?r.value:st(26,r.value,t,P,P,P,P,P,P,P,P,P)}function aM(e){let t=Wu(e,XO);return t.type===1?t.value:st(27,t.value,P,P,P,P,P,P,ws(e,to),P,P,P)}function lM(e){let t=Wu(e,JO);return t.type===1?t.value:st(29,t.value,P,P,P,P,P,[ef(e,1),ws(e,eo)],P,P,P,P)}function cM(e,t,r,s){return st(r?11:10,e,P,P,P,s,P,P,P,P,V1(t),P)}function uM(e,t,r,s){return st(8,t,P,P,P,P,{k:r,v:s},P,ef(e,0),P,P,P)}function fM(e,t,r){let s=new Uint8Array(r),a="";for(let c=0,u=s.length;c<u;c++)a+=String.fromCharCode(s[c]);return st(19,t,Go(btoa(a)),P,P,P,P,P,ef(e,5),P,P,P)}function dM(e,t){return{base:sM(e,t),child:void 0}}var hM=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Yt(this._p,this.depth,e)}};async function pM(e,t,r){let s=[];for(let a=0,c=r.length;a<c;a++)a in r?s[a]=await Yt(e,t,r[a]):s[a]=0;return s}async function mM(e,t,r,s){return yO(r,s,await pM(e,t,s))}async function tm(e,t,r){let s=Object.entries(r),a=[],c=[];for(let u=0,f=s.length;u<f;u++)a.push(Go(s[u][0])),c.push(await Yt(e,t,s[u][1]));return to in r&&(a.push(ws(e.base,to)),c.push(_O(aM(e.base),await Yt(e,t,GO(r))))),eo in r&&(a.push(ws(e.base,eo)),c.push(TO(lM(e.base),await Yt(e,t,tM(r))))),Pi in r&&(a.push(ws(e.base,Pi)),c.push(q1(r[Pi]))),Ni in r&&(a.push(ws(e.base,Ni)),c.push(r[Ni]?B1:H1)),{k:a,v:c}}async function Vh(e,t,r,s,a){return cM(r,s,a,await tm(e,t,s))}async function gM(e,t,r,s){return vO(r,await Yt(e,t,s.valueOf()))}async function yM(e,t,r,s){return bO(r,s,await Yt(e,t,s.buffer))}async function vM(e,t,r,s){return SO(r,s,await Yt(e,t,s.buffer))}async function bM(e,t,r,s){return xO(r,s,await Yt(e,t,s.buffer))}async function x0(e,t,r,s){let a=Z1(s,e.base.features);return wO(r,s,a?await tm(e,t,a):P)}async function SM(e,t,r,s){let a=Z1(s,e.base.features);return RO(r,s,a?await tm(e,t,a):P)}async function xM(e,t,r,s){let a=[],c=[];for(let[u,f]of s.entries())a.push(await Yt(e,t,u)),c.push(await Yt(e,t,f));return uM(e.base,r,a,c)}async function wM(e,t,r,s){let a=[];for(let c of s.keys())a.push(await Yt(e,t,c));return EO(r,a)}async function X1(e,t,r,s){let a=e.base.plugins;if(a)for(let c=0,u=a.length;c<u;c++){let f=a[c];if(f.parse.async&&f.test(s))return gO(r,f.tag,await f.parse.async(s,new hM(e,t),{id:r}))}return P}async function RM(e,t,r,s){let[a,c]=await oM(s);return st(12,r,a,P,P,P,P,P,await Yt(e,t,c),P,P,P)}function EM(e,t,r,s,a){let c=[],u=r.on({next:f=>{gu(this.base,t),Yt(this,e,f).then(p=>{c.push(OO(t,p))},p=>{a(p),u()})},throw:f=>{gu(this.base,t),Yt(this,e,f).then(p=>{c.push(MO(t,p)),s(c),u()},p=>{a(p),u()})},return:f=>{gu(this.base,t),Yt(this,e,f).then(p=>{c.push(AO(t,p)),s(c),u()},p=>{a(p),u()})}})}async function _M(e,t,r,s){return CO(r,ef(e.base,4),await new Promise(EM.bind(e,t,r,s)))}async function TM(e,t,r,s){let a=[];for(let c=0,u=s.v.length;c<u;c++)a[c]=await Yt(e,t,s.v[c]);return zO(r,a,s.t,s.d)}async function CM(e,t,r,s){if(Array.isArray(s))return mM(e,t,r,s);if(eM(s))return _M(e,t,r,s);if(YO(s))return TM(e,t,r,s);let a=s.constructor;if(a===HO)return Yt(e,t,s.replacement);let c=await X1(e,t,r,s);if(c)return c;switch(a){case Object:return Vh(e,t,r,s,!1);case P:return Vh(e,t,r,s,!0);case Date:return dO(r,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return x0(e,t,r,s);case Number:case Boolean:case String:case BigInt:return gM(e,t,r,s);case ArrayBuffer:return fM(e.base,r,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return yM(e,t,r,s);case DataView:return bM(e,t,r,s);case Map:return xM(e,t,r,s);case Set:return wM(e,t,r,s)}if(a===Promise||s instanceof Promise)return RM(e,t,r,s);let u=e.base.features;if(u&32&&a===RegExp)return hO(r,s);if(u&16)switch(a){case BigInt64Array:case BigUint64Array:return vM(e,t,r,s)}if(u&1&&typeof AggregateError<"u"&&(a===AggregateError||s instanceof AggregateError))return SM(e,t,r,s);if(s instanceof Error)return x0(e,t,r,s);if(to in s||eo in s)return Vh(e,t,r,s,!!a);throw new Xu(s)}async function OM(e,t,r){let s=em(e.base,r);if(s.type!==0)return s.value;let a=await X1(e,t,s.value,r);if(a)return a;throw new Xu(r)}async function Yt(e,t,r){switch(typeof r){case"boolean":return r?B1:H1;case"undefined":return XC;case"string":return q1(r);case"number":return cO(r);case"bigint":return uO(r);case"object":{if(r){let s=em(e.base,r);return s.type===0?await CM(e,t+1,s.value,r):s.value}return JC}case"symbol":return ws(e.base,r);case"function":return OM(e,t,r);default:throw new Xu(r)}}async function MM(e,t){try{return await Yt(e,0,t)}catch(r){throw r instanceof S0?r:new S0(r)}}var AM=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(AM||{});function J1(e,t){for(let r=0,s=t.length;r<s;r++){let a=t[r];e.has(a)||(e.add(a),a.extends&&J1(e,a.extends))}}function W1(e){if(e){let t=new Set;return J1(t,e),[...t]}}function zM(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new UO(e)}}var DM=1e6,kM=1e4,NM=2e4;function ex(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var PM=1e3;function jM(e,t){var r;let s=t.refs||new Map;return"types"in s||Object.assign(s,{types:new Map}),{mode:e,plugins:t.plugins,refs:s,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||PM}}function LM(e){return{mode:2,base:jM(2,e),child:P}}var IM=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return yt(this._p,this.depth,e)}};function tx(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new so({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function UM(e,t,r){return tx(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function BM(e,t,r){return tx(e.base,t),e.base.refs.set(t,r),r}function Gt(e,t,r){return e.mode===1?UM(e,t,r):BM(e,t,r)}function xp(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new so(e)}function HM(e,t){return Gt(e,t.i,aO(Ko(t.s)))}function FM(e,t,r){let s=r.a,a=s.length,c=Gt(e,r.i,new Array(a));for(let u=0,f;u<a;u++)f=s[u],f&&(c[u]=yt(e,t,f));return ex(c,r.o),c}function $M(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function ZM(e){switch(e){case eo:case Ni:case Pi:case to:return!0;default:return!1}}function w0(e,t,r){$M(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function VM(e,t,r,s,a){if(typeof s=="string")w0(r,Ko(s),yt(e,t,a));else{let c=yt(e,t,s);switch(typeof c){case"string":w0(r,c,yt(e,t,a));break;case"symbol":ZM(c)&&(r[c]=yt(e,t,a));break;default:throw new so(s)}}}function nx(e,t,r){e.base.refs.types.set(t,r)}function bl(e,t,r,s){if(e.base.refs.types.get(r)!==s)throw new so(t)}function rx(e,t,r,s){let a=r.k;if(a.length>0)for(let c=0,u=r.v,f=a.length;c<f;c++)VM(e,t,s,a[c],u[c]);return s}function qM(e,t,r){let s=Gt(e,r.i,r.t===10?{}:Object.create(null));return rx(e,t,r.p,s),ex(s,r.o),s}function YM(e,t){return Gt(e,t.i,new Date(t.s))}function GM(e,t){if(e.base.features&32){let r=Ko(t.c);if(r.length>NM)throw new so(t);return Gt(e,t.i,new RegExp(r,t.m))}throw new G1(t)}function KM(e,t,r){let s=Gt(e,r.i,new Set);for(let a=0,c=r.a,u=c.length;a<u;a++)s.add(yt(e,t,c[a]));return s}function QM(e,t,r){let s=Gt(e,r.i,new Map);for(let a=0,c=r.e.k,u=r.e.v,f=c.length;a<f;a++)s.set(yt(e,t,c[a]),yt(e,t,u[a]));return s}function XM(e,t){if(t.s.length>DM)throw new so(t);return Gt(e,t.i,K1(Ko(t.s)))}function JM(e,t,r){var s;let a=zM(r.c),c=yt(e,t,r.f),u=(s=r.b)!=null?s:0;if(u<0||u>c.byteLength)throw new so(r);return Gt(e,r.i,new a(c,u,r.l))}function WM(e,t,r){var s;let a=yt(e,t,r.f),c=(s=r.b)!=null?s:0;if(c<0||c>a.byteLength)throw new so(r);return Gt(e,r.i,new DataView(a,c,r.l))}function ox(e,t,r,s){if(r.p){let a=rx(e,t,r.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(a))}return s}function e2(e,t,r){let s=Gt(e,r.i,new AggregateError([],Ko(r.m)));return ox(e,t,r,s)}function t2(e,t,r){let s=xp(r,QC,r.s),a=Gt(e,r.i,new s(Ko(r.m)));return ox(e,t,r,a)}function n2(e,t,r){let s=Ju(),a=Gt(e,r.i,s.p),c=yt(e,t,r.f);return r.s?s.s(c):s.f(c),a}function r2(e,t,r){return Gt(e,r.i,Object(yt(e,t,r.f)))}function o2(e,t,r){let s=e.base.plugins;if(s){let a=Ko(r.c);for(let c=0,u=s.length;c<u;c++){let f=s[c];if(f.tag===a)return Gt(e,r.i,f.deserialize(r.s,new IM(e,t),{id:r.i}))}}throw new jO(r.c)}function s2(e,t){let r=Gt(e,t.i,Gt(e,t.s,Ju()).p);return nx(e,t.s,22),r}function i2(e,t,r){let s=e.base.refs.get(r.i);if(s)return bl(e,r,r.i,22),s.s(yt(e,t,r.a[1])),P;throw new vl("Promise")}function a2(e,t,r){let s=e.base.refs.get(r.i);if(s)return bl(e,r,r.i,22),s.f(yt(e,t,r.a[1])),P;throw new vl("Promise")}function l2(e,t,r){yt(e,t,r.a[0]);let s=yt(e,t,r.a[1]);return QO(s)}function c2(e,t,r){yt(e,t,r.a[0]);let s=yt(e,t,r.a[1]);return rM(s)}function u2(e,t,r){let s=Gt(e,r.i,js());nx(e,r.i,31);let a=r.a,c=a.length;if(c)for(let u=0;u<c;u++)yt(e,t,a[u]);return s}function f2(e,t,r){let s=e.base.refs.get(r.i);if(s)return bl(e,r,r.i,31),s.next(yt(e,t,r.f)),P;throw new vl("Stream")}function d2(e,t,r){let s=e.base.refs.get(r.i);if(s)return bl(e,r,r.i,31),s.throw(yt(e,t,r.f)),P;throw new vl("Stream")}function h2(e,t,r){let s=e.base.refs.get(r.i);if(s)return bl(e,r,r.i,31),s.return(yt(e,t,r.f)),P;throw new vl("Stream")}function p2(e,t,r){return yt(e,t,r.f),P}function m2(e,t,r){return yt(e,t,r.a[1]),P}function g2(e,t,r){let s=Gt(e,r.i,Q1([],r.s,r.l));for(let a=0,c=r.a.length;a<c;a++)s.v[a]=yt(e,t,r.a[a]);return s}function yt(e,t,r){if(t>e.base.depthLimit)throw new BO(e.base.depthLimit);switch(t+=1,r.t){case 2:return xp(r,GC,r.s);case 0:return Number(r.s);case 1:return Ko(String(r.s));case 3:if(String(r.s).length>kM)throw new so(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return HM(e,r);case 9:return FM(e,t,r);case 10:case 11:return qM(e,t,r);case 5:return YM(e,r);case 6:return GM(e,r);case 7:return KM(e,t,r);case 8:return QM(e,t,r);case 19:return XM(e,r);case 16:case 15:return JM(e,t,r);case 20:return WM(e,t,r);case 14:return e2(e,t,r);case 13:return t2(e,t,r);case 12:return n2(e,t,r);case 17:return xp(r,YC,r.s);case 21:return r2(e,t,r);case 25:return o2(e,t,r);case 22:return s2(e,r);case 23:return i2(e,t,r);case 24:return a2(e,t,r);case 28:return l2(e,t,r);case 30:return c2(e,t,r);case 31:return u2(e,t,r);case 32:return f2(e,t,r);case 33:return d2(e,t,r);case 34:return h2(e,t,r);case 27:return p2(e,t,r);case 29:return m2(e,t,r);case 35:return g2(e,t,r);default:throw new G1(r)}}function y2(e,t){try{return yt(e,0,t)}catch(r){throw new PO(r)}}var v2=()=>T;v2.toString();function R0(e,t){let r=W1(t.plugins),s=LM({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return y2(s,e)}async function b2(e,t={}){let r=W1(t.plugins),s=dM(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await MM(s,e),f:s.base.features,m:Array.from(s.base.marked)}}function S2(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r,s){return{v:r.parse(e.toSerializable(t))}},async async(t,r,s){return{v:await r.parse(e.toSerializable(t))}},stream(t,r,s){return{v:r.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,r,s){return e.fromSerializable(r.deserialize(t.v))}}}var x2=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}};const Cu=globalThis.Buffer,sx=!!Cu&&typeof Cu.from=="function";function ix(e){if(e.length===0)return"";if(sx)return Cu.from(e).toString("base64");const t=32768,r=[];for(let s=0;s<e.length;s+=t){const a=e.subarray(s,s+t);r.push(String.fromCharCode.apply(null,a))}return btoa(r.join(""))}function ax(e){if(e.length===0)return new Uint8Array(0);if(sx){const s=Cu.from(e,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let s=0;s<t.length;s++)r[s]=t.charCodeAt(s);return r}const Ka=Object.create(null),Qa=Object.create(null),w2=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(ax(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),R2=new TextEncoder,E2=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(R2.encode(r)):t.enqueue(ax(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),_2="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",T2="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function E0(e){const t=js(),r=e.getReader();return(async()=>{try{for(;;){const{done:s,value:a}=await r.read();if(s){t.return(void 0);break}t.next(ix(a))}}catch(s){t.throw(s)}finally{r.releaseLock()}})(),t}function _0(e){const t=js(),r=e.getReader(),s=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:a,value:c}=await r.read();if(a){try{const u=s.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=s.decode(c,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:ix(c)})}}}catch(a){t.throw(a)}finally{r.releaseLock()}})(),t}const C2={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===Ka},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return _2},deserialize(e,t,r){return Ka}},{tag:"tss/RawStreamFactoryText",test(e){return e===Qa},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return T2},deserialize(e,t,r){return Qa}}],test(e){return e instanceof x2},parse:{sync(e,t,r){const s=e.hint==="text"?Qa:Ka;return{hint:t.parse(e.hint),factory:t.parse(s),stream:t.parse(js())}},async async(e,t,r){const s=e.hint==="text"?Qa:Ka,a=e.hint==="text"?_0(e.stream):E0(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(s),stream:await t.parse(a)}},stream(e,t,r){const s=e.hint==="text"?Qa:Ka,a=e.hint==="text"?_0(e.stream):E0(e.stream);return{hint:t.parse(e.hint),factory:t.parse(s),stream:t.parse(a)}}},serialize(e,t,r){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,r){const s=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?E2(s):w2(s)}};function O2(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,r,s){return e(typeof r?.deserialize=="function"?r.deserialize(t.streamId):t.streamId)}}}const M2={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}};var jo={},lx=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),A2={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===jo},parse:{sync(){return jo},async async(){return await Promise.resolve(jo)},stream(){return jo}},serialize(){return lx.toString()},deserialize(){return jo}};function T0(e){let t=js(),r=e.getReader();async function s(){try{let a=await r.read();a.done?t.return(a.value):(t.next(a.value),await s())}catch(a){t.throw(a)}}return s().catch(()=>{}),t}var z2={tag:"seroval/plugins/web/ReadableStream",extends:[A2],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(jo),stream:t.parse(js())}},async async(e,t){return{factory:await t.parse(jo),stream:await t.parse(T0(e))}},stream(e,t){return{factory:t.parse(jo),stream:t.parse(T0(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return lx(r)}},D2=z2;const k2=[M2,C2,D2];function N2(){return[...d1()?.serializationAdapters?.map(S2)??[],...k2]}var C0=new TextDecoder,P2=new Uint8Array(0),O0=16*1024*1024,M0=32*1024*1024,A0=1024,z0=1e5;function j2(e){const t=new Map,r=new Map,s=new Set;let a=!1,c=null,u=0,f;const p=new ReadableStream({start(y){f=y},cancel(){a=!0;try{c?.cancel()}catch{}t.forEach(y=>{try{y.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),s.clear()}});function h(y){const v=r.get(y);if(v)return v;if(s.has(y))return new ReadableStream({start(S){S.close()}});if(r.size>=A0)throw new Error(`Too many raw streams in framed response (max ${A0})`);const b=new ReadableStream({start(S){t.set(y,S)},cancel(){s.add(y),t.delete(y),r.delete(y)}});return r.set(y,b),b}function m(y){return h(y),t.get(y)}return(async()=>{const y=e.getReader();c=y;const v=[];let b=0;function S(){if(b<9)return null;const x=v[0];if(x.length>=9)return{type:x[0],streamId:(x[1]<<24|x[2]<<16|x[3]<<8|x[4])>>>0,length:(x[5]<<24|x[6]<<16|x[7]<<8|x[8])>>>0};const R=new Uint8Array(9);let O=0,A=9;for(let M=0;M<v.length&&A>0;M++){const N=v[M],D=Math.min(N.length,A);R.set(N.subarray(0,D),O),O+=D,A-=D}return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0}}function E(x){if(x===0)return P2;const R=new Uint8Array(x);let O=0,A=x;for(;A>0&&v.length>0;){const M=v[0];if(!M)break;const N=Math.min(M.length,A);R.set(M.subarray(0,N),O),O+=N,A-=N,N===M.length?v.shift():v[0]=M.subarray(N)}return b-=x,R}try{for(;;){const{done:x,value:R}=await y.read();if(a||x)break;if(R){if(b+R.length>M0)throw new Error(`Framed response buffer exceeded ${M0} bytes`);for(v.push(R),b+=R.length;;){const O=S();if(!O)break;const{type:A,streamId:M,length:N}=O;if(A!==Xr.JSON&&A!==Xr.CHUNK&&A!==Xr.END&&A!==Xr.ERROR)throw new Error(`Unknown frame type: ${A}`);if(A===Xr.JSON){if(M!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(M===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(N>O0)throw new Error(`Frame payload too large: ${N} bytes (max ${O0})`);const D=9+N;if(b<D)break;if(++u>z0)throw new Error(`Too many frames in framed response (max ${z0})`);E(9);const j=E(N);switch(A){case Xr.JSON:try{f.enqueue(C0.decode(j))}catch{}break;case Xr.CHUNK:{const L=m(M);L&&L.enqueue(j);break}case Xr.END:{const L=m(M);if(s.add(M),L){try{L.close()}catch{}t.delete(M)}break}case Xr.ERROR:{const L=m(M);if(s.add(M),L){const H=C0.decode(j);L.error(new Error(H)),t.delete(M)}break}}}}}if(b!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}t.forEach(x=>{try{x.close()}catch{}}),t.clear()}catch(x){try{f.error(x)}catch{}t.forEach(R=>{try{R.error(x)}catch{}}),t.clear()}finally{try{y.releaseLock()}catch{}c=null}})(),{getOrCreateStream:h,jsonChunks:p}}var ll=null;async function wp(e){e.length>0&&await Promise.allSettled(e)}var L2=Object.prototype.hasOwnProperty;function cx(e){for(const t in e)if(L2.call(e,t))return!0;return!1}async function I2(e,t,r){ll||(ll=N2());const s=t[0],a=s.fetch??r,c=s.data instanceof FormData?"formData":"payload",u=s.headers?new Headers(s.headers):new Headers;if(u.set("x-tsr-serverFn","true"),c==="payload"&&u.set("accept",`${NT}, application/x-ndjson, application/json`),s.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const p=await ux(s);if(p!==void 0){const h=w1({payload:p});e.includes("?")?e+=`&${h}`:e+=`?${h}`}}let f;if(s.method==="POST"){const p=await U2(s);p?.contentType&&u.set("content-type",p.contentType),f=p?.body}return await B2(async()=>a(e,{method:s.method,headers:u,signal:s.signal,body:f}))}async function ux(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&cx(e.context)&&(t=!0,r.context=e.context),t)return fx(r)}async function fx(e){return JSON.stringify(await Promise.resolve(b2(e,{plugins:ll})))}async function U2(e){if(e.data instanceof FormData){let r;return e.context&&cx(e.context)&&(r=await fx(e.context)),r!==void 0&&e.data.set(kT,r),{body:e.data}}const t=await ux(e);if(t)return{body:t,contentType:"application/json"}}async function B2(e){let t;try{t=await e()}catch(s){if(s instanceof Response)t=s;else throw console.log(s),s}if(t.headers.get("x-tss-raw")==="true")return t;const r=t.headers.get("content-type");if(r||kn(),t.headers.get("x-tss-serialized")){let s;if(r.includes("application/x-tss-framed")){if(LT(r),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:a,jsonChunks:c}=j2(t.body),u=[O2(a),...ll||[]],f=new Map;s=await H2({jsonStream:c,onMessage:p=>R0(p,{refs:f,plugins:u}),onError(p,h){console.error(p,h)}})}else if(r.includes("application/json")){const a=await t.json(),c=[];s=R0(a,{plugins:ll}),await wp(c)}if(s||kn(),s instanceof Error)throw s;return s}if(r.includes("application/json")){const s=await t.json(),a=vC(s);if(a)throw a;if(en(s))throw s;return s}if(!t.ok)throw new Error(await t.text());return t}async function H2({jsonStream:e,onMessage:t,onError:r}){const s=e.getReader(),{value:a,done:c}=await s.read();if(c||!a)throw new Error("Stream ended before first object");const u=JSON.parse(a);let f=!1;const p=(async()=>{try{for(;;){const{value:y,done:v}=await s.read();if(v)break;if(y)try{const b=[];try{t(JSON.parse(y))}finally{}await wp(b)}catch(b){r?.(`Invalid JSON: ${y}`,b)}}}catch(y){f||r?.("Stream processing error:",y)}})();let h;const m=[];try{h=t(u)}catch(y){throw f=!0,s.cancel().catch(()=>{}),y}return await wp(m),Promise.resolve(h).catch(()=>{f=!0,s.cancel().catch(()=>{})}),p.finally(()=>{try{s.releaseLock()}catch{}}),h}function F2(e){const t="/_serverFn/"+e;return Object.assign((...a)=>{const c=d1()?.serverFns?.fetch;return I2(t,a,c??fetch)},{url:t,serverFnMeta:{id:e},[vp]:!0})}var $2={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(vp in e)?!1:!!e[vp],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>F2(e)};function D0(e){return e.replaceAll("\0","/").replaceAll("�","/")}function Z2(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function V2(e){window.$_TSR||kn();const t=e.options.serializationAdapters;if(t?.length){const x=new Map;t.forEach(R=>{x.set(R.key,R.fromSerializable)}),window.$_TSR.t=x,window.$_TSR.buffer.forEach(R=>R())}window.$_TSR.initialized=!0,window.$_TSR.router||kn();const r=window.$_TSR.router;r.matches.forEach(x=>{x.i=D0(x.i)}),r.lastMatchId&&(r.lastMatchId=D0(r.lastMatchId));const{manifest:s,dehydratedData:a,lastMatchId:c}=r;e.ssr={manifest:s};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const f=e.matchRoutes(e.stores.location.get()),p=Promise.all(f.map(x=>e.loadRouteChunk(e.looseRoutesById[x.routeId])));function h(x){const R=e.looseRoutesById[x.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(R){const O=Os();x._nonReactive.minPendingPromise=O,x._forcePending=!0,setTimeout(()=>{O.resolve(),e.updateMatch(x.id,A=>(A._nonReactive.minPendingPromise=void 0,{...A,_forcePending:void 0}))},R)}}function m(x){const R=e.looseRoutesById[x.routeId];R&&(R.options.ssr=x.ssr)}let y;f.forEach(x=>{const R=r.matches.find(O=>O.i===x.id);if(!R){x._nonReactive.dehydrated=!1,x.ssr=!1,m(x);return}Z2(x,R),m(x),x._nonReactive.dehydrated=x.ssr!==!1,(x.ssr==="data-only"||x.ssr===!1)&&y===void 0&&(y=x.index,h(x))}),e.stores.setMatches(f),await e.options.hydrate?.(a);const v=e.stores.matches.get(),b=e.stores.location.get();await Promise.all(v.map(async x=>{try{const R=e.looseRoutesById[x.routeId],O=v[x.index-1]?.context??e.options.context;if(R.options.context){const D={deps:x.loaderDeps,params:x.params,context:O??{},location:b,navigate:j=>e.navigate({...j,_fromLocation:b}),buildLocation:e.buildLocation,cause:x.cause,abortController:x.abortController,preload:!1,matches:f,routeId:R.id};x.__routeContext=R.options.context(D)??void 0}x.context={...O,...x.__routeContext,...x.__beforeLoadContext};const A={ssr:e.options.ssr,matches:v,match:x,params:x.params,loaderData:x.loaderData},M=await R.options.head?.(A),N=await R.options.scripts?.(A);x.meta=M?.meta,x.links=M?.links,x.headScripts=M?.scripts,x.styles=M?.styles,x.scripts=N}catch(R){if(en(R))x.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${x.routeId}`,R);else throw x.error=R,console.error(`Error during hydration for route ${x.routeId}:`,R),R}}));const S=f[f.length-1].id!==c;if(!f.some(x=>x.ssr===!1)&&!S)return f.forEach(x=>{x._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const E=Promise.resolve().then(()=>e.load()).catch(x=>{console.error("Error during router hydration:",x)});if(S){const x=f[1];x||kn(),h(x),x._displayPending=!0,x._nonReactive.displayPendingPromise=E,E.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(x.id,R=>({...R,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Ou=_.use,el=typeof window<"u"?_.useLayoutEffect:_.useEffect;function qh(e){const t=_.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function q2(e,t,r={},s={}){_.useEffect(()=>{if(!e.current||s.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([c])=>{t(c)},r);return a.observe(e.current),()=>{a.disconnect()}},[t,r,s.disabled,e])}function Y2(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}function G2({promise:e}){if(Ou)return Ou(e);const t=UC(e);if(t[Sr].status==="pending")throw t;if(t[Sr].status==="error")throw t[Sr].error;return t[Sr].data}function K2(e){const t=k.jsx(Q2,{...e});return e.fallback?k.jsx(_.Suspense,{fallback:e.fallback,children:t}):t}function Q2(e){const t=G2(e);return e.children(t)}function nm(e){const t=e.errorComponent??rm;return k.jsx(X2,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:s})=>r?_.createElement(t,{error:r,reset:s}):e.children})}var X2=class extends _.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const r=e.getResetKey();return t.error&&t.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function rm({error:e}){const[t,r]=_.useState(!1);return k.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[k.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),k.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(s=>!s),children:t?"Hide Error":"Show Error"})]}),k.jsx("div",{style:{height:".25rem"}}),t?k.jsx("div",{children:k.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?k.jsx("code",{children:e.message}):null})}):null]})}function J2({children:e,fallback:t=null}){return om()?k.jsx(xr.Fragment,{children:e}):k.jsx(xr.Fragment,{children:t})}function om(){return xr.useSyncExternalStore(W2,()=>!0,()=>!1)}function W2(){return()=>{}}var dx=_.createContext(null);function fn(e){return _.useContext(dx)}var tf=_.createContext(void 0),eA=_.createContext(void 0),Rt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Rt||{});function tA({update:e,notify:t,unwatched:r}){return{link:s,unlink:a,propagate:c,checkDirty:u,shallowPropagate:f};function s(h,m,y){const v=m.depsTail;if(v!==void 0&&v.dep===h)return;const b=v!==void 0?v.nextDep:m.deps;if(b!==void 0&&b.dep===h){b.version=y,m.depsTail=b;return}const S=h.subsTail;if(S!==void 0&&S.version===y&&S.sub===m)return;const E=m.depsTail=h.subsTail={version:y,dep:h,sub:m,prevDep:v,nextDep:b,prevSub:S,nextSub:void 0};b!==void 0&&(b.prevDep=E),v!==void 0?v.nextDep=E:m.deps=E,S!==void 0?S.nextSub=E:h.subs=E}function a(h,m=h.sub){const y=h.dep,v=h.prevDep,b=h.nextDep,S=h.nextSub,E=h.prevSub;return b!==void 0?b.prevDep=v:m.depsTail=v,v!==void 0?v.nextDep=b:m.deps=b,S!==void 0?S.prevSub=E:y.subsTail=E,E!==void 0?E.nextSub=S:(y.subs=S)===void 0&&r(y),b}function c(h){let m=h.nextSub,y;e:do{const v=h.sub;let b=v.flags;if(b&60?b&12?b&4?!(b&48)&&p(h,v)?(v.flags=b|40,b&=1):b=0:v.flags=b&-9|32:b=0:v.flags=b|32,b&2&&t(v),b&1){const S=v.subs;if(S!==void 0){const E=(h=S).nextSub;E!==void 0&&(y={value:m,prev:y},m=E);continue}}if((h=m)!==void 0){m=h.nextSub;continue}for(;y!==void 0;)if(h=y.value,y=y.prev,h!==void 0){m=h.nextSub;continue e}break}while(!0)}function u(h,m){let y,v=0,b=!1;e:do{const S=h.dep,E=S.flags;if(m.flags&16)b=!0;else if((E&17)===17){if(e(S)){const x=S.subs;x.nextSub!==void 0&&f(x),b=!0}}else if((E&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(y={value:h,prev:y}),h=S.deps,m=S,++v;continue}if(!b){const x=h.nextDep;if(x!==void 0){h=x;continue}}for(;v--;){const x=m.subs,R=x.nextSub!==void 0;if(R?(h=y.value,y=y.prev):h=x,b){if(e(m)){R&&f(x),m=h.sub;continue}b=!1}else m.flags&=-33;m=h.sub;const O=h.nextDep;if(O!==void 0){h=O;continue e}}return b}while(!0)}function f(h){do{const m=h.sub,y=m.flags;(y&48)===32&&(m.flags=y|16,(y&6)===2&&t(m))}while((h=h.nextSub)!==void 0)}function p(h,m){let y=m.depsTail;for(;y!==void 0;){if(y===h)return!0;y=y.prevDep}return!1}}function nA(e,t,r){const s=typeof e=="object",a=s?e:void 0;return{next:(s?e.next:e)?.bind(a),error:(s?e.error:t)?.bind(a),complete:(s?e.complete:r)?.bind(a)}}const Rp=[];let yu=0;const{link:k0,unlink:rA,propagate:oA,checkDirty:hx,shallowPropagate:N0}=tA({update(e){return e._update()},notify(e){Rp[Ep++]=e,e.flags&=~Rt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Rt.Mutable|Rt.Dirty,Mu(e))}});let Gc=0,Ep=0,br,_p=0;function px(e){try{++_p,e()}finally{--_p||mx()}}function Mu(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=rA(r,e)}function mx(){if(!(_p>0)){for(;Gc<Ep;){const e=Rp[Gc];Rp[Gc++]=void 0,e.notify()}Gc=0,Ep=0}}function P0(e,t){const r=typeof e=="function",s=e,a={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Rt.None:Rt.Mutable,get(){return br!==void 0&&k0(a,br,yu),a._snapshot},subscribe(c){const u=nA(c),f={current:!1},p=sA(()=>{a.get(),f.current?u.next?.(a._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const u=br,f=t?.compare??Object.is;if(r)br=a,++yu,a.depsTail=void 0;else if(c===void 0)return!1;r&&(a.flags=Rt.Mutable|Rt.RecursedCheck);try{const p=a._snapshot,h=typeof c=="function"?c(p):c===void 0&&r?s(p):c;return p===void 0||!f(p,h)?(a._snapshot=h,!0):!1}finally{br=u,r&&(a.flags&=~Rt.RecursedCheck),Mu(a)}}};return r?(a.flags=Rt.Mutable|Rt.Dirty,a.get=function(){const c=a.flags;if(c&Rt.Dirty||c&Rt.Pending&&hx(a.deps,a)){if(a._update()){const u=a.subs;u!==void 0&&N0(u)}}else c&Rt.Pending&&(a.flags=c&~Rt.Pending);return br!==void 0&&k0(a,br,yu),a._snapshot}):a.set=function(c){if(a._update(c)){const u=a.subs;u!==void 0&&(oA(u),N0(u),mx())}},a}function sA(e){const t=()=>{const s=br;br=r,++yu,r.depsTail=void 0,r.flags=Rt.Watching|Rt.RecursedCheck;try{return e()}finally{br=s,r.flags&=~Rt.RecursedCheck,Mu(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Rt.Watching|Rt.RecursedCheck,notify(){const s=this.flags;s&Rt.Dirty||s&Rt.Pending&&hx(this.deps,this)?t():this.flags=Rt.Watching},stop(){this.flags=Rt.None,this.depsTail=void 0,Mu(this)}};return t(),r}var Yh={exports:{}},Gh={},Kh={exports:{}},Qh={};var j0;function iA(){if(j0)return Qh;j0=1;var e=yl();function t(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var r=typeof Object.is=="function"?Object.is:t,s=e.useState,a=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function f(y,v){var b=v(),S=s({inst:{value:b,getSnapshot:v}}),E=S[0].inst,x=S[1];return c(function(){E.value=b,E.getSnapshot=v,p(E)&&x({inst:E})},[y,b,v]),a(function(){return p(E)&&x({inst:E}),y(function(){p(E)&&x({inst:E})})},[y]),u(b),b}function p(y){var v=y.getSnapshot;y=y.value;try{var b=v();return!r(y,b)}catch{return!0}}function h(y,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Qh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Qh}var L0;function gx(){return L0||(L0=1,Kh.exports=iA()),Kh.exports}var I0;function aA(){if(I0)return Gh;I0=1;var e=yl(),t=gx();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var s=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,f=e.useMemo,p=e.useDebugValue;return Gh.useSyncExternalStoreWithSelector=function(h,m,y,v,b){var S=c(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=f(function(){function R(D){if(!O){if(O=!0,A=D,D=v(D),b!==void 0&&E.hasValue){var j=E.value;if(b(j,D))return M=j}return M=D}if(j=M,s(A,D))return j;var L=v(D);return b!==void 0&&b(j,L)?(A=D,j):(A=D,M=L)}var O=!1,A,M,N=y===void 0?null:y;return[function(){return R(m())},N===null?void 0:function(){return R(N())}]},[m,y,v,b]);var x=a(h,S[0],S[1]);return u(function(){E.hasValue=!0,E.value=x},[x]),p(x),x},Gh}var U0;function lA(){return U0||(U0=1,Yh.exports=aA()),Yh.exports}var yx=lA();function cA(e,t){return e===t}function Pt(e,t,r=cA){const s=_.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:f}=e.subscribe(u);return f},[e]),a=_.useCallback(()=>e?.get(),[e]);return yx.useSyncExternalStoreWithSelector(s,a,a,t,r)}var uA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ls(e){const t=fn(),r=_.useContext(e.from?eA:tf),s=e.from??r,a=s?e.from?t.stores.getRouteMatchStore(s):t.stores.matchStores.get(s):void 0,c=_.useRef(void 0);return Pt(a??uA,u=>{if((e.shouldThrow??!0)&&!u&&kn(),u===void 0)return;const f=e.select?e.select(u):u;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=Io(c.current,f);return c.current=p,p}return f})}function vx(e){return Ls({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function bx(e){const{select:t,...r}=e;return Ls({...r,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function Sx(e){return Ls({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function xx(e){return Ls({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function wx(e){const t=fn();return _.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function Rx(e){return Ls({...e,select:t=>e.select?e.select(t.context):t.context})}var Tr=f1();function fA(e,t){const r=fn(),s=Y2(t),{activeProps:a,inactiveProps:c,activeOptions:u,to:f,preload:p,preloadDelay:h,preloadIntentProximity:m,hashScrollIntoView:y,replace:v,startTransition:b,resetScroll:S,viewTransition:E,children:x,target:R,disabled:O,style:A,className:M,onClick:N,onBlur:D,onFocus:j,onMouseEnter:L,onMouseLeave:H,onTouchStart:Y,ignoreBlocker:W,params:$,search:K,hash:q,state:Z,mask:I,reloadDocument:B,unsafeRelative:ee,from:ne,_fromLocation:le,...z}=e,G=om(),re=_.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=Pt(r.stores.location,ve=>ve,(ve,Ne)=>ve.href===Ne.href),he=_.useMemo(()=>{const ve={_fromLocation:ie,...re};return r.buildLocation(ve)},[r,ie,re]),de=he.maskedLocation?he.maskedLocation.publicHref:he.publicHref,ge=he.maskedLocation?he.maskedLocation.external:he.external,me=_.useMemo(()=>yA(de,ge,r.history,O),[O,ge,de,r.history]),ye=_.useMemo(()=>{if(me?.external)return Ru(me.href,r.protocolAllowlist)?void 0:me.href;if(!vA(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),Ru(f,r.protocolAllowlist)?void 0:f}catch{}},[f,me,r.protocolAllowlist]),ke=_.useMemo(()=>{if(ye)return!1;if(u?.exact){if(!oC(ie.pathname,he.pathname,r.basepath))return!1}else{const ve=Eu(ie.pathname,r.basepath),Ne=Eu(he.pathname,r.basepath);if(!(ve.startsWith(Ne)&&(ve.length===Ne.length||ve[Ne.length]==="/")))return!1}return(u?.includeSearch??!0)&&!zn(ie.search,he.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?G&&ie.hash===he.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,ie,ye,G,he.hash,he.pathname,he.search,r.basepath]),He=ke?Lo(a,{})??dA:Xh,Se=ke?Xh:Lo(c,{})??Xh,Pe=[M,He.className,Se.className].filter(Boolean).join(" "),Ze=(A||He.style||Se.style)&&{...A,...He.style,...Se.style},[Ge,Me]=_.useState(!1),Te=_.useRef(!1),Ae=e.reloadDocument||ye?!1:p??r.options.defaultPreload,be=h??r.options.defaultPreloadDelay??0,Ce=_.useCallback(()=>{r.preloadRoute({...re,_builtLocation:he}).catch(ve=>{console.warn(ve),console.warn(BC)})},[r,re,he]);q2(s,_.useCallback(ve=>{ve?.isIntersecting&&Ce()},[Ce]),gA,{disabled:!!O||Ae!=="viewport"}),_.useEffect(()=>{Te.current||!O&&Ae==="render"&&(Ce(),Te.current=!0)},[O,Ce,Ae]);const ce=ve=>{const Ne=ve.currentTarget.getAttribute("target"),Fe=R!==void 0?R:Ne;if(!O&&!bA(ve)&&!ve.defaultPrevented&&(!Fe||Fe==="_self")&&ve.button===0){ve.preventDefault(),Tr.flushSync(()=>{Me(!0)});const Ct=r.subscribe("onResolved",()=>{Ct(),Me(!1)});r.navigate({...re,replace:v,resetScroll:S,hashScrollIntoView:y,startTransition:b,viewTransition:E,ignoreBlocker:W})}};if(ye)return{...z,ref:s,href:ye,...x&&{children:x},...R&&{target:R},...O&&{disabled:O},...A&&{style:A},...M&&{className:M},...N&&{onClick:N},...D&&{onBlur:D},...j&&{onFocus:j},...L&&{onMouseEnter:L},...H&&{onMouseLeave:H},...Y&&{onTouchStart:Y}};const xe=ve=>{if(O||Ae!=="intent")return;if(!be){Ce();return}const Ne=ve.currentTarget;if(Xa.has(Ne))return;const Fe=setTimeout(()=>{Xa.delete(Ne),Ce()},be);Xa.set(Ne,Fe)},ue=ve=>{O||Ae!=="intent"||Ce()},pe=ve=>{if(O||!Ae||!be)return;const Ne=ve.currentTarget,Fe=Xa.get(Ne);Fe&&(clearTimeout(Fe),Xa.delete(Ne))};return{...z,...He,...Se,href:me?.href,ref:s,onClick:Mi([N,ce]),onBlur:Mi([D,pe]),onFocus:Mi([j,xe]),onMouseEnter:Mi([L,xe]),onMouseLeave:Mi([H,pe]),onTouchStart:Mi([Y,ue]),disabled:!!O,target:R,...Ze&&{style:Ze},...Pe&&{className:Pe},...O&&hA,...ke&&pA,...G&&Ge&&mA}}var Xh={},dA={className:"active"},hA={role:"link","aria-disabled":!0},pA={"data-status":"active","aria-current":"page"},mA={"data-transitioning":"transitioning"},Xa=new WeakMap,gA={rootMargin:"100px"},Mi=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function yA(e,t,r,s){if(!s)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function vA(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var qo=_.forwardRef((e,t)=>{const{_asChild:r,...s}=e,{type:a,...c}=fA(s,t),u=typeof s.children=="function"?s.children({isActive:c["data-status"]==="active"}):s.children;if(!r){const{disabled:f,...p}=c;return _.createElement("a",p,u)}return _.createElement(r,c,u)});function bA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var SA=class extends M1{constructor(t){super(t),this.useMatch=r=>Ls({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>Rx({...r,from:this.id}),this.useSearch=r=>xx({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Sx({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>bx({...r,from:this.id}),this.useLoaderData=r=>vx({...r,from:this.id}),this.useNavigate=()=>wx({from:this.fullPath}),this.Link=xr.forwardRef((r,s)=>k.jsx(qo,{ref:s,from:this.fullPath,...r}))}};function xA(e){return new SA(e)}var wA=class extends ZC{constructor(e){super(e),this.useMatch=t=>Ls({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Rx({...t,from:this.id}),this.useSearch=t=>xx({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Sx({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>bx({...t,from:this.id}),this.useLoaderData=t=>vx({...t,from:this.id}),this.useNavigate=()=>wx({from:this.fullPath}),this.Link=xr.forwardRef((t,r)=>k.jsx(qo,{ref:r,from:this.fullPath,...t}))}};function RA(e){return new wA(e)}function io(e){return new EA(e,{silent:!0}).createRoute}var EA=class{constructor(e,t){this.path=e,this.createRoute=r=>{const s=xA(r);return s.isRoot=!1,s},this.silent=t?.silent}};function ao(e,t){let r,s,a,c;const u=()=>(r||(r=e().then(p=>{r=void 0,s=p[t]}).catch(p=>{if(a=p,BT(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),c=!0)}})),r),f=function(h){if(c)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!s)if(Ou)Ou(u());else throw u();return _.createElement(s,h)};return f.preload=u,f}function _A(e){const t=fn(),r=`not-found-${Pt(t.stores.location,s=>s.pathname)}-${Pt(t.stores.status,s=>s)}`;return k.jsx(nm,{getResetKey:()=>r,onCatch:(s,a)=>{if(en(s))e.onCatch?.(s,a);else throw s},errorComponent:({error:s})=>{if(en(s))return e.fallback?.(s);throw s},children:e.children})}function TA(){return k.jsx("p",{children:"Not Found"})}function Ai(e){return k.jsx(k.Fragment,{children:e.children})}function Ex(e,t,r){return t.options.notFoundComponent?k.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?k.jsx(e.options.defaultNotFoundComponent,{...r}):k.jsx(TA,{})}function CA(e){return null}function OA(){return CA(fn()),null}var _x=_.memo(function({matchId:t}){const r=fn(),s=r.stores.matchStores.get(t);s||kn();const a=Pt(r.stores.loadedAt,u=>u),c=Pt(s,u=>u);return k.jsx(MA,{router:r,matchId:t,resetKey:a,matchState:_.useMemo(()=>{const u=c.routeId,f=r.routesById[u].parentRoute?.id;return{routeId:u,ssr:c.ssr,_displayPending:c._displayPending,parentRouteId:f}},[c._displayPending,c.routeId,c.ssr,r.routesById])})});function MA({router:e,matchId:t,resetKey:r,matchState:s}){const a=e.routesById[s.routeId],c=a.options.pendingComponent??e.options.defaultPendingComponent,u=c?k.jsx(c,{}):null,f=a.options.errorComponent??e.options.defaultErrorComponent,p=a.options.onCatch??e.options.defaultOnCatch,h=a.isRoot?a.options.notFoundComponent??e.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=s.ssr===!1||s.ssr==="data-only",y=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??c??(a.options.errorComponent?.preload||m))?_.Suspense:Ai,v=f?nm:Ai,b=h?_A:Ai;return k.jsxs(a.isRoot?a.options.shellComponent??Ai:Ai,{children:[k.jsx(tf.Provider,{value:t,children:k.jsx(y,{fallback:u,children:k.jsx(v,{getResetKey:()=>r,errorComponent:f||rm,onCatch:(S,E)=>{if(en(S))throw S.routeId??=s.routeId,S;p?.(S,E)},children:k.jsx(b,{fallback:S=>{if(S.routeId??=s.routeId,!h||S.routeId&&S.routeId!==s.routeId||!S.routeId&&!a.isRoot)throw S;return _.createElement(h,S)},children:m||s._displayPending?k.jsx(J2,{fallback:u,children:k.jsx(B0,{matchId:t})}):k.jsx(B0,{matchId:t})})})})}),s.parentRouteId===Ts?k.jsxs(k.Fragment,{children:[k.jsx(AA,{resetKey:r}),e.options.scrollRestoration&&h1?k.jsx(OA,{}):null]}):null]})}function AA({resetKey:e}){const t=fn(),r=_.useRef(void 0);return el(()=>{const s=t.latestLocation.href;(r.current===void 0||r.current!==s)&&(t.emit({type:"onRendered",...ki(t.stores.location.get(),t.stores.resolvedLocation.get())}),r.current=s)},[t.latestLocation.state.__TSR_key,e,t]),null}var B0=_.memo(function({matchId:t}){const r=fn(),s=(m,y)=>r.getMatch(m.id)?._nonReactive[y]??m._nonReactive[y],a=r.stores.matchStores.get(t);a||kn();const c=Pt(a,m=>m),u=c.routeId,f=r.routesById[u],p=_.useMemo(()=>{const m=(r.routesById[u].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:u,loaderDeps:c.loaderDeps,params:c._strictParams,search:c._strictSearch});return m?JSON.stringify(m):void 0},[u,c.loaderDeps,c._strictParams,c._strictSearch,r.options.defaultRemountDeps,r.routesById]),h=_.useMemo(()=>{const m=f.options.component??r.options.defaultComponent;return m?k.jsx(m,{},p):k.jsx(zA,{})},[p,f.options.component,r.options.defaultComponent]);if(c._displayPending)throw s(c,"displayPendingPromise");if(c._forcePending)throw s(c,"minPendingPromise");if(c.status==="pending"){const m=f.options.pendingMinMs??r.options.defaultPendingMinMs;if(m){const y=r.getMatch(c.id);if(y&&!y._nonReactive.minPendingPromise){const v=Os();y._nonReactive.minPendingPromise=v,setTimeout(()=>{v.resolve(),y._nonReactive.minPendingPromise=void 0},m)}}throw s(c,"loadPromise")}if(c.status==="notFound")return en(c.error)||kn(),Ex(r,f,c.error);if(c.status==="redirected")throw Dn(c.error)||kn(),s(c,"loadPromise");if(c.status==="error")throw c.error;return h}),zA=_.memo(function(){const t=fn(),r=_.useContext(tf);let s,a=!1,c;{const h=r?t.stores.matchStores.get(r):void 0;[s,a]=Pt(h,m=>[m?.routeId,m?.globalNotFound??!1]),c=Pt(t.stores.matchesId,m=>m[m.findIndex(y=>y===r)+1])}const u=s?t.routesById[s]:void 0,f=t.options.defaultPendingComponent?k.jsx(t.options.defaultPendingComponent,{}):null;if(a)return u||kn(),Ex(t,u,void 0);if(!c)return null;const p=k.jsx(_x,{matchId:c});return s===Ts?k.jsx(_.Suspense,{fallback:f,children:p}):p});function DA(){const e=fn(),t=_.useRef({router:e,mounted:!1}),[r,s]=_.useState(!1),a=Pt(e.stores.isLoading,y=>y),c=Pt(e.stores.hasPending,y=>y),u=qh(a),f=a||r||c,p=qh(f),h=a||c,m=qh(h);return e.startTransition=y=>{s(!0),_.startTransition(()=>{y(),s(!1)})},_.useEffect(()=>{const y=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Wr(e.latestLocation.publicHref)!==Wr(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{y()}},[e,e.history]),el(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),el(()=>{u&&!a&&e.emit({type:"onLoad",...ki(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,e,a]),el(()=>{m&&!h&&e.emit({type:"onBeforeRouteMount",...ki(e.stores.location.get(),e.stores.resolvedLocation.get())})},[h,m,e]),el(()=>{if(p&&!f){const y=ki(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...y}),px(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),y.hrefChanged&&VC(e)}},[f,p,e]),null}function kA(){const e=fn(),t=e.routesById[Ts].options.pendingComponent??e.options.defaultPendingComponent,r=t?k.jsx(t,{}):null,s=k.jsxs(typeof document<"u"&&e.ssr?Ai:_.Suspense,{fallback:r,children:[k.jsx(DA,{}),k.jsx(NA,{})]});return e.options.InnerWrap?k.jsx(e.options.InnerWrap,{children:s}):s}function NA(){const e=fn(),t=Pt(e.stores.firstId,a=>a),r=Pt(e.stores.loadedAt,a=>a),s=t?k.jsx(_x,{matchId:t}):null;return k.jsx(tf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?s:k.jsx(nm,{getResetKey:()=>r,errorComponent:rm,onCatch:void 0,children:s})})}var PA=e=>({createMutableStore:P0,createReadonlyStore:P0,batch:px}),jA=e=>new LA(e),LA=class extends DC{constructor(e){super(e,PA)}};function IA({router:e,children:t,...r}){m1(r)&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const s=k.jsx(dx.Provider,{value:e,children:t});return e.options.Wrap?k.jsx(e.options.Wrap,{children:s}):s}function UA({router:e,...t}){return k.jsx(IA,{router:e,...t,children:k.jsx(kA,{})})}function Tx(e){const t=fn(),r=_.useRef(void 0);return Pt(t.stores.location,s=>{const a=s;if(t.options.defaultStructuralSharing){const c=Io(r.current,a);return r.current=c,c}return a})}function Cx(e){const{attrs:t,children:r,nonce:s}=e;switch(e.tag){case"title":return k.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return k.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return k.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:s,suppressHydrationWarning:!0});case"style":return e.inlineCss,k.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:s});case"script":return k.jsx(BA,{attrs:t,children:r});default:return null}}function BA({attrs:e,children:t}){fn();const r=om(),s=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(_.useEffect(()=>{if(!s){if(e?.src){const a=(()=>{try{const u=document.baseURI||window.location.href;return new URL(e.src,u).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===a))return;const c=document.createElement("script");for(const[u,f]of Object.entries(e))u!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(u,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}if(typeof t=="string"){const a=typeof e?.type=="string"?e.type:"text/javascript",c=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(f=>{if(!(f instanceof HTMLScriptElement))return!1;const p=f.getAttribute("type")??"text/javascript",h=f.getAttribute("nonce")??void 0;return f.textContent===t&&p===a&&h===c}))return;const u=document.createElement("script");if(u.textContent=t,e)for(const[f,p]of Object.entries(e))f!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&u.setAttribute(f,typeof p=="boolean"?"":String(p));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[e,t,s]),s&&typeof t=="string")return k.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return k.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return k.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var HA=e=>{const t=fn(),r=t.options.ssr?.nonce,s=Pt(t.stores.matches,h=>h.map(m=>m.meta).filter(Boolean),zn),a=_.useMemo(()=>{const h=[],m={};let y;for(let v=s.length-1;v>=0;v--){const b=s[v];for(let S=b.length-1;S>=0;S--){const E=b[S];if(E)if(E.title)y||(y={tag:"title",children:E.title});else if("script:ld+json"in E)try{const x=JSON.stringify(E["script:ld+json"]);h.push({tag:"script",attrs:{type:"application/ld+json"},children:VT(x)})}catch{}else{const x=E.name??E.property;if(x){if(m[x])continue;m[x]=!0}h.push({tag:"meta",attrs:{...E,nonce:r}})}}}return y&&h.push(y),r&&h.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),h.reverse(),h},[s,r]),c=Pt(t.stores.matches,h=>{const m=h.map(b=>b.links).filter(Boolean).flat(1).map(b=>({tag:"link",attrs:{...b,nonce:r}})),y=t.ssr?.manifest,v=h.map(b=>y?.routes[b.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(b=>b.tag==="link"?$C(y,b)?[]:[{tag:"link",attrs:{...b.attrs,crossOrigin:b0(e,"stylesheet")??b.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}]:b.tag==="style"?[{tag:"style",attrs:{...b.attrs,nonce:r},children:b.children,...b.inlineCss?{inlineCss:!0}:{}}]:[]);return[...m,...v]},zn),u=Pt(t.stores.matches,h=>{const m=[];return h.map(y=>t.looseRoutesById[y.routeId]).forEach(y=>t.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(v=>{const b=HC(v);m.push({tag:"link",attrs:{rel:"modulepreload",href:b.href,crossOrigin:b0(e,"modulepreload")??b.crossOrigin,nonce:r}})})),m},zn),f=Pt(t.stores.matches,h=>h.map(m=>m.styles).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"style",attrs:{...y,nonce:r},children:m})),zn),p=Pt(t.stores.matches,h=>h.map(m=>m.headScripts).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"script",attrs:{...y,nonce:r},children:m})),zn);return FA([...a,...u,...c,...f,...p],h=>JSON.stringify(h))};function FA(e,t){const r=new Set;return e.filter(s=>{const a=t(s);return r.has(a)?!1:(r.add(a),!0)})}function $A(e){const t=HA(e.assetCrossOrigin),r=fn().options.ssr?.nonce;return k.jsx(k.Fragment,{children:t.map(s=>_.createElement(Cx,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:r}))})}var ZA=()=>{const e=fn(),t=e.options.ssr?.nonce,r=c=>{const u=[],f=e.ssr?.manifest;return f?(c.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>f.routes[p.id]?.assets?.filter(h=>h.tag==="script").forEach(h=>{u.push({tag:"script",attrs:{...h.attrs,nonce:t},children:h.children})})),u):[]},s=c=>c.map(u=>u.scripts).flat(1).filter(Boolean).map(({children:u,...f})=>({tag:"script",attrs:{...f,suppressHydrationWarning:!0,nonce:t},children:u})),a=Pt(e.stores.matches,r,zn);return VA(e,Pt(e.stores.matches,s,zn),a)};function VA(e,t,r){let s;e.serverSsr&&(s=e.serverSsr.takeBufferedScripts());const a=[...t,...r];return s&&a.unshift(s),k.jsx(k.Fragment,{children:a.map((c,u)=>_.createElement(Cx,{...c,key:`tsr-scripts-${c.tag}-${u}`}))})}const qA="modulepreload",YA=function(e){return"/"+e},H0={},lo=function(t,r,s){let a=Promise.resolve();if(r&&r.length>0){let p=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");a=p(r.map(h=>{if(h=YA(h),h in H0)return;H0[h]=!0;const m=h.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":qA,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,S)=>{v.addEventListener("load",b),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return a.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};var Yi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},GA=class extends Yi{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},sm=new GA,KA={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},QA=class{#e=KA;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Rs=new QA;function XA(e){setTimeout(e,0)}var JA=typeof window>"u"||"Deno"in globalThis;function Sn(){}function WA(e,t){return typeof e=="function"?e(t):e}function Tp(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ox(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $o(e,t){return typeof e=="function"?e(t):e}function Zn(e,t){return typeof e=="function"?e(t):e}function F0(e,t){const{type:r="all",exact:s,fetchStatus:a,predicate:c,queryKey:u,stale:f}=e;if(u){if(s){if(t.queryHash!==im(u,t.options))return!1}else if(!cl(t.queryKey,u))return!1}if(r!=="all"){const p=t.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||a&&a!==t.state.fetchStatus||c&&!c(t))}function $0(e,t){const{exact:r,status:s,predicate:a,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(Ms(t.options.mutationKey)!==Ms(c))return!1}else if(!cl(t.options.mutationKey,c))return!1}return!(s&&t.state.status!==s||a&&!a(t))}function im(e,t){return(t?.queryKeyHashFn||Ms)(e)}function Ms(e){return JSON.stringify(e,(t,r)=>Cp(r)?Object.keys(r).sort().reduce((s,a)=>(s[a]=r[a],s),{}):r)}function cl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>cl(e[r],t[r])):!1}var ez=Object.prototype.hasOwnProperty;function Mx(e,t,r=0){if(e===t)return e;if(r>500)return t;const s=Z0(e)&&Z0(t);if(!s&&!(Cp(e)&&Cp(t)))return t;const c=(s?e:Object.keys(e)).length,u=s?t:Object.keys(t),f=u.length,p=s?new Array(f):{};let h=0;for(let m=0;m<f;m++){const y=s?m:u[m],v=e[y],b=t[y];if(v===b){p[y]=v,(s?m<c:ez.call(e,y))&&h++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){p[y]=b;continue}const S=Mx(v,b,r+1);p[y]=S,S===v&&h++}return c===f&&h===c?e:p}function Au(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Z0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Cp(e){if(!V0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!V0(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function V0(e){return Object.prototype.toString.call(e)==="[object Object]"}function tz(e){return new Promise(t=>{Rs.setTimeout(t,e)})}function Op(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Mx(e,t):t}function nz(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function rz(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var am=Symbol();function Ax(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===am?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function lm(e,t){return typeof e=="function"?e(...t):!!e}function oz(e,t,r){let s=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=t(),s||(s=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var ul=(()=>{let e=()=>JA;return{isServer(){return e()},setIsServer(t){e=t}}})();function Mp(){let e,t;const r=new Promise((a,c)=>{e=a,t=c});r.status="pending",r.catch(()=>{});function s(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},r.reject=a=>{s({status:"rejected",reason:a}),t(a)},r}var sz=XA;function iz(){let e=[],t=0,r=f=>{f()},s=f=>{f()},a=sz;const c=f=>{t?e.push(f):a(()=>{r(f)})},u=()=>{const f=e;e=[],f.length&&a(()=>{s(()=>{f.forEach(p=>{r(p)})})})};return{batch:f=>{let p;t++;try{p=f()}finally{t--,t||u()}return p},batchCalls:f=>(...p)=>{c(()=>{f(...p)})},schedule:c,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{a=f}}}var qt=iz(),az=class extends Yi{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},zu=new az;function lz(e){return Math.min(1e3*2**e,3e4)}function zx(e){return(e??"online")==="online"?zu.isOnline():!0}var Ap=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Dx(e){let t=!1,r=0,s;const a=Mp(),c=()=>a.status!=="pending",u=E=>{if(!c()){const x=new Ap(E);v(x),e.onCancel?.(x)}},f=()=>{t=!0},p=()=>{t=!1},h=()=>sm.isFocused()&&(e.networkMode==="always"||zu.isOnline())&&e.canRun(),m=()=>zx(e.networkMode)&&e.canRun(),y=E=>{c()||(s?.(),a.resolve(E))},v=E=>{c()||(s?.(),a.reject(E))},b=()=>new Promise(E=>{s=x=>{(c()||h())&&E(x)},e.onPause?.()}).then(()=>{s=void 0,c()||e.onContinue?.()}),S=()=>{if(c())return;let E;const x=r===0?e.initialPromise:void 0;try{E=x??e.fn()}catch(R){E=Promise.reject(R)}Promise.resolve(E).then(y).catch(R=>{if(c())return;const O=e.retry??(ul.isServer()?0:3),A=e.retryDelay??lz,M=typeof A=="function"?A(r,R):A,N=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,R);if(t||!N){v(R);return}r++,e.onFail?.(r,R),tz(M).then(()=>h()?void 0:b()).then(()=>{t?v(R):S()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(s?.(),a),cancelRetry:f,continueRetry:p,canStart:m,start:()=>(m()?S():b().then(S),a)}}var kx=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Tp(this.gcTime)&&(this.#e=Rs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ul.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Rs.clearTimeout(this.#e),this.#e=void 0)}};function cz(e){return{onFetch:(t,r)=>{const s=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const h=async()=>{let m=!1;const y=S=>{oz(S,()=>t.signal,()=>m=!0)},v=Ax(t.options,t.fetchOptions),b=async(S,E,x)=>{if(m)return Promise.reject(t.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const O=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:E,direction:x?"backward":"forward",meta:t.options.meta};return y(D),D})(),A=await v(O),{maxPages:M}=t.options,N=x?rz:nz;return{pages:N(S.pages,A,M),pageParams:N(S.pageParams,E,M)}};if(a&&c.length){const S=a==="backward",E=S?uz:q0,x={pages:c,pageParams:u},R=E(s,x);f=await b(x,R,S)}else{const S=e??c.length;do{const E=p===0?u[0]??s.initialPageParam:q0(s,f);if(p>0&&E==null)break;f=await b(f,E),p++}while(p<S)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h}}}function q0(e,{pages:t,pageParams:r}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function uz(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var fz=class extends kx{#e;#t;#n;#r;#s;#o;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#r=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G0(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#o?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=G0(this.options);t.data!==void 0&&(this.setState(Y0(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const r=Op(this.state.data,e,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(Sn).catch(Sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Zn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===am||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>$o(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ox(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#o&&(this.#i||this.#u()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},a=()=>{const p=Ax(this.options,t),m=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return s(y),y})();return this.#i=!1,this.options.persister?this.options.persister(p,m,this):p(m)},u=(()=>{const p={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:a};return s(p),p})();(this.#e==="infinite"?cz(this.options.pages):this.options.behavior)?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#l({type:"fetch",meta:u.fetchOptions?.meta}),this.#o=Dx({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:p=>{p instanceof Ap&&p.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(p,h)=>{this.#l({type:"failed",failureCount:p,error:h})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const p=await this.#o.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#r.config.onSuccess?.(p,this),this.#r.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof Ap){if(p.silent)return this.#o.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#l({type:"error",error:p}),this.#r.config.onError?.(p,this),this.#r.config.onSettled?.(this.state.data,p,this),p}finally{this.scheduleGc()}}#l(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Nx(r.data,this.options),fetchMeta:e.meta??null};case"success":const s={...r,...Y0(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const a=e.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),qt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Nx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:zx(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Y0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function G0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var dz=class extends Yi{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=Mp(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#s;#o;#a;#i;#u;#l;#p;#f;#d;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K0(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zp(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zp(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#x(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Zn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!Au(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&Q0(this.#t,r,this.options,t)&&this.#h(),this.updateResult(),s&&(this.#t!==r||Zn(this.options.enabled,this.#t)!==Zn(t.enabled,this.#t)||$o(this.options.staleTime,this.#t)!==$o(t.staleTime,this.#t))&&this.#g();const a=this.#y();s&&(this.#t!==r||Zn(this.options.enabled,this.#t)!==Zn(t.enabled,this.#t)||a!==this.#c)&&this.#v(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return pz(this,r)&&(this.#r=r,this.#o=this.options,this.#s=this.#t.state),r}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(r,s)=>(this.trackProp(s),t?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Sn)),t}#g(){this.#S();const e=$o(this.options.staleTime,this.#t);if(ul.isServer()||this.#r.isStale||!Tp(e))return;const r=Ox(this.#r.dataUpdatedAt,e)+1;this.#f=Rs.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#c=e,!(ul.isServer()||Zn(this.options.enabled,this.#t)===!1||!Tp(this.#c)||this.#c===0)&&(this.#d=Rs.setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&this.#h()},this.#c))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#f!==void 0&&(Rs.clearTimeout(this.#f),this.#f=void 0)}#x(){this.#d!==void 0&&(Rs.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const r=this.#t,s=this.options,a=this.#r,c=this.#s,u=this.#o,p=e!==r?e.state:this.#n,{state:h}=e;let m={...h},y=!1,v;if(t._optimisticResults){const L=this.hasListeners(),H=!L&&K0(e,t),Y=L&&Q0(e,r,t,s);(H||Y)&&(m={...m,...Nx(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:b,errorUpdatedAt:S,status:E}=m;v=m.data;let x=!1;if(t.placeholderData!==void 0&&v===void 0&&E==="pending"){let L;a?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(L=a.data,x=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,L!==void 0&&(E="success",v=Op(a?.data,L,t),y=!0)}if(t.select&&v!==void 0&&!x)if(a&&v===c?.data&&t.select===this.#u)v=this.#l;else try{this.#u=t.select,v=t.select(v),v=Op(a?.data,v,t),this.#l=v,this.#i=null}catch(L){this.#i=L}this.#i&&(b=this.#i,v=this.#l,S=Date.now(),E="error");const R=m.fetchStatus==="fetching",O=E==="pending",A=E==="error",M=O&&R,N=v!==void 0,j={status:E,fetchStatus:m.fetchStatus,isPending:O,isSuccess:E==="success",isError:A,isInitialLoading:M,isLoading:M,data:v,dataUpdatedAt:m.dataUpdatedAt,error:b,errorUpdatedAt:S,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!O,isLoadingError:A&&!N,isPaused:m.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:A&&N,isStale:cm(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Zn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=j.data!==void 0,H=j.status==="error"&&!L,Y=K=>{H?K.reject(j.error):L&&K.resolve(j.data)},W=()=>{const K=this.#a=j.promise=Mp();Y(K)},$=this.#a;switch($.status){case"pending":e.queryHash===r.queryHash&&Y($);break;case"fulfilled":(H||j.data!==$.value)&&W();break;case"rejected":(!H||j.error!==$.reason)&&W();break}}return j}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#o=this.options,this.#s.data!==void 0&&(this.#p=this.#t),Au(t,e))return;this.#r=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.#m.size)return!0;const c=new Set(a??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(u=>{const f=u;return this.#r[f]!==e[f]&&c.has(f)})};this.#R({listeners:r()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#R(e){qt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function hz(e,t){return Zn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Zn(t.retryOnMount,e)===!1)}function K0(e,t){return hz(e,t)||e.state.data!==void 0&&zp(e,t,t.refetchOnMount)}function zp(e,t,r){if(Zn(t.enabled,e)!==!1&&$o(t.staleTime,e)!=="static"){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&cm(e,t)}return!1}function Q0(e,t,r,s){return(e!==t||Zn(s.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&cm(e,r)}function cm(e,t){return Zn(t.enabled,e)!==!1&&e.isStaleByTime($o(t.staleTime,e))}function pz(e,t){return!Au(e.getCurrentResult(),t)}var mz=class extends kx{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Px(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Dx({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#s({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",a=!this.#r.canStart();try{if(s)t();else{this.#s({type:"pending",variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#s({type:"pending",context:u,variables:e,isPaused:a})}const c=await this.#r.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,r),await this.options.onSuccess?.(c,e,this.state.context,r),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(c,null,e,this.state.context,r),this.#s({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#s({type:"error",error:c}),c}finally{this.#n.runNext(this)}}#s(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),qt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Px(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gz=class extends Yi{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const s=new mz({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(s),s}add(e){this.#e.add(e);const t=Kc(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Kc(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Kc(e);if(typeof t=="string"){const s=this.#t.get(t)?.find(a=>a.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=Kc(e);return typeof t=="string"?this.#t.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){qt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>$0(t,r))}findAll(e={}){return this.getAll().filter(t=>$0(e,t))}notify(e){qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return qt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Sn))))}};function Kc(e){return e.options.scope?.id}var yz=class extends Yi{#e;#t=void 0;#n;#r;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),Au(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Ms(r.mutationKey)!==Ms(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#o()}mutate(t,r){return this.#r=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#s(){const t=this.#n?.state??Px();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){qt.batch(()=>{if(this.#r&&this.hasListeners()){const r=this.#t.variables,s=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,r,s,a)}catch(c){Promise.reject(c)}try{this.#r.onSettled?.(t.data,null,r,s,a)}catch(c){Promise.reject(c)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,r,s,a)}catch(c){Promise.reject(c)}try{this.#r.onSettled?.(void 0,t.error,r,s,a)}catch(c){Promise.reject(c)}}}this.listeners.forEach(r=>{r(this.#t)})})}},vz=class extends Yi{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const s=t.queryKey,a=t.queryHash??im(s,t);let c=this.get(a);return c||(c=new fz({client:e,queryKey:s,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>F0(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>F0(e,r)):t}notify(e){qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},bz=class{#e;#t;#n;#r;#s;#o;#a;#i;constructor(e={}){this.#e=e.queryCache||new vz,this.#t=e.mutationCache||new gz,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=zu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),s=r.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime($o(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const s=r.data;return[t,s]})}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(s.queryHash)?.state.data,u=WA(t,c);if(u!==void 0)return this.#e.build(this,s).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return qt.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;qt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return qt.batch(()=>(r.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},s=qt.batch(()=>this.#e.findAll(e).map(a=>a.cancel(r)));return Promise.all(s).then(Sn).catch(Sn)}invalidateQueries(e,t={}){return qt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},s=qt.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let c=a.fetch(void 0,r);return r.throwOnError||(c=c.catch(Sn)),a.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(Sn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime($o(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sn).catch(Sn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sn).catch(Sn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return zu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Ms(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(s=>{cl(e,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(e,t){this.#s.set(Ms(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],r={};return t.forEach(s=>{cl(e,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=im(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===am&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},jx=_.createContext(void 0),um=e=>{const t=_.useContext(jx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Sz=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(jx.Provider,{value:e,children:t})),Lx=_.createContext(!1),xz=()=>_.useContext(Lx);Lx.Provider;function wz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Rz=_.createContext(wz()),Ez=()=>_.useContext(Rz),_z=(e,t,r)=>{const s=r?.state.error&&typeof e.throwOnError=="function"?lm(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},Tz=e=>{_.useEffect(()=>{e.clearReset()},[e])},Cz=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||lm(r,[e.error,s])),Oz=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...a)=>r(s(...a)):r(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Mz=(e,t)=>e.isLoading&&e.isFetching&&!t,Az=(e,t)=>e?.suspense&&t.isPending,X0=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function zz(e,t,r){const s=xz(),a=Ez(),c=um(),u=c.defaultQueryOptions(e);c.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const f=c.getQueryCache().get(u.queryHash);u._optimisticResults=s?"isRestoring":"optimistic",Oz(u),_z(u,a,f),Tz(a);const p=!c.getQueryCache().get(u.queryHash),[h]=_.useState(()=>new t(c,u)),m=h.getOptimisticResult(u),y=!s&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(v=>{const b=y?h.subscribe(qt.batchCalls(v)):Sn;return h.updateResult(),b},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),_.useEffect(()=>{h.setOptions(u)},[u,h]),Az(u,m))throw X0(u,h,a);if(Cz({result:m,errorResetBoundary:a,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw m.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(u,m),u.experimental_prefetchInRender&&!ul.isServer()&&Mz(m,s)&&(p?X0(u,h,a):f?.promise)?.catch(Sn).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?m:h.trackResult(m)}function Dz(e,t){return zz(e,dz)}function kz(e,t){const r=um(),[s]=_.useState(()=>new yz(r,e));_.useEffect(()=>{s.setOptions(e)},[s,e]);const a=_.useSyncExternalStore(_.useCallback(u=>s.subscribe(qt.batchCalls(u)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=_.useCallback((u,f)=>{s.mutate(u,f).catch(Sn)},[s]);if(a.error&&lm(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:c,mutateAsync:a.mutate}}const Nz=new bz({defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1,refetchOnWindowFocus:!1},mutations:{retry:0}}}),J0={};function mn(e,t){const r=_.useRef(J0);return r.current===J0&&(r.current=e(t)),r}const Dp=[];let kp;function Pz(){return kp}function jz(e){Dp.push(e)}function fm(e){const t=(r,s)=>{const a=mn(Lz).current;let c;try{kp=a;for(const u of Dp)u.before(a);c=e(r,s);for(const u of Dp)u.after(a);a.didInitialize=!0}finally{kp=void 0}return c};return t.displayName=e.displayName||e.name,t}function Ix(e){return _.forwardRef(fm(e))}function Lz(){return{didInitialize:!1}}function dm(e){const t=_.useRef(!0);t.current&&(t.current=!1,e())}const Iz=()=>{},Re=typeof document<"u"?_.useLayoutEffect:Iz;function Uz(e,t){return function(s,...a){const c=new URL(e);return c.searchParams.set("code",s.toString()),a.forEach(u=>c.searchParams.append("args[]",u)),`${t} error #${s}; visit ${c} for the full message.`}}const wn=Uz("https://base-ui.com/production-error","Base UI"),Ux=_.createContext(void 0);function Sl(e){const t=_.useContext(Ux);if(t===void 0&&!e)throw new Error(wn(72));return t}const Bz=[];function nf(e){_.useEffect(e,Bz)}const Ja=0;class dr{static create(){return new dr}currentId=Ja;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ja,r()},t)}isStarted(){return this.currentId!==Ja}clear=()=>{this.currentId!==Ja&&(clearTimeout(this.currentId),this.currentId=Ja)};disposeEffect=()=>this.clear}function Pn(){const e=mn(dr.create).current;return nf(e.disposeEffect),e}const Gi=typeof navigator<"u",Jh=Hz(),Bx=$z(),Hx=Fz(),Fx=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),$x=Jh.platform==="MacIntel"&&Jh.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Jh.platform),Zx=Gi&&/apple/i.test(navigator.vendor),Np=Gi&&/android/i.test(Bx)||/android/i.test(Hx),Vx=Gi&&Bx.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,qx=Hx.includes("jsdom/");function Hz(){if(!Gi)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Fz(){if(!Gi)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function $z(){if(!Gi)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function Vn(e){e.preventDefault(),e.stopPropagation()}function Zz(e){return"nativeEvent"in e}function Yx(e){return e.pointerType===""&&e.isTrusted?!0:Np&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Gx(e){return qx?!1:!Np&&e.width===0&&e.height===0||Np&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Fi(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Kx(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Vz(e,t){return t!=null&&!Fi(t)?0:typeof e=="function"?e():e}function Du(e,t,r){const s=Vz(e,r);return typeof s=="number"?s:s?.[t]}function W0(e){return typeof e=="function"?e():e}function Qx(e,t){return t||e==="click"||e==="mousedown"}function hm(){}const Pp=Object.freeze([]),cn=Object.freeze({}),pm="none",As="trigger-press",pn="trigger-hover",ji="trigger-focus",mm="outside-press",Xx="item-press",qz="close-press",$i="focus-out",rf="escape-key",vu="list-navigation",Yz="cancel-open",tl="sibling-open",Gz="disabled",gm="imperative-action";function Ye(e,t,r,s){let a=!1,c=!1;const u=cn;return{reason:e,event:t??new Event("base-ui"),cancel(){a=!0},allowPropagation(){c=!0},get isCanceled(){return a},get isPropagationAllowed(){return c},trigger:r,...u}}const Jx=_.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new dr,currentIdRef:{current:null},currentContextRef:{current:null}});function Kz(e){const{children:t,delay:r,timeoutMs:s=0}=e,a=_.useRef(r),c=_.useRef(r),u=_.useRef(null),f=_.useRef(null),p=Pn();return k.jsx(Jx.Provider,{value:_.useMemo(()=>({hasProvider:!0,delayRef:a,initialDelayRef:c,currentIdRef:u,timeoutMs:s,currentContextRef:f,timeout:p}),[s,p]),children:t})}function Qz(e,t={open:!1}){const r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),{open:a}=t,c=_.useContext(Jx),{currentIdRef:u,delayRef:f,timeoutMs:p,initialDelayRef:h,currentContextRef:m,hasProvider:y,timeout:v}=c,[b,S]=_.useState(!1);return Re(()=>{function E(){S(!1),m.current?.setIsInstantPhase(!1),u.current=null,m.current=null,f.current=h.current}if(u.current&&!a&&u.current===s){if(S(!1),p){const x=s;return v.start(p,()=>{r.select("open")||u.current&&u.current!==x||E()}),()=>{v.clear()}}E()}},[a,s,u,f,p,h,m,v,r]),Re(()=>{if(!a)return;const E=m.current,x=u.current;v.clear(),m.current={onOpenChange:r.setOpen,setIsInstantPhase:S},u.current=s,f.current={open:0,close:Du(h.current,"close")},x!==null&&x!==s?(S(!0),E?.setIsInstantPhase(!0),E?.onOpenChange(!1,Ye(pm))):(S(!1),E?.setIsInstantPhase(!1))},[a,s,r,u,f,p,h,m,v]),Re(()=>()=>{m.current=null},[m]),_.useMemo(()=>({hasProvider:y,delayRef:f,isInstantPhase:b}),[y,f,b])}function of(){return typeof window<"u"}function gn(e){return ym(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(ym(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ym(e){return of()?e instanceof Node||e instanceof zt(e).Node:!1}function We(e){return of()?e instanceof Element||e instanceof zt(e).Element:!1}function vt(e){return of()?e instanceof HTMLElement||e instanceof zt(e).HTMLElement:!1}function Zi(e){return!of()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}function Qo(e){const{overflow:t,overflowX:r,overflowY:s,display:a}=jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+r)&&a!=="inline"&&a!=="contents"}function Xz(e){return/^(table|td|th)$/.test(gn(e))}function sf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Jz=/transform|translate|scale|rotate|perspective|filter/,Wz=/paint|layout|strict|content/,Ss=e=>!!e&&e!=="none";let Wh;function vm(e){const t=We(e)?jn(e):e;return Ss(t.transform)||Ss(t.translate)||Ss(t.scale)||Ss(t.rotate)||Ss(t.perspective)||!af()&&(Ss(t.backdropFilter)||Ss(t.filter))||Jz.test(t.willChange||"")||Wz.test(t.contain||"")}function eD(e){let t=Cr(e);for(;vt(t)&&!wr(t);){if(vm(t))return t;if(sf(t))return null;t=Cr(t)}return null}function af(){return Wh==null&&(Wh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wh}function wr(e){return/^(html|body|#document)$/.test(gn(e))}function jn(e){return zt(e).getComputedStyle(e)}function lf(e){return We(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cr(e){if(gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zi(e)&&e.host||Or(e);return Zi(t)?t.host:t}function Wx(e){const t=Cr(e);return wr(t)?e.ownerDocument?e.ownerDocument.body:e.body:vt(t)&&Qo(t)?t:Wx(t)}function fl(e,t,r){var s;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=Wx(e),c=a===((s=e.ownerDocument)==null?void 0:s.body),u=zt(a);if(c){const f=jp(u);return t.concat(u,u.visualViewport||[],Qo(a)?a:[],f&&r?fl(f):[])}else return t.concat(a,fl(a,[],r))}function jp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qe(e,t,r,s){return e.addEventListener(t,r,s),()=>{e.removeEventListener(t,r,s)}}function Rr(...e){return()=>{for(let t=0;t<e.length;t+=1){const r=e[t];r&&r()}}}function zs(e,t,r,s){const a=mn(ew).current;return nD(a,e,t,r,s)&&tw(a,[e,t,r,s]),a.callback}function tD(e){const t=mn(ew).current;return rD(t,e)&&tw(t,e),t.callback}function ew(){return{callback:null,cleanup:null,refs:[]}}function nD(e,t,r,s,a){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==s||e.refs[3]!==a}function rD(e,t){return e.refs.length!==t.length||e.refs.some((r,s)=>r!==t[s])}function tw(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const s=Array(t.length).fill(null);for(let a=0;a<t.length;a+=1){const c=t[a];if(c!=null)switch(typeof c){case"function":{const u=c(r);typeof u=="function"&&(s[a]=u);break}case"object":{c.current=r;break}}}e.cleanup=()=>{for(let a=0;a<t.length;a+=1){const c=t[a];if(c!=null)switch(typeof c){case"function":{const u=s[a];typeof u=="function"?u():c(null);break}case"object":{c.current=null;break}}}}}}}function ln(e){const t=mn(oD,e).current;return t.next=e,Re(t.effect),t}function oD(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const ep=u1[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],sD=ep&&ep!==_.useLayoutEffect?ep:e=>e();function ze(e){const t=mn(iD).current;return t.next=e,sD(t.effect),t.trampoline}function iD(){const e={next:void 0,callback:aD,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function aD(){}const Qc=null;class lD{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const r=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let a=0;a<r.length;a+=1)r[a]?.(t)};request(t){const r=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(t){const r=t-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const Xc=new lD;class At{static create(){return new At}static request(t){return Xc.request(t)}static cancel(t){return Xc.cancel(t)}currentId=Qc;request(t){this.cancel(),this.currentId=Xc.request(()=>{this.currentId=Qc,t()})}cancel=()=>{this.currentId!==Qc&&(Xc.cancel(this.currentId),this.currentId=Qc)};disposeEffect=()=>this.cancel}function cf(){const e=mn(At.create).current;return nf(e.disposeEffect),e}function tt(e){return e?.ownerDocument||document}const cD={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},uD={...cD,position:"fixed",top:0,left:0},Vi=_.forwardRef(function(t,r){const[s,a]=_.useState();Re(()=>{Zx&&a("button")},[]);const c={tabIndex:0,role:s};return k.jsx("span",{...t,ref:r,style:uD,"aria-hidden":s?void 0:!0,...c,"data-base-ui-focus-guard":""})}),Lp="data-base-ui-focusable",nw="active",rw="selected",ow="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Zo="ArrowLeft",Vo="ArrowRight",bm="ArrowUp",xl="ArrowDown";function sr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function je(e,t){if(!e||!t)return!1;const r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&Zi(r)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function xn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ku(e,t){if(!We(e))return!1;const r=e;if(t.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(const[,s]of t.entries())if(je(s,r))return!s.hasAttribute("data-trigger-disabled");return!1}function fr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function fD(e){return e.matches("html,body")}function uf(e){return vt(e)&&e.matches(ow)}function dD(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ow}`)!=null}function Ip(e){return e?e.getAttribute("role")==="combobox"&&uf(e):!1}function hD(e){if(!e||qx)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Nu(e){return e?e.hasAttribute(Lp)?e:e.querySelector(`[${Lp}]`)||e:null}const pD=["top","right","bottom","left"],qi=Math.min,qn=Math.max,Pu=Math.round,Es=Math.floor,Er=e=>({x:e,y:e}),mD={left:"right",right:"left",bottom:"top",top:"bottom"};function Up(e,t,r){return qn(e,qi(t,r))}function no(e,t){return typeof e=="function"?e(t):e}function Nn(e){return e.split("-")[0]}function Xo(e){return e.split("-")[1]}function Sm(e){return e==="x"?"y":"x"}function xm(e){return e==="y"?"height":"width"}function ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function wm(e){return Sm(ir(e))}function gD(e,t,r){r===void 0&&(r=!1);const s=Xo(e),a=wm(e),c=xm(a);let u=a==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=ju(u)),[u,ju(u)]}function yD(e){const t=ju(e);return[Bp(e),t,Bp(t)]}function Bp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const eS=["left","right"],tS=["right","left"],vD=["top","bottom"],bD=["bottom","top"];function SD(e,t,r){switch(e){case"top":case"bottom":return r?t?tS:eS:t?eS:tS;case"left":case"right":return t?vD:bD;default:return[]}}function xD(e,t,r,s){const a=Xo(e);let c=SD(Nn(e),r==="start",s);return a&&(c=c.map(u=>u+"-"+a),t&&(c=c.concat(c.map(Bp)))),c}function ju(e){const t=Nn(e);return mD[t]+e.slice(t.length)}function wD(e){return{top:0,right:0,bottom:0,left:0,...e}}function sw(e){return typeof e!="number"?wD(e):{top:e,right:e,bottom:e,left:e}}function Lu(e){const{x:t,y:r,width:s,height:a}=e;return{width:s,height:a,top:r,left:t,right:t+s,bottom:r+a,x:t,y:r}}function Jc(e,t,r){return Math.floor(e/t)!==r}function Iu(e,t){return t<0||t>=e.length}function tp(e,t){return bn(e.current,{disabledIndices:t})}function nS(e,t){return bn(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function bn(e,{startingIndex:t=-1,decrement:r=!1,disabledIndices:s,amount:a=1}={}){let c=t;do c+=r?-a:a;while(c>=0&&c<=e.length-1&&Li(e,c,s));return c}function RD(e,{event:t,orientation:r,loopFocus:s,onLoop:a,rtl:c,cols:u,disabledIndices:f,minIndex:p,maxIndex:h,prevIndex:m,stopEvent:y=!1}){let v=m,b;if(t.key===bm?b="up":t.key===xl&&(b="down"),b){const S=[],E=[];let x=!1,R=0;{let H=null,Y=-1;e.forEach((W,$)=>{if(W==null)return;R+=1;const K=W.closest('[role="row"]');K&&(x=!0),(K!==H||Y===-1)&&(H=K,Y+=1,S[Y]=[]),S[Y].push($),E[$]=Y})}let O=!1,A=0;if(x)for(const H of S){const Y=H.length;Y>A&&(A=Y),Y!==u&&(O=!0)}const M=O&&R<e.length,N=A||u,D=H=>{if(!O||m===-1)return;const Y=E[m];if(Y==null)return;const W=S[Y].indexOf(m),$=H==="up"?-1:1;for(let K=Y+$,q=0;q<S.length;q+=1,K+=$){if(K<0||K>=S.length){if(!s||M)return;if(K=K<0?S.length-1:0,a){const I=Math.min(W,S[K].length-1),B=S[K][I]??S[K][0],ee=a(t,m,B);K=E[ee]??K}}const Z=S[K];for(let I=Math.min(W,Z.length-1);I>=0;I-=1){const B=Z[I];if(!Li(e,B,f))return B}}},j=H=>{if(!M||m===-1)return;const Y=m%N,W=H==="up"?-N:N,$=h-h%N,K=Es(h/N)+1;for(let q=m-Y+W,Z=0;Z<K;Z+=1,q+=W){if(q<0||q>h){if(!s)return;q=q<0?$:0}const I=Math.min(q+N-1,h);for(let B=Math.min(q+Y,I);B>=q;B-=1)if(!Li(e,B,f))return B}};y&&Vn(t);const L=D(b)??j(b);if(L!==void 0)v=L;else if(m===-1)v=b==="up"?h:p;else if(v=bn(e,{startingIndex:m,amount:N,decrement:b==="up",disabledIndices:f}),s){if(b==="up"&&(m-N<p||v<0)){const H=m%N,Y=h%N,W=h-(Y-H);Y===H?v=h:v=Y>H?W:W-N,a&&(v=a(t,m,v))}b==="down"&&m+N>h&&(v=bn(e,{startingIndex:m%N-N,amount:N,disabledIndices:f}),a&&(v=a(t,m,v)))}Iu(e,v)&&(v=m)}if(r==="both"){const S=Es(m/u);t.key===(c?Zo:Vo)&&(y&&Vn(t),m%u!==u-1?(v=bn(e,{startingIndex:m,disabledIndices:f}),s&&Jc(v,u,S)&&(v=bn(e,{startingIndex:m-m%u-1,disabledIndices:f}),a&&(v=a(t,m,v)))):s&&(v=bn(e,{startingIndex:m-m%u-1,disabledIndices:f}),a&&(v=a(t,m,v))),Jc(v,u,S)&&(v=m)),t.key===(c?Vo:Zo)&&(y&&Vn(t),m%u!==0?(v=bn(e,{startingIndex:m,decrement:!0,disabledIndices:f}),s&&Jc(v,u,S)&&(v=bn(e,{startingIndex:m+(u-m%u),decrement:!0,disabledIndices:f}),a&&(v=a(t,m,v)))):s&&(v=bn(e,{startingIndex:m+(u-m%u),decrement:!0,disabledIndices:f}),a&&(v=a(t,m,v))),Jc(v,u,S)&&(v=m));const E=Es(h/u)===S;Iu(e,v)&&(s&&E?(v=t.key===(c?Vo:Zo)?h:bn(e,{startingIndex:m-m%u-1,disabledIndices:f}),a&&(v=a(t,m,v))):v=m)}return v}function ED(e,t,r){const s=[];let a=0;return e.forEach(({width:c,height:u},f)=>{let p=!1;for(;!p;){const h=[];for(let m=0;m<c;m+=1)for(let y=0;y<u;y+=1)h.push(a+m+y*t);a%t+c<=t&&h.every(m=>s[m]==null)?(h.forEach(m=>{s[m]=f}),p=!0):a+=1}}),[...s]}function _D(e,t,r,s,a){if(e===-1)return-1;const c=r.indexOf(e),u=t[e];switch(a){case"tl":return c;case"tr":return u?c+u.width-1:c;case"bl":return u?c+(u.height-1)*s:c;case"br":return r.lastIndexOf(e);default:return-1}}function TD(e,t){return t.flatMap((r,s)=>e.includes(r)?[s]:[])}function Li(e,t,r){if(typeof r=="function"?r(t):r?.includes(t)??!1)return!0;const a=e[t];return a?ff(a)?!r&&(a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true"):!0:!1}function CD(e){return e.visibility==="hidden"||e.visibility==="collapse"}function ff(e,t=e?jn(e):null){return!e||!e.isConnected||!t||CD(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const OD='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function MD(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const r=e.getRootNode();return Zi(r)?r.host:null}function Hp(e){for(const t of Array.from(e.children))if(gn(t)==="summary")return t;return null}function AD(e,t){const r=Hp(t);return!!r&&(e===r||je(r,e))}function iw(e){const t=e?gn(e):"";return e!=null&&e.matches(OD)&&(t!=="summary"||e.parentElement!=null&&gn(e.parentElement)==="details"&&Hp(e.parentElement)===e)&&(t!=="details"||Hp(e)==null)&&(t!=="input"||e.type!=="hidden")}function aw(e){if(!iw(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=MD(t)){const r=t!==e,s=gn(t)==="slot";if(t.hasAttribute("inert")||r&&gn(t)==="details"&&!t.open&&!AD(e,t)||t.hasAttribute("hidden")||!s&&!zD(t,r))return!1}return!0}function zD(e,t){const r=jn(e);return t?r.display!=="none":ff(e,r)}function lw(e){const t=e.tabIndex;if(t<0){const r=gn(e);if(r==="details"||r==="audio"||r==="video"||vt(e)&&e.isContentEditable)return 0}return t}function np(e){if(gn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function DD(e,t){const r=np(e);if(!r)return!0;const s=t.find(a=>{const c=np(a);return c?.name===r.name&&c.form===r.form&&c.checked});return s?s===r:t.find(a=>{const c=np(a);return c?.name===r.name&&c.form===r.form})===r}function cw(e){if(vt(e)&&gn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return vt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function uw(e,t){cw(e).forEach(r=>{iw(r)&&t.push(r),uw(r,t)})}function fw(e,t,r){cw(e).forEach(s=>{vt(s)&&s.matches(t)&&r.push(s),fw(s,t,r)})}function Rm(e){return aw(e)&&lw(e)>=0}function dw(e){const t=[];return uw(e,t),t.filter(aw)}function wl(e){const t=dw(e);return t.filter(r=>lw(r)>=0&&DD(r,t))}function hw(e,t){const r=wl(e),s=r.length;if(s===0)return;const a=sr(tt(e)),c=r.indexOf(a),u=c===-1?t===1?0:s-1:c+t;return r[u]}function Em(e){return hw(tt(e).body,1)||e}function pw(e){return hw(tt(e).body,-1)||e}function mw(e,t){if(!e)return null;const r=wl(tt(e).body),s=r.length;if(s===0)return null;const a=r.indexOf(e);if(a===-1)return null;const c=(a+t+s)%s;return r[c]}function kD(e){return mw(e,1)}function ND(e){return mw(e,-1)}function Ii(e,t){const r=t||e.currentTarget,s=e.relatedTarget;return!s||!je(r,s)}function PD(e){wl(e).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function rS(e){const t=[];fw(e,"[data-tabindex]",t),t.forEach(r=>{const s=r.dataset.tabindex;delete r.dataset.tabindex,s?r.setAttribute("tabindex",s):r.removeAttribute("tabindex")})}function _r(e,t,r=!0){return e.filter(a=>a.parentId===t).flatMap(a=>[...!r||a.context?.open?[a]:[],..._r(e,a.id,r)])}function oS(e,t){let r=[],s=e.find(a=>a.id===t)?.parentId;for(;s;){const a=e.find(c=>c.id===s);s=a?.parentId,a&&(r=r.concat(a))}return r}function dl(e){return`data-base-ui-${e}`}let Wc=0;function bu(e,t={}){const{preventScroll:r=!1,cancelPrevious:s=!0,sync:a=!1}=t;s&&cancelAnimationFrame(Wc);const c=()=>e?.focus({preventScroll:r});if(a)return c(),hm;const u=requestAnimationFrame(c);return Wc=u,()=>{Wc===u&&(cancelAnimationFrame(u),Wc=0)}}const rp={inert:new WeakMap,"aria-hidden":new WeakMap},sS="data-base-ui-inert",Fp={inert:new WeakSet,"aria-hidden":new WeakSet};let Wa=new WeakMap,op=0;function jD(e){return Fp[e]}function gw(e){return e?Zi(e)?e.host:gw(e.parentNode):null}const sp=(e,t)=>t.map(r=>{if(e.contains(r))return r;const s=gw(r);return e.contains(s)?s:null}).filter(r=>r!=null),iS=e=>{const t=new Set;return e.forEach(r=>{let s=r;for(;s&&!t.has(s);)t.add(s),s=s.parentNode}),t},aS=(e,t,r)=>{const s=[],a=c=>{!c||r.has(c)||Array.from(c.children).forEach(u=>{gn(u)!=="script"&&(t.has(u)?a(u):s.push(u))})};return a(e),s};function LD(e,t,r,s,{mark:a=!0,markerIgnoreElements:c=[]}){const u=s?"inert":r?"aria-hidden":null;let f=null,p=null;const h=sp(t,e),m=a?sp(t,c):[],y=new Set(m),v=a?aS(t,iS(h),new Set(h)).filter(E=>!y.has(E)):[],b=[],S=[];if(u){const E=rp[u],x=jD(u);p=x,f=E;const R=sp(t,Array.from(t.querySelectorAll("[aria-live]"))),O=h.concat(R);aS(t,iS(O),new Set(O)).forEach(M=>{const N=M.getAttribute(u),D=N!==null&&N!=="false",j=(E.get(M)||0)+1;E.set(M,j),b.push(M),j===1&&D&&x.add(M),D||M.setAttribute(u,u==="inert"?"":"true")})}return a&&v.forEach(E=>{const x=(Wa.get(E)||0)+1;Wa.set(E,x),S.push(E),x===1&&E.setAttribute(sS,"")}),op+=1,()=>{f&&b.forEach(E=>{const R=(f.get(E)||0)-1;f.set(E,R),R||(!p?.has(E)&&u&&E.removeAttribute(u),p?.delete(E))}),a&&S.forEach(E=>{const x=(Wa.get(E)||0)-1;Wa.set(E,x),x||E.removeAttribute(sS)}),op-=1,op||(rp.inert=new WeakMap,rp["aria-hidden"]=new WeakMap,Fp.inert=new WeakSet,Fp["aria-hidden"]=new WeakSet,Wa=new WeakMap)}}function lS(e,t={}){const{ariaHidden:r=!1,inert:s=!1,mark:a=!0,markerIgnoreElements:c=[]}=t,u=tt(e[0]).body;return LD(e,u,r,s,{mark:a,markerIgnoreElements:c})}const ID={...u1};let cS=0;function UD(e,t="mui"){const[r,s]=_.useState(e),a=e||r;return _.useEffect(()=>{r==null&&(cS+=1,s(`${t}-${cS}`))},[r,t]),a}const uS=ID.useId;function Is(e,t){if(uS!==void 0){const r=uS();return e??(t?`${t}-${r}`:r)}return UD(e,t)}const BD=parseInt(_.version,10);function _m(e){return BD>=e}function fS(e){if(!_.isValidElement(e))return null;const t=e,r=t.props;return(_m(19)?r?.ref:t.ref)??null}function $p(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function HD(e,t){const r={};for(const s in e){const a=e[s];if(t?.hasOwnProperty(s)){const c=t[s](a);c!=null&&Object.assign(r,c);continue}a===!0?r[`data-${s.toLowerCase()}`]="":a&&(r[`data-${s.toLowerCase()}`]=a.toString())}return r}function FD(e,t){return typeof e=="function"?e(t):e}function $D(e,t){return typeof e=="function"?e(t):e}const Tm={};function ro(e,t,r,s,a){if(!r&&!s&&!e)return Uu(t);let c=Uu(e);return t&&(c=Su(c,t)),r&&(c=Su(c,r)),s&&(c=Su(c,s)),c}function ZD(e){if(e.length===0)return Tm;if(e.length===1)return Uu(e[0]);let t=Uu(e[0]);for(let r=1;r<e.length;r+=1)t=Su(t,e[r]);return t}function Uu(e){return Cm(e)?{...vw(e,Tm)}:VD(e)}function Su(e,t){return Cm(t)?vw(t,e):qD(e,t)}function VD(e){const t={...e};for(const r in t){const s=t[r];yw(r,s)&&(t[r]=bw(s))}return t}function qD(e,t){if(!t)return e;for(const r in t){const s=t[r];switch(r){case"style":{e[r]=$p(e.style,s);break}case"className":{e[r]=Sw(e.className,s);break}default:yw(r,s)?e[r]=YD(e[r],s):e[r]=s}}return e}function yw(e,t){const r=e.charCodeAt(0),s=e.charCodeAt(1),a=e.charCodeAt(2);return r===111&&s===110&&a>=65&&a<=90&&(typeof t=="function"||typeof t>"u")}function Cm(e){return typeof e=="function"}function vw(e,t){return Cm(e)?e(t):e??Tm}function YD(e,t){return t?e?(...r)=>{const s=r[0];if(xw(s)){const c=s;Bu(c);const u=t(...r);return c.baseUIHandlerPrevented||e?.(...r),u}const a=t(...r);return e?.(...r),a}:bw(t):e}function bw(e){return e&&((...t)=>{const r=t[0];return xw(r)&&Bu(r),e(...t)})}function Bu(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Sw(e,t){return t?e?t+" "+e:t:e}function xw(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Kt(e,t,r={}){const s=t.render,a=GD(t,r);if(r.enabled===!1)return null;const c=r.state??cn;return XD(e,s,a,c)}function GD(e,t={}){const{className:r,style:s,render:a}=e,{state:c=cn,ref:u,props:f,stateAttributesMapping:p,enabled:h=!0}=t,m=h?FD(r,c):void 0,y=h?$D(s,c):void 0,v=h?HD(c,p):cn,b=h&&f?KD(f):void 0,S=h?$p(v,b)??{}:cn;return typeof document<"u"&&(h?Array.isArray(u)?S.ref=tD([S.ref,fS(a),...u]):S.ref=zs(S.ref,fS(a),u):zs(null,null)),h?(m!==void 0&&(S.className=Sw(S.className,m)),y!==void 0&&(S.style=$p(S.style,y)),S):cn}function KD(e){return Array.isArray(e)?ZD(e):ro(void 0,e)}const QD=Symbol.for("react.lazy");function XD(e,t,r,s){if(t){if(typeof t=="function")return t(r,s);const a=ro(r,t.props);a.ref=r.ref;let c=t;return c?.$$typeof===QD&&(c=_.Children.toArray(t)[0]),_.cloneElement(c,a)}if(e&&typeof e=="string")return JD(e,r);throw new Error(wn(8))}function JD(e,t){return e==="button"?_.createElement("button",{type:"button",...t,key:t.key}):e==="img"?_.createElement("img",{alt:"",...t,key:t.key}):_.createElement(e,t)}const WD=500,ek=500,tk={style:{transition:"none"}},nk="data-base-ui-click-trigger",rk={fallbackAxisSide:"none"},ww={fallbackAxisSide:"end"},ok={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Rw=_.createContext(null),Ew=()=>_.useContext(Rw),sk=dl("portal");function _w(e={}){const{ref:t,container:r,componentProps:s=cn,elementProps:a}=e,c=Is(),f=Ew()?.portalNode,[p,h]=_.useState(null),[m,y]=_.useState(null),v=ze(x=>{x!==null&&y(x)}),b=_.useRef(null);Re(()=>{if(r===null){b.current&&(b.current=null,y(null),h(null));return}if(c==null)return;const x=(r&&(ym(r)?r:r.current))??f??document.body;if(x==null){b.current&&(b.current=null,y(null),h(null));return}b.current!==x&&(b.current=x,y(null),h(x))},[r,f,c]);const S=Kt("div",s,{ref:[t,v],props:[{id:c,[sk]:""},a]});return{portalNode:m,portalSubtree:p&&S?Tr.createPortal(S,p):null}}const Tw=_.forwardRef(function(t,r){const{children:s,container:a,className:c,render:u,renderGuards:f,style:p,...h}=t,{portalNode:m,portalSubtree:y}=_w({container:a,ref:r,componentProps:t,elementProps:h}),v=_.useRef(null),b=_.useRef(null),S=_.useRef(null),E=_.useRef(null),[x,R]=_.useState(null),O=_.useRef(!1),A=x?.modal,M=x?.open,N=typeof f=="boolean"?f:!!x&&!x.modal&&x.open&&!!m;_.useEffect(()=>{if(!m||A)return;function j(L){m&&L.relatedTarget&&Ii(L)&&(L.type==="focusin"?O.current&&(rS(m),O.current=!1):(PD(m),O.current=!0))}return Rr(qe(m,"focusin",j,!0),qe(m,"focusout",j,!0))},[m,A]),_.useEffect(()=>{!m||M!==!1||(rS(m),O.current=!1)},[M,m]);const D=_.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:b,beforeInsideRef:S,afterInsideRef:E,portalNode:m,setFocusManagerState:R}),[m]);return k.jsxs(_.Fragment,{children:[y,k.jsxs(Rw.Provider,{value:D,children:[N&&m&&k.jsx(Vi,{"data-type":"outside",ref:v,onFocus:j=>{if(Ii(j,m))S.current?.focus();else{const L=x?x.domReference:null;pw(L)?.focus()}}}),N&&m&&k.jsx("span",{"aria-owns":m.id,style:ok}),m&&Tr.createPortal(s,m),N&&m&&k.jsx(Vi,{"data-type":"outside",ref:b,onFocus:j=>{if(Ii(j,m))E.current?.focus();else{const L=x?x.domReference:null;Em(L)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,Ye($i,j.nativeEvent))}}})]})]})});function Cw(){const e=new Map;return{emit(t,r){e.get(t)?.forEach(s=>s(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){e.get(t)?.delete(r)}}}class Om{nodesRef={current:[]};events=Cw();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const r=this.nodesRef.current.findIndex(s=>s===t);r!==-1&&this.nodesRef.current.splice(r,1)}}const Ow=_.createContext(null),Mw=_.createContext(null),co=()=>_.useContext(Ow)?.id||null,Jo=e=>{const t=_.useContext(Mw);return e??t};function Aw(e){const t=Is(),r=Jo(e),s=co();return Re(()=>{if(!t)return;const a={id:t,parentId:s};return r?.addNode(a),()=>{r?.removeNode(a)}},[r,t,s]),t}function ik(e){const{children:t,id:r}=e,s=co();return k.jsx(Ow.Provider,{value:_.useMemo(()=>({id:r,parentId:s}),[r,s]),children:t})}function ak(e){const{children:t,externalTree:r}=e,s=mn(()=>r??new Om).current;return k.jsx(Mw.Provider,{value:s,children:t})}function Jr(e){return e==null?e:"current"in e?e.current:e}function lk(e,t){const r=zt(xn(e));return e instanceof r.KeyboardEvent?"keyboard":e instanceof r.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof r.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const dS=20;let Ho=[];function Mm(){Ho=Ho.filter(e=>e.deref()?.isConnected)}function ck(e){Mm(),e&&gn(e)!=="body"&&(Ho.push(new WeakRef(e)),Ho.length>dS&&(Ho=Ho.slice(-dS)))}function ip(){return Mm(),Ho[Ho.length-1]?.deref()}function uk(e){return e?Rm(e)?e:wl(e)[0]||e:null}function hS(e,t){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const s=dw(e).filter(c=>{const u=c.getAttribute("data-tabindex")||"";return Rm(c)||c.hasAttribute("data-tabindex")&&!u.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function zw(e){const{context:t,children:r,disabled:s=!1,initialFocus:a=!0,returnFocus:c=!0,restoreFocus:u=!1,modal:f=!0,closeOnFocusOut:p=!0,openInteractionType:h="",nextFocusableElement:m,previousFocusableElement:y,beforeContentFocusGuardRef:v,externalTree:b,getInsideElements:S}=e,E="rootStore"in t?t.rootStore:t,x=E.useState("open"),R=E.useState("domReferenceElement"),O=E.useState("floatingElement"),{events:A,dataRef:M}=E.context,N=ze(()=>M.current.floatingContext?.nodeId),D=a===!1,j=Ip(R)&&D,L=_.useRef(["content"]),H=ln(a),Y=ln(c),W=ln(h),$=Jo(b),K=Ew(),q=_.useRef(!1),Z=_.useRef(!1),I=_.useRef(!1),B=_.useRef(null),ee=_.useRef(""),ne=_.useRef(""),le=_.useRef(null),z=_.useRef(null),G=zs(le,v,K?.beforeInsideRef),re=zs(z,K?.afterInsideRef),ie=Pn(),he=Pn(),de=cf(),ge=K!=null,me=Nu(O),ye=ze((Se=me)=>Se?wl(Se):[]),ke=ze(()=>S?.().filter(Se=>Se!=null)??[]);_.useEffect(()=>{if(s||!f)return;function Se(Ze){Ze.key==="Tab"&&je(me,sr(tt(me)))&&ye().length===0&&!j&&Vn(Ze)}const Pe=tt(me);return qe(Pe,"keydown",Se)},[s,R,me,f,L,j,ye]),_.useEffect(()=>{if(s||!x)return;const Se=tt(me);function Pe(){I.current=!1}function Ze(Me){const Te=xn(Me),Ae=ke(),be=je(O,Te)||je(R,Te)||je(K?.portalNode,Te)||Ae.some(Ce=>Ce===Te||je(Ce,Te));I.current=!be,ne.current=Me.pointerType||"keyboard",Te?.closest(`[${nk}]`)&&(Z.current=!0)}function Ge(){ne.current="keyboard"}return Rr(qe(Se,"pointerdown",Ze,!0),qe(Se,"pointerup",Pe,!0),qe(Se,"pointercancel",Pe,!0),qe(Se,"keydown",Ge,!0))},[s,O,R,me,x,K,ke]),_.useEffect(()=>{if(s||!p)return;const Se=tt(me);function Pe(){Z.current=!0,he.start(0,()=>{Z.current=!1})}function Ze(Ae){const be=xn(Ae);Rm(be)&&(B.current=be)}function Ge(Ae){const be=Ae.relatedTarget,Ce=Ae.currentTarget,ce=xn(Ae);queueMicrotask(()=>{const xe=N(),ue=E.context.triggerElements,pe=ke(),ve=be?.hasAttribute(dl("focus-guard"))&&[le.current,z.current,K?.beforeInsideRef.current,K?.afterInsideRef.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,Jr(y),Jr(m)].includes(be),Ne=!(je(R,be)||je(O,be)||je(be,O)||je(K?.portalNode,be)||pe.some(Fe=>Fe===be||je(Fe,be))||be!=null&&ue.hasElement(be)||ue.hasMatchingElement(Fe=>je(Fe,be))||ve||$&&(_r($.nodesRef.current,xe).find(Fe=>je(Fe.context?.elements.floating,be)||je(Fe.context?.elements.domReference,be))||oS($.nodesRef.current,xe).find(Fe=>[Fe.context?.elements.floating,Nu(Fe.context?.elements.floating)].includes(be)||Fe.context?.elements.domReference===be)));if(Ce===R&&me&&hS(me,L),u&&Ce!==R&&!ff(ce)&&sr(Se)===Se.body){if(vt(me)&&(me.focus(),u==="popup")){de.request(()=>{me.focus()});return}const Fe=ye(),Ct=B.current,Dt=(Ct&&Fe.includes(Ct)?Ct:null)||Fe[Fe.length-1]||me;vt(Dt)&&Dt.focus()}if(M.current.insideReactTree){M.current.insideReactTree=!1;return}(j||!f)&&be&&Ne&&!Z.current&&(j||be!==ip())&&(q.current=!0,E.setOpen(!1,Ye($i,Ae)))})}function Me(){I.current||(M.current.insideReactTree=!0,ie.start(0,()=>{M.current.insideReactTree=!1}))}const Te=vt(R)?R:null;if(!(!O&&!Te))return Rr(Te&&qe(Te,"focusout",Ge),Te&&qe(Te,"pointerdown",Pe),O&&qe(O,"focusin",Ze),O&&qe(O,"focusout",Ge),O&&K&&qe(O,"focusout",Me,!0))},[s,R,O,me,f,$,K,E,p,u,ye,j,N,L,M,ie,he,de,m,y,ke]),_.useEffect(()=>{if(s||!O||!x)return;const Se=Array.from(K?.portalNode?.querySelectorAll(`[${dl("portal")}]`)||[]),Ze=($?oS($.nodesRef.current,N()):[]).find(Ce=>Ip(Ce.context?.elements.domReference||null))?.context?.elements.domReference,Me=[...[O,...Se,le.current,z.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,...ke()],Ze,Jr(y),Jr(m),j?R:null].filter(Ce=>Ce!=null),Te=lS(Me,{ariaHidden:f||j,mark:!1}),Ae=[O,...Se].filter(Ce=>Ce!=null),be=lS(Ae);return()=>{be(),Te()}},[x,s,R,O,f,L,K,j,$,N,m,y,ke]),Re(()=>{if(!x||s||!vt(me))return;const Se=tt(me),Pe=sr(Se);queueMicrotask(()=>{const Ze=H.current,Ge=typeof Ze=="function"?Ze(W.current||""):Ze;if(Ge===void 0||Ge===!1||je(me,Pe))return;let Te=null;const Ae=()=>(Te==null&&(Te=ye(me)),Te[0]||me);let be;Ge===!0||Ge===null?be=Ae():be=Jr(Ge),be=be||Ae(),bu(be,{preventScroll:be===me})})},[s,x,me,D,ye,H,W]),Re(()=>{if(s||!me)return;const Se=tt(me),Pe=sr(Se);ck(Pe);function Ze(Me){if(Me.open||(ee.current=lk(Me.nativeEvent,ne.current)),Me.reason===pn&&Me.nativeEvent.type==="mouseleave"&&(q.current=!0),Me.reason===mm)if(Me.nested)q.current=!1;else if(Yx(Me.nativeEvent)||Gx(Me.nativeEvent))q.current=!1;else{let Te=!1;tt(me).createElement("div").focus({get preventScroll(){return Te=!0,!1}}),Te?q.current=!1:q.current=!0}}A.on("openchange",Ze);function Ge(){const Me=Y.current;let Te=typeof Me=="function"?Me(ee.current):Me;if(Te===void 0||Te===!1)return null;if(Te===null&&(Te=!0),typeof Te=="boolean"){const be=R||ip();return be&&be.isConnected?be:null}const Ae=R||ip();return Jr(Te)||Ae||null}return()=>{A.off("openchange",Ze);const Me=sr(Se),Te=ke(),Ae=je(O,Me)||Te.some(ce=>ce===Me||je(ce,Me))||$&&_r($.nodesRef.current,N(),!1).some(ce=>je(ce.context?.elements.floating,Me)),be=Y.current,Ce=Ge();queueMicrotask(()=>{const ce=uk(Ce),xe=typeof be!="boolean";be&&!q.current&&vt(ce)&&(!(!xe&&ce!==Me&&Me!==Se.body)||Ae)&&ce.focus({preventScroll:!0}),q.current=!1})}},[s,O,me,Y,M,A,$,R,N,ke]),Re(()=>{if(!Fx||x||!O)return;const Se=sr(tt(O));!vt(Se)||!uf(Se)||je(O,Se)&&Se.blur()},[x,O]),Re(()=>{if(!(s||!K))return K.setFocusManagerState({modal:f,closeOnFocusOut:p,open:x,onOpenChange:E.setOpen,domReference:R}),()=>{K.setFocusManagerState(null)}},[s,K,f,x,E,p,R]),Re(()=>{if(!(s||!me))return hS(me,L),()=>{queueMicrotask(Mm)}},[s,me,L]);const He=!s&&(f?!j:!0)&&(ge||f);return k.jsxs(_.Fragment,{children:[He&&k.jsx(Vi,{"data-type":"inside",ref:G,onFocus:Se=>{if(f){const Pe=ye();bu(Pe[Pe.length-1])}else K?.portalNode&&(q.current=!1,Ii(Se,K.portalNode)?Em(R)?.focus():Jr(y??K.beforeOutsideRef)?.focus())}}),r,He&&k.jsx(Vi,{"data-type":"inside",ref:re,onFocus:Se=>{f?bu(ye()[0]):K?.portalNode&&(p&&(q.current=!0),Ii(Se,K.portalNode)?pw(R)?.focus():Jr(m??K.afterOutsideRef)?.focus())}})]})}function fk(e,t={}){const r="rootStore"in e?e.rootStore:e,s=r.context.dataRef,{enabled:a=!0,event:c="click",toggle:u=!0,ignoreMouse:f=!1,stickIfOpen:p=!0,touchOpenDelay:h=0,reason:m=As}=t,y=_.useRef(void 0),v=cf(),b=Pn(),S=_.useMemo(()=>({onPointerDown(E){y.current=E.pointerType},onMouseDown(E){const x=y.current,R=E.nativeEvent,O=r.select("open");if(E.button!==0||c==="click"||Fi(x,!0)&&f)return;const A=s.current.openEvent,M=A?.type,N=r.select("domReferenceElement")!==E.currentTarget,D=O&&N||!(O&&u&&(!(A&&p)||M==="click"||M==="mousedown")),j=xn(R);if(uf(j)){const H=Ye(m,R,j);D&&x==="touch"&&h>0?b.start(h,()=>{r.setOpen(!0,H)}):r.setOpen(D,H);return}const L=E.currentTarget;v.request(()=>{const H=Ye(m,R,L);D&&x==="touch"&&h>0?b.start(h,()=>{r.setOpen(!0,H)}):r.setOpen(D,H)})},onClick(E){if(c==="mousedown-only")return;const x=y.current;if(c==="mousedown"&&x){y.current=void 0;return}if(Fi(x,!0)&&f)return;const R=r.select("open"),O=s.current.openEvent,A=r.select("domReferenceElement")!==E.currentTarget,M=R&&A||!(R&&u&&(!(O&&p)||Kx(O))),N=Ye(m,E.nativeEvent,E.currentTarget);M&&x==="touch"&&h>0?b.start(h,()=>{r.setOpen(!0,N)}):r.setOpen(M,N)},onKeyDown(){y.current=void 0}}),[s,c,f,r,p,u,v,b,h,m]);return _.useMemo(()=>a?{reference:S}:cn,[a,S])}function dk(e,t){let r=null,s=null,a=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",f=t.axis==="y"||t.axis==="both",p=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=c.width,m=c.height,y=c.x,v=c.y;return r==null&&t.x&&u&&(r=c.x-t.x),s==null&&t.y&&f&&(s=c.y-t.y),y-=r||0,v-=s||0,h=0,m=0,!a||p?(h=t.axis==="y"?c.width:0,m=t.axis==="x"?c.height:0,y=u&&t.x!=null?t.x:y,v=f&&t.y!=null?t.y:v):a&&!p&&(m=t.axis==="x"?c.height:m,h=t.axis==="y"?c.width:h),a=!0,{width:h,height:m,x:y,y:v,top:v,right:y+h,bottom:v+m,left:y}}}}function pS(e){return e!=null&&e.clientX!=null}function hk(e,t={}){const r="rootStore"in e?e.rootStore:e,s=r.useState("open"),a=r.useState("floatingElement"),c=r.useState("domReferenceElement"),u=r.context.dataRef,{enabled:f=!0,axis:p="both"}=t,h=_.useRef(!1),m=_.useRef(null),[y,v]=_.useState(),[b,S]=_.useState([]),E=ze((M,N,D)=>{h.current||u.current.openEvent&&!pS(u.current.openEvent)||r.set("positionReference",dk(D??c,{x:M,y:N,axis:p,dataRef:u,pointerType:y}))}),x=ze(M=>{s?m.current||S([]):E(M.clientX,M.clientY,M.currentTarget)}),R=Fi(y)?a:s,O=_.useCallback(()=>{if(!R||!f)return;const M=zt(a);function N(D){const j=xn(D);je(a,j)?(m.current?.(),m.current=null):E(D.clientX,D.clientY)}if(!u.current.openEvent||pS(u.current.openEvent)){const D=()=>{m.current?.(),m.current=null};return m.current=qe(M,"mousemove",N),D}r.set("positionReference",c)},[R,f,a,u,c,r,E]);_.useEffect(()=>O(),[O,b]),_.useEffect(()=>{f&&!a&&(h.current=!1)},[f,a]),_.useEffect(()=>{!f&&s&&(h.current=!0)},[f,s]);const A=_.useMemo(()=>{function M(N){v(N.pointerType)}return{onPointerDown:M,onPointerEnter:M,onMouseMove:x,onMouseEnter:x}},[x]);return _.useMemo(()=>f?{reference:A,trigger:A}:{},[f,A])}const pk={intentional:"onClick",sloppy:"onPointerDown"};function mk(){return!1}function gk(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Am(e,t={}){const r="rootStore"in e?e.rootStore:e,s=r.useState("open"),a=r.useState("floatingElement"),{dataRef:c}=r.context,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:h="sloppy",referencePress:m=mk,referencePressEvent:y="sloppy",bubbles:v,externalTree:b}=t,S=Jo(b),E=ze(typeof p=="function"?p:()=>!1),x=typeof p=="function"?E:p,R=x!==!1,O=ze(()=>h),A=_.useRef(!1),M=_.useRef(!1),N=_.useRef(!1),{escapeKey:D,outsidePress:j}=gk(v),L=_.useRef(null),H=Pn(),Y=Pn(),W=ze(()=>{Y.clear(),c.current.insideReactTree=!1}),$=_.useRef(!1),K=_.useRef(""),q=ze(m),Z=ze(z=>{if(!s||!u||!f||z.key!=="Escape"||$.current)return;const G=c.current.floatingContext?.nodeId,re=S?_r(S.nodesRef.current,G):[];if(!D&&re.length>0){let de=!0;if(re.forEach(ge=>{ge.context?.open&&!ge.context.dataRef.current.__escapeKeyBubbles&&(de=!1)}),!de)return}const ie=Zz(z)?z.nativeEvent:z,he=Ye(rf,ie);r.setOpen(!1,he),!D&&!he.isPropagationAllowed&&z.stopPropagation()}),I=ze(()=>{c.current.insideReactTree=!0,Y.start(0,W)});_.useEffect(()=>{if(!s||!u)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=j;const z=new dr,G=new dr;function re(){z.clear(),$.current=!0}function ie(){z.start(af()?5:0,()=>{$.current=!1})}function he(){N.current=!0,G.start(0,()=>{N.current=!1})}function de(){A.current=!1,M.current=!1}function ge(){const ue=K.current,pe=ue==="pen"||!ue?"mouse":ue,ve=O(),Ne=typeof ve=="function"?ve():ve;return typeof Ne=="string"?Ne:Ne[pe]}function me(ue){const pe=ge();return pe==="intentional"&&ue.type!=="click"||pe==="sloppy"&&ue.type==="click"}function ye(ue){const pe=c.current.floatingContext?.nodeId,ve=S&&_r(S.nodesRef.current,pe).some(Ne=>fr(ue,Ne.context?.elements.floating));return fr(ue,r.select("floatingElement"))||fr(ue,r.select("domReferenceElement"))||ve}function ke(ue){if(me(ue)){W();return}if(c.current.insideReactTree){W();return}const pe=xn(ue),ve=`[${dl("inert")}]`,Ne=We(pe)?pe.getRootNode():null,Fe=Array.from((Zi(Ne)?Ne:tt(r.select("floatingElement"))).querySelectorAll(ve)),Ct=r.context.triggerElements;if(pe&&(Ct.hasElement(pe)||Ct.hasMatchingElement(Ue=>je(Ue,pe))))return;let Dt=We(pe)?pe:null;for(;Dt&&!wr(Dt);){const Ue=Cr(Dt);if(wr(Ue)||!We(Ue))break;Dt=Ue}if(Fe.length&&We(pe)&&!fD(pe)&&!je(pe,r.select("floatingElement"))&&Fe.every(Ue=>!je(Dt,Ue)))return;if(vt(pe)&&!("touches"in ue)){const Ue=wr(pe),lt=jn(pe),xt=/auto|scroll/,dn=Ue||xt.test(lt.overflowX),jt=Ue||xt.test(lt.overflowY),hr=dn&&pe.clientWidth>0&&pe.scrollWidth>pe.clientWidth,it=jt&&pe.clientHeight>0&&pe.scrollHeight>pe.clientHeight,Ft=lt.direction==="rtl",tn=it&&(Ft?ue.offsetX<=pe.offsetWidth-pe.clientWidth:ue.offsetX>pe.clientWidth),$t=hr&&ue.offsetY>pe.clientHeight;if(tn||$t)return}if(ye(ue))return;if(ge()==="intentional"&&N.current){G.clear(),N.current=!1;return}if(typeof x=="function"&&!x(ue))return;const Ht=c.current.floatingContext?.nodeId,Le=S?_r(S.nodesRef.current,Ht):[];if(Le.length>0){let Ue=!0;if(Le.forEach(lt=>{lt.context?.open&&!lt.context.dataRef.current.__outsidePressBubbles&&(Ue=!1)}),!Ue)return}r.setOpen(!1,Ye(mm,ue)),W()}function He(ue){ge()!=="sloppy"||ue.pointerType==="touch"||!r.select("open")||!u||fr(ue,r.select("floatingElement"))||fr(ue,r.select("domReferenceElement"))||ke(ue)}function Se(ue){if(ge()!=="sloppy"||!r.select("open")||!u||fr(ue,r.select("floatingElement"))||fr(ue,r.select("domReferenceElement")))return;const pe=ue.touches[0];pe&&(L.current={startTime:Date.now(),startX:pe.clientX,startY:pe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{L.current&&(L.current.dismissOnTouchEnd=!1,L.current.dismissOnMouseDown=!1)}))}function Pe(ue,pe){const ve=xn(ue);if(!ve)return;const Ne=qe(ve,ue.type,()=>{pe(ue),Ne()})}function Ze(ue){K.current="touch",Pe(ue,Se)}function Ge(ue){H.clear(),ue.type==="pointerdown"&&(K.current=ue.pointerType),!(ue.type==="mousedown"&&L.current&&!L.current.dismissOnMouseDown)&&Pe(ue,pe=>{pe.type==="pointerdown"?He(pe):ke(pe)})}function Me(ue){if(!A.current)return;const pe=M.current;if(de(),ge()==="intentional"){if(ue.type==="pointercancel"){pe&&he();return}if(!ye(ue)){if(pe){he();return}typeof x=="function"&&!x(ue)||(G.clear(),N.current=!0,W())}}}function Te(ue){if(ge()!=="sloppy"||!L.current||fr(ue,r.select("floatingElement"))||fr(ue,r.select("domReferenceElement")))return;const pe=ue.touches[0];if(!pe)return;const ve=Math.abs(pe.clientX-L.current.startX),Ne=Math.abs(pe.clientY-L.current.startY),Fe=Math.sqrt(ve*ve+Ne*Ne);Fe>5&&(L.current.dismissOnTouchEnd=!0),Fe>10&&(ke(ue),H.clear(),L.current=null)}function Ae(ue){Pe(ue,Te)}function be(ue){ge()!=="sloppy"||!L.current||fr(ue,r.select("floatingElement"))||fr(ue,r.select("domReferenceElement"))||(L.current.dismissOnTouchEnd&&ke(ue),H.clear(),L.current=null)}function Ce(ue){Pe(ue,be)}const ce=tt(a),xe=Rr(f&&Rr(qe(ce,"keydown",Z),qe(ce,"compositionstart",re),qe(ce,"compositionend",ie)),R&&Rr(qe(ce,"click",Ge,!0),qe(ce,"pointerdown",Ge,!0),qe(ce,"pointerup",Me,!0),qe(ce,"pointercancel",Me,!0),qe(ce,"mousedown",Ge,!0),qe(ce,"mouseup",Me,!0),qe(ce,"touchstart",Ze,!0),qe(ce,"touchmove",Ae,!0),qe(ce,"touchend",Ce,!0)));return()=>{xe(),z.clear(),G.clear(),de(),N.current=!1}},[c,a,f,R,x,s,u,D,j,Z,W,O,S,r,H]),_.useEffect(W,[x,W]);const B=_.useMemo(()=>({onKeyDown:Z,[pk[y]]:z=>{q()&&r.setOpen(!1,Ye(As,z.nativeEvent))},...y!=="intentional"&&{onClick(z){q()&&r.setOpen(!1,Ye(As,z.nativeEvent))}}}),[Z,r,y,q]),ee=ze(z=>{if(!s||!u||z.button!==0)return;const G=xn(z.nativeEvent);je(r.select("floatingElement"),G)&&(A.current||(A.current=!0,M.current=!1))}),ne=ze(z=>{!s||!u||(z.defaultPrevented||z.nativeEvent.defaultPrevented)&&A.current&&(M.current=!0)}),le=_.useMemo(()=>({onKeyDown:Z,onPointerDown:ne,onMouseDown:ne,onClickCapture:I,onMouseDownCapture(z){I(),ee(z)},onPointerDownCapture(z){I(),ee(z)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[Z,I,ee,ne]);return _.useMemo(()=>u?{reference:B,floating:le,trigger:B}:{},[u,B,le])}function mS(e,t,r){let{reference:s,floating:a}=e;const c=ir(t),u=wm(t),f=xm(u),p=Nn(t),h=c==="y",m=s.x+s.width/2-a.width/2,y=s.y+s.height/2-a.height/2,v=s[f]/2-a[f]/2;let b;switch(p){case"top":b={x:m,y:s.y-a.height};break;case"bottom":b={x:m,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y};break;case"left":b={x:s.x-a.width,y};break;default:b={x:s.x,y:s.y}}switch(Xo(t)){case"start":b[u]-=v*(r&&h?-1:1);break;case"end":b[u]+=v*(r&&h?-1:1);break}return b}async function yk(e,t){var r;t===void 0&&(t={});const{x:s,y:a,platform:c,rects:u,elements:f,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:v=!1,padding:b=0}=no(t,e),S=sw(b),x=f[v?y==="floating"?"reference":"floating":y],R=Lu(await c.getClippingRect({element:(r=await(c.isElement==null?void 0:c.isElement(x)))==null||r?x:x.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:p})),O=y==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),M=await(c.isElement==null?void 0:c.isElement(A))?await(c.getScale==null?void 0:c.getScale(A))||{x:1,y:1}:{x:1,y:1},N=Lu(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:O,offsetParent:A,strategy:p}):O);return{top:(R.top-N.top+S.top)/M.y,bottom:(N.bottom-R.bottom+S.bottom)/M.y,left:(R.left-N.left+S.left)/M.x,right:(N.right-R.right+S.right)/M.x}}const vk=50,bk=async(e,t,r)=>{const{placement:s="bottom",strategy:a="absolute",middleware:c=[],platform:u}=r,f=u.detectOverflow?u:{...u,detectOverflow:yk},p=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y}=mS(h,s,p),v=s,b=0;const S={};for(let E=0;E<c.length;E++){const x=c[E];if(!x)continue;const{name:R,fn:O}=x,{x:A,y:M,data:N,reset:D}=await O({x:m,y,initialPlacement:s,placement:v,strategy:a,middlewareData:S,rects:h,platform:f,elements:{reference:e,floating:t}});m=A??m,y=M??y,S[R]={...S[R],...N},D&&b<vk&&(b++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(h=D.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:a}):D.rects),{x:m,y}=mS(h,v,p)),E=-1)}return{x:m,y,placement:v,strategy:a,middlewareData:S}},Sk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,s;const{placement:a,middlewareData:c,rects:u,initialPlacement:f,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...x}=no(e,t);if((r=c.arrow)!=null&&r.alignmentOffset)return{};const R=Nn(a),O=ir(f),A=Nn(f)===f,M=await(p.isRTL==null?void 0:p.isRTL(h.floating)),N=v||(A||!E?[ju(f)]:yD(f)),D=S!=="none";!v&&D&&N.push(...xD(f,E,S,M));const j=[f,...N],L=await p.detectOverflow(t,x),H=[];let Y=((s=c.flip)==null?void 0:s.overflows)||[];if(m&&H.push(L[R]),y){const q=gD(a,u,M);H.push(L[q[0]],L[q[1]])}if(Y=[...Y,{placement:a,overflows:H}],!H.every(q=>q<=0)){var W,$;const q=(((W=c.flip)==null?void 0:W.index)||0)+1,Z=j[q];if(Z&&(!(y==="alignment"?O!==ir(Z):!1)||Y.every(ee=>ir(ee.placement)===O?ee.overflows[0]>0:!0)))return{data:{index:q,overflows:Y},reset:{placement:Z}};let I=($=Y.filter(B=>B.overflows[0]<=0).sort((B,ee)=>B.overflows[1]-ee.overflows[1])[0])==null?void 0:$.placement;if(!I)switch(b){case"bestFit":{var K;const B=(K=Y.filter(ee=>{if(D){const ne=ir(ee.placement);return ne===O||ne==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ne=>ne>0).reduce((ne,le)=>ne+le,0)]).sort((ee,ne)=>ee[1]-ne[1])[0])==null?void 0:K[0];B&&(I=B);break}case"initialPlacement":I=f;break}if(a!==I)return{reset:{placement:I}}}return{}}}};function gS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yS(e){return pD.some(t=>e[t]>=0)}const xk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:s}=t,{strategy:a="referenceHidden",...c}=no(e,t);switch(a){case"referenceHidden":{const u=await s.detectOverflow(t,{...c,elementContext:"reference"}),f=gS(u,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:yS(f)}}}case"escaped":{const u=await s.detectOverflow(t,{...c,altBoundary:!0}),f=gS(u,r.floating);return{data:{escapedOffsets:f,escaped:yS(f)}}}default:return{}}}}},Dw=new Set(["left","top"]);async function wk(e,t){const{placement:r,platform:s,elements:a}=e,c=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=Nn(r),f=Xo(r),p=ir(r)==="y",h=Dw.has(u)?-1:1,m=c&&p?-1:1,y=no(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof S=="number"&&(b=f==="end"?S*-1:S),p?{x:b*m,y:v*h}:{x:v*h,y:b*m}}const Rk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,s;const{x:a,y:c,placement:u,middlewareData:f}=t,p=await wk(t,e);return u===((r=f.offset)==null?void 0:r.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:a+p.x,y:c+p.y,data:{...p,placement:u}}}}},Ek=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:s,placement:a,platform:c}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:p={fn:R=>{let{x:O,y:A}=R;return{x:O,y:A}}},...h}=no(e,t),m={x:r,y:s},y=await c.detectOverflow(t,h),v=ir(Nn(a)),b=Sm(v);let S=m[b],E=m[v];if(u){const R=b==="y"?"top":"left",O=b==="y"?"bottom":"right",A=S+y[R],M=S-y[O];S=Up(A,S,M)}if(f){const R=v==="y"?"top":"left",O=v==="y"?"bottom":"right",A=E+y[R],M=E-y[O];E=Up(A,E,M)}const x=p.fn({...t,[b]:S,[v]:E});return{...x,data:{x:x.x-r,y:x.y-s,enabled:{[b]:u,[v]:f}}}}}},_k=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:s,placement:a,rects:c,middlewareData:u}=t,{offset:f=0,mainAxis:p=!0,crossAxis:h=!0}=no(e,t),m={x:r,y:s},y=ir(a),v=Sm(y);let b=m[v],S=m[y];const E=no(f,t),x=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(p){const A=v==="y"?"height":"width",M=c.reference[v]-c.floating[A]+x.mainAxis,N=c.reference[v]+c.reference[A]-x.mainAxis;b<M?b=M:b>N&&(b=N)}if(h){var R,O;const A=v==="y"?"width":"height",M=Dw.has(Nn(a)),N=c.reference[y]-c.floating[A]+(M&&((R=u.offset)==null?void 0:R[y])||0)+(M?0:x.crossAxis),D=c.reference[y]+c.reference[A]+(M?0:((O=u.offset)==null?void 0:O[y])||0)-(M?x.crossAxis:0);S<N?S=N:S>D&&(S=D)}return{[v]:b,[y]:S}}}},Tk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,s;const{placement:a,rects:c,platform:u,elements:f}=t,{apply:p=()=>{},...h}=no(e,t),m=await u.detectOverflow(t,h),y=Nn(a),v=Xo(a),b=ir(a)==="y",{width:S,height:E}=c.floating;let x,R;y==="top"||y==="bottom"?(x=y,R=v===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(R=y,x=v==="end"?"top":"bottom");const O=E-m.top-m.bottom,A=S-m.left-m.right,M=qi(E-m[x],O),N=qi(S-m[R],A),D=!t.middlewareData.shift;let j=M,L=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=A),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(j=O),D&&!v){const Y=qn(m.left,0),W=qn(m.right,0),$=qn(m.top,0),K=qn(m.bottom,0);b?L=S-2*(Y!==0||W!==0?Y+W:qn(m.left,m.right)):j=E-2*($!==0||K!==0?$+K:qn(m.top,m.bottom))}await p({...t,availableWidth:L,availableHeight:j});const H=await u.getDimensions(f.floating);return S!==H.width||E!==H.height?{reset:{rects:!0}}:{}}}};function kw(e){const t=jn(e);let r=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=vt(e),c=a?e.offsetWidth:r,u=a?e.offsetHeight:s,f=Pu(r)!==c||Pu(s)!==u;return f&&(r=c,s=u),{width:r,height:s,$:f}}function zm(e){return We(e)?e:e.contextElement}function Ui(e){const t=zm(e);if(!vt(t))return Er(1);const r=t.getBoundingClientRect(),{width:s,height:a,$:c}=kw(t);let u=(c?Pu(r.width):r.width)/s,f=(c?Pu(r.height):r.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const Ck=Er(0);function Nw(e){const t=zt(e);return!af()||!t.visualViewport?Ck:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ok(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==zt(e)?!1:t}function Ds(e,t,r,s){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),c=zm(e);let u=Er(1);t&&(s?We(s)&&(u=Ui(s)):u=Ui(e));const f=Ok(c,r,s)?Nw(c):Er(0);let p=(a.left+f.x)/u.x,h=(a.top+f.y)/u.y,m=a.width/u.x,y=a.height/u.y;if(c){const v=zt(c),b=s&&We(s)?zt(s):s;let S=v,E=jp(S);for(;E&&s&&b!==S;){const x=Ui(E),R=E.getBoundingClientRect(),O=jn(E),A=R.left+(E.clientLeft+parseFloat(O.paddingLeft))*x.x,M=R.top+(E.clientTop+parseFloat(O.paddingTop))*x.y;p*=x.x,h*=x.y,m*=x.x,y*=x.y,p+=A,h+=M,S=zt(E),E=jp(S)}}return Lu({width:m,height:y,x:p,y:h})}function df(e,t){const r=lf(e).scrollLeft;return t?t.left+r:Ds(Or(e)).left+r}function Pw(e,t){const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-df(e,r),a=r.top+t.scrollTop;return{x:s,y:a}}function Mk(e){let{elements:t,rect:r,offsetParent:s,strategy:a}=e;const c=a==="fixed",u=Or(s),f=t?sf(t.floating):!1;if(s===u||f&&c)return r;let p={scrollLeft:0,scrollTop:0},h=Er(1);const m=Er(0),y=vt(s);if((y||!y&&!c)&&((gn(s)!=="body"||Qo(u))&&(p=lf(s)),y)){const b=Ds(s);h=Ui(s),m.x=b.x+s.clientLeft,m.y=b.y+s.clientTop}const v=u&&!y&&!c?Pw(u,p):Er(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-p.scrollLeft*h.x+m.x+v.x,y:r.y*h.y-p.scrollTop*h.y+m.y+v.y}}function Ak(e){return Array.from(e.getClientRects())}function zk(e){const t=Or(e),r=lf(e),s=e.ownerDocument.body,a=qn(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),c=qn(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-r.scrollLeft+df(e);const f=-r.scrollTop;return jn(s).direction==="rtl"&&(u+=qn(t.clientWidth,s.clientWidth)-a),{width:a,height:c,x:u,y:f}}const vS=25;function Dk(e,t){const r=zt(e),s=Or(e),a=r.visualViewport;let c=s.clientWidth,u=s.clientHeight,f=0,p=0;if(a){c=a.width,u=a.height;const m=af();(!m||m&&t==="fixed")&&(f=a.offsetLeft,p=a.offsetTop)}const h=df(s);if(h<=0){const m=s.ownerDocument,y=m.body,v=getComputedStyle(y),b=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(s.clientWidth-y.clientWidth-b);S<=vS&&(c-=S)}else h<=vS&&(c+=h);return{width:c,height:u,x:f,y:p}}function kk(e,t){const r=Ds(e,!0,t==="fixed"),s=r.top+e.clientTop,a=r.left+e.clientLeft,c=vt(e)?Ui(e):Er(1),u=e.clientWidth*c.x,f=e.clientHeight*c.y,p=a*c.x,h=s*c.y;return{width:u,height:f,x:p,y:h}}function bS(e,t,r){let s;if(t==="viewport")s=Dk(e,r);else if(t==="document")s=zk(Or(e));else if(We(t))s=kk(t,r);else{const a=Nw(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Lu(s)}function jw(e,t){const r=Cr(e);return r===t||!We(r)||wr(r)?!1:jn(r).position==="fixed"||jw(r,t)}function Nk(e,t){const r=t.get(e);if(r)return r;let s=fl(e,[],!1).filter(f=>We(f)&&gn(f)!=="body"),a=null;const c=jn(e).position==="fixed";let u=c?Cr(e):e;for(;We(u)&&!wr(u);){const f=jn(u),p=vm(u);!p&&f.position==="fixed"&&(a=null),(c?!p&&!a:!p&&f.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Qo(u)&&!p&&jw(e,u))?s=s.filter(m=>m!==u):a=f,u=Cr(u)}return t.set(e,s),s}function Pk(e){let{element:t,boundary:r,rootBoundary:s,strategy:a}=e;const u=[...r==="clippingAncestors"?sf(t)?[]:Nk(t,this._c):[].concat(r),s],f=bS(t,u[0],a);let p=f.top,h=f.right,m=f.bottom,y=f.left;for(let v=1;v<u.length;v++){const b=bS(t,u[v],a);p=qn(b.top,p),h=qi(b.right,h),m=qi(b.bottom,m),y=qn(b.left,y)}return{width:h-y,height:m-p,x:y,y:p}}function jk(e){const{width:t,height:r}=kw(e);return{width:t,height:r}}function Lk(e,t,r){const s=vt(t),a=Or(t),c=r==="fixed",u=Ds(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const p=Er(0);function h(){p.x=df(a)}if(s||!s&&!c)if((gn(t)!=="body"||Qo(a))&&(f=lf(t)),s){const b=Ds(t,!0,c,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else a&&h();c&&!s&&a&&h();const m=a&&!s&&!c?Pw(a,f):Er(0),y=u.left+f.scrollLeft-p.x-m.x,v=u.top+f.scrollTop-p.y-m.y;return{x:y,y:v,width:u.width,height:u.height}}function ap(e){return jn(e).position==="static"}function SS(e,t){if(!vt(e)||jn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Or(e)===r&&(r=r.ownerDocument.body),r}function Lw(e,t){const r=zt(e);if(sf(e))return r;if(!vt(e)){let a=Cr(e);for(;a&&!wr(a);){if(We(a)&&!ap(a))return a;a=Cr(a)}return r}let s=SS(e,t);for(;s&&Xz(s)&&ap(s);)s=SS(s,t);return s&&wr(s)&&ap(s)&&!vm(s)?r:s||eD(e)||r}const Ik=async function(e){const t=this.getOffsetParent||Lw,r=this.getDimensions,s=await r(e.floating);return{reference:Lk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Uk(e){return jn(e).direction==="rtl"}const Bk={convertOffsetParentRelativeRectToViewportRelativeRect:Mk,getDocumentElement:Or,getClippingRect:Pk,getOffsetParent:Lw,getElementRects:Ik,getClientRects:Ak,getDimensions:jk,getScale:Ui,isElement:We,isRTL:Uk};function Iw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hk(e,t){let r=null,s;const a=Or(e);function c(){var f;clearTimeout(s),(f=r)==null||f.disconnect(),r=null}function u(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),c();const h=e.getBoundingClientRect(),{left:m,top:y,width:v,height:b}=h;if(f||t(),!v||!b)return;const S=Es(y),E=Es(a.clientWidth-(m+v)),x=Es(a.clientHeight-(y+b)),R=Es(m),A={rootMargin:-S+"px "+-E+"px "+-x+"px "+-R+"px",threshold:qn(0,qi(1,p))||1};let M=!0;function N(D){const j=D[0].intersectionRatio;if(j!==p){if(!M)return u();j?u(!1,j):s=setTimeout(()=>{u(!1,1e-7)},1e3)}j===1&&!Iw(h,e.getBoundingClientRect())&&u(),M=!1}try{r=new IntersectionObserver(N,{...A,root:a.ownerDocument})}catch{r=new IntersectionObserver(N,A)}r.observe(e)}return u(!0),c}function xS(e,t,r,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=s,h=zm(e),m=a||c?[...h?fl(h):[],...t?fl(t):[]]:[];m.forEach(R=>{a&&R.addEventListener("scroll",r,{passive:!0}),c&&R.addEventListener("resize",r)});const y=h&&f?Hk(h,r):null;let v=-1,b=null;u&&(b=new ResizeObserver(R=>{let[O]=R;O&&O.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(t)})),r()}),h&&!p&&b.observe(h),t&&b.observe(t));let S,E=p?Ds(e):null;p&&x();function x(){const R=Ds(e);E&&!Iw(E,R)&&r(),E=R,S=requestAnimationFrame(x)}return r(),()=>{var R;m.forEach(O=>{a&&O.removeEventListener("scroll",r),c&&O.removeEventListener("resize",r)}),y?.(),(R=b)==null||R.disconnect(),b=null,p&&cancelAnimationFrame(S)}}const Fk=Rk,$k=Ek,Zk=Sk,Vk=Tk,qk=xk,Yk=_k,Gk=(e,t,r)=>{const s=new Map,a={platform:Bk,...r},c={...a.platform,_c:s};return bk(e,t,{...a,platform:c})};var Kk=typeof document<"u",Qk=function(){},xu=Kk?_.useLayoutEffect:Qk;function Hu(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 r,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(s=r;s--!==0;)if(!Hu(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=r;s--!==0;){const c=a[s];if(!(c==="_owner"&&e.$$typeof)&&!Hu(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function Uw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wS(e,t){const r=Uw(e);return Math.round(t*r)/r}function lp(e){const t=_.useRef(e);return xu(()=>{t.current=e}),t}function Xk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:s=[],platform:a,elements:{reference:c,floating:u}={},transform:f=!0,whileElementsMounted:p,open:h}=e,[m,y]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=_.useState(s);Hu(v,s)||b(s);const[S,E]=_.useState(null),[x,R]=_.useState(null),O=_.useCallback(ee=>{ee!==D.current&&(D.current=ee,E(ee))},[]),A=_.useCallback(ee=>{ee!==j.current&&(j.current=ee,R(ee))},[]),M=c||S,N=u||x,D=_.useRef(null),j=_.useRef(null),L=_.useRef(m),H=p!=null,Y=lp(p),W=lp(a),$=lp(h),K=_.useCallback(()=>{if(!D.current||!j.current)return;const ee={placement:t,strategy:r,middleware:v};W.current&&(ee.platform=W.current),Gk(D.current,j.current,ee).then(ne=>{const le={...ne,isPositioned:$.current!==!1};q.current&&!Hu(L.current,le)&&(L.current=le,Tr.flushSync(()=>{y(le)}))})},[v,t,r,W,$]);xu(()=>{h===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,y(ee=>({...ee,isPositioned:!1})))},[h]);const q=_.useRef(!1);xu(()=>(q.current=!0,()=>{q.current=!1}),[]),xu(()=>{if(M&&(D.current=M),N&&(j.current=N),M&&N){if(Y.current)return Y.current(M,N,K);K()}},[M,N,K,Y,H]);const Z=_.useMemo(()=>({reference:D,floating:j,setReference:O,setFloating:A}),[O,A]),I=_.useMemo(()=>({reference:M,floating:N}),[M,N]),B=_.useMemo(()=>{const ee={position:r,left:0,top:0};if(!I.floating)return ee;const ne=wS(I.floating,m.x),le=wS(I.floating,m.y);return f?{...ee,transform:"translate("+ne+"px, "+le+"px)",...Uw(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ne,top:le}},[r,f,I.floating,m.x,m.y]);return _.useMemo(()=>({...m,update:K,refs:Z,elements:I,floatingStyles:B}),[m,K,Z,I,B])}const Jk=(e,t)=>{const r=Fk(e);return{name:r.name,fn:r.fn,options:[e,t]}},Wk=(e,t)=>{const r=$k(e);return{name:r.name,fn:r.fn,options:[e,t]}},eN=(e,t)=>({fn:Yk(e).fn,options:[e,t]}),tN=(e,t)=>{const r=Zk(e);return{name:r.name,fn:r.fn,options:[e,t]}},nN=(e,t)=>{const r=Vk(e);return{name:r.name,fn:r.fn,options:[e,t]}},rN=(e,t)=>{const r=qk(e);return{name:r.name,fn:r.fn,options:[e,t]}},_e=(e,t,r,s,a,c,...u)=>{if(u.length>0)throw new Error(wn(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var Bw=gx();const oN=_m(19),sN=oN?aN:lN;function Hw(e,t,r,s,a){return sN(e,t,r,s,a)}function iN(e,t,r,s,a){const c=_.useCallback(()=>t(e.getSnapshot(),r,s,a),[e,t,r,s,a]);return Bw.useSyncExternalStore(e.subscribe,c,c)}jz({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let r=0;r<e.syncHooks.length;r+=1){const s=e.syncHooks[r],a=s.selector(s.store.state,s.a1,s.a2,s.a3);(s.didChange||!Object.is(s.value,a))&&(t=!0,s.value=a,s.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const r=new Set;for(const a of e.syncHooks)r.add(a.store);const s=[];for(const a of r)s.push(a.subscribe(t));return()=>{for(const a of s)a()}}),Bw.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function aN(e,t,r,s,a){const c=Pz();if(!c)return iN(e,t,r,s,a);const u=c.syncIndex;c.syncIndex+=1;let f;return c.didInitialize?(f=c.syncHooks[u],(f.store!==e||f.selector!==t||!Object.is(f.a1,r)||!Object.is(f.a2,s)||!Object.is(f.a3,a))&&(f.store!==e&&(c.didChangeStore=!0),f.store=e,f.selector=t,f.a1=r,f.a2=s,f.a3=a,f.didChange=!0)):(f={store:e,selector:t,a1:r,a2:s,a3:a,value:t(e.getSnapshot(),r,s,a),didChange:!1},c.syncHooks.push(f)),f.value}function lN(e,t,r,s,a){return yx.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,r,s,a))}class cN{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const r=this.updateTick;for(const s of this.listeners){if(r!==this.updateTick)return;s(t)}}update(t){for(const r in t)if(!Object.is(this.state[r],t[r])){this.setState({...this.state,...t});return}}set(t,r){Object.is(this.state[t],r)||this.setState({...this.state,[t]:r})}notifyAll(){const t={...this.state};this.setState(t)}use(t,r,s,a){return Hw(this,t,r,s,a)}}class hf extends cN{constructor(t,r={},s){super(t),this.context=r,this.selectors=s}useSyncedValue(t,r){_.useDebugValue(t),Re(()=>{this.state[t]!==r&&this.set(t,r)},[t,r])}useSyncedValueWithCleanup(t,r){const s=this;Re(()=>(s.state[t]!==r&&s.set(t,r),()=>{s.set(t,void 0)}),[s,t,r])}useSyncedValues(t){const r=this,s=Object.values(t);Re(()=>{r.update(t)},[r,...s])}useControlledProp(t,r){_.useDebugValue(t);const s=r!==void 0;Re(()=>{s&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})},[t,r,s])}select(t,r,s,a){const c=this.selectors[t];return c(this.state,r,s,a)}useState(t,r,s,a){return _.useDebugValue(t),Hw(this,this.selectors[t],r,s,a)}useContextCallback(t,r){_.useDebugValue(t);const s=ze(r??hm);this.context[t]=s}useStateSetter(t){const r=_.useRef(void 0);return r.current===void 0&&(r.current=s=>{this.set(t,s)}),r.current}observe(t,r){let s;typeof t=="function"?s=t:s=this.selectors[t];let a=s(this.state);return r(a,a,this),this.subscribe(c=>{const u=s(c);if(!Object.is(a,u)){const f=a;a=u,r(u,f,this)}})}}const uN={open:_e(e=>e.open),transitionStatus:_e(e=>e.transitionStatus),domReferenceElement:_e(e=>e.domReferenceElement),referenceElement:_e(e=>e.positionReference??e.referenceElement),floatingElement:_e(e=>e.floatingElement),floatingId:_e(e=>e.floatingId)};class Dm extends hf{constructor(t){const{syncOnly:r,nested:s,onOpenChange:a,triggerElements:c,...u}=t;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:a,dataRef:{current:{}},events:Cw(),nested:s,triggerElements:c},uN),this.syncOnly=r}syncOpenEvent=(t,r)=>{(!t||!this.state.open||r!=null&&Kx(r))&&(this.context.dataRef.current.openEvent=t?r:void 0)};dispatchOpenChange=(t,r)=>{this.syncOpenEvent(t,r.event);const s={open:t,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",s)};setOpen=(t,r)=>{if(this.syncOnly){this.context.onOpenChange?.(t,r);return}this.dispatchOpenChange(t,r),this.context.onOpenChange?.(t,r)}}function Fw(e,t=!1,r=!1){const[s,a]=_.useState(e&&t?"idle":void 0),[c,u]=_.useState(e);return e&&!c&&(u(!0),a("starting")),!e&&c&&s!=="ending"&&!r&&a("ending"),!e&&!c&&s==="ending"&&a(void 0),Re(()=>{if(!e&&c&&s!=="ending"&&r){const f=At.request(()=>{a("ending")});return()=>{At.cancel(f)}}},[e,c,s,r]),Re(()=>{if(!e||t)return;const f=At.request(()=>{a(void 0)});return()=>{At.cancel(f)}},[t,e]),Re(()=>{if(!e||!t)return;e&&c&&s!=="idle"&&a("starting");const f=At.request(()=>{a("idle")});return()=>{At.cancel(f)}},[t,e,c,s]),{mounted:c,setMounted:u,transitionStatus:s}}let ks=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const fN={[ks.startingStyle]:""},dN={[ks.endingStyle]:""},Ki={transitionStatus(e){return e==="starting"?fN:e==="ending"?dN:null}};function km(e,t=!1,r=!0){const s=cf();return ze((a,c=null)=>{s.cancel();const u=Jr(e);if(u==null)return;const f=u,p=()=>{Tr.flushSync(a)};if(typeof f.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){a();return}function h(){Promise.all(f.getAnimations().map(m=>m.finished)).then(()=>{c?.aborted||p()}).catch(()=>{if(r){c?.aborted||p();return}const m=f.getAnimations();!c?.aborted&&m.length>0&&m.some(y=>y.pending||y.playState!=="finished")&&h()})}if(t){const m=ks.startingStyle;if(!f.hasAttribute(m)){s.request(h);return}const y=new MutationObserver(()=>{f.hasAttribute(m)||(y.disconnect(),h())});y.observe(f,{attributes:!0,attributeFilter:[m]}),c?.addEventListener("abort",()=>y.disconnect(),{once:!0});return}s.request(h)})}function Rl(e){const{enabled:t=!0,open:r,ref:s,onComplete:a}=e,c=ze(a),u=km(s,r,!1);_.useEffect(()=>{if(!t)return;const f=new AbortController;return u(c,f.signal),()=>{f.abort()}},[t,r,c,u])}function hN(e,t){const r=_.useRef(null),s=_.useRef(null);return _.useCallback(a=>{if(e!==void 0){if(r.current!==null){const c=r.current,u=s.current,f=t.context.triggerElements.getById(c);u&&f===u&&t.context.triggerElements.delete(c),r.current=null,s.current=null}a!==null&&(r.current=e,s.current=a,t.context.triggerElements.add(e,a))}},[t,e])}function $w(e,t,r,s){const a=r.useState("isMountedByTrigger",e),c=hN(e,r),u=ze(f=>{if(c(f),!f||!r.select("open"))return;const p=r.select("activeTriggerId");if(p===e){r.update({activeTriggerElement:f,...s});return}p==null&&r.update({activeTriggerId:e,activeTriggerElement:f,...s})});return Re(()=>{a&&r.update({activeTriggerElement:t.current,...s})},[a,r,t,...Object.values(s)]),{registerTrigger:u,isMountedByThisTrigger:a}}function Nm(e){const t=e.useState("open");Re(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const r=e.context.triggerElements.entries().next();if(!r.done){const[s,a]=r.value;e.update({activeTriggerId:s,activeTriggerElement:a})}}},[t,e])}function Pm(e,t,r){const{mounted:s,setMounted:a,transitionStatus:c}=Fw(e);t.useSyncedValues({mounted:s,transitionStatus:c});const u=ze(()=>{a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return Rl({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:c}}class El{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,r){const s=this.idMap.get(t);s!==r&&(s!==void 0&&this.elementsSet.delete(s),this.elementsSet.add(r),this.idMap.set(t,r))}delete(t){const r=this.idMap.get(t);r&&(this.elementsSet.delete(r),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const r of this.elementsSet)if(t(r))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function pN(){return new Dm({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new El,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0})}function jm(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:pN(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:cn,inactiveTriggerProps:cn,popupProps:cn}}const eu=_e(e=>e.triggerIdProp??e.activeTriggerId),Lm={open:_e(e=>e.openProp??e.open),mounted:_e(e=>e.mounted),transitionStatus:_e(e=>e.transitionStatus),floatingRootContext:_e(e=>e.floatingRootContext),preventUnmountingOnClose:_e(e=>e.preventUnmountingOnClose),payload:_e(e=>e.payload),activeTriggerId:eu,activeTriggerElement:_e(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:_e((e,t)=>t!==void 0&&eu(e)===t),isOpenedByTrigger:_e((e,t)=>t!==void 0&&eu(e)===t&&e.open),isMountedByTrigger:_e((e,t)=>t!==void 0&&eu(e)===t&&e.mounted),triggerProps:_e((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:_e(e=>e.popupProps),popupElement:_e(e=>e.popupElement),positionerElement:_e(e=>e.positionerElement)};function mN(e){const{open:t=!1,onOpenChange:r,elements:s={}}=e,a=Is(),c=co()!=null,u=mn(()=>new Dm({open:t,transitionStatus:void 0,onOpenChange:r,referenceElement:s.reference??null,floatingElement:s.floating??null,triggerElements:new El,floatingId:a,syncOnly:!1,nested:c})).current;return Re(()=>{const f={open:t,floatingId:a};s.reference!==void 0&&(f.referenceElement=s.reference,f.domReferenceElement=We(s.reference)?s.reference:null),s.floating!==void 0&&(f.floatingElement=s.floating),u.update(f)},[t,a,s.reference,s.floating,u]),u.context.onOpenChange=r,u.context.nested=c,u}function gN(e={}){const{nodeId:t,externalTree:r}=e,s=mN(e),a=e.rootContext||s,c={reference:a.useState("referenceElement"),floating:a.useState("floatingElement"),domReference:a.useState("domReferenceElement")},[u,f]=_.useState(null),p=_.useRef(null),h=Jo(r);Re(()=>{c.domReference&&(p.current=c.domReference)},[c.domReference]);const m=Xk({...e,elements:{...c,...u&&{reference:u}}}),y=_.useCallback(L=>{const H=We(L)?{getBoundingClientRect:()=>L.getBoundingClientRect(),getClientRects:()=>L.getClientRects(),contextElement:L}:L;f(H),m.refs.setReference(H)},[m.refs]),[v,b]=_.useState(void 0),[S,E]=_.useState(null);a.useSyncedValue("referenceElement",v??null);const x=We(v)?v:null;a.useSyncedValue("domReferenceElement",v===void 0?c.domReference:x),a.useSyncedValue("floatingElement",S);const R=_.useCallback(L=>{(We(L)||L===null)&&(p.current=L,b(L)),(We(m.refs.reference.current)||m.refs.reference.current===null||L!==null&&!We(L))&&m.refs.setReference(L)},[m.refs,b]),O=_.useCallback(L=>{E(L),m.refs.setFloating(L)},[m.refs]),A=_.useMemo(()=>({...m.refs,setReference:R,setFloating:O,setPositionReference:y,domReference:p}),[m.refs,R,O,y]),M=_.useMemo(()=>({...m.elements,domReference:c.domReference}),[m.elements,c.domReference]),N=a.useState("open"),D=a.useState("floatingId"),j=_.useMemo(()=>({...m,dataRef:a.context.dataRef,open:N,onOpenChange:a.setOpen,events:a.context.events,floatingId:D,refs:A,elements:M,nodeId:t,rootStore:a}),[m,A,M,t,a,N,D]);return Re(()=>{a.context.dataRef.current.floatingContext=j;const L=h?.nodesRef.current.find(H=>H.id===t);L&&(L.context=j)}),_.useMemo(()=>({...m,context:j,refs:A,elements:M,rootStore:a}),[m,A,M,j,a])}function Im(e){const{popupStore:t,treatPopupAsFloatingElement:r=!1,onOpenChange:s}=e,a=Is(),c=co()!=null,u=t.useState("open"),f=t.useState("activeTriggerElement"),p=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,m=mn(()=>new Dm({open:u,transitionStatus:void 0,referenceElement:f,floatingElement:p,triggerElements:h,onOpenChange:s,floatingId:a,syncOnly:!0,nested:c})).current;return Re(()=>{const y={open:u,floatingId:a,referenceElement:f,floatingElement:p};We(f)&&(y.domReferenceElement=f),m.state.positionReference===m.state.referenceElement&&(y.positionReference=f),m.update(y)},[u,a,f,p,m]),m.context.onOpenChange=s,m.context.nested=c,m}const cp=Vx&&Zx;function Zw(e,t={}){const r="rootStore"in e?e.rootStore:e,{events:s,dataRef:a}=r.context,{enabled:c=!0,delay:u}=t,f=_.useRef(!1),p=_.useRef(null),h=Pn(),m=_.useRef(!0);_.useEffect(()=>{const v=r.select("domReferenceElement");if(!c)return;const b=zt(v);function S(){const R=r.select("domReferenceElement");!r.select("open")&&vt(R)&&R===sr(tt(R))&&(f.current=!0)}function E(){m.current=!0}function x(){m.current=!1}return Rr(qe(b,"blur",S),cp&&qe(b,"keydown",E,!0),cp&&qe(b,"pointerdown",x,!0))},[r,c]),_.useEffect(()=>{if(!c)return;function v(b){if(b.reason===As||b.reason===rf){const S=r.select("domReferenceElement");We(S)&&(p.current=S,f.current=!0)}}return s.on("openchange",v),()=>{s.off("openchange",v)}},[s,c,r]);const y=_.useMemo(()=>({onMouseLeave(){f.current=!1,p.current=null},onFocus(v){const b=v.currentTarget;if(f.current){if(p.current===b)return;f.current=!1,p.current=null}const S=xn(v.nativeEvent);if(We(S)){if(cp&&!v.relatedTarget){if(!m.current&&!uf(S))return}else if(!hD(S))return}const E=ku(v.relatedTarget,r.context.triggerElements),{nativeEvent:x,currentTarget:R}=v,O=typeof u=="function"?u():u;if(r.select("open")&&E||O===0||O===void 0){r.setOpen(!0,Ye(ji,x,R));return}h.start(O,()=>{f.current||r.setOpen(!0,Ye(ji,x,R))})},onBlur(v){f.current=!1,p.current=null;const b=v.relatedTarget,S=v.nativeEvent,E=We(b)&&b.hasAttribute(dl("focus-guard"))&&b.getAttribute("data-type")==="outside";h.start(0,()=>{const x=r.select("domReferenceElement"),R=sr(tt(x));!b&&R===x||je(a.current.floatingContext?.refs.floating.current,R)||je(x,R)||E||ku(b??R,r.context.triggerElements)||r.setOpen(!1,Ye(ji,S))})}}),[a,r,h,u]);return _.useMemo(()=>c?{reference:y,trigger:y}:{},[c,y])}class Um{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new dr,this.restTimeout=new dr,this.handleCloseOptions=void 0}static create(){return new Um}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Fu=new WeakMap;function $u(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Fu.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Fu.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Vw(e,t){const{scopeElement:r,referenceElement:s,floatingElement:a}=t,c=Fu.get(r);c&&c!==e&&$u(c),$u(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=s,e.pointerEventsFloatingElement=a,Fu.set(r,e),r.style.pointerEvents="none",s.style.pointerEvents="auto",a.style.pointerEvents="auto"}function qw(e){const t=mn(Um.create).current,r=e.context.dataRef.current;return r.hoverInteractionState||(r.hoverInteractionState=t),nf(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function Yw(e,t={}){const r="rootStore"in e?e.rootStore:e,s=r.useState("open"),a=r.useState("floatingElement"),c=r.useState("domReferenceElement"),{dataRef:u}=r.context,{enabled:f=!0,closeDelay:p=0,nodeId:h}=t,m=qw(r),y=Jo(),v=co(),b=ze(()=>Qx(u.current.openEvent?.type,m.interactedInside)),S=ze(()=>{const M=u.current.openEvent?.type;return M?.includes("mouse")&&M!=="mousedown"}),E=ze(M=>ku(M,r.context.triggerElements)),x=_.useCallback(M=>{const N=Du(p,"close",m.pointerType),D=()=>{r.setOpen(!1,Ye(pn,M)),y?.events.emit("floating.closed",M)};N?m.openChangeTimeout.start(N,D):(m.openChangeTimeout.clear(),D())},[p,r,m,y]),R=ze(()=>{$u(m)}),O=ze(M=>{const N=xn(M);if(!dD(N)){m.interactedInside=!1;return}m.interactedInside=N?.closest("[aria-haspopup]")!=null});Re(()=>{s||(m.pointerType=void 0,m.restTimeoutPending=!1,m.interactedInside=!1,R())},[s,m,R]),_.useEffect(()=>R,[R]),Re(()=>{if(f&&s&&m.handleCloseOptions?.blockPointerEvents&&S()&&We(c)&&a){const M=c,N=a,D=tt(a),j=y?.nodesRef.current.find(H=>H.id===v)?.context?.elements.floating;j&&(j.style.pointerEvents="");const L=m.handleCloseOptions?.getScope?.()??m.pointerEventsScopeElement??j??M.closest("[data-rootownerid]")??D.body;return Vw(m,{scopeElement:L,referenceElement:M,floatingElement:N}),()=>{R()}}},[f,s,c,a,m,S,y,v,R]);const A=Pn();_.useEffect(()=>{if(!f)return;function M(){m.openChangeTimeout.clear(),A.clear(),y?.events.off("floating.closed",D),R()}function N(L){if(y&&v&&_r(y.nodesRef.current,v).length>0){y.events.on("floating.closed",D);return}if(E(L.relatedTarget))return;const H=u.current.floatingContext?.nodeId??h,Y=L.relatedTarget;if(!(y&&H&&We(Y)&&_r(y.nodesRef.current,H,!1).some($=>je($.context?.elements.floating,Y)))){if(m.handler){m.handler(L);return}R(),b()||x(L)}}function D(L){!y||!v||_r(y.nodesRef.current,v).length>0||A.start(0,()=>{y.events.off("floating.closed",D),r.setOpen(!1,Ye(pn,L)),y.events.emit("floating.closed",L)})}const j=a;return Rr(j&&qe(j,"mouseenter",M),j&&qe(j,"mouseleave",N),j&&qe(j,"pointerdown",O,!0),()=>{y?.events.off("floating.closed",D)})},[f,a,r,u,h,b,E,x,R,O,m,y,v,A])}const yN={current:null};function Gw(e,t={}){const r="rootStore"in e?e.rootStore:e,{dataRef:s,events:a}=r.context,{enabled:c=!0,delay:u=0,handleClose:f=null,mouseOnly:p=!1,restMs:h=0,move:m=!0,triggerElementRef:y=yN,externalTree:v,isActiveTrigger:b=!0,getHandleCloseContext:S,isClosing:E}=t,x=Jo(v),R=qw(r),O=_.useRef(!1),A=ln(f),M=ln(u),N=ln(h),D=ln(c),j=ln(E);b&&(R.handleCloseOptions=A.current?.__options);const L=ze(()=>Qx(s.current.openEvent?.type,R.interactedInside)),H=ze(q=>ku(q,r.context.triggerElements)),Y=ze((q,Z,I)=>{const B=r.context.triggerElements;if(B.hasElement(Z))return!q||!je(q,Z);if(!We(I))return!1;const ee=I;return B.hasMatchingElement(ne=>je(ne,ee))&&(!q||!je(q,ee))}),W=ze((q,Z=!0)=>{const I=Du(M.current,"close",R.pointerType);I?R.openChangeTimeout.start(I,()=>{r.setOpen(!1,Ye(pn,q)),x?.events.emit("floating.closed",q)}):Z&&(R.openChangeTimeout.clear(),r.setOpen(!1,Ye(pn,q)),x?.events.emit("floating.closed",q))}),$=ze(()=>{if(!R.handler)return;tt(r.select("domReferenceElement")).removeEventListener("mousemove",R.handler),R.handler=void 0}),K=ze(()=>{$u(R)});return _.useEffect(()=>$,[$]),_.useEffect(()=>{if(!c)return;function q(Z){Z.open?O.current=!1:(O.current=Z.reason===pn,$(),R.openChangeTimeout.clear(),R.restTimeout.clear(),R.blockMouseMove=!0,R.restTimeoutPending=!1)}return a.on("openchange",q),()=>{a.off("openchange",q)}},[c,a,R,$]),_.useEffect(()=>{if(!c)return;const q=y.current??(b?r.select("domReferenceElement"):null);if(!We(q))return;function Z(B){if(R.openChangeTimeout.clear(),R.blockMouseMove=!1,p&&!Fi(R.pointerType))return;const ee=W0(N.current),ne=Du(M.current,"open",R.pointerType),le=xn(B),z=B.currentTarget??null,G=r.select("domReferenceElement");let re=z;if(We(le)&&!r.context.triggerElements.hasElement(le)){for(const Se of r.context.triggerElements.elements())if(je(Se,le)){re=Se;break}}We(z)&&We(G)&&!r.context.triggerElements.hasElement(z)&&je(z,G)&&(re=G);const ie=re==null?!1:Y(G,re,le),he=r.select("open"),de=j.current?.()??r.select("transitionStatus")==="ending",ge=!he&&de&&O.current,me=!ie&&We(re)&&We(G)&&je(G,re)&&ge,ye=ee>0&&!ne,ke=ie&&(he||ge)||me,He=!he||ie;if(ke){r.setOpen(!0,Ye(pn,B,re));return}ye||(ne?R.openChangeTimeout.start(ne,()=>{He&&r.setOpen(!0,Ye(pn,B,re))}):He&&r.setOpen(!0,Ye(pn,B,re)))}function I(B){if(L()){K();return}$();const ee=r.select("domReferenceElement"),ne=tt(ee);R.restTimeout.clear(),R.restTimeoutPending=!1;const le=s.current.floatingContext??S?.();if(H(B.relatedTarget))return;if(A.current&&le){r.select("open")||R.openChangeTimeout.clear();const re=y.current;R.handler=A.current({...le,tree:x,x:B.clientX,y:B.clientY,onClose(){K(),$(),D.current&&!L()&&re===r.select("domReferenceElement")&&W(B,!0)}}),ne.addEventListener("mousemove",R.handler),R.handler(B);return}(R.pointerType!=="touch"||!je(r.select("floatingElement"),B.relatedTarget))&&W(B)}return m?Rr(qe(q,"mousemove",Z,{once:!0}),qe(q,"mouseenter",Z),qe(q,"mouseleave",I)):Rr(qe(q,"mouseenter",Z),qe(q,"mouseleave",I))},[$,K,s,M,W,r,c,A,R,b,Y,L,H,p,m,N,y,x,D,S,j]),_.useMemo(()=>{if(!c)return;function q(Z){R.pointerType=Z.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(Z){const{nativeEvent:I}=Z,B=Z.currentTarget,ee=r.select("domReferenceElement"),ne=r.select("open"),le=Y(ee,B,Z.target);if(p&&!Fi(R.pointerType))return;if(ne&&le&&R.handleCloseOptions?.blockPointerEvents){const re=r.select("floatingElement");if(re){const ie=R.handleCloseOptions?.getScope?.()??B.ownerDocument.body;Vw(R,{scopeElement:ie,referenceElement:B,floatingElement:re})}}const z=W0(N.current);if(ne&&!le||z===0||!le&&R.restTimeoutPending&&Z.movementX**2+Z.movementY**2<2)return;R.restTimeout.clear();function G(){if(R.restTimeoutPending=!1,L())return;const re=r.select("open");!R.blockMouseMove&&(!re||le)&&r.setOpen(!0,Ye(pn,I,B))}R.pointerType==="touch"?Tr.flushSync(()=>{G()}):le&&ne?G():(R.restTimeoutPending=!0,R.restTimeout.start(z,G))}}},[c,R,L,Y,p,r,N])}function pf(e=[]){const t=e.map(h=>h?.reference),r=e.map(h=>h?.floating),s=e.map(h=>h?.item),a=e.map(h=>h?.trigger),c=_.useCallback(h=>tu(h,e,"reference"),t),u=_.useCallback(h=>tu(h,e,"floating"),r),f=_.useCallback(h=>tu(h,e,"item"),s),p=_.useCallback(h=>tu(h,e,"trigger"),a);return _.useMemo(()=>({getReferenceProps:c,getFloatingProps:u,getItemProps:f,getTriggerProps:p}),[c,u,f,p])}function tu(e,t,r){const s=new Map,a=r==="item",c={};r==="floating"&&(c.tabIndex=-1,c[Lp]="");for(const u in e)a&&e&&(u===nw||u===rw)||(c[u]=e[u]);for(let u=0;u<t.length;u+=1){let f;const p=t[u]?.[r];typeof p=="function"?f=e?p(e):null:f=p,f&&RS(c,f,a,s)}return RS(c,e,a,s),c}function RS(e,t,r,s){for(const a in t){const c=t[a];r&&(a===nw||a===rw)||(a.startsWith("on")?(s.has(a)||s.set(a,[]),typeof c=="function"&&(s.get(a)?.push(c),e[a]=(...u)=>s.get(a)?.map(f=>f(...u)).find(f=>f!==void 0))):e[a]=c)}}const vN="Escape";function mf(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function nu(e,t){return mf(t,e===bm||e===xl,e===Zo||e===Vo)}function up(e,t,r){return mf(t,e===xl,r?e===Zo:e===Vo)||e==="Enter"||e===" "||e===""}function bN(e,t,r){return mf(t,r?e===Zo:e===Vo,e===xl)}function SN(e,t,r,s){const a=r?e===Vo:e===Zo,c=e===bm;return t==="both"||t==="horizontal"&&s&&s>1?e===vN:mf(t,a,c)}function xN(e,t){const r="rootStore"in e?e.rootStore:e,s=r.useState("open"),a=r.useState("floatingElement"),c=r.useState("domReferenceElement"),u=r.context.dataRef,{listRef:f,activeIndex:p,onNavigate:h=()=>{},enabled:m=!0,selectedIndex:y=null,allowEscape:v=!1,loopFocus:b=!1,nested:S=!1,rtl:E=!1,virtual:x=!1,focusItemOnOpen:R="auto",focusItemOnHover:O=!0,openOnArrowKeyDown:A=!0,disabledIndices:M=void 0,orientation:N="vertical",parentOrientation:D,cols:j=1,id:L,resetOnPointerLeave:H=!0,externalTree:Y}=t,W=Nu(a),$=ln(W),K=co(),q=Jo(Y);Re(()=>{u.current.orientation=N},[u,N]);const Z=Ip(c),I=_.useRef(R),B=_.useRef(y??-1),ee=_.useRef(null),ne=_.useRef(!0),le=ze(ce=>{h(B.current===-1?null:B.current,ce)}),z=_.useRef(le),G=_.useRef(!!a),re=_.useRef(s),ie=_.useRef(!1),he=_.useRef(!1),de=_.useRef(null),ge=ln(M),me=ln(s),ye=ln(y),ke=ln(H),He=ze(()=>{function ce(ve){x?q?.events.emit("virtualfocus",ve):de.current=bu(ve,{sync:ie.current,preventScroll:!0})}const xe=f.current[B.current],ue=he.current;xe&&ce(xe),(ie.current?ve=>ve():requestAnimationFrame)(()=>{const ve=f.current[B.current]||xe;if(!ve)return;xe||ce(ve),Ze&&(ue||!ne.current)&&ve.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Re(()=>{m&&(s&&a?(B.current=y??-1,I.current&&y!=null&&(he.current=!0,le())):G.current&&(B.current=-1,z.current()))},[m,s,a,y,le]),Re(()=>{if(m){if(!s){ie.current=!1;return}if(a)if(p==null){if(ie.current=!1,ye.current!=null)return;if(G.current&&(B.current=-1,He()),(!re.current||!G.current)&&I.current&&(ee.current!=null||I.current===!0&&ee.current==null)){let ce=0;const xe=()=>{f.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(xe),ce+=1):(B.current=ee.current==null||up(ee.current,N,E)||S?tp(f):nS(f),ee.current=null,le())};xe()}}else Iu(f.current,p)||(B.current=p,He(),he.current=!1)}},[m,s,a,p,ye,S,f,N,E,le,He,ge]),Re(()=>{if(!m||a||!q||x||!G.current)return;const ce=q.nodesRef.current,xe=ce.find(ve=>ve.id===K)?.context?.elements.floating,ue=sr(tt(a)),pe=ce.some(ve=>ve.context&&je(ve.context.elements.floating,ue));xe&&!pe&&ne.current&&xe.focus({preventScroll:!0})},[m,a,q,K,x]),Re(()=>{z.current=le,re.current=s,G.current=!!a}),Re(()=>{s||(ee.current=null,I.current=R)},[s,R]);const Se=p!=null,Pe=ze(ce=>{if(!me.current)return;const xe=f.current.indexOf(ce.currentTarget);xe!==-1&&(B.current!==xe||p!==xe)&&(B.current=xe,le(ce))}),Ze=_.useMemo(()=>({onFocus(xe){ie.current=!0,Pe(xe)},onClick:({currentTarget:xe})=>xe.focus({preventScroll:!0}),onMouseMove(xe){ie.current=!0,he.current=!1,O&&Pe(xe)},onPointerLeave(xe){if(!me.current||!ne.current||xe.pointerType==="touch")return;ie.current=!0;const ue=xe.relatedTarget;if(!(!O||f.current.includes(ue))&&ke.current&&(de.current?.(),de.current=null,B.current=-1,le(xe),!x)){const pe=$.current,ve=sr(tt(pe));pe&&je(pe,ve)&&pe.focus({preventScroll:!0})}}}),[Pe,me,$,O,f,le,ke,x]),Ge=_.useCallback(()=>D??q?.nodesRef.current.find(ce=>ce.id===K)?.context?.dataRef?.current.orientation,[K,q,D]),Me=ze(ce=>{if(ne.current=!1,ie.current=!0,ce.which===229||!me.current&&ce.currentTarget===$.current)return;if(S&&SN(ce.key,N,E,j)){nu(ce.key,Ge())||Vn(ce),r.setOpen(!1,Ye(vu,ce.nativeEvent)),vt(c)&&(x?q?.events.emit("virtualfocus",c):c.focus());return}const xe=B.current,ue=tp(f,M),pe=nS(f,M);if(Z||(ce.key==="Home"&&(Vn(ce),B.current=ue,le(ce)),ce.key==="End"&&(Vn(ce),B.current=pe,le(ce))),j>1){const ve=Array.from({length:f.current.length},()=>({width:1,height:1})),Ne=ED(ve,j),Fe=Ne.findIndex(Ht=>Ht!=null&&!Li(f.current,Ht,M)),Ct=Ne.reduce((Ht,Le,Ue)=>Le!=null&&!Li(f.current,Le,M)?Ue:Ht,-1),Dt=Ne[RD(Ne.map(Ht=>Ht!=null?f.current[Ht]:null),{event:ce,orientation:N,loopFocus:b,rtl:E,cols:j,disabledIndices:TD([...(typeof M!="function"?M:null)||f.current.map((Ht,Le)=>Li(f.current,Le,M)?Le:void 0),void 0],Ne),minIndex:Fe,maxIndex:Ct,prevIndex:_D(B.current>pe?ue:B.current,ve,Ne,j,ce.key===xl?"bl":ce.key===(E?Zo:Vo)?"tr":"tl"),stopEvent:!0})];if(Dt!=null&&(B.current=Dt,le(ce)),N==="both")return}if(nu(ce.key,N)){if(Vn(ce),s&&!x&&sr(ce.currentTarget.ownerDocument)===ce.currentTarget){B.current=up(ce.key,N,E)?ue:pe,le(ce);return}up(ce.key,N,E)?b?xe>=pe?v&&xe!==f.current.length?B.current=-1:(ie.current=!1,B.current=ue):B.current=bn(f.current,{startingIndex:xe,disabledIndices:M}):B.current=Math.min(pe,bn(f.current,{startingIndex:xe,disabledIndices:M})):b?xe<=ue?v&&xe!==-1?B.current=f.current.length:(ie.current=!1,B.current=pe):B.current=bn(f.current,{startingIndex:xe,decrement:!0,disabledIndices:M}):B.current=Math.max(ue,bn(f.current,{startingIndex:xe,decrement:!0,disabledIndices:M})),Iu(f.current,B.current)&&(B.current=-1),le(ce)}}),Te=_.useMemo(()=>x&&s&&Se&&{"aria-activedescendant":`${L}-${p}`},[x,s,Se,L,p]),Ae=_.useMemo(()=>({"aria-orientation":N==="both"?void 0:N,...Z?{}:Te,onKeyDown(ce){if(ce.key==="Tab"&&ce.shiftKey&&s&&!x){const xe=xn(ce.nativeEvent);if(xe&&!je($.current,xe))return;Vn(ce),r.setOpen(!1,Ye($i,ce.nativeEvent)),vt(c)&&c.focus();return}Me(ce)},onPointerMove(){ne.current=!0}}),[Te,Me,$,N,Z,r,s,x,c]),be=_.useMemo(()=>{function ce(ue){R==="auto"&&Yx(ue.nativeEvent)&&(I.current=!x)}function xe(ue){I.current=R,R==="auto"&&Gx(ue.nativeEvent)&&(I.current=!0)}return{onKeyDown(ue){const pe=r.select("open");ne.current=!1;const ve=ue.key.startsWith("Arrow"),Ne=bN(ue.key,Ge(),E),Fe=nu(ue.key,N),Ct=(S?Ne:Fe)||ue.key==="Enter"||ue.key.trim()==="";if(x&&pe)return Me(ue);if(!(!pe&&!A&&ve)){if(Ct){const Dt=nu(ue.key,Ge());ee.current=S&&Dt?null:ue.key}if(S){Ne&&(Vn(ue),pe?(B.current=tp(f,ge.current),le(ue)):r.setOpen(!0,Ye(vu,ue.nativeEvent,ue.currentTarget)));return}Fe&&(ye.current!=null&&(B.current=ye.current),Vn(ue),!pe&&A?r.setOpen(!0,Ye(vu,ue.nativeEvent,ue.currentTarget)):Me(ue),pe&&le(ue))}},onFocus(ue){r.select("open")&&!x&&(B.current=-1,le(ue))},onPointerDown:xe,onPointerEnter:xe,onMouseDown:ce,onClick:ce}},[Me,ge,R,f,S,le,r,A,N,Ge,E,ye,x]),Ce=_.useMemo(()=>({...Te,...be}),[Te,be]);return _.useMemo(()=>m?{reference:Ce,floating:Ae,item:Ze,trigger:be}:{},[m,Ce,Ae,be,Ze])}const wN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Kw(e,t={}){const r="rootStore"in e?e.rootStore:e,s=r.useState("open"),a=r.useState("floatingId"),c=r.useState("domReferenceElement"),u=r.useState("floatingElement"),{role:f="dialog"}=t,p=Is(),h=c?.id||p,m=_.useMemo(()=>Nu(u)?.id||a,[u,a]),y=wN.get(f)??f,b=co()!=null,S=_.useMemo(()=>y==="tooltip"||f==="label"?cn:{"aria-haspopup":y==="alertdialog"?"dialog":y,"aria-expanded":"false",...y==="listbox"&&{role:"combobox"},...y==="menu"&&b&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[y,b,f]),E=_.useMemo(()=>y==="tooltip"||f==="label"?{[`aria-${f==="label"?"labelledby":"describedby"}`]:s?m:void 0}:{...S,"aria-expanded":s?"true":"false","aria-controls":s?m:void 0,...y==="menu"&&{id:h}},[y,m,s,h,f,S]),x=_.useMemo(()=>{const O={id:m,...y&&{role:y}};return y==="tooltip"||f==="label"?O:{...O,...y==="menu"&&{"aria-labelledby":h}}},[y,m,h,f]),R=_.useCallback(({active:O,selected:A})=>{const M={role:"option",...O&&{id:`${m}-fui-option`}};switch(f){case"select":case"combobox":return{...M,"aria-selected":A}}return{}},[m,f]);return _.useMemo(()=>({reference:E,floating:x,item:R,trigger:S}),[E,x,S,R])}function RN(e,t){const r="rootStore"in e?e.rootStore:e,s=r.context.dataRef,a=r.useState("open"),{listRef:c,elementsRef:u,activeIndex:f,onMatch:p,onTypingChange:h,enabled:m=!0,resetMs:y=750,selectedIndex:v=null}=t,b=Pn(),S=_.useRef(""),E=_.useRef(v??f??-1),x=_.useRef(null);Re(()=>{!a&&v!==null||(b.clear(),x.current=null,S.current!==""&&(S.current=""))},[a,v,b]),Re(()=>{a&&S.current===""&&(E.current=v??f??-1)},[a,v,f]);const R=ze(D=>{D?s.current.typing||(s.current.typing=D,h?.(D)):s.current.typing&&(s.current.typing=D,h?.(D))}),O=ze(D=>{function j(Z){const I=u?.current[Z];return!I||ff(I)}function L(Z,I,B=0){if(Z.length===0)return-1;const ee=(B%Z.length+Z.length)%Z.length,ne=I.toLocaleLowerCase();for(let le=0;le<Z.length;le+=1){const z=(ee+le)%Z.length;if(!(!Z[z]?.toLocaleLowerCase().startsWith(ne)||!j(z)))return z}return-1}const H=c.current;if(S.current.length>0&&D.key===" "&&(Vn(D),R(!0)),S.current.length>0&&S.current[0]!==" "&&L(H,S.current)===-1&&D.key!==" "&&R(!1),H==null||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;a&&D.key!==" "&&(Vn(D),R(!0));const Y=S.current==="";Y&&(E.current=v??f??-1),H.every(Z=>Z?Z[0]?.toLocaleLowerCase()!==Z[1]?.toLocaleLowerCase():!0)&&S.current===D.key&&(S.current="",E.current=x.current),S.current+=D.key,b.start(y,()=>{S.current="",E.current=x.current,R(!1)});const K=((Y?v??f??-1:E.current)??0)+1,q=L(H,S.current,K);q!==-1?(p?.(q),x.current=q):D.key!==" "&&(S.current="",R(!1))}),A=ze(D=>{const j=D.relatedTarget,L=r.select("domReferenceElement"),H=r.select("floatingElement"),Y=je(L,j),W=je(H,j);Y||W||(b.clear(),S.current="",E.current=x.current,R(!1))}),M=_.useMemo(()=>({onKeyDown:O,onBlur:A}),[O,A]),N=_.useMemo(()=>({onKeyDown:O,onBlur:A}),[O,A]);return _.useMemo(()=>m?{reference:M,floating:N}:{},[m,M,N])}const ES=.1,EN=ES*ES,pt=.5;function ru(e,t,r,s,a,c){return s>=t!=c>=t&&e<=(a-r)*(t-s)/(c-s)+r}function ou(e,t,r,s,a,c,u,f,p,h){let m=!1;return ru(e,t,r,s,a,c)&&(m=!m),ru(e,t,a,c,u,f)&&(m=!m),ru(e,t,u,f,p,h)&&(m=!m),ru(e,t,p,h,r,s)&&(m=!m),m}function _N(e,t,r){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}function su(e,t,r,s,a,c){const u=Math.min(r,a),f=Math.max(r,a),p=Math.min(s,c),h=Math.max(s,c);return e>=u&&e<=f&&t>=p&&t<=h}function Qw(e={}){const{blockPointerEvents:t=!1}=e,r=new dr,s=({x:a,y:c,placement:u,elements:f,onClose:p,nodeId:h,tree:m})=>{const y=u?.split("-")[0];let v=!1,b=null,S=null,E=typeof performance<"u"?performance.now():0;function x(O,A){const M=performance.now(),N=M-E;if(b===null||S===null||N===0)return b=O,S=A,E=M,!1;const D=O-b,j=A-S,L=D*D+j*j,H=N*N*EN;return b=O,S=A,E=M,L<H}function R(){r.clear(),p()}return function(A){r.clear();const M=f.domReference,N=f.floating;if(!M||!N||y==null||a==null||c==null)return;const{clientX:D,clientY:j}=A,L=xn(A),H=A.type==="mouseleave",Y=je(N,L),W=je(M,L);if(Y&&(v=!0,!H))return;if(W&&(v=!1,!H)){v=!0;return}if(H&&We(A.relatedTarget)&&je(N,A.relatedTarget))return;function $(){return!!(m&&_r(m.nodesRef.current,h).length>0)}function K(){$()||R()}if($())return;const q=M.getBoundingClientRect(),Z=N.getBoundingClientRect(),I=a>Z.right-Z.width/2,B=c>Z.bottom-Z.height/2,ee=Z.width>q.width,ne=Z.height>q.height,le=(ee?q:Z).left,z=(ee?q:Z).right,G=(ne?q:Z).top,re=(ne?q:Z).bottom;if(y==="top"&&c>=q.bottom-1||y==="bottom"&&c<=q.top+1||y==="left"&&a>=q.right-1||y==="right"&&a<=q.left+1){K();return}let ie=!1;switch(y){case"top":ie=su(D,j,le,q.top+1,z,Z.bottom-1);break;case"bottom":ie=su(D,j,le,Z.top+1,z,q.bottom-1);break;case"left":ie=su(D,j,Z.right-1,re,q.left+1,G);break;case"right":ie=su(D,j,q.right-1,re,Z.left+1,G);break}if(ie)return;if(v&&!_N(D,j,q)){K();return}if(!H&&x(D,j)){K();return}let he=!1;switch(y){case"top":{const de=ee?pt/2:pt*4,ge=ee||I?a+de:a-de,me=ee?a-de:I?a+de:a-de,ye=c+pt+1,ke=I||ee?Z.bottom-pt:Z.top,He=I?ee?Z.bottom-pt:Z.top:Z.bottom-pt;he=ou(D,j,ge,ye,me,ye,Z.left,ke,Z.right,He);break}case"bottom":{const de=ee?pt/2:pt*4,ge=ee||I?a+de:a-de,me=ee?a-de:I?a+de:a-de,ye=c-pt,ke=I||ee?Z.top+pt:Z.bottom,He=I?ee?Z.top+pt:Z.bottom:Z.top+pt;he=ou(D,j,ge,ye,me,ye,Z.left,ke,Z.right,He);break}case"left":{const de=ne?pt/2:pt*4,ge=ne||B?c+de:c-de,me=ne?c-de:B?c+de:c-de,ye=a+pt+1,ke=B||ne?Z.right-pt:Z.left,He=B?ne?Z.right-pt:Z.left:Z.right-pt;he=ou(D,j,ke,Z.top,He,Z.bottom,ye,ge,ye,me);break}case"right":{const de=ne?pt/2:pt*4,ge=ne||B?c+de:c-de,me=ne?c-de:B?c+de:c-de,ye=a-pt,ke=B||ne?Z.left+pt:Z.right,He=B?ne?Z.left+pt:Z.right:Z.left+pt;he=ou(D,j,ye,ge,ye,me,ke,Z.top,He,Z.bottom);break}}he?v||r.start(40,K):K()}};return s.__options={...e,blockPointerEvents:t},s}const TN={...Lm,disabled:_e(e=>e.disabled),instantType:_e(e=>e.instantType),isInstantPhase:_e(e=>e.isInstantPhase),trackCursorAxis:_e(e=>e.trackCursorAxis),disableHoverablePopup:_e(e=>e.disableHoverablePopup),lastOpenChangeReason:_e(e=>e.openChangeReason),closeOnClick:_e(e=>e.closeOnClick),closeDelay:_e(e=>e.closeDelay),hasViewport:_e(e=>e.hasViewport)};class Bm extends hf{constructor(t){super({...CN(),...t},{popupRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new El},TN)}setOpen=(t,r)=>{const s=r.reason,a=s===pn,c=t&&s===ji,u=!t&&(s===As||s===rf);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,r);const f=()=>{const p={open:t,openChangeReason:s};c?p.instantType="focus":u?p.instantType="dismiss":s===pn&&(p.instantType=void 0);const h=r.trigger?.id??null;(h||t)&&(p.activeTriggerId=h,p.activeTriggerElement=r.trigger??null),this.update(p)};a?Tr.flushSync(f):f()};static useStore(t,r){const s=mn(()=>new Bm(r)).current,a=t??s,c=Im({popupStore:a,onOpenChange:a.setOpen});return a.state.floatingRootContext=c,a}}function CN(){return{...jm(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const ON=fm(function(t){const{disabled:r=!1,defaultOpen:s=!1,open:a,disableHoverablePopup:c=!1,trackCursorAxis:u="none",actionsRef:f,onOpenChange:p,onOpenChangeComplete:h,handle:m,triggerId:y,defaultTriggerId:v=null,children:b}=t,S=Bm.useStore(m?.store,{open:s,openProp:a,activeTriggerId:v,triggerIdProp:y});dm(()=>{a===void 0&&S.state.open===!1&&s===!0&&S.update({open:!0,activeTriggerId:v})}),S.useControlledProp("openProp",a),S.useControlledProp("triggerIdProp",y),S.useContextCallback("onOpenChange",p),S.useContextCallback("onOpenChangeComplete",h);const E=S.useState("open"),x=!r&&E,R=S.useState("activeTriggerId"),O=S.useState("payload");S.useSyncedValues({trackCursorAxis:u,disableHoverablePopup:c}),Re(()=>{E&&r&&S.setOpen(!1,Ye(Gz))},[E,r,S]),S.useSyncedValue("disabled",r),Nm(S);const{forceUnmount:A,transitionStatus:M}=Pm(x,S),N=S.select("floatingRootContext"),D=S.useState("isInstantPhase"),j=S.useState("instantType"),L=S.useState("lastOpenChangeReason"),H=_.useRef(null);Re(()=>{M==="ending"&&L===pm||M!=="ending"&&D?(j!=="delay"&&(H.current=j),S.set("instantType","delay")):H.current!==null&&(S.set("instantType",H.current),H.current=null)},[M,D,L,j,S]),Re(()=>{x&&R==null&&S.set("payload",void 0)},[S,R,x]);const Y=_.useCallback(()=>{S.setOpen(!1,Ye(gm))},[S]);_.useImperativeHandle(f,()=>({unmount:A,close:Y}),[A,Y]);const W=Am(N,{enabled:!r,referencePress:()=>S.select("closeOnClick")}),$=hk(N,{enabled:!r&&u!=="none",axis:u==="none"?void 0:u}),{getReferenceProps:K,getFloatingProps:q,getTriggerProps:Z}=pf([W,$]),I=_.useMemo(()=>K(),[K]),B=_.useMemo(()=>Z(),[Z]),ee=_.useMemo(()=>q(),[q]);return S.useSyncedValues({activeTriggerProps:I,inactiveTriggerProps:B,popupProps:ee}),k.jsx(Ux.Provider,{value:S,children:typeof b=="function"?b({payload:O}):b})});let _s=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ks.startingStyle]="startingStyle",e[e.endingStyle=ks.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Zu=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const MN={[Zu.popupOpen]:""},AN={[Zu.popupOpen]:"",[Zu.pressed]:""},zN={[_s.open]:""},DN={[_s.closed]:""},kN={[_s.anchorHidden]:""},NN={open(e){return e?MN:null}},_S={open(e){return e?AN:null}},Qi={open(e){return e?zN:DN},anchorHidden(e){return e?kN:null}};function Xi(e){return Is(e,"base-ui")}const Xw=_.createContext(void 0);function PN(){return _.useContext(Xw)}let jN=(function(e){return e[e.popupOpen=Zu.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const LN=600,IN=Ix(function(t,r){const{className:s,render:a,handle:c,payload:u,disabled:f,delay:p,closeOnClick:h=!0,closeDelay:m,id:y,style:v,...b}=t,S=Sl(!0),E=c?.store??S;if(!E)throw new Error(wn(82));const x=Xi(y),R=E.useState("isTriggerActive",x),O=E.useState("isOpenedByTrigger",x),A=E.useState("floatingRootContext"),M=_.useRef(null),N=p??LN,D=m??0,{registerTrigger:j,isMountedByThisTrigger:L}=$w(x,M,E,{payload:u,closeOnClick:h,closeDelay:D}),H=PN(),{delayRef:Y,isInstantPhase:W,hasProvider:$}=Qz(A,{open:O});E.useSyncedValue("isInstantPhase",W);const K=E.useState("disabled"),q=f??K,Z=E.useState("trackCursorAxis"),I=E.useState("disableHoverablePopup"),B=Gw(A,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!I&&Z!=="both"?Qw():null,restMs(){const G=H?.delay,re=typeof Y.current=="object"?Y.current.open:void 0;let ie=N;return $&&(re!==0?ie=p??G??N:ie=0),ie},delay(){const G=typeof Y.current=="object"?Y.current.close:void 0;let re=D;return m==null&&$&&(re=G),{close:re}},triggerElementRef:M,isActiveTrigger:R,isClosing:()=>E.select("transitionStatus")==="ending"}),ee=Zw(A,{enabled:!q}).reference,ne={open:O},le=E.useState("triggerProps",L);return Kt("button",t,{state:ne,ref:[r,j,M],props:[B,ee,le,{onPointerDown(){E.set("closeOnClick",h)},id:x,[jN.triggerDisabled]:q?"":void 0},b],stateAttributesMapping:NN})}),Jw=_.createContext(void 0);function UN(){const e=_.useContext(Jw);if(e===void 0)throw new Error(wn(70));return e}const BN=_.forwardRef(function(t,r){const{children:s,container:a,className:c,render:u,style:f,...p}=t,{portalNode:h,portalSubtree:m}=_w({container:a,ref:r,componentProps:t,elementProps:p});return!m&&!h?null:k.jsxs(_.Fragment,{children:[m,h&&Tr.createPortal(s,h)]})}),HN=_.forwardRef(function(t,r){const{keepMounted:s=!1,...a}=t;return Sl().useState("mounted")||s?k.jsx(Jw.Provider,{value:s,children:k.jsx(BN,{ref:r,...a})}):null}),Ww=_.createContext(void 0);function eR(){const e=_.useContext(Ww);if(e===void 0)throw new Error(wn(71));return e}const FN=_.createContext(void 0);function tR(){return _.useContext(FN)?.direction??"ltr"}const $N=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:s,placement:a,rects:c,platform:u,elements:f,middlewareData:p}=t,{element:h,padding:m=0,offsetParent:y="real"}=no(e,t)||{};if(h==null)return{};const v=sw(m),b={x:r,y:s},S=wm(a),E=xm(S),x=await u.getDimensions(h),R=S==="y",O=R?"top":"left",A=R?"bottom":"right",M=R?"clientHeight":"clientWidth",N=c.reference[E]+c.reference[S]-b[S]-c.floating[E],D=b[S]-c.reference[S],j=y==="real"?await u.getOffsetParent?.(h):f.floating;let L=f.floating[M]||c.floating[E];(!L||!await u.isElement?.(j))&&(L=f.floating[M]||c.floating[E]);const H=N/2-D/2,Y=L/2-x[E]/2-1,W=Math.min(v[O],Y),$=Math.min(v[A],Y),K=W,q=L-x[E]-$,Z=L/2-x[E]/2+H,I=Up(K,Z,q),B=!p.arrow&&Xo(a)!=null&&Z!==I&&c.reference[E]/2-(Z<K?W:$)-x[E]/2<0,ee=B?Z<K?Z-K:Z-q:0;return{[S]:b[S]+ee,data:{[S]:I,centerOffset:Z-I-ee,...B&&{alignmentOffset:ee}},reset:B}}}),ZN=(e,t)=>({...$N(e),options:[e,t]}),VN={name:"hide",async fn(e){const{width:t,height:r,x:s,y:a}=e.rects.reference,c=t===0&&r===0&&s===0&&a===0;return{data:{referenceHidden:(await rN().fn(e)).data?.referenceHidden||c}}}},wu={sideX:"left",sideY:"top"},nR={name:"adaptiveOrigin",async fn(e){const{x:t,y:r,rects:{floating:s},elements:{floating:a},platform:c,strategy:u,placement:f}=e,p=zt(a),h=p.getComputedStyle(a);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:r,data:wu};const y=await c.getOffsetParent?.(a);let v={width:0,height:0};if(u==="fixed"&&p?.visualViewport)v={width:p.visualViewport.width,height:p.visualViewport.height};else if(y===p){const O=tt(a);v={width:O.documentElement.clientWidth,height:O.documentElement.clientHeight}}else await c.isElement?.(y)&&(v=await c.getDimensions(y));const b=Nn(f);let S=t,E=r;b==="left"&&(S=v.width-(t+s.width)),b==="top"&&(E=v.height-(r+s.height));const x=b==="left"?"right":wu.sideX,R=b==="top"?"bottom":wu.sideY;return{x:S,y:E,data:{sideX:x,sideY:R}}}};function rR(e,t,r){const s=e==="inline-start"||e==="inline-end";return{top:"top",right:s?r?"inline-start":"inline-end":"right",bottom:"bottom",left:s?r?"inline-end":"inline-start":"left"}[t]}function TS(e,t,r){const{rects:s,placement:a}=e;return{side:rR(t,Nn(a),r),align:Xo(a)||"center",anchor:{width:s.reference.width,height:s.reference.height},positioner:{width:s.floating.width,height:s.floating.height}}}function oR(e){const{anchor:t,positionMethod:r="absolute",side:s="bottom",sideOffset:a=0,align:c="center",alignOffset:u=0,collisionBoundary:f,collisionPadding:p=5,sticky:h=!1,arrowPadding:m=5,disableAnchorTracking:y=!1,keepMounted:v=!1,floatingRootContext:b,mounted:S,collisionAvoidance:E,shiftCrossAxis:x=!1,nodeId:R,adaptiveOrigin:O,lazyFlip:A=!1,externalTree:M}=e,[N,D]=_.useState(null);!S&&N!==null&&D(null);const j=E.side||"flip",L=E.align||"flip",H=E.fallbackAxisSide||"end",Y=typeof t=="function"?t:void 0,W=ze(Y),$=Y?W:t,K=ln(t),q=ln(S),I=tR()==="rtl",B=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[s],ee=c==="center"?B:`${B}-${c}`;let ne=p;const le=1,z=s==="bottom"?le:0,G=s==="top"?le:0,re=s==="right"?le:0,ie=s==="left"?le:0;typeof ne=="number"?ne={top:ne+z,right:ne+ie,bottom:ne+G,left:ne+re}:ne&&(ne={top:(ne.top||0)+z,right:(ne.right||0)+ie,bottom:(ne.bottom||0)+G,left:(ne.left||0)+re});const he={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:ne},de=_.useRef(null),ge=ln(a),me=ln(u),He=[Jk(it=>{const Ft=TS(it,s,I),tn=typeof ge.current=="function"?ge.current(Ft):ge.current,$t=typeof me.current=="function"?me.current(Ft):me.current;return{mainAxis:tn,crossAxis:$t,alignmentAxis:$t}},[typeof a!="function"?a:0,typeof u!="function"?u:0,I,s])],Se=L==="none"&&j!=="shift",Pe=!Se&&(h||x||j==="shift"),Ze=j==="none"?null:tN({...he,padding:{top:ne.top+le,right:ne.right+le,bottom:ne.bottom+le,left:ne.left+le},mainAxis:!x&&j==="flip",crossAxis:L==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),Ge=Se?null:Wk(it=>{const Ft=tt(it.elements.floating).documentElement;return{...he,rootBoundary:x?{x:0,y:0,width:Ft.clientWidth,height:Ft.clientHeight}:void 0,mainAxis:L!=="none",crossAxis:Pe,limiter:h||x?void 0:eN(tn=>{if(!de.current)return{};const{width:$t,height:Rn}=de.current.getBoundingClientRect(),Zt=ir(Nn(tn.placement)),Yn=Zt==="y"?$t:Rn,Gn=Zt==="y"?ne.left+ne.right:ne.top+ne.bottom;return{offset:Yn/2+Gn/2}})}},[he,h,x,ne,L]);j==="shift"||L==="shift"||c==="center"?He.push(Ge,Ze):He.push(Ze,Ge),He.push(nN({...he,apply({elements:{floating:it},availableWidth:Ft,availableHeight:tn,rects:$t}){if(!q.current)return;const Rn=it.style;Rn.setProperty("--available-width",`${Ft}px`),Rn.setProperty("--available-height",`${tn}px`);const Zt=zt(it).devicePixelRatio||1,{x:Yn,y:Gn,width:Fs,height:$s}=$t.reference,ts=(Math.round((Yn+Fs)*Zt)-Math.round(Yn*Zt))/Zt,zr=(Math.round((Gn+$s)*Zt)-Math.round(Gn*Zt))/Zt;Rn.setProperty("--anchor-width",`${ts}px`),Rn.setProperty("--anchor-height",`${zr}px`)}}),ZN(()=>({element:de.current||tt(de.current).createElement("div"),padding:m,offsetParent:"floating"}),[m]),{name:"transformOrigin",fn(it){const{elements:Ft,middlewareData:tn,placement:$t,rects:Rn,y:Zt}=it,Yn=Nn($t),Gn=ir(Yn),Fs=de.current,$s=tn.arrow?.x||0,ts=tn.arrow?.y||0,zr=Fs?.clientWidth||0,Rf=Fs?.clientHeight||0,Zs=$s+zr/2,Wi=ts+Rf/2,Ml=Math.abs(tn.shift?.y||0),ea=Rn.reference.height/2,Dr=typeof a=="function"?a(TS(it,s,I)):a,Al=Ml>Dr,zl={top:`${Zs}px calc(100% + ${Dr}px)`,bottom:`${Zs}px ${-Dr}px`,left:`calc(100% + ${Dr}px) ${Wi}px`,right:`${-Dr}px ${Wi}px`}[Yn],pr=`${Zs}px ${Rn.reference.y+ea-Zt}px`;return Ft.floating.style.setProperty("--transform-origin",Pe&&Gn==="y"&&Al?pr:zl),{}}},VN,O),Re(()=>{!S&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[S,b]);const Me=_.useMemo(()=>({elementResize:!y&&typeof ResizeObserver<"u",layoutShift:!y&&typeof IntersectionObserver<"u"}),[y]),{refs:Te,elements:Ae,x:be,y:Ce,middlewareData:ce,update:xe,placement:ue,context:pe,isPositioned:ve,floatingStyles:Ne}=gN({rootContext:b,open:v?S:void 0,placement:ee,middleware:He,strategy:r,whileElementsMounted:v?void 0:(...it)=>xS(...it,Me),nodeId:R,externalTree:M}),{sideX:Fe,sideY:Ct}=ce.adaptiveOrigin||wu,Dt=ve?r:"fixed",Ht=_.useMemo(()=>{const it=O?{position:Dt,[Fe]:be,[Ct]:Ce}:{position:Dt,...Ne};return ve||(it.opacity=0),it},[O,Dt,Fe,be,Ct,Ce,Ne,ve]),Le=_.useRef(null);Re(()=>{if(!S)return;const it=K.current,Ft=typeof it=="function"?it():it,$t=(CS(Ft)?Ft.current:Ft)||null||null;$t!==Le.current&&(Te.setPositionReference($t),Le.current=$t)},[S,Te,$,K]),_.useEffect(()=>{if(!S)return;const it=K.current;typeof it!="function"&&CS(it)&&it.current!==Le.current&&(Te.setPositionReference(it.current),Le.current=it.current)},[S,Te,$,K]),_.useEffect(()=>{if(v&&S&&Ae.domReference&&Ae.floating)return xS(Ae.domReference,Ae.floating,xe,Me)},[v,S,Ae,xe,Me]);const Ue=Nn(ue),lt=rR(s,Ue,I),xt=Xo(ue)||"center",dn=!!ce.hide?.referenceHidden;Re(()=>{A&&S&&ve&&D(Ue)},[A,S,ve,Ue]);const jt=_.useMemo(()=>({position:"absolute",top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),hr=ce.arrow?.centerOffset!==0;return _.useMemo(()=>({positionerStyles:Ht,arrowStyles:jt,arrowRef:de,arrowUncentered:hr,side:lt,align:xt,physicalSide:Ue,anchorHidden:dn,refs:Te,context:pe,isPositioned:ve,update:xe}),[Ht,jt,de,hr,lt,xt,Ue,dn,Te,pe,ve,xe])}function CS(e){return e!=null&&"current"in e}function Hm(e){return e==="starting"?tk:cn}function sR(e,t,{styles:r,transitionStatus:s,props:a,refs:c,hidden:u,inert:f=!1}){const p={...r};return f&&(p.pointerEvents="none"),Kt("div",e,{state:t,ref:c,props:[{role:"presentation",hidden:u,style:p},Hm(s),a],stateAttributesMapping:Qi})}const qN=_.forwardRef(function(t,r){const{render:s,className:a,anchor:c,positionMethod:u="absolute",side:f="top",align:p="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:y="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:S=!1,disableAnchorTracking:E=!1,collisionAvoidance:x=ww,style:R,...O}=t,A=Sl(),M=UN(),N=A.useState("open"),D=A.useState("mounted"),j=A.useState("trackCursorAxis"),L=A.useState("disableHoverablePopup"),H=A.useState("floatingRootContext"),Y=A.useState("instantType"),W=A.useState("transitionStatus"),$=A.useState("hasViewport"),K=oR({anchor:c,positionMethod:u,floatingRootContext:H,mounted:D,side:f,sideOffset:h,align:p,alignOffset:m,collisionBoundary:y,collisionPadding:v,sticky:S,arrowPadding:b,disableAnchorTracking:E,keepMounted:M,collisionAvoidance:x,adaptiveOrigin:$?nR:void 0}),q=_.useMemo(()=>({open:N,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:j!=="none"?"tracking-cursor":Y}),[N,K.side,K.align,K.anchorHidden,j,Y]),Z=sR(t,q,{styles:K.positionerStyles,transitionStatus:W,props:O,refs:[r,A.useStateSetter("positionerElement")],hidden:!D,inert:!N||j==="both"||L});return k.jsx(Ww.Provider,{value:K,children:Z})}),YN={...Qi,...Ki},GN=_.forwardRef(function(t,r){const{className:s,render:a,style:c,...u}=t,f=Sl(),{side:p,align:h}=eR(),m=f.useState("open"),y=f.useState("instantType"),v=f.useState("transitionStatus"),b=f.useState("popupProps"),S=f.useState("floatingRootContext");Rl({open:m,ref:f.context.popupRef,onComplete(){m&&f.context.onOpenChangeComplete?.(!0)}});const E=f.useState("disabled"),x=f.useState("closeDelay");return Yw(S,{enabled:!E,closeDelay:x}),Kt("div",t,{state:{open:m,side:p,align:h,instant:y,transitionStatus:v},ref:[r,f.context.popupRef,f.useStateSetter("popupElement")],props:[b,Hm(v),u],stateAttributesMapping:YN})}),KN=_.forwardRef(function(t,r){const{className:s,render:a,style:c,...u}=t,f=Sl(),p=f.useState("open"),h=f.useState("instantType"),{arrowRef:m,side:y,align:v,arrowUncentered:b,arrowStyles:S}=eR();return Kt("div",t,{state:{open:p,side:y,align:v,uncentered:b,instant:h},ref:[r,m],props:[{style:S,"aria-hidden":!0},u],stateAttributesMapping:Qi})}),QN=function(t){const{delay:r,closeDelay:s,timeout:a=400}=t,c=_.useMemo(()=>({delay:r,closeDelay:s}),[r,s]),u=_.useMemo(()=>({open:r,close:s}),[r,s]);return k.jsx(Xw.Provider,{value:c,children:k.jsx(Kz,{delay:u,timeoutMs:a,children:t.children})})};function iR(e){return _m(19)?e:e?"true":void 0}function aR(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=aR(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function lR(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=aR(e))&&(s&&(s+=" "),s+=t);return s}const XN=new Set(["p-","px-","py-","pt-","pr-","pb-","pl-","m-","mx-","my-","mt-","mr-","mb-","ml-","w-","h-","min-w-","min-h-","max-w-","max-h-","gap-","gap-x-","gap-y-","inset-","inset-x-","inset-y-","top-","right-","bottom-","left-","z-","bg-","text-","border-","ring-","shadow-","rounded-","rounded-t-","rounded-r-","rounded-b-","rounded-l-","rounded-tl-","rounded-tr-","rounded-br-","rounded-bl-","font-","leading-","tracking-","opacity-","scale-","rotate-","translate-x-","translate-y-","skew-x-","skew-y-","divide-x-","divide-y-","space-x-","space-y-","flex-","grid-cols-","grid-rows-","col-","col-start-","col-end-","row-","row-start-","row-end-","order-","duration-","delay-","ease-","size-","blur-","brightness-","contrast-","grayscale-"]);function JN(e){for(let t=e.length;t>0;t--){const r=e.slice(0,t);if(XN.has(r))return r}return null}function nt(...e){const t=lR(e);if(!t)return"";const r=new Map,s=[];for(const a of t.split(" ")){if(!a)continue;const c=JN(a);if(c)if(r.has(c)){const u=s.indexOf(r.get(c));u>=0&&(s[u]=a)}else r.set(c,a),s.push(a);else s.push(a)}return s.join(" ")}function WN({delay:e=0,...t}){return k.jsx(QN,{"data-slot":"tooltip-provider",delay:e,...t})}function eP({...e}){return k.jsx(ON,{"data-slot":"tooltip",...e})}function tP({...e}){return k.jsx(IN,{"data-slot":"tooltip-trigger",...e})}function nP({className:e,side:t="top",sideOffset:r=4,align:s="center",alignOffset:a=0,children:c,...u}){return k.jsx(HN,{children:k.jsx(qN,{align:s,alignOffset:a,side:t,sideOffset:r,className:"isolate z-50",children:k.jsxs(GN,{"data-slot":"tooltip-content",className:nt("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u,children:[c,k.jsx(KN,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const cR="hermium-theme";function OS(){try{const e=localStorage.getItem(cR);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function rP(e){try{localStorage.setItem(cR,e)}catch{}}function oP(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function fp(e){const t=document.documentElement;(e==="system"?oP():e)==="dark"?t.classList.add("dark"):t.classList.remove("dark")}const Zp=_.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function sP({children:e}){const[t,r]=_.useState("system"),[s,a]=_.useState("light"),[c,u]=_.useState(!1);_.useEffect(()=>{u(!0);const p=OS();r(p),fp(p);const h=p==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches:p==="dark";a(h?"dark":"light");const m=window.matchMedia("(prefers-color-scheme: dark)"),y=v=>{OS()==="system"&&(fp("system"),a(v.matches?"dark":"light"))};return m.addEventListener("change",y),()=>m.removeEventListener("change",y)},[]);const f=_.useCallback(p=>{r(p),rP(p),fp(p);const h=p==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches:p==="dark";a(h?"dark":"light")},[]);return c?k.jsx(Zp.Provider,{value:{theme:t,resolvedTheme:s,setTheme:f},children:e}):k.jsx(Zp.Provider,{value:{theme:"system",resolvedTheme:"light",setTheme:()=>{}},children:e})}function iP(){return _.useContext(Zp)}function Fm(e){return Kt(e.defaultTagName??"div",e,e)}const MS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,AS=lR,uR=(e,t)=>r=>{var s;if(t?.variants==null)return AS(e,r?.class,r?.className);const{variants:a,defaultVariants:c}=t,u=Object.keys(a).map(h=>{const m=r?.[h],y=c?.[h];if(m===null)return null;const v=MS(m)||MS(y);return a[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[y,v]=m;return v===void 0||(h[y]=v),h},{}),p=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((h,m)=>{let{class:y,className:v,...b}=m;return Object.entries(b).every(S=>{let[E,x]=S;return Array.isArray(x)?x.includes({...c,...f}[E]):{...c,...f}[E]===x})?[...h,y,v]:h},[]);return AS(e,u,p,r?.class,r?.className)},dp=768;function aP(){const[e,t]=_.useState(void 0);return _.useEffect(()=>{const r=window.matchMedia(`(max-width: ${dp-1}px)`),s=()=>{t(window.innerWidth<dp)};return r.addEventListener("change",s),t(window.innerWidth<dp),()=>r.removeEventListener("change",s)},[]),!!e}const lP=_.createContext(void 0);function $m(e=!1){const t=_.useContext(lP);if(t===void 0&&!e)throw new Error(wn(16));return t}function cP(e){const{focusableWhenDisabled:t,disabled:r,composite:s=!1,tabIndex:a=0,isNativeButton:c}=e,u=s&&t!==!1,f=s&&t===!1;return{props:_.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return s||(h.tabIndex=a,!c&&r&&(h.tabIndex=t?a:-1)),(c&&(t||u)||!c&&r)&&(h["aria-disabled"]=r),c&&(!t||f)&&(h.disabled=r),h},[s,r,t,u,f,c,a])}}function _l(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:s=0,native:a=!0,composite:c}=e,u=_.useRef(null),f=$m(!0),p=c??f!==void 0,{props:h}=cP({focusableWhenDisabled:r,disabled:t,composite:p,tabIndex:s,isNativeButton:a}),m=_.useCallback(()=>{const b=u.current;hp(b)&&p&&t&&h.disabled===void 0&&b.disabled&&(b.disabled=!1)},[t,h.disabled,p]);Re(m,[m]);const y=_.useCallback((b={})=>{const{onClick:S,onMouseDown:E,onKeyUp:x,onKeyDown:R,onPointerDown:O,...A}=b;return ro({type:a?"button":void 0,onClick(N){if(t){N.preventDefault();return}S?.(N)},onMouseDown(N){t||E?.(N)},onKeyDown(N){if(t||(Bu(N),R?.(N),N.baseUIHandlerPrevented))return;const D=N.target===N.currentTarget,j=N.currentTarget,L=hp(j),H=!a&&uP(j),Y=D&&(a?L:!H),W=N.key==="Enter",$=N.key===" ",K=j.getAttribute("role"),q=K?.startsWith("menuitem")||K==="option"||K==="gridcell";if(D&&p&&$){if(N.defaultPrevented&&q)return;N.preventDefault(),H||a&&L?(j.click(),N.preventBaseUIHandler()):Y&&(S?.(N),N.preventBaseUIHandler());return}Y&&(!a&&($||W)&&N.preventDefault(),!a&&W&&S?.(N))},onKeyUp(N){if(!t){if(Bu(N),x?.(N),N.target===N.currentTarget&&a&&p&&hp(N.currentTarget)&&N.key===" "){N.preventDefault();return}N.baseUIHandlerPrevented||N.target===N.currentTarget&&!a&&!p&&N.key===" "&&S?.(N)}},onPointerDown(N){if(t){N.preventDefault();return}O?.(N)}},a?void 0:{role:"button"},h,A)},[t,h,p,a]),v=ze(b=>{u.current=b,m()});return{getButtonProps:y,buttonRef:v}}function hp(e){return vt(e)&&e.tagName==="BUTTON"}function uP(e){return!!(e?.tagName==="A"&&e?.href)}const fP=_.forwardRef(function(t,r){const{render:s,className:a,disabled:c=!1,focusableWhenDisabled:u=!1,nativeButton:f=!0,style:p,...h}=t,{getButtonProps:m,buttonRef:y}=_l({disabled:c,focusableWhenDisabled:u,native:f});return Kt("button",t,{state:{disabled:c},ref:[r,y],props:[h,m]})}),dP=uR("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function fR({className:e,variant:t="default",size:r="default",...s}){return k.jsx(fP,{"data-slot":"button",className:nt(dP({variant:t,size:r,className:e})),...s})}function hP({controlled:e,default:t,name:r,state:s="value"}){const{current:a}=_.useRef(e!==void 0),[c,u]=_.useState(t),f=a?e:c,p=_.useCallback(h=>{a||u(h)},[]);return[f,p]}const dR=_.createContext(void 0);function Us(e){const t=_.useContext(dR);if(e===!1&&t===void 0)throw new Error(wn(27));return t}const pP={...Qi,...Ki},mP=_.forwardRef(function(t,r){const{render:s,className:a,style:c,forceRender:u=!1,...f}=t,{store:p}=Us(),h=p.useState("open"),m=p.useState("nested"),y=p.useState("mounted"),v=p.useState("transitionStatus");return Kt("div",t,{state:{open:h,transitionStatus:v},ref:[p.context.backdropRef,r],stateAttributesMapping:pP,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},f],enabled:u||!m})}),gP=_.forwardRef(function(t,r){const{render:s,className:a,disabled:c=!1,nativeButton:u=!0,style:f,...p}=t,{store:h}=Us(),m=h.useState("open");function y(E){m&&h.setOpen(!1,Ye(qz,E.nativeEvent))}const{getButtonProps:v,buttonRef:b}=_l({disabled:c,native:u});return Kt("button",t,{state:{disabled:c},ref:[r,b],props:[{onClick:y},p,v]})}),yP=_.forwardRef(function(t,r){const{render:s,className:a,style:c,id:u,...f}=t,{store:p}=Us(),h=Xi(u);return p.useSyncedValueWithCleanup("descriptionElementId",h),Kt("p",t,{ref:r,props:[{id:h},f]})});let vP=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),bP=(function(e){return e[e.open=_s.open]="open",e[e.closed=_s.closed]="closed",e[e.startingStyle=_s.startingStyle]="startingStyle",e[e.endingStyle=_s.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const hR=_.createContext(void 0);function SP(){const e=_.useContext(hR);if(e===void 0)throw new Error(wn(26));return e}const pR="ArrowUp",mR="ArrowDown",gR="ArrowLeft",yR="ArrowRight",vR="Home",bR="End",xP=new Set([gR,yR]),wP=new Set([pR,mR]),RP=new Set([...xP,...wP]);[...RP];const SR=new Set([pR,mR,gR,yR,vR,bR]),EP={...Qi,...Ki,nestedDialogOpen(e){return e?{[bP.nestedDialogOpen]:""}:null}},_P=_.forwardRef(function(t,r){const{className:s,finalFocus:a,initialFocus:c,render:u,style:f,...p}=t,{store:h}=Us(),m=h.useState("descriptionElementId"),y=h.useState("disablePointerDismissal"),v=h.useState("floatingRootContext"),b=h.useState("popupProps"),S=h.useState("modal"),E=h.useState("mounted"),x=h.useState("nested"),R=h.useState("nestedOpenDialogCount"),O=h.useState("open"),A=h.useState("openMethod"),M=h.useState("titleElementId"),N=h.useState("transitionStatus"),D=h.useState("role");SP(),Rl({open:O,ref:h.context.popupRef,onComplete(){O&&h.context.onOpenChangeComplete?.(!0)}});function j($){return $==="touch"?h.context.popupRef.current:!0}const L=c===void 0?j:c,H=R>0,W=Kt("div",t,{state:{open:O,nested:x,transitionStatus:N,nestedDialogOpen:H},props:[b,{"aria-labelledby":M??void 0,"aria-describedby":m??void 0,role:D,tabIndex:-1,hidden:!E,onKeyDown($){SR.has($.key)&&$.stopPropagation()},style:{[vP.nestedDialogs]:R}},p],ref:[r,h.context.popupRef,h.useStateSetter("popupElement")],stateAttributesMapping:EP});return k.jsx(zw,{context:v,openInteractionType:A,disabled:!E,closeOnFocusOut:!y,initialFocus:L,returnFocus:a,modal:S!==!1,restoreFocus:"popup",children:W})}),xR=_.forwardRef(function(t,r){const{cutout:s,...a}=t;let c;if(s){const u=s.getBoundingClientRect();c=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${u.left}px ${u.top}px,${u.left}px ${u.bottom}px,${u.right}px ${u.bottom}px,${u.right}px ${u.top}px,${u.left}px ${u.top}px)`}return k.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...a,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),TP=_.forwardRef(function(t,r){const{keepMounted:s=!1,...a}=t,{store:c}=Us(),u=c.useState("mounted"),f=c.useState("modal"),p=c.useState("open");return u||s?k.jsx(hR.Provider,{value:s,children:k.jsxs(Tw,{ref:r,...a,children:[u&&f===!0&&k.jsx(xR,{ref:c.context.internalBackdropRef,inert:iR(!p)}),t.children]})}):null});let zS={},DS={},kS="";function CP(e){if(typeof document>"u")return!1;const t=tt(e);return zt(t).innerWidth-t.documentElement.clientWidth>0}function OP(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=tt(e),s=r.documentElement,a=r.body,c=Qo(s)?s:a,u=c.style.overflowY,f=s.style.scrollbarGutter;s.style.scrollbarGutter="stable",c.style.overflowY="scroll";const p=c.offsetWidth;c.style.overflowY="hidden";const h=c.offsetWidth;return c.style.overflowY=u,s.style.scrollbarGutter=f,p===h}function MP(e){const t=tt(e),r=t.documentElement,s=t.body,a=Qo(r)?r:s,c={overflowY:a.style.overflowY,overflowX:a.style.overflowX};return Object.assign(a.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(a.style,c)}}function AP(e){const t=tt(e),r=t.documentElement,s=t.body,a=zt(r);let c=0,u=0,f=!1;const p=At.create();if(Fx&&(a.visualViewport?.scale??1)!==1)return()=>{};function h(){const b=a.getComputedStyle(r),S=a.getComputedStyle(s),R=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=r.scrollTop,u=r.scrollLeft,zS={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},kS=r.style.scrollBehavior,DS={position:s.style.position,height:s.style.height,width:s.style.width,boxSizing:s.style.boxSizing,overflowY:s.style.overflowY,overflowX:s.style.overflowX,scrollBehavior:s.style.scrollBehavior};const O=r.scrollHeight>r.clientHeight,A=r.scrollWidth>r.clientWidth,M=b.overflowY==="scroll"||S.overflowY==="scroll",N=b.overflowX==="scroll"||S.overflowX==="scroll",D=Math.max(0,a.innerWidth-s.clientWidth),j=Math.max(0,a.innerHeight-s.clientHeight),L=parseFloat(S.marginTop)+parseFloat(S.marginBottom),H=parseFloat(S.marginLeft)+parseFloat(S.marginRight),Y=Qo(r)?r:s;if(f=OP(e),f){r.style.scrollbarGutter=R,Y.style.overflowY="hidden",Y.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(O||M)&&(r.style.overflowY="scroll"),(A||N)&&(r.style.overflowX="scroll"),Object.assign(s.style,{position:"relative",height:L||j?`calc(100dvh - ${L+j}px)`:"100dvh",width:H||D?`calc(100vw - ${H+D}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),s.scrollTop=c,s.scrollLeft=u,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function m(){Object.assign(r.style,zS),Object.assign(s.style,DS),f||(r.scrollTop=c,r.scrollLeft=u,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=kS)}function y(){m(),p.request(h)}h();const v=qe(a,"resize",y);return()=>{p.cancel(),m(),typeof a.removeEventListener=="function"&&v()}}class zP{lockCount=0;restore=null;timeoutLock=dr.create();timeoutUnlock=dr.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const s=tt(t).documentElement,a=zt(s).getComputedStyle(s).overflowY;if(a==="hidden"||a==="clip"){this.restore=hm;return}const c=$x||!CP(t);this.restore=c?MP(t):AP(t)}}const DP=new zP;function wR(e=!0,t=null){Re(()=>{if(e)return DP.acquire(t)},[e,t])}function kP(e){const t=_.useRef(""),r=_.useCallback(a=>{a.defaultPrevented||(t.current=a.pointerType,e(a,a.pointerType))},[e]);return{onClick:_.useCallback(a=>{if(a.detail===0){e(a,"keyboard");return}"pointerType"in a?e(a,a.pointerType):e(a,t.current),t.current=""},[e]),onPointerDown:r}}function NP(e,t){const r=_.useRef(e),s=ze(t);Re(()=>{r.current!==e&&s(r.current)},[e,s]),Re(()=>{r.current=e},[e])}function RR(e){const[t,r]=_.useState(null),s=ze((u,f)=>{e||r(f||($x?"touch":""))});NP(e,u=>{u&&!e&&r(null)});const{onClick:a,onPointerDown:c}=kP(s);return _.useMemo(()=>({openMethod:t,triggerProps:{onClick:a,onPointerDown:c}}),[t,a,c])}function PP(e){const{store:t,parentContext:r,actionsRef:s,isDrawer:a}=e,c=t.useState("open"),u=t.useState("disablePointerDismissal"),f=t.useState("modal"),p=t.useState("popupElement"),{openMethod:h,triggerProps:m}=RR(c);Nm(t);const{forceUnmount:y}=Pm(c,t),v=_.useCallback(()=>{t.setOpen(!1,Ye(gm))},[t]);_.useImperativeHandle(s,()=>({unmount:y,close:v}),[y,v]);const b=Im({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0}),[S,E]=_.useState(0),[x,R]=_.useState(0),O=S===0,A=Kw(b),M=Am(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:f==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(W){if(!t.context.outsidePressEnabledRef.current||"button"in W&&W.button!==0||"touches"in W&&W.touches.length!==1)return!1;const $=xn(W);if(O&&!u){const K=$;return f&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===K||t.context.backdropRef.current===K||je(K,p)&&!K?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:O});wR(c&&f===!0,p);const{getReferenceProps:N,getFloatingProps:D,getTriggerProps:j}=pf([A,M]);t.useContextCallback("onNestedDialogOpen",(W,$)=>{E(W),R($)}),t.useContextCallback("onNestedDialogClose",()=>{E(0),R(0)}),_.useEffect(()=>(r?.onNestedDialogOpen&&c&&r.onNestedDialogOpen(S+1,x+(a?1:0)),r?.onNestedDialogClose&&!c&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&c&&r.onNestedDialogClose()}),[a,c,S,x,r]);const L=_.useMemo(()=>N(m),[N,m]),H=_.useMemo(()=>j(m),[j,m]),Y=_.useMemo(()=>D(),[D]);t.useSyncedValues({openMethod:h,activeTriggerProps:L,inactiveTriggerProps:H,popupProps:Y,floatingRootContext:b,nestedOpenDialogCount:S,nestedOpenDrawerCount:x})}const jP={...Lm,modal:_e(e=>e.modal),nested:_e(e=>e.nested),nestedOpenDialogCount:_e(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:_e(e=>e.nestedOpenDrawerCount),disablePointerDismissal:_e(e=>e.disablePointerDismissal),openMethod:_e(e=>e.openMethod),descriptionElementId:_e(e=>e.descriptionElementId),titleElementId:_e(e=>e.titleElementId),viewportElement:_e(e=>e.viewportElement),role:_e(e=>e.role)};class Zm extends hf{constructor(t){super(LP(t),{popupRef:_.createRef(),backdropRef:_.createRef(),internalBackdropRef:_.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new El,onOpenChange:void 0,onOpenChangeComplete:void 0},jP)}setOpen=(t,r)=>{if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,r);const s={open:t},a=r.trigger?.id??null;(a||t)&&(s.activeTriggerId=a,s.activeTriggerElement=r.trigger??null),this.update(s)};static useStore(t,r){const s=mn(()=>new Zm(r)).current;return t??s}}function LP(e={}){return{...jm(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}const NS=_.createContext(!1);function IP(e){const{children:t,open:r,defaultOpen:s=!1,onOpenChange:a,onOpenChangeComplete:c,disablePointerDismissal:u=!1,modal:f=!0,actionsRef:p,handle:h,triggerId:m,defaultTriggerId:y=null}=e,v=Us(!0),b=_.useContext(NS),S=!!v,E=Zm.useStore(h?.store,{open:s,openProp:r,activeTriggerId:y,triggerIdProp:m,modal:f,disablePointerDismissal:u,nested:S});dm(()=>{r===void 0&&E.state.open===!1&&s===!0&&E.update({open:!0,activeTriggerId:y})}),E.useControlledProp("openProp",r),E.useControlledProp("triggerIdProp",m),E.useSyncedValues({disablePointerDismissal:u,nested:S,modal:f}),E.useContextCallback("onOpenChange",a),E.useContextCallback("onOpenChangeComplete",c);const x=E.useState("payload");PP({store:E,actionsRef:p,parentContext:v?.store.context,isDrawer:b});const R=_.useMemo(()=>({store:E}),[E]);return k.jsx(NS.Provider,{value:!1,children:k.jsx(dR.Provider,{value:R,children:typeof t=="function"?t({payload:x}):t})})}const UP=_.forwardRef(function(t,r){const{render:s,className:a,style:c,id:u,...f}=t,{store:p}=Us(),h=Xi(u);return p.useSyncedValueWithCleanup("titleElementId",h),Kt("h2",t,{ref:r,props:[{id:h},f]})});var BP={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Et=(e,t,r,s)=>{const a=_.forwardRef(({color:c="currentColor",size:u=24,stroke:f=2,title:p,className:h,children:m,...y},v)=>_.createElement("svg",{ref:v,...BP[e],width:u,height:u,className:["tabler-icon",`tabler-icon-${t}`,h].join(" "),strokeWidth:f,stroke:c,...y},[p&&_.createElement("title",{key:"svg-title"},p),...s.map(([b,S])=>_.createElement(b,S)),...Array.isArray(m)?m:[m]]));return a.displayName=`${r}`,a};const HP=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],FP=Et("outline","arrow-left","ArrowLeft",HP);const $P=[["path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8",key:"svg-0"}],["path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8",key:"svg-1"}],["path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5",key:"svg-2"}],["path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0",key:"svg-3"}],["path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5",key:"svg-4"}],["path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10",key:"svg-5"}]],ZP=Et("outline","brain","Brain",$P);const VP=[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]],qP=Et("outline","brand-github","BrandGithub",VP);const YP=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],GP=Et("outline","chart-bar","ChartBar",YP);const KP=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],QP=Et("outline","chevron-down","ChevronDown",KP);const XP=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],JP=Et("outline","chevron-up","ChevronUp",XP);const WP=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]],e3=Et("outline","circle-plus","CirclePlus",WP);const t3=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],ER=Et("outline","copy","Copy",t3);const n3=[["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],r3=Et("outline","dots","Dots",n3);const o3=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],s3=Et("outline","download","Download",o3);const i3=[["path",{d:"M5 9l14 0",key:"svg-0"}],["path",{d:"M5 15l14 0",key:"svg-1"}],["path",{d:"M11 4l-4 16",key:"svg-2"}],["path",{d:"M17 4l-4 16",key:"svg-3"}]],a3=Et("outline","hash","Hash",i3);const l3=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M9 4l0 16",key:"svg-1"}]],c3=Et("outline","layout-sidebar","LayoutSidebar",l3);const u3=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],f3=Et("outline","moon","Moon",u3);const d3=[["path",{d:"M5 5a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -2",key:"svg-0"}],["path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2",key:"svg-1"}],["path",{d:"M10 16a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -4",key:"svg-2"}]],h3=Et("outline","paint","Paint",d3);const p3=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],m3=Et("outline","pencil","Pencil",p3);const g3=[["path",{d:"M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4",key:"svg-0"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-1"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-2"}]],PS=Et("outline","pin","Pin",g3);const y3=[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]],v3=Et("outline","pinned-off","PinnedOff",y3);const b3=[["path",{d:"M4 7h3a1 1 0 0 0 1 -1v-1a2 2 0 0 1 4 0v1a1 1 0 0 0 1 1h3a1 1 0 0 1 1 1v3a1 1 0 0 0 1 1h1a2 2 0 0 1 0 4h-1a1 1 0 0 0 -1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1v-1a2 2 0 0 0 -4 0v1a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h1a2 2 0 0 0 0 -4h-1a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1",key:"svg-0"}]],S3=Et("outline","puzzle","Puzzle",b3);const x3=[["path",{d:"M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]],w3=Et("outline","robot","Robot",x3);const R3=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],jS=Et("outline","search","Search",R3);const E3=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],_3=Et("outline","settings","Settings",E3);const T3=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],C3=Et("outline","sun","Sun",T3);const O3=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],M3=Et("outline","trash","Trash",O3);const A3=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],_R=Et("outline","x","X",A3);function z3({...e}){return k.jsx(IP,{"data-slot":"sheet",...e})}function D3({...e}){return k.jsx(TP,{"data-slot":"sheet-portal",...e})}function k3({className:e,...t}){return k.jsx(mP,{"data-slot":"sheet-overlay",className:nt("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function N3({className:e,children:t,side:r="right",showCloseButton:s=!0,...a}){return k.jsxs(D3,{children:[k.jsx(k3,{}),k.jsxs(_P,{"data-slot":"sheet-content","data-side":r,className:nt("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...a,children:[t,s&&k.jsxs(gP,{"data-slot":"sheet-close",render:k.jsx(fR,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[k.jsx(_R,{}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function P3({className:e,...t}){return k.jsx("div",{"data-slot":"sheet-header",className:nt("flex flex-col gap-0.5 p-4",e),...t})}function j3({className:e,...t}){return k.jsx(UP,{"data-slot":"sheet-title",className:nt("font-heading text-base font-medium text-foreground",e),...t})}function L3({className:e,...t}){return k.jsx(yP,{"data-slot":"sheet-description",className:nt("text-sm text-muted-foreground",e),...t})}const I3="sidebar_state",U3=3600*24*7,B3="16rem",H3="18rem",F3="3rem",$3="b",TR=_.createContext(null);function Tl(){const e=_.useContext(TR);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Z3({defaultOpen:e=!0,open:t,onOpenChange:r,className:s,style:a,children:c,...u}){const f=aP(),[p,h]=_.useState(!1),[m,y]=_.useState(e),v=t??m,b=_.useCallback(R=>{const O=typeof R=="function"?R(v):R;r?r(O):y(O),document.cookie=`${I3}=${O}; path=/; max-age=${U3}`},[r,v]),S=_.useCallback(()=>f?h(R=>!R):b(R=>!R),[f,b,h]);_.useEffect(()=>{const R=O=>{O.key===$3&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),S())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[S]);const E=v?"expanded":"collapsed",x=_.useMemo(()=>({state:E,open:v,setOpen:b,isMobile:f,openMobile:p,setOpenMobile:h,toggleSidebar:S}),[E,v,b,f,p,h,S]);return k.jsx(TR.Provider,{value:x,children:k.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":B3,"--sidebar-width-icon":F3,...a},className:nt("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...u,children:c})})}function V3({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:s,children:a,dir:c,...u}){const{isMobile:f,state:p,openMobile:h,setOpenMobile:m}=Tl();return r==="none"?k.jsx("div",{"data-slot":"sidebar",className:nt("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...u,children:a}):f?k.jsx(z3,{open:h,onOpenChange:m,...u,children:k.jsxs(N3,{dir:c,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":H3},side:e,children:[k.jsxs(P3,{className:"sr-only",children:[k.jsx(j3,{children:"Sidebar"}),k.jsx(L3,{children:"Displays the mobile sidebar."})]}),k.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):k.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?r:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[k.jsx("div",{"data-slot":"sidebar-gap",className:nt("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)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),k.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:nt("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...u,children:k.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:a})})]})}function q3({className:e,onClick:t,...r}){const{toggleSidebar:s}=Tl();return k.jsxs(fR,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:nt(e),onClick:a=>{t?.(a),s()},...r,children:[k.jsx(c3,{}),k.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Y3({className:e,...t}){return k.jsx("main",{"data-slot":"sidebar-inset",className:nt("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function G3({className:e,...t}){return k.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:nt("flex flex-col gap-2 p-2",e),...t})}function K3({className:e,...t}){return k.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:nt("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Q3({className:e,...t}){return k.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:nt("relative flex w-full min-w-0 flex-col p-2",e),...t})}function X3({className:e,render:t,...r}){return Fm({defaultTagName:"div",props:ro({className:nt("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e)},r),render:t,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function CR({className:e,...t}){return k.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:nt("flex w-full min-w-0 flex-col gap-0",e),...t})}function Vp({className:e,...t}){return k.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:nt("group/menu-item relative",e),...t})}const J3=uR("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! 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 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{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"}});function qp({render:e,isActive:t=!1,variant:r="default",size:s="default",tooltip:a,className:c,...u}){const{isMobile:f,state:p}=Tl(),h=Fm({defaultTagName:"button",props:ro({className:nt(J3({variant:r,size:s}),c)},u),render:a?k.jsx(tP,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:t}});return a?(typeof a=="string"&&(a={children:a}),k.jsxs(eP,{children:[h,k.jsx(nP,{side:"right",align:"center",hidden:p!=="collapsed"||f,...a})]})):h}function W3({className:e,...t}){return k.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:nt("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})}function e4({render:e,size:t="md",isActive:r=!1,className:s,...a}){return Fm({defaultTagName:"a",props:ro({className:nt("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden 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 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",s)},a),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:r}})}function t4(e){const{open:t,defaultOpen:r,onOpenChange:s,disabled:a}=e,c=t!==void 0,[u,f]=hP({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:p,setMounted:h,transitionStatus:m}=Fw(u,!0,!0),[y,v]=_.useState(u),[{height:b,width:S},E]=_.useState({height:void 0,width:void 0}),x=Xi(),[R,O]=_.useState(),A=R??x,[M,N]=_.useState(!1),[D,j]=_.useState(!1),L=_.useRef(null),H=_.useRef(null),Y=_.useRef(null),W=_.useRef(null),$=km(W,!1),K=ze(q=>{const Z=!u,I=Ye(As,q.nativeEvent);if(s(Z,I),I.isCanceled)return;const B=W.current;H.current==="css-animation"&&B!=null&&B.style.removeProperty("animation-name"),!M&&!D&&(H.current!=null&&H.current!=="css-animation"&&!p&&Z&&h(!0),H.current==="css-animation"&&(!y&&Z&&v(!0),!p&&Z&&h(!0))),f(Z),H.current==="none"&&p&&!Z&&h(!1)});return Re(()=>{c&&H.current==="none"&&!u&&h(!1)},[c,u,t,h]),_.useMemo(()=>({abortControllerRef:L,animationTypeRef:H,disabled:a,handleTrigger:K,height:b,mounted:p,open:u,panelId:A,panelRef:W,runOnceAnimationsFinish:$,setDimensions:E,setHiddenUntilFound:N,setKeepMounted:j,setMounted:h,setOpen:f,setPanelIdState:O,setVisible:v,transitionDimensionRef:Y,transitionStatus:m,visible:y,width:S}),[L,H,a,K,b,p,u,A,W,$,E,N,j,h,f,v,Y,m,y,S])}const OR=_.createContext(void 0);function MR(){const e=_.useContext(OR);if(e===void 0)throw new Error(wn(15));return e}let rl=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ks.startingStyle]="startingStyle",e[e.endingStyle=ks.endingStyle]="endingStyle",e})({}),n4=(function(e){return e.panelOpen="data-panel-open",e})({});const r4={[rl.open]:""},o4={[rl.closed]:""},s4={open(e){return e?{[n4.panelOpen]:""}:null}},i4={open(e){return e?r4:o4}},AR={...i4,...Ki},a4=_.forwardRef(function(t,r){const{render:s,className:a,defaultOpen:c=!1,disabled:u=!1,onOpenChange:f,open:p,style:h,...m}=t,y=ze(f),v=t4({open:p,defaultOpen:c,onOpenChange:y,disabled:u}),b=_.useMemo(()=>({open:v.open,disabled:v.disabled,transitionStatus:v.transitionStatus}),[v.open,v.disabled,v.transitionStatus]),S=_.useMemo(()=>({...v,onOpenChange:y,state:b}),[v,y,b]),E=Kt("div",t,{state:b,ref:r,props:m,stateAttributesMapping:AR});return k.jsx(OR.Provider,{value:S,children:E})}),l4={...s4,...Ki},c4=_.forwardRef(function(t,r){const{panelId:s,open:a,handleTrigger:c,state:u,disabled:f}=MR(),{className:p,disabled:h=f,id:m,render:y,nativeButton:v=!0,style:b,...S}=t,{getButtonProps:E,buttonRef:x}=_l({disabled:h,focusableWhenDisabled:!0,native:v}),R=_.useMemo(()=>({"aria-controls":a?s:void 0,"aria-expanded":a,onClick:c}),[s,a,c]);return Kt("button",t,{state:u,ref:[r,x],props:[R,S,E],stateAttributesMapping:l4})});let u4=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function f4(e){const{abortControllerRef:t,animationTypeRef:r,externalRef:s,height:a,hiddenUntilFound:c,keepMounted:u,id:f,mounted:p,onOpenChange:h,open:m,panelRef:y,runOnceAnimationsFinish:v,setDimensions:b,setMounted:S,setOpen:E,setVisible:x,transitionDimensionRef:R,visible:O,width:A}=e,M=_.useRef(!1),N=_.useRef(null),D=_.useRef(m),j=_.useRef(m),L=cf(),H=_.useMemo(()=>r.current==="css-animation"?!O:!m&&!p,[m,p,O,r]),Y=ze($=>{if(!$)return;if(r.current==null||R.current==null){const Z=getComputedStyle($),I=Z.animationName!=="none"&&Z.animationName!=="",B=Z.transitionDuration!=="0s"&&Z.transitionDuration!=="";I&&B||(Z.animationName==="none"&&Z.transitionDuration!=="0s"?r.current="css-transition":Z.animationName!=="none"&&Z.transitionDuration==="0s"?r.current="css-animation":r.current="none"),$.getAttribute(u4.orientation)==="horizontal"||Z.transitionProperty.indexOf("width")>-1?R.current="width":R.current="height"}if(r.current!=="css-transition")return;(a===void 0||A===void 0)&&(b({height:$.scrollHeight,width:$.scrollWidth}),j.current&&$.style.setProperty("transition-duration","0s"));let K=-1,q=-1;return K=At.request(()=>{j.current=!1,q=At.request(()=>{setTimeout(()=>{$.style.removeProperty("transition-duration")})})}),()=>{At.cancel(K),At.cancel(q)}}),W=zs(s,y,Y);return Re(()=>{if(r.current!=="css-transition")return;const $=y.current;if(!$)return;let K=-1;if(t.current!=null&&(t.current.abort(),t.current=null),m){const q={"justify-content":$.style.justifyContent,"align-items":$.style.alignItems,"align-content":$.style.alignContent,"justify-items":$.style.justifyItems};Object.keys(q).forEach(Z=>{$.style.setProperty(Z,"initial","important")}),!j.current&&!u&&$.setAttribute(rl.startingStyle,""),b({height:$.scrollHeight,width:$.scrollWidth}),K=At.request(()=>{Object.entries(q).forEach(([Z,I])=>{I===""?$.style.removeProperty(Z):$.style.setProperty(Z,I)})})}else{if($.scrollHeight===0&&$.scrollWidth===0)return;b({height:$.scrollHeight,width:$.scrollWidth});const q=new AbortController;t.current=q;const Z=q.signal;let I=null;const B=rl.endingStyle;return I=new MutationObserver(ee=>{ee.some(le=>le.type==="attributes"&&le.attributeName===B)&&(I?.disconnect(),I=null,v(()=>{b({height:0,width:0}),$.style.removeProperty("content-visibility"),S(!1),t.current===q&&(t.current=null)},Z))}),I.observe($,{attributes:!0,attributeFilter:[B]}),()=>{I?.disconnect(),L.cancel(),t.current===q&&(q.abort(),t.current=null)}}return()=>{At.cancel(K)}},[t,r,L,c,u,p,m,y,v,b,S]),Re(()=>{if(r.current!=="css-animation")return;const $=y.current;$&&(N.current=$.style.animationName||N.current,$.style.setProperty("animation-name","none"),b({height:$.scrollHeight,width:$.scrollWidth}),!D.current&&!M.current&&$.style.removeProperty("animation-name"),m?(t.current!=null&&(t.current.abort(),t.current=null),S(!0),x(!0)):(t.current=new AbortController,v(()=>{S(!1),x(!1),t.current=null},t.current.signal)))},[t,r,m,y,v,b,S,x,O]),nf(()=>{const $=At.request(()=>{D.current=!1});return()=>At.cancel($)}),Re(()=>{if(!c)return;const $=y.current;if(!$)return;let K=-1,q=-1;return m&&M.current&&($.style.transitionDuration="0s",b({height:$.scrollHeight,width:$.scrollWidth}),K=At.request(()=>{M.current=!1,q=At.request(()=>{setTimeout(()=>{$.style.removeProperty("transition-duration")})})})),()=>{At.cancel(K),At.cancel(q)}},[c,m,y,b]),Re(()=>{const $=y.current;$&&c&&H&&($.setAttribute("hidden","until-found"),r.current==="css-transition"&&$.setAttribute(rl.startingStyle,""))},[c,H,r,y]),_.useEffect(function(){const K=y.current;if(!K)return;function q(Z){M.current=!0,E(!0),h(!0,Ye(pm,Z))}return qe(K,"beforematch",q)},[h,y,E]),_.useMemo(()=>({props:{hidden:H,id:f,ref:W}}),[H,f,W])}let LS=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const d4=_.forwardRef(function(t,r){const{className:s,hiddenUntilFound:a,keepMounted:c,render:u,id:f,style:p,...h}=t,{abortControllerRef:m,animationTypeRef:y,height:v,mounted:b,onOpenChange:S,open:E,panelId:x,panelRef:R,runOnceAnimationsFinish:O,setDimensions:A,setHiddenUntilFound:M,setKeepMounted:N,setMounted:D,setPanelIdState:j,setOpen:L,setVisible:H,state:Y,transitionDimensionRef:W,visible:$,width:K,transitionStatus:q}=MR(),Z=a??!1,I=c??!1;Re(()=>{if(f)return j(f),()=>{j(void 0)}},[f,j]),Re(()=>{M(Z)},[M,Z]),Re(()=>{N(I)},[N,I]);const{props:B}=f4({abortControllerRef:m,animationTypeRef:y,externalRef:r,height:v,hiddenUntilFound:Z,id:x,keepMounted:I,mounted:b,onOpenChange:S,open:E,panelRef:R,runOnceAnimationsFinish:O,setDimensions:A,setMounted:D,setOpen:L,setVisible:H,transitionDimensionRef:W,visible:$,width:K});Rl({open:E&&q==="idle",ref:R,onComplete(){E&&A({height:void 0,width:void 0})}});const ee=_.useMemo(()=>({...Y,transitionStatus:q}),[Y,q]),ne=Kt("div",t,{state:ee,ref:[r,R],props:[B,{style:{[LS.collapsiblePanelHeight]:v===void 0?"auto":`${v}px`,[LS.collapsiblePanelWidth]:K===void 0?"auto":`${K}px`}},h],stateAttributesMapping:AR});return I||Z||b?ne:null});function h4({...e}){return k.jsx(a4,{"data-slot":"collapsible",...e})}function p4({...e}){return k.jsx(c4,{"data-slot":"collapsible-trigger",...e})}function m4({...e}){return k.jsx(d4,{"data-slot":"collapsible-content",...e})}function pp(e,t){return!!(e===t||t!=="/"&&e.startsWith(t))}function g4({routes:e}){const{state:t}=Tl(),r=t==="collapsed",[s,a]=_.useState(null),c=Tx();return k.jsx(CR,{children:e.map(u=>{const f=!r&&s===u.id,p=!!u.subs?.length,h=pp(c.pathname,u.link)||u.subs?.some(m=>pp(c.pathname,m.link));return k.jsx(Vp,{children:p?k.jsxs(h4,{open:f,onOpenChange:m=>a(m?u.id:null),className:"w-full",children:[k.jsxs(p4,{render:k.jsx(qp,{className:nt("flex w-full items-center rounded-lg px-2 transition-colors",f||h?"bg-sidebar-muted text-foreground":"text-muted-foreground hover:bg-sidebar-muted hover:text-foreground",r&&"justify-center")}),children:[u.icon,!r&&k.jsx("span",{className:"ml-2 flex-1 text-sm font-medium",children:u.title}),!r&&p&&k.jsx("span",{className:"ml-auto",children:f?k.jsx(JP,{className:"size-4"}):k.jsx(QP,{className:"size-4"})})]}),!r&&k.jsx(m4,{children:k.jsx(W3,{className:"my-1 ml-3.5",children:u.subs?.map(m=>{const y=pp(c.pathname,m.link);return k.jsx(Vp,{className:"h-auto",children:k.jsx(e4,{render:k.jsx(qo,{to:m.link,className:nt("flex items-center rounded-md px-4 py-1.5 text-sm font-medium",y?"bg-sidebar-muted text-foreground":"text-muted-foreground hover:bg-sidebar-muted hover:text-foreground")}),children:m.title})},`${u.id}-${m.title}`)})})})]}):k.jsxs(qp,{tooltip:u.title,render:k.jsx(qo,{to:u.link,className:nt("flex items-center rounded-lg px-2 transition-colors",h?"bg-sidebar-muted text-foreground":"text-muted-foreground hover:bg-sidebar-muted hover:text-foreground",r&&"justify-center")}),children:[u.icon,!r&&k.jsx("span",{className:"ml-2 text-sm font-medium",children:u.title})]})},u.id)})})}const zR=_.createContext(void 0);function DR(e){const t=_.useContext(zR);if(t===void 0&&!e)throw new Error(wn(33));return t}const kR=_.createContext(void 0);function Bs(e){const t=_.useContext(kR);if(t===void 0&&!e)throw new Error(wn(36));return t}const y4=_.createContext(void 0);function gf(e=!0){const t=_.useContext(y4);if(t===void 0&&!e)throw new Error(wn(25));return t}function v4(e){const{closeOnClick:t,highlighted:r,id:s,nodeId:a,store:c,typingRef:u,itemRef:f,itemMetadata:p}=e,{events:h}=c.useState("floatingTreeRoot"),m=gf(!0),y=m!==void 0;return _.useMemo(()=>({id:s,role:"menuitem",tabIndex:r?0:-1,onKeyDown(v){v.key===" "&&u?.current&&v.preventDefault()},onMouseMove(v){a&&h.emit("itemhover",{nodeId:a,target:v.currentTarget})},onClick(v){t&&h.emit("close",{domEvent:v,reason:Xx})},onMouseUp(v){if(m){const b=m.initialCursorPointRef.current;if(m.initialCursorPointRef.current=null,y&&b&&Math.abs(v.clientX-b.x)<=1&&Math.abs(v.clientY-b.y)<=1||y&&!Vx&&v.button===2)return}f.current&&c.context.allowMouseUpTriggerRef.current&&(!y||v.button===2)&&(!p||p.type==="regular-item")&&f.current.click()}}),[t,r,s,h,a,c,u,f,m,y,p])}const b4={type:"regular-item"};function S4(e){const{closeOnClick:t,disabled:r=!1,highlighted:s,id:a,store:c,typingRef:u=c.context.typingRef,nativeButton:f,itemMetadata:p,nodeId:h}=e,m=_.useRef(null),{getButtonProps:y,buttonRef:v}=_l({disabled:r,focusableWhenDisabled:!0,native:f,composite:!0}),b=v4({closeOnClick:t,highlighted:s,id:a,nodeId:h,store:c,typingRef:u,itemRef:m,itemMetadata:p}),S=_.useCallback(x=>ro(b,{onMouseEnter(){p.type==="submenu-trigger"&&p.setActive()}},x,y),[b,y,p]),E=zs(m,v);return _.useMemo(()=>({getItemProps:S,itemRef:E}),[S,E])}const NR=_.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function x4(){return _.useContext(NR)}let w4=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function PR(e={}){const{label:t,metadata:r,textRef:s,indexGuessBehavior:a,index:c}=e,{register:u,unregister:f,subscribeMapChange:p,elementsRef:h,labelsRef:m,nextIndexRef:y}=x4(),v=_.useRef(-1),[b,S]=_.useState(c??(a===w4.GuessFromOrder?()=>{if(v.current===-1){const R=y.current;y.current+=1,v.current=R}return v.current}:-1)),E=_.useRef(null),x=_.useCallback(R=>{if(E.current=R,b!==-1&&R!==null&&(h.current[b]=R,m)){const O=t!==void 0;m.current[b]=O?t:s?.current?.textContent??R.textContent}},[b,h,m,t,s]);return Re(()=>{if(c!=null)return;const R=E.current;if(R)return u(R,r),()=>{f(R)}},[c,u,f,r]),Re(()=>{if(c==null)return p(R=>{const O=E.current?R.get(E.current)?.index:null;O!=null&&S(O)})},[c,p,S]),_.useMemo(()=>({ref:x,index:b}),[b,x])}const R4=_.forwardRef(function(t,r){const{render:s,className:a,id:c,label:u,nativeButton:f=!1,disabled:p=!1,closeOnClick:h=!0,style:m,...y}=t,v=PR({label:u}),b=DR(!0),S=Xi(c),{store:E}=Bs(),x=E.useState("isActive",v.index),R=E.useState("itemProps"),{getItemProps:O,itemRef:A}=S4({closeOnClick:h,disabled:p,highlighted:x,id:S,store:E,nativeButton:f,nodeId:b?.context.nodeId,itemMetadata:b4});return Kt("div",t,{state:{disabled:p,highlighted:x},props:[R,y,O],ref:[A,r,v.ref]})}),E4=_.createContext(void 0);function _4(e){return _.useContext(E4)}const T4={...Qi,...Ki},C4=_.forwardRef(function(t,r){const{render:s,className:a,style:c,finalFocus:u,...f}=t,{store:p}=Bs(),{side:h,align:m}=DR(),y=_4()!=null,v=p.useState("open"),b=p.useState("transitionStatus"),S=p.useState("popupProps"),E=p.useState("mounted"),x=p.useState("instantType"),R=p.useState("activeTriggerElement"),O=p.useState("parent"),A=p.useState("lastOpenChangeReason"),M=p.useState("rootId"),N=p.useState("floatingRootContext"),D=p.useState("floatingTreeRoot"),j=p.useState("closeDelay"),L=p.useState("activeTriggerElement"),H=O.type==="context-menu";Rl({open:v,ref:p.context.popupRef,onComplete(){v&&p.context.onOpenChangeComplete?.(!0)}}),_.useEffect(()=>{function I(B){p.setOpen(!1,Ye(B.reason,B.domEvent))}return D.events.on("close",I),()=>{D.events.off("close",I)}},[D.events,p]);const Y=p.useState("hoverEnabled"),W=p.useState("disabled");Yw(N,{enabled:Y&&!W&&!H&&O.type!=="menubar",closeDelay:j});const $={transitionStatus:b,side:h,align:m,open:v,nested:O.type==="menu",instant:x},K=_.useCallback(I=>{p.set("popupElement",I)},[p]),q=Kt("div",t,{state:$,ref:[r,p.context.popupRef,K],stateAttributesMapping:T4,props:[S,{onKeyDown(I){y&&SR.has(I.key)&&I.stopPropagation()}},Hm(b),f,{"data-rootownerid":M}]});let Z=O.type===void 0||H;return(R||O.type==="menubar"&&A!==mm)&&(Z=!0),k.jsx(zw,{context:N,modal:H,disabled:!E,returnFocus:u===void 0?Z:u,initialFocus:O.type!=="menu",restoreFocus:!0,externalTree:O.type!=="menubar"?D:void 0,previousFocusableElement:L,nextFocusableElement:O.type===void 0?p.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:O.type===void 0?p.context.beforeContentFocusGuardRef:void 0,children:q})}),jR=_.createContext(void 0);function O4(){const e=_.useContext(jR);if(e===void 0)throw new Error(wn(32));return e}const M4=_.forwardRef(function(t,r){const{keepMounted:s=!1,...a}=t,{store:c}=Bs();return c.useState("mounted")||s?k.jsx(jR.Provider,{value:s,children:k.jsx(Tw,{ref:r,...a})}):null});function A4(e){const{children:t,elementsRef:r,labelsRef:s,onMapChange:a}=e,c=ze(a),u=_.useRef(0),f=mn(D4).current,p=mn(z4).current,[h,m]=_.useState(0),y=_.useRef(h),v=ze((R,O)=>{p.set(R,O??null),y.current+=1,m(y.current)}),b=ze(R=>{p.delete(R),y.current+=1,m(y.current)}),S=_.useMemo(()=>{const R=new Map;return Array.from(p.keys()).filter(A=>A.isConnected).sort(k4).forEach((A,M)=>{const N=p.get(A)??{};R.set(A,{...N,index:M})}),R},[p,h]);Re(()=>{if(typeof MutationObserver!="function"||S.size===0)return;const R=new MutationObserver(O=>{const A=new Set,M=N=>A.has(N)?A.delete(N):A.add(N);O.forEach(N=>{N.removedNodes.forEach(M),N.addedNodes.forEach(M)}),A.size===0&&(y.current+=1,m(y.current))});return S.forEach((O,A)=>{A.parentElement&&R.observe(A.parentElement,{childList:!0})}),()=>{R.disconnect()}},[S]),Re(()=>{y.current===h&&(r.current.length!==S.size&&(r.current.length=S.size),s&&s.current.length!==S.size&&(s.current.length=S.size),u.current=S.size),c(S)},[c,S,r,s,h]),Re(()=>()=>{r.current=[]},[r]),Re(()=>()=>{s&&(s.current=[])},[s]);const E=ze(R=>(f.add(R),()=>{f.delete(R)}));Re(()=>{f.forEach(R=>R(S))},[f,S]);const x=_.useMemo(()=>({register:v,unregister:b,subscribeMapChange:E,elementsRef:r,labelsRef:s,nextIndexRef:u}),[v,b,E,r,s,u]);return k.jsx(NR.Provider,{value:x,children:t})}function z4(){return new Map}function D4(){return new Set}function k4(e,t){const r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}const N4=20;function P4(e,t,r,s){const[a,c]=_.useState(!1);Re(()=>{if(!e||!t||r==null){c(!1);return}const u=tt(r).documentElement.clientWidth,f=r.offsetWidth;c(u>0&&f>0&&f>=u-N4)},[e,t,r]),wR(e&&(!t||a),s)}const j4=_.forwardRef(function(t,r){const{anchor:s,positionMethod:a="absolute",className:c,render:u,side:f,align:p,sideOffset:h=0,alignOffset:m=0,collisionBoundary:y="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:S=!1,disableAnchorTracking:E=!1,collisionAvoidance:x=rk,style:R,...O}=t,{store:A}=Bs(),M=O4(),N=gf(!0),D=A.useState("parent"),j=A.useState("floatingRootContext"),L=A.useState("floatingTreeRoot"),H=A.useState("mounted"),Y=A.useState("open"),W=A.useState("modal"),$=A.useState("openMethod"),K=A.useState("activeTriggerElement"),q=A.useState("transitionStatus"),Z=A.useState("positionerElement"),I=A.useState("instantType"),B=A.useState("hasViewport"),ee=A.useState("lastOpenChangeReason"),ne=A.useState("floatingNodeId"),le=A.useState("floatingParentNodeId"),z=j.useState("domReferenceElement"),G=_.useRef(null),re=km(Z,!1,!1);let ie=s,he=h,de=m,ge=p,me=x;D.type==="context-menu"&&(ie=s??D.context?.anchor,ge=ge??"start",!f&&ge!=="center"&&(de=t.alignOffset??2,he=t.sideOffset??-5));let ye=f,ke=ge;D.type==="menu"?(ye=ye??"inline-end",ke=ke??"start",me=t.collisionAvoidance??ww):D.type==="menubar"&&(ye=ye??"bottom",ke=ke??"start");const He=D.type==="context-menu",Se=oR({anchor:ie,floatingRootContext:j,positionMethod:N?"fixed":a,mounted:H,side:ye,sideOffset:he,align:ke,alignOffset:de,arrowPadding:He?0:b,collisionBoundary:y,collisionPadding:v,sticky:S,nodeId:ne,keepMounted:M,disableAnchorTracking:E,collisionAvoidance:me,shiftCrossAxis:He&&!("side"in me&&me.side==="flip"),externalTree:L,adaptiveOrigin:B?nR:void 0});_.useEffect(()=>{function Ce(ce){ce.open&&(ce.parentNodeId===ne&&A.set("hoverEnabled",!1),ce.nodeId!==ne&&ce.parentNodeId===A.select("floatingParentNodeId")&&A.setOpen(!1,Ye(tl)))}return L.events.on("menuopenchange",Ce),()=>{L.events.off("menuopenchange",Ce)}},[A,L.events,ne]),_.useEffect(()=>{if(A.select("floatingParentNodeId")==null)return;function Ce(ce){if(ce.open||ce.nodeId!==A.select("floatingParentNodeId"))return;const xe=ce.reason??tl;A.setOpen(!1,Ye(xe))}return L.events.on("menuopenchange",Ce),()=>{L.events.off("menuopenchange",Ce)}},[L.events,A]);const Pe=Pn();_.useEffect(()=>{Y||Pe.clear()},[Y,Pe]),_.useEffect(()=>{function Ce(ce){if(!(!Y||ce.nodeId!==A.select("floatingParentNodeId")))if(ce.target&&K&&K!==ce.target){const xe=A.select("closeDelay");xe>0?Pe.isStarted()||Pe.start(xe,()=>{A.setOpen(!1,Ye(tl))}):A.setOpen(!1,Ye(tl))}else Pe.clear()}return L.events.on("itemhover",Ce),()=>{L.events.off("itemhover",Ce)}},[L.events,Y,K,A,Pe]),_.useEffect(()=>{const Ce={open:Y,nodeId:ne,parentNodeId:le,reason:A.select("lastOpenChangeReason")};L.events.emit("menuopenchange",Ce)},[L.events,Y,A,ne,le]),Re(()=>{const Ce=z,ce=G.current;if(Ce&&(G.current=Ce),ce&&Ce&&Ce!==ce){A.set("instantType",void 0);const xe=new AbortController;return re(()=>{A.set("instantType","trigger-change")},xe.signal),()=>{xe.abort()}}},[z,re,A]);const Ze={open:Y,side:Se.side,align:Se.align,anchorHidden:Se.anchorHidden,nested:D.type==="menu",instant:I},Ge=D.type==="menubar"&&D.context.modal;P4(Y&&(Ge||W&&ee!==pn),$==="touch",Z,K);const Te=sR(t,Ze,{styles:Se.positionerStyles,transitionStatus:q,props:O,refs:[r,A.useStateSetter("positionerElement")],hidden:!H,inert:!Y}),Ae=H&&D.type!=="menu"&&(D.type!=="menubar"&&W&&ee!==pn||D.type==="menubar"&&D.context.modal);let be=null;return D.type==="menubar"?be=D.context.contentElement:D.type===void 0&&(be=K),k.jsxs(zR.Provider,{value:Se,children:[Ae&&k.jsx(xR,{ref:D.type==="context-menu"||D.type==="nested-context-menu"?D.context.internalBackdropRef:null,inert:iR(!Y),cutout:be}),k.jsx(ik,{id:ne,children:k.jsx(A4,{elementsRef:A.context.itemDomElements,labelsRef:A.context.itemLabels,children:Te})})]})}),L4=_.createContext(null);function LR(e){return _.useContext(L4)}const I4={...Lm,disabled:_e(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:_e(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),openMethod:_e(e=>e.openMethod),allowMouseEnter:_e(e=>e.allowMouseEnter),stickIfOpen:_e(e=>e.stickIfOpen),parent:_e(e=>e.parent),rootId:_e(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:_e(e=>e.activeIndex),isActive:_e((e,t)=>e.activeIndex===t),hoverEnabled:_e(e=>e.hoverEnabled),instantType:_e(e=>e.instantType),lastOpenChangeReason:_e(e=>e.openChangeReason),floatingTreeRoot:_e(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:_e(e=>e.floatingNodeId),floatingParentNodeId:_e(e=>e.floatingParentNodeId),itemProps:_e(e=>e.itemProps),closeDelay:_e(e=>e.closeDelay),hasViewport:_e(e=>e.hasViewport),keyboardEventRelay:_e(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Vm extends hf{constructor(t){super({...U4(),...t},{positionerRef:_.createRef(),popupRef:_.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:_.createRef(),beforeContentFocusGuardRef:_.createRef(),onOpenChangeComplete:void 0,triggerElements:new El},I4),this.unsubscribeParentListener=this.observe("parent",r=>{if(this.unsubscribeParentListener?.(),r.type==="menu"){let s=r.store.select("rootId"),a=r.store.select("floatingTreeRoot"),c=r.store.select("keyboardEventRelay");this.unsubscribeParentListener=r.store.subscribe(()=>{const u=r.store.select("rootId"),f=r.store.select("floatingTreeRoot"),p=r.store.select("keyboardEventRelay");s===u&&a===f&&c===p||(s=u,a=f,c=p,this.notifyAll())}),this.context.allowMouseUpTriggerRef=r.store.context.allowMouseUpTriggerRef;return}r.type!==void 0&&(this.context.allowMouseUpTriggerRef=r.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(t,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:r})}static useStore(t,r){const s=mn(()=>new Vm(r)).current;return t??s}unsubscribeParentListener=null}function U4(){return{...jm(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Om,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:cn,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}const B4=_.createContext(void 0);function H4(){return _.useContext(B4)}const F4=fm(function(t){const{children:r,open:s,onOpenChange:a,onOpenChangeComplete:c,defaultOpen:u=!1,disabled:f=!1,modal:p,loopFocus:h=!0,orientation:m="vertical",actionsRef:y,closeParentOnEsc:v=!1,handle:b,triggerId:S,defaultTriggerId:E=null,highlightItemOnHover:x=!0}=t,R=gf(!0),O=Bs(!0),A=LR(!0),M=H4(),N=_.useMemo(()=>M&&O?{type:"menu",store:O.store}:A?{type:"menubar",context:A}:R&&!O?{type:"context-menu",context:R}:{type:void 0},[R,O,A,M]),D=Vm.useStore(b?.store,{open:u,openProp:s,activeTriggerId:E,triggerIdProp:S,parent:N});dm(()=>{s===void 0&&D.state.open===!1&&u===!0&&D.update({open:!0,activeTriggerId:E})}),D.useControlledProp("openProp",s),D.useControlledProp("triggerIdProp",S),D.useContextCallback("onOpenChangeComplete",c);const j=D.useState("floatingTreeRoot"),L=Aw(j),H=co();Re(()=>{R&&!O?D.update({parent:{type:"context-menu",context:R},floatingNodeId:L,floatingParentNodeId:H}):O&&D.update({floatingNodeId:L,floatingParentNodeId:H})},[R,O,L,H,D]);const Y=D.useState("open"),W=D.useState("activeTriggerElement"),$=D.useState("positionerElement"),K=D.useState("hoverEnabled"),q=D.useState("disabled"),Z=D.useState("lastOpenChangeReason"),I=D.useState("parent"),B=D.useState("activeIndex"),ee=D.useState("payload"),ne=D.useState("floatingParentNodeId"),le=_.useRef(null),z=ne!=null,{openMethod:G,triggerProps:re}=RR(Y);D.useSyncedValues({disabled:f,modal:I.type===void 0?p:void 0,openMethod:G,rootId:Is()}),Nm(D);const{forceUnmount:ie}=Pm(Y,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0})}),he=_.useRef(I.type!=="context-menu"),de=Pn();_.useEffect(()=>{if(Y||(le.current=null),I.type==="context-menu"){if(!Y){de.clear(),he.current=!1;return}de.start(500,()=>{he.current=!0})}},[de,Y,I.type]),Re(()=>{!Y&&!K&&D.set("hoverEnabled",!0)},[Y,K,D]);const ge=_.useRef(!0),me=Pn(),ye=ze((Le,Ue)=>{const lt=Ue.reason;if(Y===Le&&Ue.trigger===W&&Z===lt||(Ue.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},!Le&&Ue.trigger==null&&(Ue.trigger=W??void 0),a?.(Le,Ue),Ue.isCanceled))return;D.state.floatingRootContext.dispatchOpenChange(Le,Ue);const xt=Ue.event;if(Le===!1&&xt?.type==="click"&&xt.pointerType==="touch"&&!ge.current)return;if(!Le&&B!==null){const Ft=D.context.itemDomElements.current[B];queueMicrotask(()=>{Ft?.setAttribute("tabindex","-1")})}Le&&lt===ji?(ge.current=!1,me.start(300,()=>{ge.current=!0})):(ge.current=!0,me.clear());const dn=(lt===As||lt===Xx)&&xt.detail===0&&xt?.isTrusted,jt=!Le&&(lt===rf||lt==null),hr={open:Le,openChangeReason:lt};le.current=Ue.event??null;const it=Ue.trigger?.id??null;(it||Le)&&(hr.activeTriggerId=it,hr.activeTriggerElement=Ue.trigger??null),D.update(hr),I.type==="menubar"&&(lt===ji||lt===$i||lt===pn||lt===vu||lt===tl)?D.set("instantType","group"):dn||jt?D.set("instantType",dn?"click":"dismiss"):D.set("instantType",void 0)}),ke=_.useCallback(()=>{D.setOpen(!1,Ye(gm))},[D]);_.useImperativeHandle(y,()=>({unmount:ie,close:ke}),[ie,ke]);let He;I.type==="context-menu"&&(He=I.context),_.useImperativeHandle(He?.positionerRef,()=>$,[$]),_.useImperativeHandle(He?.actionsRef,()=>({setOpen:ye}),[ye]);const Se=Im({popupStore:D,onOpenChange:ye}),Pe=Se.context.events;_.useEffect(()=>{const Le=({open:Ue,eventDetails:lt})=>ye(Ue,lt);return Pe.on("setOpen",Le),()=>{Pe?.off("setOpen",Le)}},[Pe,ye]);const Ze=Am(Se,{enabled:!q,bubbles:{escapeKey:v&&I.type==="menu"},outsidePress(){return I.type!=="context-menu"||le.current?.type==="contextmenu"?!0:he.current},externalTree:z?j:void 0}),Ge=Kw(Se,{role:"menu"}),Me=tR(),Te=_.useCallback(Le=>{D.select("activeIndex")!==Le&&D.set("activeIndex",Le)},[D]),Ae=xN(Se,{enabled:!q,listRef:D.context.itemDomElements,activeIndex:B,nested:I.type!==void 0,loopFocus:h,orientation:m,parentOrientation:I.type==="menubar"?I.context.orientation:void 0,rtl:Me==="rtl",disabledIndices:Pp,onNavigate:Te,openOnArrowKeyDown:I.type!=="context-menu",externalTree:z?j:void 0,focusItemOnHover:x}),be=_.useCallback(Le=>{D.context.typingRef.current=Le},[D]),Ce=RN(Se,{listRef:D.context.itemLabels,elementsRef:D.context.itemDomElements,activeIndex:B,resetMs:WD,onMatch:Le=>{Y&&Le!==B&&D.set("activeIndex",Le)},onTypingChange:be}),{getReferenceProps:ce,getFloatingProps:xe,getItemProps:ue,getTriggerProps:pe}=pf([Ze,Ge,Ae,Ce]),ve=_.useMemo(()=>{const Le=ro(ce(),{onMouseMove(){D.set("allowMouseEnter",!0)}},re);return delete Le.role,Le},[ce,D,re]),Ne=_.useMemo(()=>{const Le=pe();if(!Le)return Le;const Ue=ro(Le,re);return delete Ue.role,delete Ue["aria-controls"],Ue},[pe,re]),Fe=_.useMemo(()=>xe({onMouseMove(){D.set("allowMouseEnter",!0),I.type==="menu"&&D.set("hoverEnabled",!1)},onClick(){D.select("hoverEnabled")&&D.set("hoverEnabled",!1)},onKeyDown(Le){const Ue=D.select("keyboardEventRelay");Ue&&!Le.isPropagationStopped()&&Ue(Le)}}),[xe,I.type,D]),Ct=_.useMemo(()=>ue(),[ue]);D.useSyncedValues({floatingRootContext:Se,activeTriggerProps:ve,inactiveTriggerProps:Ne,popupProps:Fe,itemProps:Ct});const Dt=_.useMemo(()=>({store:D,parent:N}),[D,N]),Ht=k.jsx(kR.Provider,{value:Dt,children:typeof r=="function"?r({payload:ee}):r});return I.type===void 0||I.type==="context-menu"?k.jsx(ak,{externalTree:j,children:Ht}):Ht});function $4(e){const t=e.getBoundingClientRect(),r=zt(e),s=r.getComputedStyle(e,"::before"),a=r.getComputedStyle(e,"::after");if(!(s.content!=="none"||a.content!=="none"))return t;const u=parseFloat(s.width)||0,f=parseFloat(s.height)||0,p=parseFloat(a.width)||0,h=parseFloat(a.height)||0,m=Math.max(t.width,u,p),y=Math.max(t.height,f,h),v=m-t.width,b=y-t.height;return{left:t.left-v/2,right:t.right+v/2,top:t.top-b/2,bottom:t.bottom+b/2}}function Z4(e={}){const{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:s}=$m(),{ref:a,index:c}=PR(e),u=r===c,f=_.useRef(null),p=zs(a,f);return{compositeProps:_.useMemo(()=>({tabIndex:u?0:-1,onFocus(){s(c)},onMouseMove(){const m=f.current;if(!t||!m)return;const y=m.hasAttribute("disabled")||m.ariaDisabled==="true";!u&&!y&&m.focus()}}),[u,s,c,t]),compositeRef:p,index:c}}function V4(e){const{render:t,className:r,style:s,state:a=cn,props:c=Pp,refs:u=Pp,metadata:f,stateAttributesMapping:p,tag:h="div",...m}=e,{compositeProps:y,compositeRef:v}=Z4({metadata:f});return Kt(h,e,{state:a,ref:[...u,v],props:[y,...c,m],stateAttributesMapping:p})}function IR(e){if(vt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!wr(e))return IR(Cr(e))}function q4(e,t){const r=_.useRef(null),s=ze(c=>{Tr.flushSync(()=>{e.setOpen(!1,Ye($i,c.nativeEvent,c.currentTarget))}),ND(r.current)?.focus()}),a=ze(c=>{const u=e.select("positionerElement");if(u&&Ii(c,u))e.context.beforeContentFocusGuardRef.current?.focus();else{Tr.flushSync(()=>{e.setOpen(!1,Ye($i,c.nativeEvent,c.currentTarget))});let f=kD(e.context.triggerFocusTargetRef.current||t.current);for(;f!==null&&je(u,f);){const p=f;if(f=Em(f),f===p)break}f?.focus()}});return{preFocusGuardRef:r,handlePreFocusGuardFocus:s,handleFocusTargetFocus:a}}function Y4(e){const{enabled:t=!0,mouseDownAction:r,open:s}=e,a=_.useRef(!1);return _.useMemo(()=>t?{onMouseDown:c=>{(r==="open"&&!s||r==="close"&&s)&&(a.current=!0,tt(c.currentTarget).addEventListener("click",()=>{a.current=!1},{once:!0}))},onClick:c=>{a.current&&(a.current=!1,c.preventBaseUIHandler())}}:cn,[t,r,s])}const iu=2,G4=Ix(function(t,r){const{render:s,className:a,disabled:c=!1,nativeButton:u=!0,id:f,openOnHover:p,delay:h=100,closeDelay:m=0,handle:y,payload:v,style:b,...S}=t,E=Bs(!0),x=y?.store??E?.store;if(!x)throw new Error(wn(85));const R=Xi(f),O=x.useState("isTriggerActive",R),A=x.useState("floatingRootContext"),M=x.useState("isOpenedByTrigger",R),N=_.useRef(null),D=Q4(),j=$m(!0),L=Jo(),H=_.useMemo(()=>L??new Om,[L]),Y=Aw(H),W=co(),{registerTrigger:$,isMountedByThisTrigger:K}=$w(R,N,x,{payload:v,closeDelay:m,parent:D,floatingTreeRoot:H,floatingNodeId:Y,floatingParentNodeId:W,keyboardEventRelay:j?.relayKeyboardEvent}),q=D.type==="menubar",Z=x.useState("disabled"),I=c||Z||q&&D.context.disabled,{getButtonProps:B,buttonRef:ee}=_l({disabled:I,native:u});_.useEffect(()=>{!M&&D.type===void 0&&(x.context.allowMouseUpTriggerRef.current=!1)},[x,M,D.type]);const ne=_.useRef(null),le=Pn(),z=ze(Ae=>{if(!ne.current)return;le.clear(),x.context.allowMouseUpTriggerRef.current=!1;const be=Ae.target;if(je(ne.current,be)||je(x.select("positionerElement"),be)||be===ne.current||be!=null&&IR(be)===x.select("rootId"))return;const Ce=$4(ne.current);Ae.clientX>=Ce.left-iu&&Ae.clientX<=Ce.right+iu&&Ae.clientY>=Ce.top-iu&&Ae.clientY<=Ce.bottom+iu||H.events.emit("close",{domEvent:Ae,reason:Yz})});_.useEffect(()=>{M&&x.select("lastOpenChangeReason")===pn&&tt(ne.current).addEventListener("mouseup",z,{once:!0})},[M,z,x]);const G=q&&D.context.hasSubmenuOpen,ie=Gw(A,{enabled:(p??G)&&!I&&D.type!=="context-menu"&&(!q||G&&!K),handleClose:Qw({blockPointerEvents:!q}),mouseOnly:!0,move:!1,restMs:D.type===void 0?h:void 0,delay:{close:m},triggerElementRef:N,externalTree:H,isActiveTrigger:O,isClosing:()=>x.select("transitionStatus")==="ending"}),he=K4(M,x.select("lastOpenChangeReason")),de=fk(A,{enabled:!I&&D.type!=="context-menu",event:M&&q?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:D.type===void 0?he:!1}),ge=Zw(A,{enabled:!I&&G}),me=Y4({open:M,enabled:q,mouseDownAction:"open"}),ye=pf([de,ge]),ke={disabled:I,open:M},He=x.useState("triggerProps",K),Se=[ne,r,ee,$,N],Pe=[ye.getReferenceProps(),ie??cn,He,{"aria-haspopup":"menu",id:R,onMouseDown:Ae=>{if(x.select("open"))return;le.start(200,()=>{x.context.allowMouseUpTriggerRef.current=!0}),tt(Ae.currentTarget).addEventListener("mouseup",z,{once:!0})}},q?{role:"menuitem"}:{},me,S,B],{preFocusGuardRef:Ze,handlePreFocusGuardFocus:Ge,handleFocusTargetFocus:Me}=q4(x,N),Te=Kt("button",t,{enabled:!q,stateAttributesMapping:_S,state:ke,ref:Se,props:Pe});return q?k.jsx(V4,{tag:"button",render:s,className:a,style:b,state:ke,refs:Se,props:Pe,stateAttributesMapping:_S}):M?k.jsxs(_.Fragment,{children:[k.jsx(Vi,{ref:Ze,onFocus:Ge},`${R}-pre-focus-guard`),k.jsx(_.Fragment,{children:Te},R),k.jsx(Vi,{ref:x.context.triggerFocusTargetRef,onFocus:Me},`${R}-post-focus-guard`)]}):k.jsx(_.Fragment,{children:Te},R)});function K4(e,t){const r=Pn(),[s,a]=_.useState(!1);return Re(()=>{e&&t==="trigger-hover"?(a(!0),r.start(ek,()=>{a(!1)})):e||(r.clear(),a(!1))},[e,t,r]),s}function Q4(){const e=gf(!0),t=Bs(!0),r=LR();return _.useMemo(()=>r?{type:"menubar",context:r}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,r])}function X4({...e}){return k.jsx(F4,{"data-slot":"dropdown-menu",...e})}function J4({...e}){return k.jsx(G4,{"data-slot":"dropdown-menu-trigger",...e})}function W4({align:e="start",alignOffset:t=0,side:r="bottom",sideOffset:s=4,className:a,...c}){return k.jsx(M4,{children:k.jsx(j4,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:r,sideOffset:s,children:k.jsx(C4,{"data-slot":"dropdown-menu-content",className:nt("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",a),...c})})})}function au({className:e,inset:t,variant:r="default",...s}){return k.jsx(R4,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:nt("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...s})}const IS=e=>{let t;const r=new Set,s=(h,m)=>{const y=typeof h=="function"?h(t):h;if(!Object.is(y,t)){const v=t;t=m??(typeof y!="object"||y===null)?y:Object.assign({},t,y),r.forEach(b=>b(t,v))}},a=()=>t,f={setState:s,getState:a,getInitialState:()=>p,subscribe:h=>(r.add(h),()=>r.delete(h))},p=t=e(s,a,f);return f},ej=(e=>e?IS(e):IS),tj=e=>e;function nj(e,t=tj){const r=xr.useSyncExternalStore(e.subscribe,xr.useCallback(()=>t(e.getState()),[e,t]),xr.useCallback(()=>t(e.getInitialState()),[e,t]));return xr.useDebugValue(r),r}const rj=e=>{const t=ej(e),r=s=>nj(t,s);return Object.assign(r,t),r},oj=(e=>rj),US={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TSS_DEV_SERVER:"false",TSS_DEV_SSR_STYLES_BASEPATH:"/",TSS_DEV_SSR_STYLES_ENABLED:"true",TSS_INLINE_CSS_ENABLED:"false",TSS_ROUTER_BASEPATH:"",TSS_SERVER_FN_BASE:"/_serverFn/"},BS=e=>!!e.dispatchFromDevtools&&typeof e.dispatch=="function",hl=new Map,lu=e=>{const t=hl.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,s])=>[r,s.getState()])):{}},sj=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const s=hl.get(r.name);if(s)return{type:"tracked",store:e,...s};const a={connection:t.connect(r),stores:{}};return hl.set(r.name,a),{type:"tracked",store:e,...a}},ij=(e,t)=>{if(t===void 0)return;const r=hl.get(e);r&&(delete r.stores[t],Object.keys(r.stores).length===0&&hl.delete(e))},aj=/.+ (.+) .+/,lj=/^([^@]+)@/;function cj(e){var t,r,s;if(!e)return;const a=e.split(`
13
- `),c=a.findIndex(f=>f.includes("api.setState"));if(c<0)return;const u=((t=a[c+1])==null?void 0:t.trim())||"";return((r=aj.exec(u))==null?void 0:r[1])||((s=lj.exec(u))==null?void 0:s[1])}const uj=(e,t={})=>(r,s,a)=>{const{enabled:c,anonymousActionType:u,store:f,...p}=t;let h;try{h=(c??(US?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!h)return e(r,s,a);const{connection:m,...y}=sj(f,h,p);let v=!0;a.setState=((E,x,R)=>{const O=r(E,x);if(!v)return O;const A=R===void 0?{type:u||cj(new Error().stack)||"anonymous"}:typeof R=="string"?{type:R}:R;return f===void 0?(m?.send(A,s()),O):(m?.send({...A,type:`${f}/${A.type}`},{...lu(p.name),[f]:a.getState()}),O)}),a.devtools={cleanup:()=>{m&&typeof m.unsubscribe=="function"&&m.unsubscribe(),ij(p.name,f)}};const b=(...E)=>{const x=v;v=!1,r(...E),v=x},S=e(a.setState,s,a);if(y.type==="untracked"?m?.init(S):(y.stores[y.store]=a,m?.init(Object.fromEntries(Object.entries(y.stores).map(([E,x])=>[E,E===y.store?S:x.getState()])))),BS(a)){let E=!1;const x=a.dispatch;a.dispatch=(...R)=>{(US?"production":void 0)!=="production"&&R[0].type==="__setState"&&!E&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),E=!0),x(...R)}}return m.subscribe(E=>{var x;switch(E.type){case"ACTION":if(typeof E.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return mp(E.payload,R=>{if(R.type==="__setState"){if(f===void 0){b(R.state);return}Object.keys(R.state).length!==1&&console.error(`
14
- [zustand devtools middleware] Unsupported __setState action format.
15
- When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
16
- and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
17
- `);const O=R.state[f];if(O==null)return;JSON.stringify(a.getState())!==JSON.stringify(O)&&b(O);return}BS(a)&&a.dispatch(R)});case"DISPATCH":switch(E.payload.type){case"RESET":return b(S),f===void 0?m?.init(a.getState()):m?.init(lu(p.name));case"COMMIT":if(f===void 0){m?.init(a.getState());return}return m?.init(lu(p.name));case"ROLLBACK":return mp(E.state,R=>{if(f===void 0){b(R),m?.init(a.getState());return}b(R[f]),m?.init(lu(p.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return mp(E.state,R=>{if(f===void 0){b(R);return}JSON.stringify(a.getState())!==JSON.stringify(R[f])&&b(R[f])});case"IMPORT_STATE":{const{nextLiftedState:R}=E.payload,O=(x=R.computedStates.slice(-1)[0])==null?void 0:x.state;if(!O)return;b(f===void 0?O:O[f]),m?.send(null,R);return}case"PAUSE_RECORDING":return v=!v}return}}),S},fj=uj,mp=(e,t)=>{let r;try{r=JSON.parse(e)}catch(s){console.error("[zustand devtools middleware] Could not parse the received json",s)}r!==void 0&&t(r)},Cl="http://localhost:47474";class dj extends Error{constructor(t,r,s){super(t),this.status=r,this.code=s,this.name="ApiError"}status;code}async function Ol(e){if(!e.ok){let t=null;try{t=await e.json()}catch{}throw new dj((t&&typeof t.error=="string"?t.error:e.statusText)??"Unknown error",e.status,typeof t?.code=="string"?t.code:void 0)}return e.json()}async function pl(e,t){const r=new URL(`${Cl}${e}`),s=await fetch(r,{credentials:"include",cache:"no-store"});return Ol(s)}async function yf(e,t){const r=await fetch(`${Cl}${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:t!=null?JSON.stringify(t):void 0});return Ol(r)}async function UU(e,t){const r=await fetch(`${Cl}${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:t!=null?JSON.stringify(t):void 0});return Ol(r)}async function hj(e,t){const r=await fetch(`${Cl}${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:t!=null?JSON.stringify(t):void 0});return Ol(r)}async function pj(e){const t=await fetch(`${Cl}${e}`,{method:"DELETE",credentials:"include"});return Ol(t)}function mj(){return Date.now().toString(36)+Math.random().toString(36).slice(2,8)}const gp="hermium_active_session",UR="hermium_pinned_sessions";function gj(){try{const e=localStorage.getItem(UR);return e?JSON.parse(e):[]}catch{return[]}}function yj(e){localStorage.setItem(UR,JSON.stringify(e))}const vj={sessions:[],activeSessionId:null,streamingSessions:new Set,isLoadingSessions:!1,isLoadingMessages:!1,sessionsLoaded:!1,pinnedSessionIds:gj()};let cu=null;const No=oj()(fj((e,t)=>({...vj,getSession:r=>t().sessions.find(s=>s.id===r),activeSession:()=>{const r=t();return r.sessions.find(s=>s.id===r.activeSessionId)||null},messages:()=>{const r=t();return r.sessions.find(a=>a.id===r.activeSessionId)?.messages||[]},updateSession:(r,s)=>{e(a=>({sessions:a.sessions.map(c=>c.id===r?{...c,...s}:c)}))},loadSessions:async()=>{try{e({isLoadingSessions:!0});const s=((await pl("/api/sessions")).sessions||[]).map(h=>{const m=h.started_at?h.started_at<1e12?h.started_at*1e3:h.started_at:Date.now();return{id:String(h.id),title:h.title||"Untitled",model:h.model||"",source:h.source||"webui",messages:[],createdAt:m,updatedAt:h.ended_at?h.ended_at<1e12?h.ended_at*1e3:h.ended_at:m,messageCount:h.message_count??0,inputTokens:h.input_tokens??0,outputTokens:h.output_tokens??0}}),a=new Map;for(const h of s)a.set(h.id,h);const c=[...a.values()],f=[...t().sessions.filter(h=>!c.some(m=>m.id===h.id)&&(h.messages.length>0||h.id===t().activeSessionId)),...c];if(e({sessions:f,sessionsLoaded:!0,streamingSessions:new Set}),!t().activeSessionId){const h=localStorage.getItem(gp);h&&c.some(m=>m.id===h)&&t().switchSession(h)}}catch(r){console.error("Failed to load sessions:",r)}finally{e({isLoadingSessions:!1})}},switchSession:r=>{t().activeSessionId!==r&&(e({activeSessionId:r}),localStorage.setItem(gp,r))},loadSessionMessages:async r=>{cu=r;try{e({isLoadingMessages:!0});const s=await pl(`/api/sessions/${r}`);if(cu!==r)return;const c=(s.messages||[]).map((f,p)=>({id:String(f.id||`${r}-${p}`),role:f.role,content:typeof f.content=="string"?f.content:"",timestamp:f.timestamp?Number(f.timestamp)*(f.timestamp<1e12?1e3:1):Date.now(),toolCalls:f.tool_calls?f.tool_calls.map(h=>({name:h.function?.name||h.name||"tool",preview:"",status:"done",callId:h.id||void 0,output:void 0})):void 0,reasoning:f.reasoning||f.reasoning_content||void 0})),u=s.title||c.find(f=>f.role==="user")?.content?.slice(0,64)||"Untitled";e(f=>{const p=f.sessions.find(h=>h.id===r);if(p){const h=c.length===0&&p.messages.length>0?p.messages:c;return{sessions:f.sessions.map(m=>m.id===r?{...m,messages:h,title:u,model:m.model||s.model||"",messageCount:s.message_count??m.messageCount??c.length,inputTokens:s.input_tokens??m.inputTokens??0,outputTokens:s.output_tokens??m.outputTokens??0,reasoningTokens:s.reasoning_tokens??m.reasoningTokens??0}:m)}}return{sessions:[...f.sessions,{id:r,title:u,model:s.model||"",source:s.source||"webui",messages:c,createdAt:s.started_at?s.started_at<1e12?s.started_at*1e3:s.started_at:Date.now(),updatedAt:s.ended_at?s.ended_at<1e12?s.ended_at*1e3:s.ended_at:Date.now(),messageCount:s.message_count??c.length,inputTokens:s.input_tokens??0,outputTokens:s.output_tokens??0,reasoningTokens:s.reasoning_tokens??0}]}})}finally{cu===r&&(cu=null),e({isLoadingMessages:!1})}},deleteSession:r=>{e(s=>({sessions:s.sessions.filter(a=>a.id!==r)}))},newChat:async r=>{const s=mj(),a=Date.now(),c={id:s,title:"New Conversation",model:r||"",messages:[],createdAt:a,updatedAt:a};return e(u=>({sessions:[c,...u.sessions],activeSessionId:c.id})),localStorage.setItem(gp,c.id),c.id},addOrUpdateSession:r=>{e(s=>{const a=s.sessions.findIndex(c=>c.id===r.id);if(a>=0){const c=[...s.sessions];return c[a]={...c[a],...r},{sessions:c}}return{sessions:[r,...s.sessions]}})},togglePin:r=>{e(s=>{const c=s.pinnedSessionIds.includes(r)?s.pinnedSessionIds.filter(u=>u!==r):[...s.pinnedSessionIds,r];return yj(c),{pinnedSessionIds:c}})},isSessionStreaming:r=>t().streamingSessions.has(r)}),{name:"chat",enabled:!1}));async function BU(e){const t=await yf("/api/sessions",{model:e?.model});return{id:t.id,session_id:t.id,title:t.title||"New Conversation",workspace:e?.workspace||"",model:t.model||"",source:t.source||"webui",message_count:t.message_count??0,started_at:t.started_at,ended_at:null,created_at:t.started_at,updated_at:t.started_at,input_tokens:t.input_tokens??0,output_tokens:t.output_tokens??0}}async function bj(e,t){return hj(`/api/sessions/${e}`,{title:t})}async function Sj(e){return pj(`/api/sessions/${e}`)}async function HU(){return pl("/api/config/models")}async function FU(e){return yf("/api/config/model",e)}async function $U(e){return yf("/api/approval/respond",e)}async function xj(){return pl("/api/version")}async function wj(){return yf("/api/update")}function Rj(){return Dz({queryKey:["version"],queryFn:xj,staleTime:300*1e3,refetchInterval:300*1e3,refetchIntervalInBackground:!1,retry:2})}function Ej(){return kz({mutationFn:wj})}function _j(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>typeof t=="object"&&t.text?t.text:"").join(" "):""}function Tj(e,t,r){const s=e.role,a=_j(e.content),c=e.reasoning||e.reasoning_content||"",u=[];if(Array.isArray(e.tool_calls))for(const p of e.tool_calls){const m=p.function?.name||p.name;m&&u.push({name:m,preview:"",status:"done"})}let f="assistant";return s==="user"&&(f="user"),s==="tool"&&(f="tool"),{id:`${t}-${r}`,role:f,content:a,timestamp:e.timestamp?Number(e.timestamp)*(e.timestamp<1e12?1e3:1):Date.now(),reasoning:c||void 0,toolName:e.name||void 0,toolCalls:u.length>0?u:void 0}}const BR={all:["session-messages"],detail:e=>[...BR.all,e]};function Cj(e,t){return e.prefetchQuery({queryKey:BR.detail(t),queryFn:async()=>{const r=await pl(`/api/sessions/${t}`),s=[];let a=r.title||"";for(const c of r.messages??[]){const u=Tj(c,t,s.length);s.push(u),!a&&c.role==="user"&&u.content.trim()&&(a=u.content.trim())}return{messages:s,title:a||"Conversation"}},staleTime:3e4,gcTime:3e5})}const Oj=[{id:"dashboard",title:"New Chat",icon:k.jsx(e3,{className:"size-4"}),link:"/"},{id:"memory",title:"Memory",icon:k.jsx(ZP,{className:"size-4"}),link:"/memory"},{id:"skills",title:"Skills",icon:k.jsx(S3,{className:"size-4"}),link:"/skills"},{id:"automations",title:"Automations",icon:k.jsx(w3,{className:"size-4"}),link:"/automations"},{id:"channels",title:"Channels",icon:k.jsx(a3,{className:"size-4"}),link:"/channels"},{id:"usage",title:"Usage",icon:k.jsx(GP,{className:"size-4"}),link:"/usage"}];function HS(e){return e.startsWith("/settings")}function Mj(){const{state:e}=Tl(),t=e==="collapsed",{resolvedTheme:r,setTheme:s}=iP(),a=um(),c=No(z=>z.sessions),u=No(z=>z.loadSessions),f=No(z=>z.activeSessionId),p=No(z=>z.deleteSession),h=No(z=>z.sessionsLoaded),m=No(z=>z.pinnedSessionIds),y=No(z=>z.togglePin),v=_.useCallback(z=>Cj(a,z),[a]),b=Tx(),S=new URLSearchParams(b.search).get("section")||"appearance",[E,x]=_.useState(""),[R,O]=_.useState(!1),[A,M]=_.useState(HS(b.pathname)?"settings":"main"),N=_.useRef(null);_.useEffect(()=>{M(HS(b.pathname)?"settings":"main")},[b.pathname]),_.useEffect(()=>{console.log("[Sidebar] mount effect, sessionsLoaded=",h),h||u()},[h,u]);const[D,j]=_.useState(null),[L,H]=_.useState(""),Y=_.useRef(null),W=async z=>{try{await Sj(z),p(z)}catch{}},$=async z=>{const G=L.trim();if(!G){j(null);return}try{await bj(z,G),No.getState().updateSession(z,{title:G})}catch{}j(null)},K=z=>{navigator.clipboard.writeText(z).catch(()=>{})},q=z=>{j(z.id),H(z.title),setTimeout(()=>Y.current?.focus(),0)},Z=c.filter(z=>z.messages.length>0||(z.messageCount??0)>0||z.id===f),I=E?Z.filter(z=>z.title.toLowerCase().includes(E.toLowerCase())):Z,B=I.filter(z=>m.includes(z.id)),ee=I.filter(z=>!m.includes(z.id)),ne=()=>{O(!0),setTimeout(()=>N.current?.focus(),0)},le=()=>{O(!1),x("")};return k.jsxs(V3,{variant:"inset",collapsible:"icon",children:[k.jsxs(G3,{className:nt("flex px-0.5 md:pt-3.5",t?"flex-row items-center justify-between gap-y-4 md:flex-col md:items-start md:justify-start":"flex-row items-center justify-between"),children:[k.jsx("a",{href:"/",className:"flex items-center px-2",children:k.jsx("img",{src:"/nous-logo.png",alt:"Nous",className:"h-6 w-6 rounded object-cover shrink-0"})}),k.jsx("div",{className:nt("flex items-center gap-2",t?"flex-row md:flex-col-reverse":"flex-row"),children:k.jsx(q3,{})})]}),k.jsx(K3,{children:k.jsx("div",{className:"relative flex flex-col flex-1 min-h-0 gap-1 px-0.5 py-1",children:k.jsx("div",{className:"relative flex-1 min-h-0 overflow-hidden",children:k.jsxs("div",{className:"flex h-full transition-transform duration-150 ease-out",style:{width:"200%",transform:A==="settings"?"translateX(-50%)":"translateX(0)"},children:[k.jsxs("div",{className:"flex flex-col gap-1 h-full justify-between w-1/2",children:[k.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-h-0",children:[k.jsx(g4,{routes:Oj}),!t&&k.jsxs(Q3,{className:"px-0 flex flex-col min-h-0",children:[k.jsx("div",{className:"group/search flex items-center justify-between px-0.5 pb-0.5 shrink-0",children:R?k.jsxs("div",{className:"flex w-full items-center gap-1 min-w-0",children:[k.jsx(jS,{className:"size-3.5 shrink-0 text-muted-foreground"}),k.jsx("input",{ref:N,value:E,onChange:z=>x(z.target.value),onKeyDown:z=>{z.key==="Escape"&&le()},placeholder:"Search...",className:"flex-1 min-w-0 bg-transparent border-none outline-none text-xs text-foreground placeholder:text-muted-foreground/50"}),k.jsx("button",{onClick:le,className:"flex shrink-0 items-center justify-center rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-sidebar-muted transition-colors","aria-label":"Close search",title:"Close search",children:k.jsx(_R,{className:"size-4"})})]}):k.jsxs(k.Fragment,{children:[k.jsx(X3,{className:"!text-[11px] !font-normal text-muted-foreground/60",children:"Chats"}),k.jsx("button",{onClick:ne,className:"flex shrink-0 items-center justify-center rounded p-0.5 text-muted-foreground opacity-0 hover:text-foreground group-hover/search:opacity-100 transition-opacity","aria-label":"Search chats",children:k.jsx(jS,{className:"size-3.5"})})]})}),k.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:k.jsxs(CR,{children:[I.length===0&&E&&k.jsxs("p",{className:"px-2 py-4 text-xs text-muted-foreground",children:['No chats match "',E,'"']}),I.length===0&&!E&&k.jsx("p",{className:"px-2 py-4 text-xs text-muted-foreground",children:"No conversations yet. Start chatting!"}),B.map(z=>k.jsx($S,{session:z,isActive:f===z.id,isEditing:D===z.id,editTitle:L,setEditTitle:H,renameInputRef:Y,onRename:G=>$(G),onCancelRename:()=>j(null),onPrefetch:()=>v(z.id),onStartRename:()=>q(z),onTogglePin:()=>y(z.id),onCopyId:()=>K(z.id),onDelete:()=>W(z.id),isPinned:!0},z.id)),ee.slice(0,20).map(z=>k.jsx($S,{session:z,isActive:f===z.id,isEditing:D===z.id,editTitle:L,setEditTitle:H,renameInputRef:Y,onRename:G=>$(G),onCancelRename:()=>j(null),onPrefetch:()=>v(z.id),onStartRename:()=>q(z),onTogglePin:()=>y(z.id),onCopyId:()=>K(z.id),onDelete:()=>W(z.id)},z.id))]})})]})]}),k.jsxs("div",{className:"shrink-0 space-y-1",children:[k.jsx(Aj,{isCollapsed:t}),k.jsxs("div",{className:nt("flex items-center",t?"flex-col gap-1":"flex-row gap-1"),children:[k.jsxs(qo,{to:"/settings",className:nt("flex items-center gap-1.5 rounded-md text-xs font-medium text-muted-foreground hover:bg-sidebar-muted hover:text-foreground transition-colors",t?"justify-center p-1.5 w-full":"flex-1 px-2 py-1"),"aria-label":"Settings",title:t?"Settings":void 0,children:[k.jsx(_3,{className:"size-3.5 shrink-0"}),!t&&k.jsx("span",{children:"Settings"})]}),k.jsxs("button",{onClick:()=>s(r==="dark"?"light":"dark"),className:nt("flex items-center justify-center rounded-md text-muted-foreground hover:bg-sidebar-muted hover:text-foreground transition-colors",t?"p-1.5 w-full":"p-1.5"),"aria-label":"Toggle theme",title:t?r==="dark"?"Light mode":"Dark mode":void 0,children:[k.jsx(C3,{className:"size-3.5 dark:hidden"}),k.jsx(f3,{className:"size-3.5 hidden dark:block"})]})]})]})]}),k.jsxs("div",{className:"flex flex-col h-full justify-between w-1/2",children:[k.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[k.jsx("div",{className:"px-1 pb-1.5 shrink-0",children:k.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground/60",children:"Settings"})}),k.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 space-y-0.5 px-0.5",children:[k.jsx(FS,{icon:k.jsx(h3,{className:"size-4"}),title:"Appearance",section:"appearance",activeSection:S}),k.jsx(FS,{icon:k.jsx(qP,{className:"size-4"}),title:"About",section:"about",activeSection:S})]})]}),k.jsx("div",{className:"shrink-0 px-0.5 pb-1",children:k.jsxs(qo,{to:"/",className:"flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-sidebar-muted hover:text-foreground transition-colors",children:[k.jsx(FP,{className:"size-4 shrink-0"}),k.jsx("span",{children:"Back to app"})]})})]})]})})})})]})}function FS({icon:e,title:t,section:r,activeSection:s}){const a=s===r;return k.jsxs(qo,{to:"/settings",search:{section:r},className:nt("flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors",a?"bg-sidebar-muted text-foreground font-medium":"text-muted-foreground hover:bg-sidebar-muted hover:text-foreground"),children:[k.jsx("span",{className:"flex shrink-0 items-center justify-center",children:e}),k.jsx("span",{className:"truncate",children:t})]})}function $S({session:e,isActive:t,isEditing:r,editTitle:s,setEditTitle:a,renameInputRef:c,onRename:u,onCancelRename:f,onPrefetch:p,onStartRename:h,onTogglePin:m,onCopyId:y,onDelete:v,isPinned:b=!1}){return k.jsx(Vp,{className:"group/chat",children:k.jsx("div",{className:"relative",children:r?k.jsx("input",{ref:c,value:s,onChange:S=>a(S.target.value),onKeyDown:S=>{S.key==="Enter"&&u(e.id),S.key==="Escape"&&f()},onBlur:()=>f(),className:"w-full px-2 py-1 text-xs font-medium bg-transparent border-b border-sidebar-ring text-foreground outline-none"}):k.jsxs(k.Fragment,{children:[k.jsxs(qp,{isActive:t,className:"px-2 py-1 pr-8 text-xs font-medium text-muted-foreground hover:text-foreground data-[active=true]:bg-sidebar-muted data-[active=true]:text-foreground",onDoubleClick:h,render:k.jsx(qo,{to:`/chat/${e.id}`,className:"flex items-center gap-1.5",onPointerEnter:p}),children:[b&&k.jsx(PS,{className:"size-3 shrink-0 text-amber-500"}),k.jsx("span",{className:"truncate",children:e.title})]}),k.jsxs(X4,{children:[k.jsx(J4,{render:k.jsx("button",{className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md p-1 text-muted-foreground opacity-0 hover:bg-sidebar-muted hover:text-foreground group-hover/chat:opacity-100 transition-opacity"}),children:k.jsx(r3,{className:"size-4"})}),k.jsxs(W4,{align:"end",side:"right",sideOffset:4,children:[k.jsxs(au,{className:"gap-2",onClick:h,children:[k.jsx(m3,{className:"size-3.5"}),"Rename"]}),k.jsx(au,{className:"gap-2",onClick:m,children:b?k.jsxs(k.Fragment,{children:[k.jsx(v3,{className:"size-3.5"}),"Unpin"]}):k.jsxs(k.Fragment,{children:[k.jsx(PS,{className:"size-3.5"}),"Pin"]})}),k.jsxs(au,{className:"gap-2",onClick:y,children:[k.jsx(ER,{className:"size-3.5"}),"Copy ID"]}),k.jsxs(au,{className:"gap-2 text-destructive",onClick:v,children:[k.jsx(M3,{className:"size-3.5"}),"Delete"]})]})]})]})})})}function Aj({isCollapsed:e}){const{data:t,isLoading:r}=Rj(),s=Ej(),[a,c]=_.useState(!1);return r||!t?.outdated?null:k.jsxs("div",{className:"relative",children:[k.jsxs("button",{onClick:()=>c(u=>!u),className:nt("flex items-center gap-1.5 rounded-md text-xs font-medium transition-colors w-full",e?"justify-center p-1.5 bg-amber-500/10 text-amber-600 hover:bg-amber-500/20 dark:text-amber-400":"px-2 py-1.5 bg-amber-500/10 text-amber-600 hover:bg-amber-500/20 dark:text-amber-400"),title:"Update available",children:[k.jsx(s3,{className:"size-3.5 shrink-0"}),!e&&k.jsxs("span",{className:"truncate",children:["Update v",t.latest]})]}),a&&!e&&k.jsx("div",{className:"absolute bottom-full left-0 right-0 mb-1.5 rounded-lg border border-border bg-popover p-3 shadow-lg z-50",children:k.jsxs("div",{className:"space-y-2",children:[k.jsxs("div",{className:"text-xs font-medium text-foreground",children:["Hermium v",t.latest," is available"]}),k.jsxs("div",{className:"text-[11px] text-muted-foreground",children:["You are running v",t.current,"."]}),s.isSuccess&&s.data.success?k.jsx("div",{className:"rounded-md bg-green-500/10 px-2 py-1.5 text-[11px] text-green-600 dark:text-green-400",children:s.data.message}):s.isSuccess&&!s.data.success?k.jsxs("div",{className:"space-y-1.5",children:[k.jsx("div",{className:"rounded-md bg-red-500/10 px-2 py-1.5 text-[11px] text-red-600 dark:text-red-400",children:s.data.message}),s.data.command&&k.jsxs("div",{className:"flex items-center gap-1.5 rounded-md border border-border bg-muted px-2 py-1.5",children:[k.jsx("code",{className:"flex-1 text-[11px] font-mono text-foreground truncate",children:s.data.command}),k.jsx("button",{onClick:()=>navigator.clipboard.writeText(s.data.command),className:"shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground hover:bg-muted-foreground/10 transition-colors",title:"Copy command",children:k.jsx(ER,{className:"size-3.5"})})]})]}):k.jsxs("div",{className:"flex gap-1.5",children:[k.jsx("button",{onClick:()=>s.mutate(),disabled:s.isPending,className:"flex-1 rounded-md bg-primary px-2 py-1 text-[11px] font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",children:s.isPending?"Updating...":"Update now"}),k.jsx("button",{onClick:()=>{t.updateCommand&&navigator.clipboard.writeText(t.updateCommand)},className:"rounded-md border border-border px-2 py-1 text-[11px] font-medium text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Copy cmd"})]}),k.jsx("button",{onClick:()=>c(!1),className:"w-full rounded-md border border-border px-2 py-1 text-[11px] font-medium text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:"Dismiss"})]})})]})}function zj({children:e}){return k.jsx(Z3,{style:{"--sidebar-width-icon":"2.5rem"},children:k.jsxs("div",{className:"relative flex h-dvh w-full",children:[k.jsx(Mj,{}),k.jsx(Y3,{className:"flex flex-col min-w-0",children:e})]})})}const Dj="/assets/styles-KcflDlA_.css",kj=`
18
- (function() {
19
- try {
20
- var theme = localStorage.getItem('hermium-theme') || 'system';
21
- var resolved = theme === 'system'
22
- ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
23
- : theme;
24
- if (resolved === 'dark') {
25
- document.documentElement.classList.add('dark');
26
- } else {
27
- document.documentElement.classList.remove('dark');
28
- }
29
- } catch (e) {}
30
- })();
31
- `,Mr=RA({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Hermium"}],links:[{rel:"stylesheet",href:Dj},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"},{rel:"icon",type:"image/png",href:"/favicon.png"}],scripts:[{type:"text/javascript",children:kj}]}),notFoundComponent:()=>k.jsxs("main",{className:"container mx-auto p-4 pt-16",children:[k.jsx("h1",{children:"404"}),k.jsx("p",{children:"The requested page could not be found."})]}),shellComponent:Nj});function Nj({children:e}){return k.jsxs("html",{lang:"en",suppressHydrationWarning:!0,children:[k.jsx("head",{children:k.jsx($A,{})}),k.jsxs("body",{children:[k.jsx(Sz,{client:Nz,children:k.jsx(sP,{children:k.jsx(WN,{children:k.jsx(zj,{children:e})})})}),!1,k.jsx(ZA,{})]})]})}const Pj=()=>lo(()=>import("./index-U6RcWedt.js"),__vite__mapDeps([0,1,2])),jj=io("/")({component:ao(Pj,"component")}),Lj=()=>lo(()=>import("./index-CtacpN3I.js"),__vite__mapDeps([3,4])),Ij=io("/usage/")({component:ao(Lj,"component")}),Uj=()=>lo(()=>import("./index-DY7aE-9s.js"),__vite__mapDeps([5,6,2,7,4,8])),Bj=io("/skills/")({component:ao(Uj,"component")});var ZS;function fe(e,t,r){function s(f,p){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:p,constr:u,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,p);const h=u.prototype,m=Object.keys(h);for(let y=0;y<m.length;y++){const v=m[y];v in f||(f[v]=h[v].bind(f))}}const a=r?.Parent??Object;class c extends a{}Object.defineProperty(c,"name",{value:e});function u(f){var p;const h=r?.Parent?new c:this;s(h,f),(p=h._zod).deferred??(p.deferred=[]);for(const m of h._zod.deferred)m();return h}return Object.defineProperty(u,"init",{value:s}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class Bi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class HR extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(ZS=globalThis).__zod_globalConfig??(ZS.__zod_globalConfig={});const qm=globalThis.__zod_globalConfig;function Ns(e){return qm}function FR(e){const t=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,a])=>t.indexOf(+s)===-1).map(([s,a])=>a)}function Yp(e,t){return typeof t=="bigint"?t.toString():t}function Ym(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Gm(e){return e==null}function Km(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const VS=Symbol("evaluating");function mt(e,t,r){let s;Object.defineProperty(e,t,{get(){if(s!==VS)return s===void 0&&(s=VS,s=r()),s},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Hs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Wo(...e){const t={};for(const r of e){const s=Object.getOwnPropertyDescriptors(r);Object.assign(t,s)}return Object.defineProperties({},t)}function qS(e){return JSON.stringify(e)}function Hj(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $R="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Fj=Ym(()=>{if(qm.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ml(e){if(Vu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Vu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ZR(e){return ml(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const $j=new Set(["string","number","symbol"]);function vf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function es(e,t,r){const s=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(s._zod.parent=e),s}function Ie(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(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 Zj(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Vj(e,t){const r=e._zod.def,s=r.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=Wo(e._zod.def,{get shape(){const u={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(u[f]=r.shape[f])}return Hs(this,"shape",u),u},checks:[]});return es(e,c)}function qj(e,t){const r=e._zod.def,s=r.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=Wo(e._zod.def,{get shape(){const u={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete u[f]}return Hs(this,"shape",u),u},checks:[]});return es(e,c)}function Yj(e,t){if(!ml(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const c=e._zod.def.shape;for(const u in t)if(Object.getOwnPropertyDescriptor(c,u)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Wo(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return Hs(this,"shape",c),c}});return es(e,a)}function Gj(e,t){if(!ml(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Wo(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Hs(this,"shape",s),s}});return es(e,r)}function Kj(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=Wo(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t._zod.def.shape};return Hs(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return es(e,r)}function Qj(e,t,r){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const u=Wo(t._zod.def,{get shape(){const f=t._zod.def.shape,p={...f};if(r)for(const h in r){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);r[h]&&(p[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)p[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return Hs(this,"shape",p),p},checks:[]});return es(t,u)}function Xj(e,t,r){const s=Wo(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(r)for(const u in r){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=new e({type:"nonoptional",innerType:a[u]}))}else for(const u in a)c[u]=new e({type:"nonoptional",innerType:a[u]});return Hs(this,"shape",c),c}});return es(t,s)}function Di(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Jj(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function VR(e,t){return t.map(r=>{var s;return(s=r).path??(s.path=[]),r.path.unshift(e),r})}function uu(e){return typeof e=="string"?e:e?.message}function Ps(e,t,r){const s=e.message?e.message:uu(e.inst?._zod.def?.error?.(e))??uu(t?.error?.(e))??uu(r.customError?.(e))??uu(r.localeError?.(e))??"Invalid input",{inst:a,continue:c,input:u,...f}=e;return f.path??(f.path=[]),f.message=s,t?.reportInput&&(f.input=u),f}function Qm(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gl(...e){const[t,r,s]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:s}:{...t}}const qR=(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,Yp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},YR=fe("$ZodError",qR),GR=fe("$ZodError",qR,{Parent:Error});function Wj(e,t=r=>r.message){const r={},s=[];for(const a of e.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):s.push(t(a));return{formErrors:s,fieldErrors:r}}function e5(e,t=r=>r.message){const r={_errors:[]},s=(a,c=[])=>{for(const u of a.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(f=>s({issues:f},[...c,...u.path]));else if(u.code==="invalid_key")s({issues:u.issues},[...c,...u.path]);else if(u.code==="invalid_element")s({issues:u.issues},[...c,...u.path]);else{const f=[...c,...u.path];if(f.length===0)r._errors.push(t(u));else{let p=r,h=0;for(;h<f.length;){const m=f[h];h===f.length-1?(p[m]=p[m]||{_errors:[]},p[m]._errors.push(t(u))):p[m]=p[m]||{_errors:[]},p=p[m],h++}}}};return s(e),r}const Xm=e=>(t,r,s,a)=>{const c=s?{...s,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},c);if(u instanceof Promise)throw new Bi;if(u.issues.length){const f=new(a?.Err??e)(u.issues.map(p=>Ps(p,c,Ns())));throw $R(f,a?.callee),f}return u.value},Jm=e=>async(t,r,s,a)=>{const c=s?{...s,async:!0}:{async:!0};let u=t._zod.run({value:r,issues:[]},c);if(u instanceof Promise&&(u=await u),u.issues.length){const f=new(a?.Err??e)(u.issues.map(p=>Ps(p,c,Ns())));throw $R(f,a?.callee),f}return u.value},bf=e=>(t,r,s)=>{const a=s?{...s,async:!1}:{async:!1},c=t._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new Bi;return c.issues.length?{success:!1,error:new(e??YR)(c.issues.map(u=>Ps(u,a,Ns())))}:{success:!0,data:c.value}},t5=bf(GR),Sf=e=>async(t,r,s)=>{const a=s?{...s,async:!0}:{async:!0};let c=t._zod.run({value:r,issues:[]},a);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(u=>Ps(u,a,Ns())))}:{success:!0,data:c.value}},n5=Sf(GR),r5=e=>(t,r,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return Xm(e)(t,r,a)},o5=e=>(t,r,s)=>Xm(e)(t,r,s),s5=e=>async(t,r,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return Jm(e)(t,r,a)},i5=e=>async(t,r,s)=>Jm(e)(t,r,s),a5=e=>(t,r,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return bf(e)(t,r,a)},l5=e=>(t,r,s)=>bf(e)(t,r,s),c5=e=>async(t,r,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return Sf(e)(t,r,a)},u5=e=>async(t,r,s)=>Sf(e)(t,r,s),f5=/^[cC][0-9a-z]{6,}$/,d5=/^[0-9a-z]+$/,h5=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,p5=/^[0-9a-vA-V]{20}$/,m5=/^[A-Za-z0-9]{27}$/,g5=/^[a-zA-Z0-9_-]{21}$/,y5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,v5=/^([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})$/,YS=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)$/,b5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,S5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function x5(){return new RegExp(S5,"u")}const w5=/^(?:(?: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])$/,R5=/^(([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}|:))$/,E5=/^((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])$/,_5=/^(([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])$/,T5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,KR=/^[A-Za-z0-9_-]*$/,C5=/^https?$/,O5=/^\+[1-9]\d{6,14}$/,QR="(?:(?:\\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])))",M5=new RegExp(`^${QR}$`);function XR(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 A5(e){return new RegExp(`^${XR(e)}$`)}function z5(e){const t=XR({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${r.join("|")})`;return new RegExp(`^${QR}T(?:${s})$`)}const D5=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},k5=/^[^A-Z]*$/,N5=/^[^a-z]*$/,Ar=fe("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),P5=fe("$ZodCheckMaxLength",(e,t)=>{var r;Ar.init(e,t),(r=e._zod.def).when??(r.when=s=>{const a=s.value;return!Gm(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const a=s.value;if(a.length<=t.maximum)return;const u=Qm(a);s.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),j5=fe("$ZodCheckMinLength",(e,t)=>{var r;Ar.init(e,t),(r=e._zod.def).when??(r.when=s=>{const a=s.value;return!Gm(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const a=s.value;if(a.length>=t.minimum)return;const u=Qm(a);s.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),L5=fe("$ZodCheckLengthEquals",(e,t)=>{var r;Ar.init(e,t),(r=e._zod.def).when??(r.when=s=>{const a=s.value;return!Gm(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=s=>{const a=s.value,c=a.length;if(c===t.length)return;const u=Qm(a),f=c>t.length;s.issues.push({origin:u,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),xf=fe("$ZodCheckStringFormat",(e,t)=>{var r,s;Ar.init(e,t),e._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.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})}):(s=e._zod).check??(s.check=()=>{})}),I5=fe("$ZodCheckRegex",(e,t)=>{xf.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),U5=fe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=k5),xf.init(e,t)}),B5=fe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=N5),xf.init(e,t)}),H5=fe("$ZodCheckIncludes",(e,t)=>{Ar.init(e,t);const r=vf(t.includes),s=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=s,e._zod.onattach.push(a=>{const c=a._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(s)}),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})}}),F5=fe("$ZodCheckStartsWith",(e,t)=>{Ar.init(e,t);const r=new RegExp(`^${vf(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.startsWith(t.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),$5=fe("$ZodCheckEndsWith",(e,t)=>{Ar.init(e,t);const r=new RegExp(`.*${vf(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.endsWith(t.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}}),Z5=fe("$ZodCheckOverwrite",(e,t)=>{Ar.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class V5{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 s=t.split(`
32
- `).filter(u=>u),a=Math.min(...s.map(u=>u.length-u.trimStart().length)),c=s.map(u=>u.slice(a)).map(u=>" ".repeat(this.indent*2)+u);for(const u of c)this.content.push(u)}compile(){const t=Function,r=this?.args,a=[...(this?.content??[""]).map(c=>` ${c}`)];return new t(...r,a.join(`
33
- `))}}const q5={major:4,minor:4,patch:3},Qt=fe("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=q5;const s=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&s.unshift(e);for(const a of s)for(const c of a._zod.onattach)c(e);if(s.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(u,f,p)=>{let h=Di(u),m;for(const y of f){if(y._zod.def.when){if(Jj(u)||!y._zod.def.when(u))continue}else if(h)continue;const v=u.issues.length,b=y._zod.check(u);if(b instanceof Promise&&p?.async===!1)throw new Bi;if(m||b instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await b,u.issues.length!==v&&(h||(h=Di(u,v)))});else{if(u.issues.length===v)continue;h||(h=Di(u,v))}}return m?m.then(()=>u):u},c=(u,f,p)=>{if(Di(u))return u.aborted=!0,u;const h=a(f,s,p);if(h instanceof Promise){if(p.async===!1)throw new Bi;return h.then(m=>e._zod.parse(m,p))}return e._zod.parse(h,p)};e._zod.run=(u,f)=>{if(f.skipChecks)return e._zod.parse(u,f);if(f.direction==="backward"){const h=e._zod.parse({value:u.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(m=>c(m,u,f)):c(h,u,f)}const p=e._zod.parse(u,f);if(p instanceof Promise){if(f.async===!1)throw new Bi;return p.then(h=>a(h,s,f))}return a(p,s,f)}}mt(e,"~standard",()=>({validate:a=>{try{const c=t5(e,a);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return n5(e,a).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),Wm=fe("$ZodString",(e,t)=>{Qt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??D5(e._zod.bag),e._zod.parse=(r,s)=>{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}}),_t=fe("$ZodStringFormat",(e,t)=>{xf.init(e,t),Wm.init(e,t)}),Y5=fe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=v5),_t.init(e,t)}),G5=fe("$ZodUUID",(e,t)=>{if(t.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(s===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=YS(s))}else t.pattern??(t.pattern=YS());_t.init(e,t)}),K5=fe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=b5),_t.init(e,t)}),Q5=fe("$ZodURL",(e,t)=>{_t.init(e,t),e._zod.check=r=>{try{const s=r.value.trim();if(!t.normalize&&t.protocol?.source===C5.source&&!/^https?:\/\//i.test(s)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const a=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=a.href:r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),X5=fe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=x5()),_t.init(e,t)}),J5=fe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=g5),_t.init(e,t)}),W5=fe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=f5),_t.init(e,t)}),e6=fe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=d5),_t.init(e,t)}),t6=fe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=h5),_t.init(e,t)}),n6=fe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=p5),_t.init(e,t)}),r6=fe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=m5),_t.init(e,t)}),o6=fe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=z5(t)),_t.init(e,t)}),s6=fe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=M5),_t.init(e,t)}),i6=fe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=A5(t)),_t.init(e,t)}),a6=fe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=y5),_t.init(e,t)}),l6=fe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=w5),_t.init(e,t),e._zod.bag.format="ipv4"}),c6=fe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=R5),_t.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),u6=fe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=E5),_t.init(e,t)}),f6=fe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=_5),_t.init(e,t),e._zod.check=r=>{const s=r.value.split("/");try{if(s.length!==2)throw new Error;const[a,c]=s;if(!c)throw new Error;const u=Number(c);if(`${u}`!==c)throw new Error;if(u<0||u>128)throw new Error;new URL(`http://[${a}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function JR(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const d6=fe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=T5),_t.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{JR(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function h6(e){if(!KR.test(e))return!1;const t=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return JR(r)}const p6=fe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=KR),_t.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{h6(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),m6=fe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=O5),_t.init(e,t)});function g6(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[s]=r;if(!s)return!1;const a=JSON.parse(atob(s));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const y6=fe("$ZodJWT",(e,t)=>{_t.init(e,t),e._zod.check=r=>{g6(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),v6=fe("$ZodUnknown",(e,t)=>{Qt.init(e,t),e._zod.parse=r=>r}),b6=fe("$ZodNever",(e,t)=>{Qt.init(e,t),e._zod.parse=(r,s)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function GS(e,t,r){e.issues.length&&t.issues.push(...VR(r,e.issues)),t.value[r]=e.value}const S6=fe("$ZodArray",(e,t)=>{Qt.init(e,t),e._zod.parse=(r,s)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=Array(a.length);const c=[];for(let u=0;u<a.length;u++){const f=a[u],p=t.element._zod.run({value:f,issues:[]},s);p instanceof Promise?c.push(p.then(h=>GS(h,r,u))):GS(p,r,u)}return c.length?Promise.all(c).then(()=>r):r}});function qu(e,t,r,s,a,c){const u=r in s;if(e.issues.length){if(a&&c&&!u)return;t.issues.push(...VR(r,e.issues))}if(!u&&!a){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?u&&(t.value[r]=void 0):t.value[r]=e.value}function WR(e){const t=Object.keys(e.shape);for(const s of t)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);const r=Zj(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function eE(e,t,r,s,a,c){const u=[],f=a.keySet,p=a.catchall._zod,h=p.def.type,m=p.optin==="optional",y=p.optout==="optional";for(const v in t){if(v==="__proto__"||f.has(v))continue;if(h==="never"){u.push(v);continue}const b=p.run({value:t[v],issues:[]},s);b instanceof Promise?e.push(b.then(S=>qu(S,r,v,t,m,y))):qu(b,r,v,t,m,y)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:c}),e.length?Promise.all(e).then(()=>r):r}const x6=fe("$ZodObject",(e,t)=>{if(Qt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const p={...f};return Object.defineProperty(t,"shape",{value:p}),p}})}const s=Ym(()=>WR(t));mt(e._zod,"propValues",()=>{const f=t.shape,p={};for(const h in f){const m=f[h]._zod;if(m.values){p[h]??(p[h]=new Set);for(const y of m.values)p[h].add(y)}}return p});const a=Vu,c=t.catchall;let u;e._zod.parse=(f,p)=>{u??(u=s.value);const h=f.value;if(!a(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const m=[],y=u.shape;for(const v of u.keys){const b=y[v],S=b._zod.optin==="optional",E=b._zod.optout==="optional",x=b._zod.run({value:h[v],issues:[]},p);x instanceof Promise?m.push(x.then(R=>qu(R,f,v,h,S,E))):qu(x,f,v,h,S,E)}return c?eE(m,h,f,p,s.value,e):m.length?Promise.all(m).then(()=>f):f}}),w6=fe("$ZodObjectJIT",(e,t)=>{x6.init(e,t);const r=e._zod.parse,s=Ym(()=>WR(t)),a=v=>{const b=new V5(["shape","payload","ctx"]),S=s.value,E=A=>{const M=qS(A);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};b.write("const input = payload.value;");const x=Object.create(null);let R=0;for(const A of S.keys)x[A]=`key_${R++}`;b.write("const newResult = {};");for(const A of S.keys){const M=x[A],N=qS(A),D=v[A],j=D?._zod?.optin==="optional",L=D?._zod?.optout==="optional";b.write(`const ${M} = ${E(A)};`),j&&L?b.write(`
34
- if (${M}.issues.length) {
35
- if (${N} in input) {
36
- payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
37
- ...iss,
38
- path: iss.path ? [${N}, ...iss.path] : [${N}]
39
- })));
40
- }
41
- }
42
-
43
- if (${M}.value === undefined) {
44
- if (${N} in input) {
45
- newResult[${N}] = undefined;
46
- }
47
- } else {
48
- newResult[${N}] = ${M}.value;
49
- }
50
-
51
- `):j?b.write(`
52
- if (${M}.issues.length) {
53
- payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
54
- ...iss,
55
- path: iss.path ? [${N}, ...iss.path] : [${N}]
56
- })));
57
- }
58
-
59
- if (${M}.value === undefined) {
60
- if (${N} in input) {
61
- newResult[${N}] = undefined;
62
- }
63
- } else {
64
- newResult[${N}] = ${M}.value;
65
- }
66
-
67
- `):b.write(`
68
- const ${M}_present = ${N} in input;
69
- if (${M}.issues.length) {
70
- payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
71
- ...iss,
72
- path: iss.path ? [${N}, ...iss.path] : [${N}]
73
- })));
74
- }
75
- if (!${M}_present && !${M}.issues.length) {
76
- payload.issues.push({
77
- code: "invalid_type",
78
- expected: "nonoptional",
79
- input: undefined,
80
- path: [${N}]
81
- });
82
- }
83
-
84
- if (${M}_present) {
85
- if (${M}.value === undefined) {
86
- newResult[${N}] = undefined;
87
- } else {
88
- newResult[${N}] = ${M}.value;
89
- }
90
- }
91
-
92
- `)}b.write("payload.value = newResult;"),b.write("return payload;");const O=b.compile();return(A,M)=>O(v,A,M)};let c;const u=Vu,f=!qm.jitless,h=f&&Fj.value,m=t.catchall;let y;e._zod.parse=(v,b)=>{y??(y=s.value);const S=v.value;return u(S)?f&&h&&b?.async===!1&&b.jitless!==!0?(c||(c=a(t.shape)),v=c(v,b),m?eE([],S,v,b,y,e):v):r(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),v)}});function KS(e,t,r,s){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const a=e.filter(c=>!Di(c));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(c=>c.issues.map(u=>Ps(u,s,Ns())))}),t)}const R6=fe("$ZodUnion",(e,t)=>{Qt.init(e,t),mt(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),mt(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),mt(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),mt(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${s.map(a=>Km(a.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(s,a)=>{if(r)return r(s,a);let c=!1;const u=[];for(const f of t.options){const p=f._zod.run({value:s.value,issues:[]},a);if(p instanceof Promise)u.push(p),c=!0;else{if(p.issues.length===0)return p;u.push(p)}}return c?Promise.all(u).then(f=>KS(f,s,e,a)):KS(u,s,e,a)}}),E6=fe("$ZodIntersection",(e,t)=>{Qt.init(e,t),e._zod.parse=(r,s)=>{const a=r.value,c=t.left._zod.run({value:a,issues:[]},s),u=t.right._zod.run({value:a,issues:[]},s);return c instanceof Promise||u instanceof Promise?Promise.all([c,u]).then(([p,h])=>QS(r,p,h)):QS(r,c,u)}});function Gp(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(ml(e)&&ml(t)){const r=Object.keys(t),s=Object.keys(e).filter(c=>r.indexOf(c)!==-1),a={...e,...t};for(const c of s){const u=Gp(e[c],t[c]);if(!u.valid)return{valid:!1,mergeErrorPath:[c,...u.mergeErrorPath]};a[c]=u.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let s=0;s<e.length;s++){const a=e[s],c=t[s],u=Gp(a,c);if(!u.valid)return{valid:!1,mergeErrorPath:[s,...u.mergeErrorPath]};r.push(u.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function QS(e,t,r){const s=new Map;let a;for(const f of t.issues)if(f.code==="unrecognized_keys"){a??(a=f);for(const p of f.keys)s.has(p)||s.set(p,{}),s.get(p).l=!0}else e.issues.push(f);for(const f of r.issues)if(f.code==="unrecognized_keys")for(const p of f.keys)s.has(p)||s.set(p,{}),s.get(p).r=!0;else e.issues.push(f);const c=[...s].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(c.length&&a&&e.issues.push({...a,keys:c}),Di(e))return e;const u=Gp(t.value,r.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const _6=fe("$ZodEnum",(e,t)=>{Qt.init(e,t);const r=FR(t.entries),s=new Set(r);e._zod.values=s,e._zod.pattern=new RegExp(`^(${r.filter(a=>$j.has(typeof a)).map(a=>typeof a=="string"?vf(a):a.toString()).join("|")})$`),e._zod.parse=(a,c)=>{const u=a.value;return s.has(u)||a.issues.push({code:"invalid_value",values:r,input:u,inst:e}),a}}),T6=fe("$ZodTransform",(e,t)=>{Qt.init(e,t),e._zod.optin="optional",e._zod.parse=(r,s)=>{if(s.direction==="backward")throw new HR(e.constructor.name);const a=t.transform(r.value,r);if(s.async)return(a instanceof Promise?a:Promise.resolve(a)).then(u=>(r.value=u,r.fallback=!0,r));if(a instanceof Promise)throw new Bi;return r.value=a,r.fallback=!0,r}});function XS(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const tE=fe("$ZodOptional",(e,t)=>{Qt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",mt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),mt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Km(r.source)})?$`):void 0}),e._zod.parse=(r,s)=>{if(t.innerType._zod.optin==="optional"){const a=r.value,c=t.innerType._zod.run(r,s);return c instanceof Promise?c.then(u=>XS(u,a)):XS(c,a)}return r.value===void 0?r:t.innerType._zod.run(r,s)}}),C6=fe("$ZodExactOptional",(e,t)=>{tE.init(e,t),mt(e._zod,"values",()=>t.innerType._zod.values),mt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,s)=>t.innerType._zod.run(r,s)}),O6=fe("$ZodNullable",(e,t)=>{Qt.init(e,t),mt(e._zod,"optin",()=>t.innerType._zod.optin),mt(e._zod,"optout",()=>t.innerType._zod.optout),mt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Km(r.source)}|null)$`):void 0}),mt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,s)=>r.value===null?r:t.innerType._zod.run(r,s)}),M6=fe("$ZodDefault",(e,t)=>{Qt.init(e,t),e._zod.optin="optional",mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);if(r.value===void 0)return r.value=t.defaultValue,r;const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(c=>JS(c,t)):JS(a,t)}});function JS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const A6=fe("$ZodPrefault",(e,t)=>{Qt.init(e,t),e._zod.optin="optional",mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>(s.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,s))}),z6=fe("$ZodNonOptional",(e,t)=>{Qt.init(e,t),mt(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(s=>s!==void 0)):void 0}),e._zod.parse=(r,s)=>{const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(c=>WS(c,e)):WS(a,e)}});function WS(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 D6=fe("$ZodCatch",(e,t)=>{Qt.init(e,t),e._zod.optin="optional",mt(e._zod,"optout",()=>t.innerType._zod.optout),mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(c=>(r.value=c.value,c.issues.length&&(r.value=t.catchValue({...r,error:{issues:c.issues.map(u=>Ps(u,s,Ns()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(c=>Ps(c,s,Ns()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),k6=fe("$ZodPipe",(e,t)=>{Qt.init(e,t),mt(e._zod,"values",()=>t.in._zod.values),mt(e._zod,"optin",()=>t.in._zod.optin),mt(e._zod,"optout",()=>t.out._zod.optout),mt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,s)=>{if(s.direction==="backward"){const c=t.out._zod.run(r,s);return c instanceof Promise?c.then(u=>fu(u,t.in,s)):fu(c,t.in,s)}const a=t.in._zod.run(r,s);return a instanceof Promise?a.then(c=>fu(c,t.out,s)):fu(a,t.out,s)}});function fu(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const N6=fe("$ZodReadonly",(e,t)=>{Qt.init(e,t),mt(e._zod,"propValues",()=>t.innerType._zod.propValues),mt(e._zod,"values",()=>t.innerType._zod.values),mt(e._zod,"optin",()=>t.innerType?._zod?.optin),mt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(e1):e1(a)}});function e1(e){return e.value=Object.freeze(e.value),e}const P6=fe("$ZodCustom",(e,t)=>{Ar.init(e,t),Qt.init(e,t),e._zod.parse=(r,s)=>r,e._zod.check=r=>{const s=r.value,a=t.fn(s);if(a instanceof Promise)return a.then(c=>t1(c,r,s,e));t1(a,r,s,e)}});function t1(e,t,r,s){if(!e){const a={code:"custom",input:r,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(a.params=s._zod.def.params),t.issues.push(gl(a))}}var n1;class j6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const s=r[0];return this._map.set(t,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const s={...this.get(r)??{}};delete s.id;const a={...s,...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 L6(){return new j6}(n1=globalThis).__zod_globalRegistry??(n1.__zod_globalRegistry=L6());const nl=globalThis.__zod_globalRegistry;function I6(e,t){return new e({type:"string",...Ie(t)})}function U6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ie(t)})}function r1(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ie(t)})}function B6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ie(t)})}function H6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ie(t)})}function F6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ie(t)})}function $6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ie(t)})}function Z6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ie(t)})}function V6(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ie(t)})}function q6(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ie(t)})}function Y6(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ie(t)})}function G6(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ie(t)})}function K6(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ie(t)})}function Q6(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ie(t)})}function X6(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ie(t)})}function J6(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ie(t)})}function W6(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ie(t)})}function eL(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ie(t)})}function tL(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ie(t)})}function nL(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ie(t)})}function rL(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ie(t)})}function oL(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ie(t)})}function sL(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ie(t)})}function iL(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ie(t)})}function aL(e,t){return new e({type:"string",format:"date",check:"string_format",...Ie(t)})}function lL(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ie(t)})}function cL(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ie(t)})}function uL(e){return new e({type:"unknown"})}function fL(e,t){return new e({type:"never",...Ie(t)})}function nE(e,t){return new P5({check:"max_length",...Ie(t),maximum:e})}function Yu(e,t){return new j5({check:"min_length",...Ie(t),minimum:e})}function rE(e,t){return new L5({check:"length_equals",...Ie(t),length:e})}function dL(e,t){return new I5({check:"string_format",format:"regex",...Ie(t),pattern:e})}function hL(e){return new U5({check:"string_format",format:"lowercase",...Ie(e)})}function pL(e){return new B5({check:"string_format",format:"uppercase",...Ie(e)})}function mL(e,t){return new H5({check:"string_format",format:"includes",...Ie(t),includes:e})}function gL(e,t){return new F5({check:"string_format",format:"starts_with",...Ie(t),prefix:e})}function yL(e,t){return new $5({check:"string_format",format:"ends_with",...Ie(t),suffix:e})}function Ji(e){return new Z5({check:"overwrite",tx:e})}function vL(e){return Ji(t=>t.normalize(e))}function bL(){return Ji(e=>e.trim())}function SL(){return Ji(e=>e.toLowerCase())}function xL(){return Ji(e=>e.toUpperCase())}function wL(){return Ji(e=>Hj(e))}function RL(e,t,r){return new e({type:"array",element:t,...Ie(r)})}function EL(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ie(r)})}function _L(e,t){const r=TL(s=>(s.addIssue=a=>{if(typeof a=="string")s.issues.push(gl(a,s.value,r._zod.def));else{const c=a;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=s.value),c.inst??(c.inst=r),c.continue??(c.continue=!r._zod.def.abort),s.issues.push(gl(c))}},e(s.value,s)),t);return r}function TL(e,t){const r=new Ar({check:"custom",...Ie(t)});return r._zod.check=e,r}function oE(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??nl,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function un(e,t,r={path:[],schemaPath:[]}){var s;const a=e._zod.def,c=t.seen.get(e);if(c)return c.count++,r.schemaPath.includes(e)&&(c.cycle=r.path),c.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,u);const f=e._zod.toJSONSchema?.();if(f)u.schema=f;else{const m={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,m);else{const v=u.schema,b=t.processors[a.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);b(e,t,v,m)}const y=e._zod.parent;y&&(u.ref||(u.ref=y),un(y,t,m),t.seen.get(y).isParent=!0)}const p=t.metadataRegistry.get(e);return p&&Object.assign(u.schema,p),t.io==="input"&&vn(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&"_prefault"in u.schema&&((s=u.schema).default??(s.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function sE(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const u of e.seen.entries()){const f=e.metadataRegistry.get(u[0])?.id;if(f){const p=s.get(f);if(p&&p!==u[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(f,u[0])}}const a=u=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(u[0])?.id,v=e.external.uri??(S=>S);if(y)return{ref:v(y)};const b=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(u[1]===r)return{ref:"#"};const h=`#/${f}/`,m=u[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:h+m}},c=u=>{if(u[1].schema.$ref)return;const f=u[1],{ref:p,defId:h}=a(u);f.def={...f.schema},h&&(f.defId=h);const m=f.schema;for(const y in m)delete m[y];m.$ref=p};if(e.cycles==="throw")for(const u of e.seen.entries()){const f=u[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
93
-
94
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const f=u[1];if(t===u[0]){c(u);continue}if(e.external){const h=e.external.registry.get(u[0])?.id;if(t!==u[0]&&h){c(u);continue}}if(e.metadataRegistry.get(u[0])?.id){c(u);continue}if(f.cycle){c(u);continue}if(f.count>1&&e.reused==="ref"){c(u);continue}}}function iE(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=f=>{const p=e.seen.get(f);if(p.ref===null)return;const h=p.def??p.schema,m={...h},y=p.ref;if(p.ref=null,y){s(y);const b=e.seen.get(y),S=b.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(S)):Object.assign(h,S),Object.assign(h,m),f._zod.parent===y)for(const x in h)x==="$ref"||x==="allOf"||x in m||delete h[x];if(S.$ref&&b.def)for(const x in h)x==="$ref"||x==="allOf"||x in b.def&&JSON.stringify(h[x])===JSON.stringify(b.def[x])&&delete h[x]}const v=f._zod.parent;if(v&&v!==y){s(v);const b=e.seen.get(v);if(b?.schema.$ref&&(h.$ref=b.schema.$ref,b.def))for(const S in h)S==="$ref"||S==="allOf"||S in b.def&&JSON.stringify(h[S])===JSON.stringify(b.def[S])&&delete h[S]}e.override({zodSchema:f,jsonSchema:h,path:p.path??[]})};for(const f of[...e.seen.entries()].reverse())s(f[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,e.external?.uri){const f=e.external.registry.get(t)?.id;if(!f)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(f)}Object.assign(a,r.def??r.schema);const c=e.metadataRegistry.get(t)?.id;c!==void 0&&a.id===c&&delete a.id;const u=e.external?.defs??{};for(const f of e.seen.entries()){const p=f[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,u[p.defId]=p.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?a.$defs=u:a.definitions=u);try{const f=JSON.parse(JSON.stringify(a));return Object.defineProperty(f,"~standard",{value:{...t["~standard"],jsonSchema:{input:Gu(t,"input",e.processors),output:Gu(t,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function vn(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return vn(s.element,r);if(s.type==="set")return vn(s.valueType,r);if(s.type==="lazy")return vn(s.getter(),r);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return vn(s.innerType,r);if(s.type==="intersection")return vn(s.left,r)||vn(s.right,r);if(s.type==="record"||s.type==="map")return vn(s.keyType,r)||vn(s.valueType,r);if(s.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:vn(s.in,r)||vn(s.out,r);if(s.type==="object"){for(const a in s.shape)if(vn(s.shape[a],r))return!0;return!1}if(s.type==="union"){for(const a of s.options)if(vn(a,r))return!0;return!1}if(s.type==="tuple"){for(const a of s.items)if(vn(a,r))return!0;return!!(s.rest&&vn(s.rest,r))}return!1}const CL=(e,t={})=>r=>{const s=oE({...r,processors:t});return un(e,s),sE(s,e),iE(s,e)},Gu=(e,t,r={})=>s=>{const{libraryOptions:a,target:c}=s??{},u=oE({...a??{},target:c,io:t,processors:r});return un(e,u),sE(u,e),iE(u,e)},OL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ML=(e,t,r,s)=>{const a=r;a.type="string";const{minimum:c,maximum:u,format:f,patterns:p,contentEncoding:h}=e._zod.bag;if(typeof c=="number"&&(a.minLength=c),typeof u=="number"&&(a.maxLength=u),f&&(a.format=OL[f]??f,a.format===""&&delete a.format,f==="time"&&delete a.format),h&&(a.contentEncoding=h),p&&p.size>0){const m=[...p];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},AL=(e,t,r,s)=>{r.not={}},zL=(e,t,r,s)=>{},DL=(e,t,r,s)=>{const a=e._zod.def,c=FR(a.entries);c.every(u=>typeof u=="number")&&(r.type="number"),c.every(u=>typeof u=="string")&&(r.type="string"),r.enum=c},kL=(e,t,r,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},NL=(e,t,r,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},PL=(e,t,r,s)=>{const a=r,c=e._zod.def,{minimum:u,maximum:f}=e._zod.bag;typeof u=="number"&&(a.minItems=u),typeof f=="number"&&(a.maxItems=f),a.type="array",a.items=un(c.element,t,{...s,path:[...s.path,"items"]})},jL=(e,t,r,s)=>{const a=r,c=e._zod.def;a.type="object",a.properties={};const u=c.shape;for(const h in u)a.properties[h]=un(u[h],t,{...s,path:[...s.path,"properties",h]});const f=new Set(Object.keys(u)),p=new Set([...f].filter(h=>{const m=c.shape[h]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));p.size>0&&(a.required=Array.from(p)),c.catchall?._zod.def.type==="never"?a.additionalProperties=!1:c.catchall?c.catchall&&(a.additionalProperties=un(c.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},LL=(e,t,r,s)=>{const a=e._zod.def,c=a.inclusive===!1,u=a.options.map((f,p)=>un(f,t,{...s,path:[...s.path,c?"oneOf":"anyOf",p]}));c?r.oneOf=u:r.anyOf=u},IL=(e,t,r,s)=>{const a=e._zod.def,c=un(a.left,t,{...s,path:[...s.path,"allOf",0]}),u=un(a.right,t,{...s,path:[...s.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,p=[...f(c)?c.allOf:[c],...f(u)?u.allOf:[u]];r.allOf=p},UL=(e,t,r,s)=>{const a=e._zod.def,c=un(a.innerType,t,s),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=a.innerType,r.nullable=!0):r.anyOf=[c,{type:"null"}]},BL=(e,t,r,s)=>{const a=e._zod.def;un(a.innerType,t,s);const c=t.seen.get(e);c.ref=a.innerType},HL=(e,t,r,s)=>{const a=e._zod.def;un(a.innerType,t,s);const c=t.seen.get(e);c.ref=a.innerType,r.default=JSON.parse(JSON.stringify(a.defaultValue))},FL=(e,t,r,s)=>{const a=e._zod.def;un(a.innerType,t,s);const c=t.seen.get(e);c.ref=a.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},$L=(e,t,r,s)=>{const a=e._zod.def;un(a.innerType,t,s);const c=t.seen.get(e);c.ref=a.innerType;let u;try{u=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=u},ZL=(e,t,r,s)=>{const a=e._zod.def,c=a.in._zod.traits.has("$ZodTransform"),u=t.io==="input"?c?a.out:a.in:a.out;un(u,t,s);const f=t.seen.get(e);f.ref=u},VL=(e,t,r,s)=>{const a=e._zod.def;un(a.innerType,t,s);const c=t.seen.get(e);c.ref=a.innerType,r.readOnly=!0},aE=(e,t,r,s)=>{const a=e._zod.def;un(a.innerType,t,s);const c=t.seen.get(e);c.ref=a.innerType},qL=fe("ZodISODateTime",(e,t)=>{o6.init(e,t),Tt.init(e,t)});function YL(e){return iL(qL,e)}const GL=fe("ZodISODate",(e,t)=>{s6.init(e,t),Tt.init(e,t)});function KL(e){return aL(GL,e)}const QL=fe("ZodISOTime",(e,t)=>{i6.init(e,t),Tt.init(e,t)});function XL(e){return lL(QL,e)}const JL=fe("ZodISODuration",(e,t)=>{a6.init(e,t),Tt.init(e,t)});function WL(e){return cL(JL,e)}const eI=(e,t)=>{YR.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>e5(e,r)},flatten:{value:r=>Wj(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Yp,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Yp,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=fe("ZodError",eI,{Parent:Error}),tI=Xm(ar),nI=Jm(ar),rI=bf(ar),oI=Sf(ar),sI=r5(ar),iI=o5(ar),aI=s5(ar),lI=i5(ar),cI=a5(ar),uI=l5(ar),fI=c5(ar),dI=u5(ar),o1=new WeakMap;function wf(e,t,r){const s=Object.getPrototypeOf(e);let a=o1.get(s);if(a||(a=new Set,o1.set(s,a)),!a.has(t)){a.add(t);for(const c in r){const u=r[c];Object.defineProperty(s,c,{configurable:!0,enumerable:!1,get(){const f=u.bind(this);return Object.defineProperty(this,c,{configurable:!0,writable:!0,enumerable:!0,value:f}),f},set(f){Object.defineProperty(this,c,{configurable:!0,writable:!0,enumerable:!0,value:f})}})}}}const Xt=fe("ZodType",(e,t)=>(Qt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Gu(e,"input"),output:Gu(e,"output")}}),e.toJSONSchema=CL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,s)=>tI(e,r,s,{callee:e.parse}),e.safeParse=(r,s)=>rI(e,r,s),e.parseAsync=async(r,s)=>nI(e,r,s,{callee:e.parseAsync}),e.safeParseAsync=async(r,s)=>oI(e,r,s),e.spa=e.safeParseAsync,e.encode=(r,s)=>sI(e,r,s),e.decode=(r,s)=>iI(e,r,s),e.encodeAsync=async(r,s)=>aI(e,r,s),e.decodeAsync=async(r,s)=>lI(e,r,s),e.safeEncode=(r,s)=>cI(e,r,s),e.safeDecode=(r,s)=>uI(e,r,s),e.safeEncodeAsync=async(r,s)=>fI(e,r,s),e.safeDecodeAsync=async(r,s)=>dI(e,r,s),wf(e,"ZodType",{check(...r){const s=this.def;return this.clone(Wo(s,{checks:[...s.checks??[],...r.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,s){return es(this,r,s)},brand(){return this},register(r,s){return r.add(this,s),this},refine(r,s){return this.check(iU(r,s))},superRefine(r,s){return this.check(aU(r,s))},overwrite(r){return this.check(Ji(r))},optional(){return a1(this)},exactOptional(){return YI(this)},nullable(){return l1(this)},nullish(){return a1(l1(this))},nonoptional(r){return WI(this,r)},array(){return jI(this)},or(r){return BI([this,r])},and(r){return FI(this,r)},transform(r){return c1(this,VI(r))},default(r){return QI(this,r)},prefault(r){return JI(this,r)},catch(r){return tU(this,r)},pipe(r){return c1(this,r)},readonly(){return oU(this)},describe(r){const s=this.clone();return nl.add(s,{description:r}),s},meta(...r){if(r.length===0)return nl.get(this);const s=this.clone();return nl.add(s,r[0]),s},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return nl.get(e)?.description},configurable:!0}),e)),lE=fe("_ZodString",(e,t)=>{Wm.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(s,a,c)=>ML(e,s,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,wf(e,"_ZodString",{regex(...s){return this.check(dL(...s))},includes(...s){return this.check(mL(...s))},startsWith(...s){return this.check(gL(...s))},endsWith(...s){return this.check(yL(...s))},min(...s){return this.check(Yu(...s))},max(...s){return this.check(nE(...s))},length(...s){return this.check(rE(...s))},nonempty(...s){return this.check(Yu(1,...s))},lowercase(s){return this.check(hL(s))},uppercase(s){return this.check(pL(s))},trim(){return this.check(bL())},normalize(...s){return this.check(vL(...s))},toLowerCase(){return this.check(SL())},toUpperCase(){return this.check(xL())},slugify(){return this.check(wL())}})}),hI=fe("ZodString",(e,t)=>{Wm.init(e,t),lE.init(e,t),e.email=r=>e.check(U6(mI,r)),e.url=r=>e.check(Z6(gI,r)),e.jwt=r=>e.check(sL(zI,r)),e.emoji=r=>e.check(V6(yI,r)),e.guid=r=>e.check(r1(s1,r)),e.uuid=r=>e.check(B6(du,r)),e.uuidv4=r=>e.check(H6(du,r)),e.uuidv6=r=>e.check(F6(du,r)),e.uuidv7=r=>e.check($6(du,r)),e.nanoid=r=>e.check(q6(vI,r)),e.guid=r=>e.check(r1(s1,r)),e.cuid=r=>e.check(Y6(bI,r)),e.cuid2=r=>e.check(G6(SI,r)),e.ulid=r=>e.check(K6(xI,r)),e.base64=r=>e.check(nL(OI,r)),e.base64url=r=>e.check(rL(MI,r)),e.xid=r=>e.check(Q6(wI,r)),e.ksuid=r=>e.check(X6(RI,r)),e.ipv4=r=>e.check(J6(EI,r)),e.ipv6=r=>e.check(W6(_I,r)),e.cidrv4=r=>e.check(eL(TI,r)),e.cidrv6=r=>e.check(tL(CI,r)),e.e164=r=>e.check(oL(AI,r)),e.datetime=r=>e.check(YL(r)),e.date=r=>e.check(KL(r)),e.time=r=>e.check(XL(r)),e.duration=r=>e.check(WL(r))});function pI(e){return I6(hI,e)}const Tt=fe("ZodStringFormat",(e,t)=>{_t.init(e,t),lE.init(e,t)}),mI=fe("ZodEmail",(e,t)=>{K5.init(e,t),Tt.init(e,t)}),s1=fe("ZodGUID",(e,t)=>{Y5.init(e,t),Tt.init(e,t)}),du=fe("ZodUUID",(e,t)=>{G5.init(e,t),Tt.init(e,t)}),gI=fe("ZodURL",(e,t)=>{Q5.init(e,t),Tt.init(e,t)}),yI=fe("ZodEmoji",(e,t)=>{X5.init(e,t),Tt.init(e,t)}),vI=fe("ZodNanoID",(e,t)=>{J5.init(e,t),Tt.init(e,t)}),bI=fe("ZodCUID",(e,t)=>{W5.init(e,t),Tt.init(e,t)}),SI=fe("ZodCUID2",(e,t)=>{e6.init(e,t),Tt.init(e,t)}),xI=fe("ZodULID",(e,t)=>{t6.init(e,t),Tt.init(e,t)}),wI=fe("ZodXID",(e,t)=>{n6.init(e,t),Tt.init(e,t)}),RI=fe("ZodKSUID",(e,t)=>{r6.init(e,t),Tt.init(e,t)}),EI=fe("ZodIPv4",(e,t)=>{l6.init(e,t),Tt.init(e,t)}),_I=fe("ZodIPv6",(e,t)=>{c6.init(e,t),Tt.init(e,t)}),TI=fe("ZodCIDRv4",(e,t)=>{u6.init(e,t),Tt.init(e,t)}),CI=fe("ZodCIDRv6",(e,t)=>{f6.init(e,t),Tt.init(e,t)}),OI=fe("ZodBase64",(e,t)=>{d6.init(e,t),Tt.init(e,t)}),MI=fe("ZodBase64URL",(e,t)=>{p6.init(e,t),Tt.init(e,t)}),AI=fe("ZodE164",(e,t)=>{m6.init(e,t),Tt.init(e,t)}),zI=fe("ZodJWT",(e,t)=>{y6.init(e,t),Tt.init(e,t)}),DI=fe("ZodUnknown",(e,t)=>{v6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>zL()});function i1(){return uL(DI)}const kI=fe("ZodNever",(e,t)=>{b6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>AL(e,r,s)});function NI(e){return fL(kI,e)}const PI=fe("ZodArray",(e,t)=>{S6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>PL(e,r,s,a),e.element=t.element,wf(e,"ZodArray",{min(r,s){return this.check(Yu(r,s))},nonempty(r){return this.check(Yu(1,r))},max(r,s){return this.check(nE(r,s))},length(r,s){return this.check(rE(r,s))},unwrap(){return this.element}})});function jI(e,t){return RL(PI,e,t)}const LI=fe("ZodObject",(e,t)=>{w6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>jL(e,r,s,a),mt(e,"shape",()=>t.shape),wf(e,"ZodObject",{keyof(){return $I(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:i1()})},loose(){return this.clone({...this._zod.def,catchall:i1()})},strict(){return this.clone({...this._zod.def,catchall:NI()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Yj(this,r)},safeExtend(r){return Gj(this,r)},merge(r){return Kj(this,r)},pick(r){return Vj(this,r)},omit(r){return qj(this,r)},partial(...r){return Qj(cE,this,r[0])},required(...r){return Xj(uE,this,r[0])}})});function II(e,t){const r={type:"object",shape:e??{},...Ie(t)};return new LI(r)}const UI=fe("ZodUnion",(e,t)=>{R6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>LL(e,r,s,a),e.options=t.options});function BI(e,t){return new UI({type:"union",options:e,...Ie(t)})}const HI=fe("ZodIntersection",(e,t)=>{E6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>IL(e,r,s,a)});function FI(e,t){return new HI({type:"intersection",left:e,right:t})}const Kp=fe("ZodEnum",(e,t)=>{_6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(s,a,c)=>DL(e,s,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(s,a)=>{const c={};for(const u of s)if(r.has(u))c[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new Kp({...t,checks:[],...Ie(a),entries:c})},e.exclude=(s,a)=>{const c={...t.entries};for(const u of s)if(r.has(u))delete c[u];else throw new Error(`Key ${u} not found in enum`);return new Kp({...t,checks:[],...Ie(a),entries:c})}});function $I(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new Kp({type:"enum",entries:r,...Ie(t)})}const ZI=fe("ZodTransform",(e,t)=>{T6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>NL(e,r),e._zod.parse=(r,s)=>{if(s.direction==="backward")throw new HR(e.constructor.name);r.addIssue=c=>{if(typeof c=="string")r.issues.push(gl(c,r.value,t));else{const u=c;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=r.value),u.inst??(u.inst=e),r.issues.push(gl(u))}};const a=t.transform(r.value,r);return a instanceof Promise?a.then(c=>(r.value=c,r.fallback=!0,r)):(r.value=a,r.fallback=!0,r)}});function VI(e){return new ZI({type:"transform",transform:e})}const cE=fe("ZodOptional",(e,t)=>{tE.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>aE(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function a1(e){return new cE({type:"optional",innerType:e})}const qI=fe("ZodExactOptional",(e,t)=>{C6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>aE(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function YI(e){return new qI({type:"optional",innerType:e})}const GI=fe("ZodNullable",(e,t)=>{O6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>UL(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function l1(e){return new GI({type:"nullable",innerType:e})}const KI=fe("ZodDefault",(e,t)=>{M6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>HL(e,r,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function QI(e,t){return new KI({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ZR(t)}})}const XI=fe("ZodPrefault",(e,t)=>{A6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>FL(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function JI(e,t){return new XI({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ZR(t)}})}const uE=fe("ZodNonOptional",(e,t)=>{z6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>BL(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function WI(e,t){return new uE({type:"nonoptional",innerType:e,...Ie(t)})}const eU=fe("ZodCatch",(e,t)=>{D6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>$L(e,r,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tU(e,t){return new eU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const nU=fe("ZodPipe",(e,t)=>{k6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>ZL(e,r,s,a),e.in=t.in,e.out=t.out});function c1(e,t){return new nU({type:"pipe",in:e,out:t})}const rU=fe("ZodReadonly",(e,t)=>{N6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>VL(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function oU(e){return new rU({type:"readonly",innerType:e})}const sU=fe("ZodCustom",(e,t)=>{P6.init(e,t),Xt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>kL(e,r)});function iU(e,t={}){return EL(sU,e,t)}function aU(e,t){return _L(e,t)}const lU=()=>lo(()=>import("./index-_6iFZ0fh.js"),[]),cU=II({section:pI().optional().default("appearance")}),uU=io("/settings/")({component:ao(lU,"component"),validateSearch:e=>cU.parse(e)}),fU=()=>lo(()=>import("./index-CWUaRwcE.js"),__vite__mapDeps([9,2,7,4,10,8])),dU=io("/memory/")({component:ao(fU,"component")}),hU=()=>lo(()=>import("./index-DvDLadUx.js"),[]),pU=io("/chat/")({component:ao(hU,"component")}),mU=()=>lo(()=>import("./index-enFS26SU.js"),__vite__mapDeps([11,6,12,13,2,10])),gU=io("/channels/")({component:ao(mU,"component")}),yU=()=>lo(()=>import("./index-CinLq3cd.js"),__vite__mapDeps([14,12,15,4,2])),vU=io("/automations/")({component:ao(yU,"component")}),bU=()=>lo(()=>import("./index-Bbz3abmO.js"),__vite__mapDeps([16,15,1,2,8,10,13])),SU=io("/chat/$sessionId/")({component:ao(bU,"component")}),xU=jj.update({id:"/",path:"/",getParentRoute:()=>Mr}),wU=Ij.update({id:"/usage/",path:"/usage/",getParentRoute:()=>Mr}),RU=Bj.update({id:"/skills/",path:"/skills/",getParentRoute:()=>Mr}),EU=uU.update({id:"/settings/",path:"/settings/",getParentRoute:()=>Mr}),_U=dU.update({id:"/memory/",path:"/memory/",getParentRoute:()=>Mr}),TU=pU.update({id:"/chat/",path:"/chat/",getParentRoute:()=>Mr}),CU=gU.update({id:"/channels/",path:"/channels/",getParentRoute:()=>Mr}),OU=vU.update({id:"/automations/",path:"/automations/",getParentRoute:()=>Mr}),MU=SU.update({id:"/chat/$sessionId/",path:"/chat/$sessionId/",getParentRoute:()=>Mr}),AU={IndexRoute:xU,AutomationsIndexRoute:OU,ChannelsIndexRoute:CU,ChatIndexRoute:TU,MemoryIndexRoute:_U,SettingsIndexRoute:EU,SkillsIndexRoute:RU,UsageIndexRoute:wU,ChatSessionIdIndexRoute:MU},zU=Mr._addFileChildren(AU);function DU(){return jA({routeTree:zU,scrollRestoration:!0,defaultPreload:"intent",defaultPreloadStaleTime:0})}async function kU(){const e=await DU();let t;return t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push($2),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await V2(e),e}async function NU(){const e=await kU();return window.$_TSR?.h(),e}var yp;function PU(){return yp||(yp=NU()),k.jsx(K2,{promise:yp,children:e=>k.jsx(UA,{router:e})})}_.startTransition(()=>{DT.hydrateRoot(document,k.jsx(_.StrictMode,{children:k.jsx(PU,{})}))});export{$U as $,hj as A,fR as B,pj as C,X4 as D,M3 as E,wn as F,cn as G,Xi as H,m3 as I,mn as J,ze as K,Re as L,We as M,hm as N,sr as O,tt as P,hP as Q,uU as R,Kt as S,Ye as T,pm as U,xr as V,r3 as W,bj as X,Sj as Y,ER as Z,lo as _,FU as a,SU as a0,HU as a1,RT as a2,BU as b,Et as c,nt as d,J4 as e,W4 as f,au as g,pl as h,GP as i,k as j,S3 as k,jS as l,_R as m,QP as n,qP as o,yf as p,h3 as q,_ as r,iP as s,ZP as t,wx as u,No as v,UU as w,um as x,Dz as y,kz as z};