intlayer-editor 5.5.0 → 5.5.2

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 (443) hide show
  1. package/client/dist/assets/abap-BdImnpbu.js +1 -0
  2. package/client/dist/assets/actionscript-3-CfeIJUat.js +1 -0
  3. package/client/dist/assets/ada-bCR0ucgS.js +1 -0
  4. package/client/dist/assets/angular-html-Bbf3ZyxA.js +1 -0
  5. package/client/dist/assets/angular-ts-C26w9mnW.js +1 -0
  6. package/client/dist/assets/apache-Pmp26Uib.js +1 -0
  7. package/client/dist/assets/apex-QX45V2Sx.js +1 -0
  8. package/client/dist/assets/apl-e980N3t4.js +1 -0
  9. package/client/dist/assets/applescript-Co6uUVPk.js +1 -0
  10. package/client/dist/assets/ara-BRHolxvo.js +1 -0
  11. package/client/dist/assets/asciidoc-CdggvHu8.js +1 -0
  12. package/client/dist/assets/asm-D_Q5rh1f.js +1 -0
  13. package/client/dist/assets/astro-DAp1zUbp.js +1 -0
  14. package/client/dist/assets/awk-DMzUqQB5.js +1 -0
  15. package/client/dist/assets/ballerina-BFfxhgS-.js +1 -0
  16. package/client/dist/assets/bat-BkioyH1T.js +1 -0
  17. package/client/dist/assets/beancount-BoKiGodi.js +1 -0
  18. package/client/dist/assets/berry-D08WgyRC.js +1 -0
  19. package/client/dist/assets/bibtex-CHM0blh-.js +1 -0
  20. package/client/dist/assets/bicep-6nHXG8SA.js +1 -0
  21. package/client/dist/assets/blade-DGJDb2eD.js +1 -0
  22. package/client/dist/assets/bsl-BO_Y6i37.js +1 -0
  23. package/client/dist/assets/c-BIGW1oBm.js +1 -0
  24. package/client/dist/assets/cadence-D2CYqzqI.js +1 -0
  25. package/client/dist/assets/{cairo-DbSVSKxu.js → cairo-KRGpt6FW.js} +1 -1
  26. package/client/dist/assets/catppuccin-frappe-Btyk0a-E.js +1 -0
  27. package/client/dist/assets/catppuccin-latte-q-j0iyEw.js +1 -0
  28. package/client/dist/assets/catppuccin-macchiato-brDaU2vB.js +1 -0
  29. package/client/dist/assets/catppuccin-mocha-BR7mELCv.js +1 -0
  30. package/client/dist/assets/clarity-CHh-QcGE.js +1 -0
  31. package/client/dist/assets/clojure-P80f7IUj.js +1 -0
  32. package/client/dist/assets/cmake-D1j8_8rp.js +1 -0
  33. package/client/dist/assets/cobol-CCPHrsME.js +1 -0
  34. package/client/dist/assets/codeql-DsOJ9woJ.js +1 -0
  35. package/client/dist/assets/coffee-JUOWOZUj.js +1 -0
  36. package/client/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
  37. package/client/dist/assets/coq-CMdgaOU9.js +1 -0
  38. package/client/dist/assets/cpp-ChttZZSa.js +1 -0
  39. package/client/dist/assets/crystal-CfkhwHAQ.js +1 -0
  40. package/client/dist/assets/csharp-CHadp7IV.js +1 -0
  41. package/client/dist/assets/css-DPfMkruS.js +1 -0
  42. package/client/dist/assets/cue-D82EKSYY.js +1 -0
  43. package/client/dist/assets/cypher-COkxafJQ.js +1 -0
  44. package/client/dist/assets/d-85-TOEBH.js +1 -0
  45. package/client/dist/assets/dart-CF10PKvl.js +1 -0
  46. package/client/dist/assets/dax-CEL-wOlO.js +1 -0
  47. package/client/dist/assets/desktop-BmXAJ9_W.js +1 -0
  48. package/client/dist/assets/diff-D97Zzqfu.js +1 -0
  49. package/client/dist/assets/dotenv-Da5cRb03.js +1 -0
  50. package/client/dist/assets/dream-maker-BtqSS_iP.js +1 -0
  51. package/client/dist/assets/{edge-7WOHoDwQ.js → edge-CKszZCnI.js} +1 -1
  52. package/client/dist/assets/elixir-Cc7HHYVZ.js +1 -0
  53. package/client/dist/assets/elm-DbKCFpqz.js +1 -0
  54. package/client/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
  55. package/client/dist/assets/erb-D3EuUlpm.js +1 -0
  56. package/client/dist/assets/erlang-DpOm0zC4.js +1 -0
  57. package/client/dist/assets/fennel-BYunw83y.js +1 -0
  58. package/client/dist/assets/fish-Bl2oy6fF.js +1 -0
  59. package/client/dist/assets/fluent-C4IJs8-o.js +1 -0
  60. package/client/dist/assets/{fortran-fixed-form-DMTTIQFJ.js → fortran-fixed-form-BZjJHVRy.js} +1 -1
  61. package/client/dist/assets/fortran-free-form-D22FLkUw.js +1 -0
  62. package/client/dist/assets/fsharp-DQy8In2x.js +1 -0
  63. package/client/dist/assets/gdresource-BSDf9Pz1.js +1 -0
  64. package/client/dist/assets/gdscript-Bty6elJm.js +1 -0
  65. package/client/dist/assets/{gdshader-C8KBts9d.js → gdshader-DkwncUOv.js} +1 -1
  66. package/client/dist/assets/genie-D0YGMca9.js +1 -0
  67. package/client/dist/assets/gherkin-DyxjwDmM.js +1 -0
  68. package/client/dist/assets/{git-commit-COHn4upB.js → git-commit-F4YmCXRG.js} +1 -1
  69. package/client/dist/assets/{git-rebase-D7M3XCeK.js → git-rebase-r7XF79zn.js} +1 -1
  70. package/client/dist/assets/gleam-BspZqrRM.js +1 -0
  71. package/client/dist/assets/glimmer-js-Dz9X99Cm.js +1 -0
  72. package/client/dist/assets/glimmer-ts-aQ3p29eY.js +1 -0
  73. package/client/dist/assets/glsl-DplSGwfg.js +1 -0
  74. package/client/dist/assets/gnuplot-DdkO51Og.js +1 -0
  75. package/client/dist/assets/go-PEFJdsE-.js +1 -0
  76. package/client/dist/assets/graphql-Caa12_AY.js +1 -0
  77. package/client/dist/assets/groovy-gcz8RCvz.js +1 -0
  78. package/client/dist/assets/{gruvbox-dark-hard-BNFkGX63.js → gruvbox-dark-hard-Hhtzho9R.js} +1 -1
  79. package/client/dist/assets/gruvbox-dark-medium-DFR6f4Jn.js +1 -0
  80. package/client/dist/assets/{gruvbox-dark-soft-rn_0Wvg-.js → gruvbox-dark-soft-BFVdkX1U.js} +1 -1
  81. package/client/dist/assets/{gruvbox-light-hard-DPpLE3g-.js → gruvbox-light-hard-7i6GEmcB.js} +1 -1
  82. package/client/dist/assets/gruvbox-light-medium-Dcsh5twl.js +1 -0
  83. package/client/dist/assets/{gruvbox-light-soft-Ism0zgIY.js → gruvbox-light-soft-leinZj1a.js} +1 -1
  84. package/client/dist/assets/hack-C1oSbnf3.js +1 -0
  85. package/client/dist/assets/haml-AZXGPtNI.js +1 -0
  86. package/client/dist/assets/handlebars-YebKLiTq.js +1 -0
  87. package/client/dist/assets/haskell-Df6bDoY_.js +1 -0
  88. package/client/dist/assets/haxe-BP3HzMA6.js +1 -0
  89. package/client/dist/assets/hcl-BWvSN4gD.js +1 -0
  90. package/client/dist/assets/hjson-D5-asLiD.js +1 -0
  91. package/client/dist/assets/hlsl-D3lLCCz7.js +1 -0
  92. package/client/dist/assets/html-B8pBdPMQ.js +1 -0
  93. package/client/dist/assets/html-derivative-ZQ8onl8Z.js +1 -0
  94. package/client/dist/assets/http-C38VWM-o.js +1 -0
  95. package/client/dist/assets/{hxml-BYnPWQ3Z.js → hxml-B2Z6b3nn.js} +1 -1
  96. package/client/dist/assets/hy-DFXneXwc.js +1 -0
  97. package/client/dist/assets/imba-DGztddWO.js +1 -0
  98. package/client/dist/assets/index-A_u6piFE.js +290 -0
  99. package/client/dist/assets/index-BF7i91m0.css +1 -0
  100. package/client/dist/assets/ini-BEwlwnbL.js +1 -0
  101. package/client/dist/assets/java-CylS5w8V.js +1 -0
  102. package/client/dist/assets/javascript-BMMyXqK5.js +1 -0
  103. package/client/dist/assets/jinja-BJmZiE_F.js +1 -0
  104. package/client/dist/assets/jison-BCRtk9Os.js +1 -0
  105. package/client/dist/assets/json-Cp-IABpG.js +1 -0
  106. package/client/dist/assets/json5-C9tS-k6U.js +1 -0
  107. package/client/dist/assets/jsonc-Des-eS-w.js +1 -0
  108. package/client/dist/assets/jsonl-DcaNXYhu.js +1 -0
  109. package/client/dist/assets/jsonnet-DFQXde-d.js +1 -0
  110. package/client/dist/assets/{jssm-BtZDPN4U.js → jssm-C2t-YnRu.js} +1 -1
  111. package/client/dist/assets/jsx-g9-lgVsj.js +1 -0
  112. package/client/dist/assets/julia-Db79kMu7.js +1 -0
  113. package/client/dist/assets/{kotlin-MsGODAH1.js → kotlin-BdnUsdx6.js} +1 -1
  114. package/client/dist/assets/kusto-BvAqAH-y.js +1 -0
  115. package/client/dist/assets/latex-okZ41ve_.js +1 -0
  116. package/client/dist/assets/lean-c1G5yEKj.js +1 -0
  117. package/client/dist/assets/less-B1dDrJ26.js +1 -0
  118. package/client/dist/assets/liquid-C1lUkxsO.js +1 -0
  119. package/client/dist/assets/llvm-D32k8WzR.js +1 -0
  120. package/client/dist/assets/log-BFvZA1X9.js +1 -0
  121. package/client/dist/assets/logo-BtOb2qkB.js +1 -0
  122. package/client/dist/assets/lua-BbnMAYS6.js +1 -0
  123. package/client/dist/assets/luau-irsrSlf-.js +1 -0
  124. package/client/dist/assets/make-CHLpvVh8.js +1 -0
  125. package/client/dist/assets/markdown-RrBGtqGR.js +1 -0
  126. package/client/dist/assets/marko-C0z8HR23.js +1 -0
  127. package/client/dist/assets/matlab-D7o27uSR.js +1 -0
  128. package/client/dist/assets/mdc-02rxpBA4.js +1 -0
  129. package/client/dist/assets/mdx-Cmh6b_Ma.js +1 -0
  130. package/client/dist/assets/mermaid-DfEE3Bzs.js +1 -0
  131. package/client/dist/assets/mipsasm-CKIfxQSi.js +1 -0
  132. package/client/dist/assets/mojo-1DNp92w6.js +1 -0
  133. package/client/dist/assets/move-BkPM1oy1.js +1 -0
  134. package/client/dist/assets/narrat-DRg8JJMk.js +1 -0
  135. package/client/dist/assets/nextflow-Bk5OV074.js +1 -0
  136. package/client/dist/assets/nginx-DknmC5AR.js +1 -0
  137. package/client/dist/assets/nim-ANgMEeb1.js +1 -0
  138. package/client/dist/assets/nix-BepWV7mh.js +1 -0
  139. package/client/dist/assets/nushell-I3RK9BU8.js +1 -0
  140. package/client/dist/assets/objective-c-DXmwc3jG.js +1 -0
  141. package/client/dist/assets/objective-cpp-CLxacb5B.js +1 -0
  142. package/client/dist/assets/ocaml-C0hk2d4L.js +1 -0
  143. package/client/dist/assets/pascal-D93ZcfNL.js +1 -0
  144. package/client/dist/assets/perl-EWVMYlR0.js +1 -0
  145. package/client/dist/assets/php-9PMsNEzE.js +1 -0
  146. package/client/dist/assets/plsql-ChMvpjG-.js +1 -0
  147. package/client/dist/assets/{po-CZKeM8oa.js → po-BTJTHyun.js} +1 -1
  148. package/client/dist/assets/polar-C0HS_06l.js +1 -0
  149. package/client/dist/assets/postcss-CXtECtnM.js +1 -0
  150. package/client/dist/assets/powerquery-CEu0bR-o.js +1 -0
  151. package/client/dist/assets/powershell-Dpen1YoG.js +1 -0
  152. package/client/dist/assets/prisma-Dd19v3D-.js +1 -0
  153. package/client/dist/assets/prolog-CbFg5uaA.js +1 -0
  154. package/client/dist/assets/proto-DyJlTyXw.js +1 -0
  155. package/client/dist/assets/pug-Ch9lOoSd.js +1 -0
  156. package/client/dist/assets/puppet-BMWR74SV.js +1 -0
  157. package/client/dist/assets/purescript-CtrldY6v.js +1 -0
  158. package/client/dist/assets/python-B6aJPvgy.js +1 -0
  159. package/client/dist/assets/qml-CHzV51_b.js +1 -0
  160. package/client/dist/assets/qss-IeuSbFQv.js +1 -0
  161. package/client/dist/assets/r-C2tOF0e5.js +1 -0
  162. package/client/dist/assets/racket-BqYA7rlc.js +1 -0
  163. package/client/dist/assets/raku-DXvB9xmW.js +1 -0
  164. package/client/dist/assets/razor-CNXmhs1n.js +1 -0
  165. package/client/dist/assets/{reg-eiUPDiaM.js → reg-C-SQnVFl.js} +1 -1
  166. package/client/dist/assets/{regexp-we84whta.js → regexp-CDVJQ6XC.js} +1 -1
  167. package/client/dist/assets/rel-C3B-1QV4.js +1 -0
  168. package/client/dist/assets/riscv-BM1_JUlF.js +1 -0
  169. package/client/dist/assets/rose-pine-BHrmToEH.js +1 -0
  170. package/client/dist/assets/rose-pine-dawn-CnK8MTSM.js +1 -0
  171. package/client/dist/assets/rose-pine-moon-NleAzG8P.js +1 -0
  172. package/client/dist/assets/rst-DHpKpUMA.js +1 -0
  173. package/client/dist/assets/ruby-C5MNRm7z.js +1 -0
  174. package/client/dist/assets/rust-B1yitclQ.js +1 -0
  175. package/client/dist/assets/sas-Dlf3BogE.js +1 -0
  176. package/client/dist/assets/sass-Cj5Yp3dK.js +1 -0
  177. package/client/dist/assets/scala-C151Ov-r.js +1 -0
  178. package/client/dist/assets/scheme-C98Dy4si.js +1 -0
  179. package/client/dist/assets/scss-OYdSNvt2.js +1 -0
  180. package/client/dist/assets/sdbl-DVxCFoDh.js +1 -0
  181. package/client/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
  182. package/client/dist/assets/shellscript-Yzrsuije.js +1 -0
  183. package/client/dist/assets/{shellsession-C_x4i0EA.js → shellsession-BADoaaVG.js} +1 -1
  184. package/client/dist/assets/smalltalk-BERRCDM3.js +1 -0
  185. package/client/dist/assets/solidity-BbcW6ACK.js +1 -0
  186. package/client/dist/assets/soy-B_7ge1HE.js +1 -0
  187. package/client/dist/assets/sparql-rVzFXLq3.js +1 -0
  188. package/client/dist/assets/splunk-BtCnVYZw.js +1 -0
  189. package/client/dist/assets/sql-B9xm8XSJ.js +1 -0
  190. package/client/dist/assets/{ssh-config-BhVUZvoY.js → ssh-config-_ykCGR6B.js} +1 -1
  191. package/client/dist/assets/stata-C5TGba-T.js +1 -0
  192. package/client/dist/assets/stylus-BEDo0Tqx.js +1 -0
  193. package/client/dist/assets/svelte-CXAE1zBs.js +1 -0
  194. package/client/dist/assets/swift-fve9TYiY.js +1 -0
  195. package/client/dist/assets/system-verilog-CnnmHF94.js +1 -0
  196. package/client/dist/assets/systemd-4A_iFExJ.js +1 -0
  197. package/client/dist/assets/talonscript-CkByrt1z.js +1 -0
  198. package/client/dist/assets/tasl-QIJgUcNo.js +1 -0
  199. package/client/dist/assets/tcl-dwOrl1Do.js +1 -0
  200. package/client/dist/assets/templ-kZcegUSt.js +1 -0
  201. package/client/dist/assets/terraform-BETggiCN.js +1 -0
  202. package/client/dist/assets/tex-mQPFytnq.js +1 -0
  203. package/client/dist/assets/toml-vGWfd6FD.js +1 -0
  204. package/client/dist/assets/ts-tags-CHnADXob.js +1 -0
  205. package/client/dist/assets/tsx-COt5Ahok.js +1 -0
  206. package/client/dist/assets/turtle-BsS91CYL.js +1 -0
  207. package/client/dist/assets/twig-febACT8g.js +1 -0
  208. package/client/dist/assets/typescript-DlfHMoPT.js +1 -0
  209. package/client/dist/assets/typespec-Df68jz8_.js +1 -0
  210. package/client/dist/assets/typst-DHCkPAjA.js +1 -0
  211. package/client/dist/assets/v-DljmTZ5-.js +1 -0
  212. package/client/dist/assets/vala-CsfeWuGM.js +1 -0
  213. package/client/dist/assets/vb-D17OF-Vu.js +1 -0
  214. package/client/dist/assets/{verilog-DmSgp3mE.js → verilog-BQ8w6xss.js} +1 -1
  215. package/client/dist/assets/vhdl-CeAyd5Ju.js +1 -0
  216. package/client/dist/assets/viml-CJc9bBzg.js +1 -0
  217. package/client/dist/assets/vue-html-dOMv_FQ0.js +1 -0
  218. package/client/dist/assets/vue-xz9K_ZKN.js +1 -0
  219. package/client/dist/assets/vyper-CDx5xZoG.js +1 -0
  220. package/client/dist/assets/wasm-MzD3tlZU.js +1 -0
  221. package/client/dist/assets/wenyan-BV7otONQ.js +1 -0
  222. package/client/dist/assets/wgsl-Dx-B1_4e.js +1 -0
  223. package/client/dist/assets/wikitext-BhOHFoWU.js +1 -0
  224. package/client/dist/assets/wit-5i3qLPDT.js +1 -0
  225. package/client/dist/assets/wolfram-lXgVvXCa.js +1 -0
  226. package/client/dist/assets/xml-sdJ4AIDG.js +1 -0
  227. package/client/dist/assets/xsl-CtQFsRM5.js +1 -0
  228. package/client/dist/assets/yaml-Buea-lGh.js +1 -0
  229. package/client/dist/assets/zenscript-DVFEvuxE.js +1 -0
  230. package/client/dist/assets/zig-CK-KhNJq.js +1 -0
  231. package/client/dist/index.html +2 -2
  232. package/package.json +21 -21
  233. package/client/dist/assets/abap-CuzaboPy.js +0 -1
  234. package/client/dist/assets/actionscript-3-BWZb6ht_.js +0 -1
  235. package/client/dist/assets/ada-lbGJHcqN.js +0 -1
  236. package/client/dist/assets/angular-html-DMNHImpm.js +0 -1
  237. package/client/dist/assets/angular-ts-eB8LWD2C.js +0 -1
  238. package/client/dist/assets/apache-ClrZ-IwE.js +0 -1
  239. package/client/dist/assets/apex-DHEJMXht.js +0 -1
  240. package/client/dist/assets/apl-DSpMDkz7.js +0 -1
  241. package/client/dist/assets/applescript-d8h0XnfP.js +0 -1
  242. package/client/dist/assets/ara-D11-aFNM.js +0 -1
  243. package/client/dist/assets/asciidoc-BPN7z6_Y.js +0 -1
  244. package/client/dist/assets/asm-B-o3LjfJ.js +0 -1
  245. package/client/dist/assets/astro-BEfdsCb3.js +0 -1
  246. package/client/dist/assets/awk-DFufGi5b.js +0 -1
  247. package/client/dist/assets/ballerina-DCKmv_4D.js +0 -1
  248. package/client/dist/assets/bat-9J6oqHce.js +0 -1
  249. package/client/dist/assets/beancount-CJ6EEQ2V.js +0 -1
  250. package/client/dist/assets/berry-CufD37jc.js +0 -1
  251. package/client/dist/assets/bibtex-B5xtV7zU.js +0 -1
  252. package/client/dist/assets/bicep-B-_DnH9T.js +0 -1
  253. package/client/dist/assets/blade-jtwiscur.js +0 -1
  254. package/client/dist/assets/bsl-BXaZRMg3.js +0 -1
  255. package/client/dist/assets/c-Du_P13ro.js +0 -1
  256. package/client/dist/assets/cadence-BhCOhF7G.js +0 -1
  257. package/client/dist/assets/catppuccin-frappe-BtitwTYg.js +0 -1
  258. package/client/dist/assets/catppuccin-latte-CW_h_59B.js +0 -1
  259. package/client/dist/assets/catppuccin-macchiato-CXeUe8zM.js +0 -1
  260. package/client/dist/assets/catppuccin-mocha-Cj87Vp-p.js +0 -1
  261. package/client/dist/assets/clarity-D72Djq1u.js +0 -1
  262. package/client/dist/assets/clojure-I1vGaenB.js +0 -1
  263. package/client/dist/assets/cmake-C07pmjNf.js +0 -1
  264. package/client/dist/assets/cobol-DLiQ7VlT.js +0 -1
  265. package/client/dist/assets/codeql-TbzFAQVx.js +0 -1
  266. package/client/dist/assets/coffee-CN9rYqj2.js +0 -1
  267. package/client/dist/assets/common-lisp-0v_W_vIl.js +0 -1
  268. package/client/dist/assets/coq-DqPPCFWZ.js +0 -1
  269. package/client/dist/assets/cpp-D6jLj3ac.js +0 -1
  270. package/client/dist/assets/crystal-CSXto_ug.js +0 -1
  271. package/client/dist/assets/csharp-t9jp2bdZ.js +0 -1
  272. package/client/dist/assets/css-6ydISZ1j.js +0 -1
  273. package/client/dist/assets/cue-DZa-IHfU.js +0 -1
  274. package/client/dist/assets/cypher-B8QFFMEI.js +0 -1
  275. package/client/dist/assets/d-BWEIE2mf.js +0 -1
  276. package/client/dist/assets/dart-Bc9cAHms.js +0 -1
  277. package/client/dist/assets/dax-B4O06LmT.js +0 -1
  278. package/client/dist/assets/desktop-C480DKyb.js +0 -1
  279. package/client/dist/assets/diff-7a-uGD01.js +0 -1
  280. package/client/dist/assets/dotenv-RqsQB2BX.js +0 -1
  281. package/client/dist/assets/dream-maker-CwZzURTK.js +0 -1
  282. package/client/dist/assets/elixir-C8UL7p8J.js +0 -1
  283. package/client/dist/assets/elm-BVJIbDWr.js +0 -1
  284. package/client/dist/assets/emacs-lisp-BGJzjoMF.js +0 -1
  285. package/client/dist/assets/erb-2bVwkg7V.js +0 -1
  286. package/client/dist/assets/erlang-Buh6fjeB.js +0 -1
  287. package/client/dist/assets/fennel-BN5cw1dr.js +0 -1
  288. package/client/dist/assets/fish-BIU4F8Lx.js +0 -1
  289. package/client/dist/assets/fluent-DPdCYVuL.js +0 -1
  290. package/client/dist/assets/fortran-free-form-FZM7PgI4.js +0 -1
  291. package/client/dist/assets/fsharp-B93pd7q9.js +0 -1
  292. package/client/dist/assets/gdresource-I9Onfmy0.js +0 -1
  293. package/client/dist/assets/gdscript-E0a2itvD.js +0 -1
  294. package/client/dist/assets/genie-CZ1jFyQ7.js +0 -1
  295. package/client/dist/assets/gherkin-B-23jXpc.js +0 -1
  296. package/client/dist/assets/gleam-CFlCaHJ1.js +0 -1
  297. package/client/dist/assets/glimmer-js-DTuRZoQB.js +0 -1
  298. package/client/dist/assets/glimmer-ts-BGh34NOZ.js +0 -1
  299. package/client/dist/assets/glsl-D6Vaizag.js +0 -1
  300. package/client/dist/assets/gnuplot-DwPOQrla.js +0 -1
  301. package/client/dist/assets/go-DSI44sMb.js +0 -1
  302. package/client/dist/assets/graphql-CzqHVaah.js +0 -1
  303. package/client/dist/assets/groovy-DnUZ9V9w.js +0 -1
  304. package/client/dist/assets/gruvbox-dark-medium-fPwOVgKi.js +0 -1
  305. package/client/dist/assets/gruvbox-light-medium-BBkKoO69.js +0 -1
  306. package/client/dist/assets/hack-BfoaVUmQ.js +0 -1
  307. package/client/dist/assets/haml-BjHfNtf2.js +0 -1
  308. package/client/dist/assets/handlebars-DN1vFC8Y.js +0 -1
  309. package/client/dist/assets/haskell-C97r5ta3.js +0 -1
  310. package/client/dist/assets/haxe-BVnfiMDc.js +0 -1
  311. package/client/dist/assets/hcl-BRpPFe2i.js +0 -1
  312. package/client/dist/assets/hjson-Bgmt9vRU.js +0 -1
  313. package/client/dist/assets/hlsl-DgLWmsUM.js +0 -1
  314. package/client/dist/assets/html-DQt1crSz.js +0 -1
  315. package/client/dist/assets/html-derivative-OoyioBIu.js +0 -1
  316. package/client/dist/assets/http-B1MEeU_C.js +0 -1
  317. package/client/dist/assets/hy--6ePOT02.js +0 -1
  318. package/client/dist/assets/imba-ZOHZ3W7h.js +0 -1
  319. package/client/dist/assets/index-DvcASeAX.css +0 -1
  320. package/client/dist/assets/index-pODb1sKT.js +0 -299
  321. package/client/dist/assets/ini-m1-xr6K8.js +0 -1
  322. package/client/dist/assets/java-DzEvymKG.js +0 -1
  323. package/client/dist/assets/javascript-DFxyEsuO.js +0 -1
  324. package/client/dist/assets/jinja-CbuI_e8q.js +0 -1
  325. package/client/dist/assets/jison-BThBLrI1.js +0 -1
  326. package/client/dist/assets/json-BLmTiKMJ.js +0 -1
  327. package/client/dist/assets/json5-C5z8RDkF.js +0 -1
  328. package/client/dist/assets/jsonc-CuA0FkKk.js +0 -1
  329. package/client/dist/assets/jsonl-CBcFDUab.js +0 -1
  330. package/client/dist/assets/jsonnet-CCBwdCM5.js +0 -1
  331. package/client/dist/assets/jsx-Dog42FfX.js +0 -1
  332. package/client/dist/assets/julia-QW6AWql5.js +0 -1
  333. package/client/dist/assets/kusto-BEWisg9D.js +0 -1
  334. package/client/dist/assets/latex-D6g4IvIb.js +0 -1
  335. package/client/dist/assets/lean-Bsgk112v.js +0 -1
  336. package/client/dist/assets/less-CL8eqPyx.js +0 -1
  337. package/client/dist/assets/liquid-DwnqW0Hw.js +0 -1
  338. package/client/dist/assets/llvm-CQsJUk-H.js +0 -1
  339. package/client/dist/assets/log-DnFCEHlQ.js +0 -1
  340. package/client/dist/assets/logo-CkBIg-lq.js +0 -1
  341. package/client/dist/assets/lua-DgKrCl_t.js +0 -1
  342. package/client/dist/assets/luau-CqbnzJ-x.js +0 -1
  343. package/client/dist/assets/make-CSWLD5xG.js +0 -1
  344. package/client/dist/assets/markdown-CfdnVo6U.js +0 -1
  345. package/client/dist/assets/marko-Ddcey6ql.js +0 -1
  346. package/client/dist/assets/matlab-LZB065En.js +0 -1
  347. package/client/dist/assets/mdc-BSBcOUr9.js +0 -1
  348. package/client/dist/assets/mdx-B_I5quxp.js +0 -1
  349. package/client/dist/assets/mermaid-CXyZL9PL.js +0 -1
  350. package/client/dist/assets/mipsasm-BwEeJ4dY.js +0 -1
  351. package/client/dist/assets/mojo-DHZoLXvC.js +0 -1
  352. package/client/dist/assets/move-_bK4LppZ.js +0 -1
  353. package/client/dist/assets/narrat-CElRTuuq.js +0 -1
  354. package/client/dist/assets/nextflow--CXHmARm.js +0 -1
  355. package/client/dist/assets/nginx-C1Yc5-eE.js +0 -1
  356. package/client/dist/assets/nim-CuWg7p6V.js +0 -1
  357. package/client/dist/assets/nix-C-iLU9M_.js +0 -1
  358. package/client/dist/assets/nushell-BsWK4Erq.js +0 -1
  359. package/client/dist/assets/objective-c-JQgEzMhr.js +0 -1
  360. package/client/dist/assets/objective-cpp-CAZ1NrJr.js +0 -1
  361. package/client/dist/assets/ocaml-CANNzmGA.js +0 -1
  362. package/client/dist/assets/pascal-CUU_xxmv.js +0 -1
  363. package/client/dist/assets/perl-Bcivc5lk.js +0 -1
  364. package/client/dist/assets/php-XhOgcbHd.js +0 -1
  365. package/client/dist/assets/plsql-Csx-KgEj.js +0 -1
  366. package/client/dist/assets/polar-C9vCuADp.js +0 -1
  367. package/client/dist/assets/postcss-BgR6IBVD.js +0 -1
  368. package/client/dist/assets/powerquery-BZR5jcz4.js +0 -1
  369. package/client/dist/assets/powershell-Q0c5v3Fs.js +0 -1
  370. package/client/dist/assets/prisma-yac1gHcz.js +0 -1
  371. package/client/dist/assets/prolog-S2snRG_L.js +0 -1
  372. package/client/dist/assets/proto-B2asqJ_e.js +0 -1
  373. package/client/dist/assets/pug-Ud6KBVuk.js +0 -1
  374. package/client/dist/assets/puppet-qBI2rw6w.js +0 -1
  375. package/client/dist/assets/purescript-CYAc_BdW.js +0 -1
  376. package/client/dist/assets/python-N_fYzn4k.js +0 -1
  377. package/client/dist/assets/qml-BdV_SRG6.js +0 -1
  378. package/client/dist/assets/qss-xAjwRsjP.js +0 -1
  379. package/client/dist/assets/r-15AZnl_Y.js +0 -1
  380. package/client/dist/assets/racket-DfaBuPIG.js +0 -1
  381. package/client/dist/assets/raku-DARByBhS.js +0 -1
  382. package/client/dist/assets/razor-R9tSNI_9.js +0 -1
  383. package/client/dist/assets/rel-CLLaPSAr.js +0 -1
  384. package/client/dist/assets/riscv-BOXXFo5k.js +0 -1
  385. package/client/dist/assets/rose-pine-BZeqa82Q.js +0 -1
  386. package/client/dist/assets/rose-pine-dawn-Dr8AihTi.js +0 -1
  387. package/client/dist/assets/rose-pine-moon-Bo9_Wbqy.js +0 -1
  388. package/client/dist/assets/rst-C0h9YO46.js +0 -1
  389. package/client/dist/assets/ruby-Cwn6T5Qb.js +0 -1
  390. package/client/dist/assets/rust-A6NUYkDQ.js +0 -1
  391. package/client/dist/assets/sas-Yvy-jB3G.js +0 -1
  392. package/client/dist/assets/sass-DxKx6i08.js +0 -1
  393. package/client/dist/assets/scala-urTpdRWL.js +0 -1
  394. package/client/dist/assets/scheme-DfDtJdlR.js +0 -1
  395. package/client/dist/assets/scss-DkCoLJBz.js +0 -1
  396. package/client/dist/assets/sdbl-Cflpv1WG.js +0 -1
  397. package/client/dist/assets/shaderlab-DprXpeCX.js +0 -1
  398. package/client/dist/assets/shellscript-Cs-zf8G1.js +0 -1
  399. package/client/dist/assets/smalltalk-CvaLaq0K.js +0 -1
  400. package/client/dist/assets/solidity-BWEW8IEt.js +0 -1
  401. package/client/dist/assets/soy-CV61xlNT.js +0 -1
  402. package/client/dist/assets/sparql-Ccgs8XSw.js +0 -1
  403. package/client/dist/assets/splunk-RtPzT0sk.js +0 -1
  404. package/client/dist/assets/sql-D8pCRXw6.js +0 -1
  405. package/client/dist/assets/stata-nt34lD2m.js +0 -1
  406. package/client/dist/assets/stylus-q-cGTZ-j.js +0 -1
  407. package/client/dist/assets/svelte-Ue2gIPbO.js +0 -1
  408. package/client/dist/assets/swift-zJDMamB5.js +0 -1
  409. package/client/dist/assets/system-verilog-6Pjza-7V.js +0 -1
  410. package/client/dist/assets/systemd-BzvtnNXz.js +0 -1
  411. package/client/dist/assets/talonscript-B5KooqzE.js +0 -1
  412. package/client/dist/assets/tasl-actOPUJz.js +0 -1
  413. package/client/dist/assets/tcl-BX3nBwNA.js +0 -1
  414. package/client/dist/assets/templ-CJFw_bmP.js +0 -1
  415. package/client/dist/assets/terraform-BWjU2UX-.js +0 -1
  416. package/client/dist/assets/tex-C7L-Ug2D.js +0 -1
  417. package/client/dist/assets/toml-x-gNw4Ca.js +0 -1
  418. package/client/dist/assets/ts-tags-B_RTbvdJ.js +0 -1
  419. package/client/dist/assets/tsx-CHbqLUsD.js +0 -1
  420. package/client/dist/assets/turtle-imGXYByQ.js +0 -1
  421. package/client/dist/assets/twig-DxolMe-m.js +0 -1
  422. package/client/dist/assets/typescript-6msxI5qU.js +0 -1
  423. package/client/dist/assets/typespec-5ugHtu89.js +0 -1
  424. package/client/dist/assets/typst-DGKQAwST.js +0 -1
  425. package/client/dist/assets/v-2Dvll9y_.js +0 -1
  426. package/client/dist/assets/vala-DhIY81xx.js +0 -1
  427. package/client/dist/assets/vb-D4bKSGYI.js +0 -1
  428. package/client/dist/assets/vhdl-DCjSv28y.js +0 -1
  429. package/client/dist/assets/viml-DMG7XCk5.js +0 -1
  430. package/client/dist/assets/vue-BebZw_gy.js +0 -1
  431. package/client/dist/assets/vue-html-B9Bqf25R.js +0 -1
  432. package/client/dist/assets/vyper-D68BUWwe.js +0 -1
  433. package/client/dist/assets/wasm-CJJW67X8.js +0 -1
  434. package/client/dist/assets/wenyan-BXqZv6Dq.js +0 -1
  435. package/client/dist/assets/wgsl-Do8n-e3P.js +0 -1
  436. package/client/dist/assets/wikitext-CQSnJ68I.js +0 -1
  437. package/client/dist/assets/wit-dyhQlKC1.js +0 -1
  438. package/client/dist/assets/wolfram-EuqmgloR.js +0 -1
  439. package/client/dist/assets/xml-iIRqcNou.js +0 -1
  440. package/client/dist/assets/xsl-BqXt74Hp.js +0 -1
  441. package/client/dist/assets/yaml-DeMLtiT4.js +0 -1
  442. package/client/dist/assets/zenscript-BbLEZwDK.js +0 -1
  443. package/client/dist/assets/zig-DFp_trfT.js +0 -1
@@ -1,299 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DMNHImpm.js","assets/html-DQt1crSz.js","assets/javascript-DFxyEsuO.js","assets/css-6ydISZ1j.js","assets/angular-ts-eB8LWD2C.js","assets/scss-DkCoLJBz.js","assets/apl-DSpMDkz7.js","assets/xml-iIRqcNou.js","assets/java-DzEvymKG.js","assets/json-BLmTiKMJ.js","assets/astro-BEfdsCb3.js","assets/typescript-6msxI5qU.js","assets/postcss-BgR6IBVD.js","assets/blade-jtwiscur.js","assets/html-derivative-OoyioBIu.js","assets/sql-D8pCRXw6.js","assets/bsl-BXaZRMg3.js","assets/sdbl-Cflpv1WG.js","assets/cairo-DbSVSKxu.js","assets/python-N_fYzn4k.js","assets/cobol-DLiQ7VlT.js","assets/coffee-CN9rYqj2.js","assets/cpp-D6jLj3ac.js","assets/regexp-we84whta.js","assets/glsl-D6Vaizag.js","assets/c-Du_P13ro.js","assets/crystal-CSXto_ug.js","assets/shellscript-Cs-zf8G1.js","assets/edge-7WOHoDwQ.js","assets/elixir-C8UL7p8J.js","assets/elm-BVJIbDWr.js","assets/erb-2bVwkg7V.js","assets/ruby-Cwn6T5Qb.js","assets/haml-BjHfNtf2.js","assets/graphql-CzqHVaah.js","assets/jsx-Dog42FfX.js","assets/tsx-CHbqLUsD.js","assets/lua-DgKrCl_t.js","assets/yaml-DeMLtiT4.js","assets/fortran-fixed-form-DMTTIQFJ.js","assets/fortran-free-form-FZM7PgI4.js","assets/fsharp-B93pd7q9.js","assets/markdown-CfdnVo6U.js","assets/gdresource-I9Onfmy0.js","assets/gdshader-C8KBts9d.js","assets/gdscript-E0a2itvD.js","assets/git-commit-COHn4upB.js","assets/diff-7a-uGD01.js","assets/git-rebase-D7M3XCeK.js","assets/glimmer-js-DTuRZoQB.js","assets/glimmer-ts-BGh34NOZ.js","assets/hack-BfoaVUmQ.js","assets/handlebars-DN1vFC8Y.js","assets/http-B1MEeU_C.js","assets/hxml-BYnPWQ3Z.js","assets/haxe-BVnfiMDc.js","assets/jinja-CbuI_e8q.js","assets/jison-BThBLrI1.js","assets/julia-QW6AWql5.js","assets/r-15AZnl_Y.js","assets/latex-D6g4IvIb.js","assets/tex-C7L-Ug2D.js","assets/liquid-DwnqW0Hw.js","assets/marko-Ddcey6ql.js","assets/less-CL8eqPyx.js","assets/mdc-BSBcOUr9.js","assets/nginx-C1Yc5-eE.js","assets/nim-CuWg7p6V.js","assets/perl-Bcivc5lk.js","assets/php-XhOgcbHd.js","assets/pug-Ud6KBVuk.js","assets/qml-BdV_SRG6.js","assets/razor-R9tSNI_9.js","assets/csharp-t9jp2bdZ.js","assets/rst-C0h9YO46.js","assets/cmake-C07pmjNf.js","assets/sas-Yvy-jB3G.js","assets/shaderlab-DprXpeCX.js","assets/hlsl-DgLWmsUM.js","assets/shellsession-C_x4i0EA.js","assets/soy-CV61xlNT.js","assets/sparql-Ccgs8XSw.js","assets/turtle-imGXYByQ.js","assets/stata-nt34lD2m.js","assets/svelte-Ue2gIPbO.js","assets/templ-CJFw_bmP.js","assets/go-DSI44sMb.js","assets/ts-tags-B_RTbvdJ.js","assets/twig-DxolMe-m.js","assets/vue-BebZw_gy.js","assets/vue-html-B9Bqf25R.js","assets/xsl-BqXt74Hp.js"])))=>i.map(i=>d[i]);
2
- var dM=Object.defineProperty;var fM=(e,t,n)=>t in e?dM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>fM(e,typeof t!="symbol"?t+"":t,n);function hM(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hg={exports:{}},ic={};/**
3
- * @license React
4
- * react-jsx-runtime.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var hS;function mM(){if(hS)return ic;hS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return ic.Fragment=t,ic.jsx=n,ic.jsxs=n,ic}var mS;function pM(){return mS||(mS=1,hg.exports=mM()),hg.exports}var _=pM(),mg={exports:{}},Ze={};/**
11
- * @license React
12
- * react.production.js
13
- *
14
- * Copyright (c) Meta Platforms, Inc. and affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var pS;function gM(){if(pS)return Ze;pS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function y(j){return j===null||typeof j!="object"?null:(j=g&&j[g]||j["@@iterator"],typeof j=="function"?j:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,S={};function A(j,W,F){this.props=j,this.context=W,this.refs=S,this.updater=F||b}A.prototype.isReactComponent={},A.prototype.setState=function(j,W){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,W,"setState")},A.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function w(){}w.prototype=A.prototype;function T(j,W,F){this.props=j,this.context=W,this.refs=S,this.updater=F||b}var R=T.prototype=new w;R.constructor=T,v(R,A.prototype),R.isPureReactComponent=!0;var D=Array.isArray,N={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function I(j,W,F,ie,re,de){return F=de.ref,{$$typeof:e,type:j,key:W,ref:F!==void 0?F:null,props:de}}function P(j,W){return I(j.type,W,void 0,void 0,void 0,j.props)}function V(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function H(j){var W={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(F){return W[F]})}var fe=/\/+/g;function te(j,W){return typeof j=="object"&&j!==null&&j.key!=null?H(""+j.key):W.toString(36)}function ue(){}function Y(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(ue,ue):(j.status="pending",j.then(function(W){j.status==="pending"&&(j.status="fulfilled",j.value=W)},function(W){j.status==="pending"&&(j.status="rejected",j.reason=W)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function J(j,W,F,ie,re){var de=typeof j;(de==="undefined"||de==="boolean")&&(j=null);var ye=!1;if(j===null)ye=!0;else switch(de){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(j.$$typeof){case e:case t:ye=!0;break;case m:return ye=j._init,J(ye(j._payload),W,F,ie,re)}}if(ye)return re=re(j),ye=ie===""?"."+te(j,0):ie,D(re)?(F="",ye!=null&&(F=ye.replace(fe,"$&/")+"/"),J(re,W,F,"",function(He){return He})):re!=null&&(V(re)&&(re=P(re,F+(re.key==null||j&&j.key===re.key?"":(""+re.key).replace(fe,"$&/")+"/")+ye)),W.push(re)),1;ye=0;var ge=ie===""?".":ie+":";if(D(j))for(var we=0;we<j.length;we++)ie=j[we],de=ge+te(ie,we),ye+=J(ie,W,F,de,re);else if(we=y(j),typeof we=="function")for(j=we.call(j),we=0;!(ie=j.next()).done;)ie=ie.value,de=ge+te(ie,we++),ye+=J(ie,W,F,de,re);else if(de==="object"){if(typeof j.then=="function")return J(Y(j),W,F,ie,re);throw W=String(j),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return ye}function U(j,W,F){if(j==null)return j;var ie=[],re=0;return J(j,ie,"","",function(de){return W.call(F,de,re++)}),ie}function ne(j){if(j._status===-1){var W=j._result;W=W(),W.then(function(F){(j._status===0||j._status===-1)&&(j._status=1,j._result=F)},function(F){(j._status===0||j._status===-1)&&(j._status=2,j._result=F)}),j._status===-1&&(j._status=0,j._result=W)}if(j._status===1)return j._result.default;throw j._result}var ee=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)};function ve(){}return Ze.Children={map:U,forEach:function(j,W,F){U(j,function(){W.apply(this,arguments)},F)},count:function(j){var W=0;return U(j,function(){W++}),W},toArray:function(j){return U(j,function(W){return W})||[]},only:function(j){if(!V(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Ze.Component=A,Ze.Fragment=n,Ze.Profiler=a,Ze.PureComponent=T,Ze.StrictMode=r,Ze.Suspense=d,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ze.act=function(){throw Error("act(...) is not supported in production builds of React.")},Ze.cache=function(j){return function(){return j.apply(null,arguments)}},Ze.cloneElement=function(j,W,F){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ie=v({},j.props),re=j.key,de=void 0;if(W!=null)for(ye in W.ref!==void 0&&(de=void 0),W.key!==void 0&&(re=""+W.key),W)!k.call(W,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&W.ref===void 0||(ie[ye]=W[ye]);var ye=arguments.length-2;if(ye===1)ie.children=F;else if(1<ye){for(var ge=Array(ye),we=0;we<ye;we++)ge[we]=arguments[we+2];ie.children=ge}return I(j.type,re,void 0,void 0,de,ie)},Ze.createContext=function(j){return j={$$typeof:l,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:o,_context:j},j},Ze.createElement=function(j,W,F){var ie,re={},de=null;if(W!=null)for(ie in W.key!==void 0&&(de=""+W.key),W)k.call(W,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(re[ie]=W[ie]);var ye=arguments.length-2;if(ye===1)re.children=F;else if(1<ye){for(var ge=Array(ye),we=0;we<ye;we++)ge[we]=arguments[we+2];re.children=ge}if(j&&j.defaultProps)for(ie in ye=j.defaultProps,ye)re[ie]===void 0&&(re[ie]=ye[ie]);return I(j,de,void 0,void 0,null,re)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(j){return{$$typeof:u,render:j}},Ze.isValidElement=V,Ze.lazy=function(j){return{$$typeof:m,_payload:{_status:-1,_result:j},_init:ne}},Ze.memo=function(j,W){return{$$typeof:f,type:j,compare:W===void 0?null:W}},Ze.startTransition=function(j){var W=N.T,F={};N.T=F;try{var ie=j(),re=N.S;re!==null&&re(F,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(ve,ee)}catch(de){ee(de)}finally{N.T=W}},Ze.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ze.use=function(j){return N.H.use(j)},Ze.useActionState=function(j,W,F){return N.H.useActionState(j,W,F)},Ze.useCallback=function(j,W){return N.H.useCallback(j,W)},Ze.useContext=function(j){return N.H.useContext(j)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(j,W){return N.H.useDeferredValue(j,W)},Ze.useEffect=function(j,W){return N.H.useEffect(j,W)},Ze.useId=function(){return N.H.useId()},Ze.useImperativeHandle=function(j,W,F){return N.H.useImperativeHandle(j,W,F)},Ze.useInsertionEffect=function(j,W){return N.H.useInsertionEffect(j,W)},Ze.useLayoutEffect=function(j,W){return N.H.useLayoutEffect(j,W)},Ze.useMemo=function(j,W){return N.H.useMemo(j,W)},Ze.useOptimistic=function(j,W){return N.H.useOptimistic(j,W)},Ze.useReducer=function(j,W,F){return N.H.useReducer(j,W,F)},Ze.useRef=function(j){return N.H.useRef(j)},Ze.useState=function(j){return N.H.useState(j)},Ze.useSyncExternalStore=function(j,W,F){return N.H.useSyncExternalStore(j,W,F)},Ze.useTransition=function(){return N.H.useTransition()},Ze.version="19.0.0",Ze}var gS;function du(){return gS||(gS=1,mg.exports=gM()),mg.exports}var E=du();const $e=xh(E),yM=hM({__proto__:null,default:$e},[E]);var pg={exports:{}},ac={},gg={exports:{}},yg={};/**
19
- * @license React
20
- * scheduler.production.js
21
- *
22
- * Copyright (c) Meta Platforms, Inc. and affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var yS;function vM(){return yS||(yS=1,function(e){function t(U,ne){var ee=U.length;U.push(ne);e:for(;0<ee;){var ve=ee-1>>>1,j=U[ve];if(0<a(j,ne))U[ve]=ne,U[ee]=j,ee=ve;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var ne=U[0],ee=U.pop();if(ee!==ne){U[0]=ee;e:for(var ve=0,j=U.length,W=j>>>1;ve<W;){var F=2*(ve+1)-1,ie=U[F],re=F+1,de=U[re];if(0>a(ie,ee))re<j&&0>a(de,ie)?(U[ve]=de,U[re]=ee,ve=re):(U[ve]=ie,U[F]=ee,ve=F);else if(re<j&&0>a(de,ee))U[ve]=de,U[re]=ee,ve=re;else break e}}return ne}function a(U,ne){var ee=U.sortIndex-ne.sortIndex;return ee!==0?ee:U.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,g=null,y=3,b=!1,v=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R(U){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=U)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function D(U){if(S=!1,R(U),!v)if(n(d)!==null)v=!0,Y();else{var ne=n(f);ne!==null&&J(D,ne.startTime-U)}}var N=!1,k=-1,I=5,P=-1;function V(){return!(e.unstable_now()-P<I)}function H(){if(N){var U=e.unstable_now();P=U;var ne=!0;try{e:{v=!1,S&&(S=!1,w(k),k=-1),b=!0;var ee=y;try{t:{for(R(U),g=n(d);g!==null&&!(g.expirationTime>U&&V());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,y=g.priorityLevel;var j=ve(g.expirationTime<=U);if(U=e.unstable_now(),typeof j=="function"){g.callback=j,R(U),ne=!0;break t}g===n(d)&&r(d),R(U)}else r(d);g=n(d)}if(g!==null)ne=!0;else{var W=n(f);W!==null&&J(D,W.startTime-U),ne=!1}}break e}finally{g=null,y=ee,b=!1}ne=void 0}}finally{ne?fe():N=!1}}}var fe;if(typeof T=="function")fe=function(){T(H)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ue=te.port2;te.port1.onmessage=H,fe=function(){ue.postMessage(null)}}else fe=function(){A(H,0)};function Y(){N||(N=!0,fe())}function J(U,ne){k=A(function(){U(e.unstable_now())},ne)}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(U){U.callback=null},e.unstable_continueExecution=function(){v||b||(v=!0,Y())},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(U){switch(y){case 1:case 2:case 3:var ne=3;break;default:ne=y}var ee=y;y=ne;try{return U()}finally{y=ee}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,ne){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ee=y;y=U;try{return ne()}finally{y=ee}},e.unstable_scheduleCallback=function(U,ne,ee){var ve=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ve+ee:ve):ee=ve,U){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=ee+j,U={id:m++,callback:ne,priorityLevel:U,startTime:ee,expirationTime:j,sortIndex:-1},ee>ve?(U.sortIndex=ee,t(f,U),n(d)===null&&U===n(f)&&(S?(w(k),k=-1):S=!0,J(D,ee-ve))):(U.sortIndex=j,t(d,U),v||b||(v=!0,Y())),U},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(U){var ne=y;return function(){var ee=y;y=ne;try{return U.apply(this,arguments)}finally{y=ee}}}}(yg)),yg}var vS;function bM(){return vS||(vS=1,gg.exports=vM()),gg.exports}var vg={exports:{}},fn={};/**
27
- * @license React
28
- * react-dom.production.js
29
- *
30
- * Copyright (c) Meta Platforms, Inc. and affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var bS;function _M(){if(bS)return fn;bS=1;var e=du();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,f,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,fn.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(d,f,null,m)},fn.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},fn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},fn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},fn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,g=u(m,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:b}):m==="script"&&r.d.X(d,{crossOrigin:g,integrity:y,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},fn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},fn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,g=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},fn.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},fn.requestFormReset=function(d){r.d.r(d)},fn.unstable_batchedUpdates=function(d,f){return d(f)},fn.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},fn.useFormStatus=function(){return l.H.useHostTransitionStatus()},fn.version="19.0.0",fn}var _S;function WT(){if(_S)return vg.exports;_S=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(),vg.exports=_M(),vg.exports}/**
35
- * @license React
36
- * react-dom-client.production.js
37
- *
38
- * Copyright (c) Meta Platforms, Inc. and affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */var xS;function xM(){if(xS)return ac;xS=1;var e=bM(),t=du(),n=WT();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}var o=Symbol.for("react.element"),l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),y=Symbol.for("react.consumer"),b=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),D=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function k(i){return i===null||typeof i!="object"?null:(i=N&&i[N]||i["@@iterator"],typeof i=="function"?i:null)}var I=Symbol.for("react.client.reference");function P(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===I?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case d:return"Fragment";case u:return"Portal";case m:return"Profiler";case f:return"StrictMode";case S:return"Suspense";case A:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case b:return(i.displayName||"Context")+".Provider";case y:return(i._context.displayName||"Context")+".Consumer";case v:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case w:return s=i.displayName||null,s!==null?s:P(i.type)||"Memo";case T:s=i._payload,i=i._init;try{return P(i(s))}catch{}}return null}var V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.assign,fe,te;function ue(i){if(fe===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);fe=s&&s[1]||"",te=-1<c.stack.indexOf(`
43
- at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
44
- `+fe+i+te}var Y=!1;function J(i,s){if(!i||Y)return"";Y=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(se){var Q=se}Reflect.construct(i,[],he)}else{try{he.call()}catch(se){Q=se}i.call(he.prototype)}}else{try{throw Error()}catch(se){Q=se}(he=i())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(se){if(se&&Q&&typeof se.stack=="string")return[se.stack,Q.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=h.DetermineComponentFrameRoot(),C=x[0],O=x[1];if(C&&O){var M=C.split(`
45
- `),$=O.split(`
46
- `);for(p=h=0;h<M.length&&!M[h].includes("DetermineComponentFrameRoot");)h++;for(;p<$.length&&!$[p].includes("DetermineComponentFrameRoot");)p++;if(h===M.length||p===$.length)for(h=M.length-1,p=$.length-1;1<=h&&0<=p&&M[h]!==$[p];)p--;for(;1<=h&&0<=p;h--,p--)if(M[h]!==$[p]){if(h!==1||p!==1)do if(h--,p--,0>p||M[h]!==$[p]){var oe=`
47
- `+M[h].replace(" at new "," at ");return i.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",i.displayName)),oe}while(1<=h&&0<=p);break}}}finally{Y=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?ue(c):""}function U(i){switch(i.tag){case 26:case 27:case 5:return ue(i.type);case 16:return ue("Lazy");case 13:return ue("Suspense");case 19:return ue("SuspenseList");case 0:case 15:return i=J(i.type,!1),i;case 11:return i=J(i.type.render,!1),i;case 1:return i=J(i.type,!0),i;default:return""}}function ne(i){try{var s="";do s+=U(i),i=i.return;while(i);return s}catch(c){return`
48
- Error generating stack: `+c.message+`
49
- `+c.stack}}function ee(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function ve(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function j(i){if(ee(i)!==i)throw Error(r(188))}function W(i){var s=i.alternate;if(!s){if(s=ee(i),s===null)throw Error(r(188));return s!==i?null:i}for(var c=i,h=s;;){var p=c.return;if(p===null)break;var x=p.alternate;if(x===null){if(h=p.return,h!==null){c=h;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===c)return j(p),i;if(x===h)return j(p),s;x=x.sibling}throw Error(r(188))}if(c.return!==h.return)c=p,h=x;else{for(var C=!1,O=p.child;O;){if(O===c){C=!0,c=p,h=x;break}if(O===h){C=!0,h=p,c=x;break}O=O.sibling}if(!C){for(O=x.child;O;){if(O===c){C=!0,c=x,h=p;break}if(O===h){C=!0,h=x,c=p;break}O=O.sibling}if(!C)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:s}function F(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=F(i),s!==null)return s;i=i.sibling}return null}var ie=Array.isArray,re=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},ye=[],ge=-1;function we(i){return{current:i}}function He(i){0>ge||(i.current=ye[ge],ye[ge]=null,ge--)}function Me(i,s){ge++,ye[ge]=i.current,i.current=s}var Ke=we(null),at=we(null),Et=we(null),Yt=we(null);function pr(i,s){switch(Me(Et,s),Me(at,i),Me(Ke,null),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)&&(s=s.namespaceURI)?HE(s):0;break;default:if(i=i===8?s.parentNode:s,s=i.tagName,i=i.namespaceURI)i=HE(i),s=FE(i,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}He(Ke),Me(Ke,s)}function Dn(){He(Ke),He(at),He(Et)}function Nr(i){i.memoizedState!==null&&Me(Yt,i);var s=Ke.current,c=FE(s,i.type);s!==c&&(Me(at,i),Me(Ke,c))}function z(i){at.current===i&&(He(Ke),He(at)),Yt.current===i&&(He(Yt),Jl._currentValue=de)}var X=Object.prototype.hasOwnProperty,ae=e.unstable_scheduleCallback,Ae=e.unstable_cancelCallback,Ee=e.unstable_shouldYield,_e=e.unstable_requestPaint,ke=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,Lt=e.unstable_ImmediatePriority,Mt=e.unstable_UserBlockingPriority,In=e.unstable_NormalPriority,sm=e.unstable_LowPriority,Os=e.unstable_IdlePriority,ll=e.log,om=e.unstable_setDisableYieldValue,ji=null,bn=null;function Lu(i){if(bn&&typeof bn.onCommitFiberRoot=="function")try{bn.onCommitFiberRoot(ji,i,void 0,(i.current.flags&128)===128)}catch{}}function Pi(i){if(typeof ll=="function"&&om(i),bn&&typeof bn.setStrictMode=="function")try{bn.setStrictMode(ji,i)}catch{}}var Ln=Math.clz32?Math.clz32:QD,ZD=Math.log,XD=Math.LN2;function QD(i){return i>>>=0,i===0?32:31-(ZD(i)/XD|0)|0}var Mu=128,ju=4194304;function Ia(i){var s=i&42;if(s!==0)return s;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128: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 i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Pu(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,p=i.suspendedLanes,x=i.pingedLanes,C=i.warmLanes;i=i.finishedLanes!==0;var O=c&134217727;return O!==0?(c=O&~p,c!==0?h=Ia(c):(x&=O,x!==0?h=Ia(x):i||(C=O&~C,C!==0&&(h=Ia(C))))):(O=c&~p,O!==0?h=Ia(O):x!==0?h=Ia(x):i||(C=c&~C,C!==0&&(h=Ia(C)))),h===0?0:s!==0&&s!==h&&(s&p)===0&&(p=h&-h,C=s&-s,p>=C||p===32&&(C&4194176)!==0)?s:h}function cl(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function JD(i,s){switch(i){case 1:case 2:case 4:case 8:return s+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function L0(){var i=Mu;return Mu<<=1,(Mu&4194176)===0&&(Mu=128),i}function M0(){var i=ju;return ju<<=1,(ju&62914560)===0&&(ju=4194304),i}function lm(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function ul(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function eI(i,s,c,h,p,x){var C=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var O=i.entanglements,M=i.expirationTimes,$=i.hiddenUpdates;for(c=C&~c;0<c;){var oe=31-Ln(c),he=1<<oe;O[oe]=0,M[oe]=-1;var Q=$[oe];if(Q!==null)for($[oe]=null,oe=0;oe<Q.length;oe++){var se=Q[oe];se!==null&&(se.lane&=-536870913)}c&=~he}h!==0&&j0(i,h,0),x!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=x&~(C&~s))}function j0(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var h=31-Ln(s);i.entangledLanes|=s,i.entanglements[h]=i.entanglements[h]|1073741824|c&4194218}function P0(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-Ln(c),p=1<<h;p&s|i[h]&s&&(i[h]|=s),c&=~p}}function V0(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function B0(){var i=re.p;return i!==0?i:(i=window.event,i===void 0?32:oS(i.type))}function tI(i,s){var c=re.p;try{return re.p=i,s()}finally{re.p=c}}var Vi=Math.random().toString(36).slice(2),un="__reactFiber$"+Vi,Tn="__reactProps$"+Vi,ks="__reactContainer$"+Vi,cm="__reactEvents$"+Vi,nI="__reactListeners$"+Vi,rI="__reactHandles$"+Vi,z0="__reactResources$"+Vi,dl="__reactMarker$"+Vi;function um(i){delete i[un],delete i[Tn],delete i[cm],delete i[nI],delete i[rI]}function La(i){var s=i[un];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ks]||c[un]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=qE(i);i!==null;){if(c=i[un])return c;i=qE(i)}return s}i=c,c=i.parentNode}return null}function Ds(i){if(i=i[un]||i[ks]){var s=i.tag;if(s===5||s===6||s===13||s===26||s===27||s===3)return i}return null}function fl(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function Is(i){var s=i[z0];return s||(s=i[z0]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Zt(i){i[dl]=!0}var U0=new Set,H0={};function Ma(i,s){Ls(i,s),Ls(i+"Capture",s)}function Ls(i,s){for(H0[i]=s,i=0;i<s.length;i++)U0.add(s[i])}var ti=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iI=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]*$"),F0={},G0={};function aI(i){return X.call(G0,i)?!0:X.call(F0,i)?!1:iI.test(i)?G0[i]=!0:(F0[i]=!0,!1)}function Vu(i,s,c){if(aI(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function Bu(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function ni(i,s,c,h){if(h===null)i.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+h)}}function Wn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function $0(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function sI(i){var s=$0(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return p.call(this)},set:function(C){h=""+C,x.call(this,C)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(C){h=""+C},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function zu(i){i._valueTracker||(i._valueTracker=sI(i))}function q0(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=$0(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function Uu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var oI=/[\n"\\]/g;function Yn(i){return i.replace(oI,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function dm(i,s,c,h,p,x,C,O){i.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?i.type=C:i.removeAttribute("type"),s!=null?C==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Wn(s)):i.value!==""+Wn(s)&&(i.value=""+Wn(s)):C!=="submit"&&C!=="reset"||i.removeAttribute("value"),s!=null?fm(i,C,Wn(s)):c!=null?fm(i,C,Wn(c)):h!=null&&i.removeAttribute("value"),p==null&&x!=null&&(i.defaultChecked=!!x),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?i.name=""+Wn(O):i.removeAttribute("name")}function K0(i,s,c,h,p,x,C,O){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.type=x),s!=null||c!=null){if(!(x!=="submit"&&x!=="reset"||s!=null))return;c=c!=null?""+Wn(c):"",s=s!=null?""+Wn(s):c,O||s===i.value||(i.value=s),i.defaultValue=s}h=h??p,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=O?i.checked:!!h,i.defaultChecked=!!h,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(i.name=C)}function fm(i,s,c){s==="number"&&Uu(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function Ms(i,s,c,h){if(i=i.options,s){s={};for(var p=0;p<c.length;p++)s["$"+c[p]]=!0;for(c=0;c<i.length;c++)p=s.hasOwnProperty("$"+i[c].value),i[c].selected!==p&&(i[c].selected=p),p&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Wn(c),s=null,p=0;p<i.length;p++){if(i[p].value===c){i[p].selected=!0,h&&(i[p].defaultSelected=!0);return}s!==null||i[p].disabled||(s=i[p])}s!==null&&(s.selected=!0)}}function W0(i,s,c){if(s!=null&&(s=""+Wn(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+Wn(c):""}function Y0(i,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(ie(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=Wn(s),i.defaultValue=c,h=i.textContent,h===c&&h!==""&&h!==null&&(i.value=h)}function js(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var lI=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 Z0(i,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":h?i.setProperty(s,c):typeof c!="number"||c===0||lI.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function X0(i,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var p in s)h=s[p],s.hasOwnProperty(p)&&c[p]!==h&&Z0(i,p,h)}else for(var x in s)s.hasOwnProperty(x)&&Z0(i,x,s[x])}function hm(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var cI=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"]]),uI=/^[\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 Hu(i){return uI.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var mm=null;function pm(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ps=null,Vs=null;function Q0(i){var s=Ds(i);if(s&&(i=s.stateNode)){var c=i[Tn]||null;e:switch(i=s.stateNode,s.type){case"input":if(dm(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Yn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var p=h[Tn]||null;if(!p)throw Error(r(90));dm(h,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===i.form&&q0(h)}break e;case"textarea":W0(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Ms(i,!!c.multiple,s,!1)}}}var gm=!1;function J0(i,s,c){if(gm)return i(s,c);gm=!0;try{var h=i(s);return h}finally{if(gm=!1,(Ps!==null||Vs!==null)&&(wd(),Ps&&(s=Ps,i=Vs,Vs=Ps=null,Q0(s),i)))for(s=0;s<i.length;s++)Q0(i[s])}}function hl(i,s){var c=i.stateNode;if(c===null)return null;var h=c[Tn]||null;if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var ym=!1;if(ti)try{var ml={};Object.defineProperty(ml,"passive",{get:function(){ym=!0}}),window.addEventListener("test",ml,ml),window.removeEventListener("test",ml,ml)}catch{ym=!1}var Bi=null,vm=null,Fu=null;function e_(){if(Fu)return Fu;var i,s=vm,c=s.length,h,p="value"in Bi?Bi.value:Bi.textContent,x=p.length;for(i=0;i<c&&s[i]===p[i];i++);var C=c-i;for(h=1;h<=C&&s[c-h]===p[x-h];h++);return Fu=p.slice(i,1<h?1-h:void 0)}function Gu(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function $u(){return!0}function t_(){return!1}function Cn(i){function s(c,h,p,x,C){this._reactName=c,this._targetInst=p,this.type=h,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var O in i)i.hasOwnProperty(O)&&(c=i[O],this[O]=c?c(x):x[O]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?$u:t_,this.isPropagationStopped=t_,this}return H(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=$u)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=$u)},persist:function(){},isPersistent:$u}),s}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qu=Cn(ja),pl=H({},ja,{view:0,detail:0}),dI=Cn(pl),bm,_m,gl,Ku=H({},pl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Em,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==gl&&(gl&&i.type==="mousemove"?(bm=i.screenX-gl.screenX,_m=i.screenY-gl.screenY):_m=bm=0,gl=i),bm)},movementY:function(i){return"movementY"in i?i.movementY:_m}}),n_=Cn(Ku),fI=H({},Ku,{dataTransfer:0}),hI=Cn(fI),mI=H({},pl,{relatedTarget:0}),xm=Cn(mI),pI=H({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),gI=Cn(pI),yI=H({},ja,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),vI=Cn(yI),bI=H({},ja,{data:0}),r_=Cn(bI),_I={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xI={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"},EI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SI(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=EI[i])?!!s[i]:!1}function Em(){return SI}var AI=H({},pl,{key:function(i){if(i.key){var s=_I[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Gu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Em,charCode:function(i){return i.type==="keypress"?Gu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Gu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),wI=Cn(AI),TI=H({},Ku,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),i_=Cn(TI),CI=H({},pl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Em}),RI=Cn(CI),NI=H({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),OI=Cn(NI),kI=H({},Ku,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),DI=Cn(kI),II=H({},ja,{newState:0,oldState:0}),LI=Cn(II),MI=[9,13,27,32],Sm=ti&&"CompositionEvent"in window,yl=null;ti&&"documentMode"in document&&(yl=document.documentMode);var jI=ti&&"TextEvent"in window&&!yl,a_=ti&&(!Sm||yl&&8<yl&&11>=yl),s_=" ",o_=!1;function l_(i,s){switch(i){case"keyup":return MI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Bs=!1;function PI(i,s){switch(i){case"compositionend":return c_(s);case"keypress":return s.which!==32?null:(o_=!0,s_);case"textInput":return i=s.data,i===s_&&o_?null:i;default:return null}}function VI(i,s){if(Bs)return i==="compositionend"||!Sm&&l_(i,s)?(i=e_(),Fu=vm=Bi=null,Bs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return a_&&s.locale!=="ko"?null:s.data;default:return null}}var BI={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 u_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!BI[i.type]:s==="textarea"}function d_(i,s,c,h){Ps?Vs?Vs.push(h):Vs=[h]:Ps=h,s=Od(s,"onChange"),0<s.length&&(c=new qu("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var vl=null,bl=null;function zI(i){PE(i,0)}function Wu(i){var s=fl(i);if(q0(s))return i}function f_(i,s){if(i==="change")return s}var h_=!1;if(ti){var Am;if(ti){var wm="oninput"in document;if(!wm){var m_=document.createElement("div");m_.setAttribute("oninput","return;"),wm=typeof m_.oninput=="function"}Am=wm}else Am=!1;h_=Am&&(!document.documentMode||9<document.documentMode)}function p_(){vl&&(vl.detachEvent("onpropertychange",g_),bl=vl=null)}function g_(i){if(i.propertyName==="value"&&Wu(bl)){var s=[];d_(s,bl,i,pm(i)),J0(zI,s)}}function UI(i,s,c){i==="focusin"?(p_(),vl=s,bl=c,vl.attachEvent("onpropertychange",g_)):i==="focusout"&&p_()}function HI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Wu(bl)}function FI(i,s){if(i==="click")return Wu(s)}function GI(i,s){if(i==="input"||i==="change")return Wu(s)}function $I(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Mn=typeof Object.is=="function"?Object.is:$I;function _l(i,s){if(Mn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var p=c[h];if(!X.call(s,p)||!Mn(i[p],s[p]))return!1}return!0}function y_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function v_(i,s){var c=y_(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=y_(c)}}function b_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?b_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function __(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Uu(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=Uu(i.document)}return s}function Tm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function qI(i,s){var c=__(s);s=i.focusedElem;var h=i.selectionRange;if(c!==s&&s&&s.ownerDocument&&b_(s.ownerDocument.documentElement,s)){if(h!==null&&Tm(s)){if(i=h.start,c=h.end,c===void 0&&(c=i),"selectionStart"in s)s.selectionStart=i,s.selectionEnd=Math.min(c,s.value.length);else if(c=(i=s.ownerDocument||document)&&i.defaultView||window,c.getSelection){c=c.getSelection();var p=s.textContent.length,x=Math.min(h.start,p);h=h.end===void 0?x:Math.min(h.end,p),!c.extend&&x>h&&(p=h,h=x,x=p),p=v_(s,x);var C=v_(s,h);p&&C&&(c.rangeCount!==1||c.anchorNode!==p.node||c.anchorOffset!==p.offset||c.focusNode!==C.node||c.focusOffset!==C.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),c.removeAllRanges(),x>h?(c.addRange(i),c.extend(C.node,C.offset)):(i.setEnd(C.node,C.offset),c.addRange(i)))}}for(i=[],c=s;c=c.parentNode;)c.nodeType===1&&i.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<i.length;s++)c=i[s],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var KI=ti&&"documentMode"in document&&11>=document.documentMode,zs=null,Cm=null,xl=null,Rm=!1;function x_(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Rm||zs==null||zs!==Uu(h)||(h=zs,"selectionStart"in h&&Tm(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),xl&&_l(xl,h)||(xl=h,h=Od(Cm,"onSelect"),0<h.length&&(s=new qu("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=zs)))}function Pa(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Us={animationend:Pa("Animation","AnimationEnd"),animationiteration:Pa("Animation","AnimationIteration"),animationstart:Pa("Animation","AnimationStart"),transitionrun:Pa("Transition","TransitionRun"),transitionstart:Pa("Transition","TransitionStart"),transitioncancel:Pa("Transition","TransitionCancel"),transitionend:Pa("Transition","TransitionEnd")},Nm={},E_={};ti&&(E_=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function Va(i){if(Nm[i])return Nm[i];if(!Us[i])return i;var s=Us[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in E_)return Nm[i]=s[c];return i}var S_=Va("animationend"),A_=Va("animationiteration"),w_=Va("animationstart"),WI=Va("transitionrun"),YI=Va("transitionstart"),ZI=Va("transitioncancel"),T_=Va("transitionend"),C_=new Map,R_="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 scrollEnd toggle touchMove waiting wheel".split(" ");function gr(i,s){C_.set(i,s),Ma(s,[i])}var Zn=[],Hs=0,Om=0;function Yu(){for(var i=Hs,s=Om=Hs=0;s<i;){var c=Zn[s];Zn[s++]=null;var h=Zn[s];Zn[s++]=null;var p=Zn[s];Zn[s++]=null;var x=Zn[s];if(Zn[s++]=null,h!==null&&p!==null){var C=h.pending;C===null?p.next=p:(p.next=C.next,C.next=p),h.pending=p}x!==0&&N_(c,p,x)}}function Zu(i,s,c,h){Zn[Hs++]=i,Zn[Hs++]=s,Zn[Hs++]=c,Zn[Hs++]=h,Om|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function km(i,s,c,h){return Zu(i,s,c,h),Xu(i)}function zi(i,s){return Zu(i,null,null,s),Xu(i)}function N_(i,s,c){i.lanes|=c;var h=i.alternate;h!==null&&(h.lanes|=c);for(var p=!1,x=i.return;x!==null;)x.childLanes|=c,h=x.alternate,h!==null&&(h.childLanes|=c),x.tag===22&&(i=x.stateNode,i===null||i._visibility&1||(p=!0)),i=x,x=x.return;p&&s!==null&&i.tag===3&&(x=i.stateNode,p=31-Ln(c),x=x.hiddenUpdates,i=x[p],i===null?x[p]=[s]:i.push(s),s.lane=c|536870912)}function Xu(i){if(50<ql)throw ql=0,Pp=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Fs={},O_=new WeakMap;function Xn(i,s){if(typeof i=="object"&&i!==null){var c=O_.get(i);return c!==void 0?c:(s={value:i,source:s,stack:ne(s)},O_.set(i,s),s)}return{value:i,source:s,stack:ne(s)}}var Gs=[],$s=0,Qu=null,Ju=0,Qn=[],Jn=0,Ba=null,ri=1,ii="";function za(i,s){Gs[$s++]=Ju,Gs[$s++]=Qu,Qu=i,Ju=s}function k_(i,s,c){Qn[Jn++]=ri,Qn[Jn++]=ii,Qn[Jn++]=Ba,Ba=i;var h=ri;i=ii;var p=32-Ln(h)-1;h&=~(1<<p),c+=1;var x=32-Ln(s)+p;if(30<x){var C=p-p%5;x=(h&(1<<C)-1).toString(32),h>>=C,p-=C,ri=1<<32-Ln(s)+p|c<<p|h,ii=x+i}else ri=1<<x|c<<p|h,ii=i}function Dm(i){i.return!==null&&(za(i,1),k_(i,1,0))}function Im(i){for(;i===Qu;)Qu=Gs[--$s],Gs[$s]=null,Ju=Gs[--$s],Gs[$s]=null;for(;i===Ba;)Ba=Qn[--Jn],Qn[Jn]=null,ii=Qn[--Jn],Qn[Jn]=null,ri=Qn[--Jn],Qn[Jn]=null}var _n=null,an=null,dt=!1,yr=null,Or=!1,Lm=Error(r(519));function Ua(i){var s=Error(r(418,""));throw Al(Xn(s,i)),Lm}function D_(i){var s=i.stateNode,c=i.type,h=i.memoizedProps;switch(s[un]=i,s[Tn]=h,c){case"dialog":ot("cancel",s),ot("close",s);break;case"iframe":case"object":case"embed":ot("load",s);break;case"video":case"audio":for(c=0;c<Wl.length;c++)ot(Wl[c],s);break;case"source":ot("error",s);break;case"img":case"image":case"link":ot("error",s),ot("load",s);break;case"details":ot("toggle",s);break;case"input":ot("invalid",s),K0(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0),zu(s);break;case"select":ot("invalid",s);break;case"textarea":ot("invalid",s),Y0(s,h.value,h.defaultValue,h.children),zu(s)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||UE(s.textContent,c)?(h.popover!=null&&(ot("beforetoggle",s),ot("toggle",s)),h.onScroll!=null&&ot("scroll",s),h.onScrollEnd!=null&&ot("scrollend",s),h.onClick!=null&&(s.onclick=kd),s=!0):s=!1,s||Ua(i)}function I_(i){for(_n=i.return;_n;)switch(_n.tag){case 3:case 27:Or=!0;return;case 5:case 13:Or=!1;return;default:_n=_n.return}}function El(i){if(i!==_n)return!1;if(!dt)return I_(i),dt=!0,!1;var s=!1,c;if((c=i.tag!==3&&i.tag!==27)&&((c=i.tag===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||eg(i.type,i.memoizedProps)),c=!c),c&&(s=!0),s&&an&&Ua(i),I_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(s===0){an=br(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++;i=i.nextSibling}an=null}}else an=_n?br(i.stateNode.nextSibling):null;return!0}function Sl(){an=_n=null,dt=!1}function Al(i){yr===null?yr=[i]:yr.push(i)}var wl=Error(r(460)),L_=Error(r(474)),Mm={then:function(){}};function M_(i){return i=i.status,i==="fulfilled"||i==="rejected"}function ed(){}function j_(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(ed,ed),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,i===wl?Error(r(483)):i;default:if(typeof s.status=="string")s.then(ed,ed);else{if(i=vt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(h){if(s.status==="pending"){var p=s;p.status="fulfilled",p.value=h}},function(h){if(s.status==="pending"){var p=s;p.status="rejected",p.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,i===wl?Error(r(483)):i}throw Tl=s,wl}}var Tl=null;function P_(){if(Tl===null)throw Error(r(459));var i=Tl;return Tl=null,i}var qs=null,Cl=0;function td(i){var s=Cl;return Cl+=1,qs===null&&(qs=[]),j_(qs,i,s)}function Rl(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function nd(i,s){throw s.$$typeof===o?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function V_(i){var s=i._init;return s(i._payload)}function B_(i){function s(K,G){if(i){var Z=K.deletions;Z===null?(K.deletions=[G],K.flags|=16):Z.push(G)}}function c(K,G){if(!i)return null;for(;G!==null;)s(K,G),G=G.sibling;return null}function h(K){for(var G=new Map;K!==null;)K.key!==null?G.set(K.key,K):G.set(K.index,K),K=K.sibling;return G}function p(K,G){return K=Qi(K,G),K.index=0,K.sibling=null,K}function x(K,G,Z){return K.index=Z,i?(Z=K.alternate,Z!==null?(Z=Z.index,Z<G?(K.flags|=33554434,G):Z):(K.flags|=33554434,G)):(K.flags|=1048576,G)}function C(K){return i&&K.alternate===null&&(K.flags|=33554434),K}function O(K,G,Z,ce){return G===null||G.tag!==6?(G=Np(Z,K.mode,ce),G.return=K,G):(G=p(G,Z),G.return=K,G)}function M(K,G,Z,ce){var Re=Z.type;return Re===d?oe(K,G,Z.props.children,ce,Z.key):G!==null&&(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&V_(Re)===G.type)?(G=p(G,Z.props),Rl(G,Z),G.return=K,G):(G=_d(Z.type,Z.key,Z.props,null,K.mode,ce),Rl(G,Z),G.return=K,G)}function $(K,G,Z,ce){return G===null||G.tag!==4||G.stateNode.containerInfo!==Z.containerInfo||G.stateNode.implementation!==Z.implementation?(G=Op(Z,K.mode,ce),G.return=K,G):(G=p(G,Z.children||[]),G.return=K,G)}function oe(K,G,Z,ce,Re){return G===null||G.tag!==7?(G=Xa(Z,K.mode,ce,Re),G.return=K,G):(G=p(G,Z),G.return=K,G)}function he(K,G,Z){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Np(""+G,K.mode,Z),G.return=K,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case l:return Z=_d(G.type,G.key,G.props,null,K.mode,Z),Rl(Z,G),Z.return=K,Z;case u:return G=Op(G,K.mode,Z),G.return=K,G;case T:var ce=G._init;return G=ce(G._payload),he(K,G,Z)}if(ie(G)||k(G))return G=Xa(G,K.mode,Z,null),G.return=K,G;if(typeof G.then=="function")return he(K,td(G),Z);if(G.$$typeof===b)return he(K,yd(K,G),Z);nd(K,G)}return null}function Q(K,G,Z,ce){var Re=G!==null?G.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Re!==null?null:O(K,G,""+Z,ce);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:return Z.key===Re?M(K,G,Z,ce):null;case u:return Z.key===Re?$(K,G,Z,ce):null;case T:return Re=Z._init,Z=Re(Z._payload),Q(K,G,Z,ce)}if(ie(Z)||k(Z))return Re!==null?null:oe(K,G,Z,ce,null);if(typeof Z.then=="function")return Q(K,G,td(Z),ce);if(Z.$$typeof===b)return Q(K,G,yd(K,Z),ce);nd(K,Z)}return null}function se(K,G,Z,ce,Re){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return K=K.get(Z)||null,O(G,K,""+ce,Re);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:return K=K.get(ce.key===null?Z:ce.key)||null,M(G,K,ce,Re);case u:return K=K.get(ce.key===null?Z:ce.key)||null,$(G,K,ce,Re);case T:var nt=ce._init;return ce=nt(ce._payload),se(K,G,Z,ce,Re)}if(ie(ce)||k(ce))return K=K.get(Z)||null,oe(G,K,ce,Re,null);if(typeof ce.then=="function")return se(K,G,Z,td(ce),Re);if(ce.$$typeof===b)return se(K,G,Z,yd(G,ce),Re);nd(G,ce)}return null}function Le(K,G,Z,ce){for(var Re=null,nt=null,Pe=G,Ve=G=0,Jt=null;Pe!==null&&Ve<Z.length;Ve++){Pe.index>Ve?(Jt=Pe,Pe=null):Jt=Pe.sibling;var ft=Q(K,Pe,Z[Ve],ce);if(ft===null){Pe===null&&(Pe=Jt);break}i&&Pe&&ft.alternate===null&&s(K,Pe),G=x(ft,G,Ve),nt===null?Re=ft:nt.sibling=ft,nt=ft,Pe=Jt}if(Ve===Z.length)return c(K,Pe),dt&&za(K,Ve),Re;if(Pe===null){for(;Ve<Z.length;Ve++)Pe=he(K,Z[Ve],ce),Pe!==null&&(G=x(Pe,G,Ve),nt===null?Re=Pe:nt.sibling=Pe,nt=Pe);return dt&&za(K,Ve),Re}for(Pe=h(Pe);Ve<Z.length;Ve++)Jt=se(Pe,K,Ve,Z[Ve],ce),Jt!==null&&(i&&Jt.alternate!==null&&Pe.delete(Jt.key===null?Ve:Jt.key),G=x(Jt,G,Ve),nt===null?Re=Jt:nt.sibling=Jt,nt=Jt);return i&&Pe.forEach(function(aa){return s(K,aa)}),dt&&za(K,Ve),Re}function qe(K,G,Z,ce){if(Z==null)throw Error(r(151));for(var Re=null,nt=null,Pe=G,Ve=G=0,Jt=null,ft=Z.next();Pe!==null&&!ft.done;Ve++,ft=Z.next()){Pe.index>Ve?(Jt=Pe,Pe=null):Jt=Pe.sibling;var aa=Q(K,Pe,ft.value,ce);if(aa===null){Pe===null&&(Pe=Jt);break}i&&Pe&&aa.alternate===null&&s(K,Pe),G=x(aa,G,Ve),nt===null?Re=aa:nt.sibling=aa,nt=aa,Pe=Jt}if(ft.done)return c(K,Pe),dt&&za(K,Ve),Re;if(Pe===null){for(;!ft.done;Ve++,ft=Z.next())ft=he(K,ft.value,ce),ft!==null&&(G=x(ft,G,Ve),nt===null?Re=ft:nt.sibling=ft,nt=ft);return dt&&za(K,Ve),Re}for(Pe=h(Pe);!ft.done;Ve++,ft=Z.next())ft=se(Pe,K,Ve,ft.value,ce),ft!==null&&(i&&ft.alternate!==null&&Pe.delete(ft.key===null?Ve:ft.key),G=x(ft,G,Ve),nt===null?Re=ft:nt.sibling=ft,nt=ft);return i&&Pe.forEach(function(uM){return s(K,uM)}),dt&&za(K,Ve),Re}function Dt(K,G,Z,ce){if(typeof Z=="object"&&Z!==null&&Z.type===d&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:e:{for(var Re=Z.key;G!==null;){if(G.key===Re){if(Re=Z.type,Re===d){if(G.tag===7){c(K,G.sibling),ce=p(G,Z.props.children),ce.return=K,K=ce;break e}}else if(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&V_(Re)===G.type){c(K,G.sibling),ce=p(G,Z.props),Rl(ce,Z),ce.return=K,K=ce;break e}c(K,G);break}else s(K,G);G=G.sibling}Z.type===d?(ce=Xa(Z.props.children,K.mode,ce,Z.key),ce.return=K,K=ce):(ce=_d(Z.type,Z.key,Z.props,null,K.mode,ce),Rl(ce,Z),ce.return=K,K=ce)}return C(K);case u:e:{for(Re=Z.key;G!==null;){if(G.key===Re)if(G.tag===4&&G.stateNode.containerInfo===Z.containerInfo&&G.stateNode.implementation===Z.implementation){c(K,G.sibling),ce=p(G,Z.children||[]),ce.return=K,K=ce;break e}else{c(K,G);break}else s(K,G);G=G.sibling}ce=Op(Z,K.mode,ce),ce.return=K,K=ce}return C(K);case T:return Re=Z._init,Z=Re(Z._payload),Dt(K,G,Z,ce)}if(ie(Z))return Le(K,G,Z,ce);if(k(Z)){if(Re=k(Z),typeof Re!="function")throw Error(r(150));return Z=Re.call(Z),qe(K,G,Z,ce)}if(typeof Z.then=="function")return Dt(K,G,td(Z),ce);if(Z.$$typeof===b)return Dt(K,G,yd(K,Z),ce);nd(K,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,G!==null&&G.tag===6?(c(K,G.sibling),ce=p(G,Z),ce.return=K,K=ce):(c(K,G),ce=Np(Z,K.mode,ce),ce.return=K,K=ce),C(K)):c(K,G)}return function(K,G,Z,ce){try{Cl=0;var Re=Dt(K,G,Z,ce);return qs=null,Re}catch(Pe){if(Pe===wl)throw Pe;var nt=rr(29,Pe,null,K.mode);return nt.lanes=ce,nt.return=K,nt}finally{}}}var Ha=B_(!0),z_=B_(!1),Ks=we(null),rd=we(0);function U_(i,s){i=pi,Me(rd,i),Me(Ks,s),pi=i|s.baseLanes}function jm(){Me(rd,pi),Me(Ks,Ks.current)}function Pm(){pi=rd.current,He(Ks),He(rd)}var er=we(null),kr=null;function Ui(i){var s=i.alternate;Me(Gt,Gt.current&1),Me(er,i),kr===null&&(s===null||Ks.current!==null||s.memoizedState!==null)&&(kr=i)}function H_(i){if(i.tag===22){if(Me(Gt,Gt.current),Me(er,i),kr===null){var s=i.alternate;s!==null&&s.memoizedState!==null&&(kr=i)}}else Hi()}function Hi(){Me(Gt,Gt.current),Me(er,er.current)}function ai(i){He(er),kr===i&&(kr=null),He(Gt)}var Gt=we(0);function id(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var XI=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,h){i.push(h)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},QI=e.unstable_scheduleCallback,JI=e.unstable_NormalPriority,$t={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vm(){return{controller:new XI,data:new Map,refCount:0}}function Nl(i){i.refCount--,i.refCount===0&&QI(JI,function(){i.controller.abort()})}var Ol=null,Bm=0,Ws=0,Ys=null;function eL(i,s){if(Ol===null){var c=Ol=[];Bm=0,Ws=$p(),Ys={status:"pending",value:void 0,then:function(h){c.push(h)}}}return Bm++,s.then(F_,F_),s}function F_(){if(--Bm===0&&Ol!==null){Ys!==null&&(Ys.status="fulfilled");var i=Ol;Ol=null,Ws=0,Ys=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function tL(i,s){var c=[],h={status:"pending",value:null,reason:null,then:function(p){c.push(p)}};return i.then(function(){h.status="fulfilled",h.value=s;for(var p=0;p<c.length;p++)(0,c[p])(s)},function(p){for(h.status="rejected",h.reason=p,p=0;p<c.length;p++)(0,c[p])(void 0)}),h}var G_=V.S;V.S=function(i,s){typeof s=="object"&&s!==null&&typeof s.then=="function"&&eL(i,s),G_!==null&&G_(i,s)};var Fa=we(null);function zm(){var i=Fa.current;return i!==null?i:vt.pooledCache}function ad(i,s){s===null?Me(Fa,Fa.current):Me(Fa,s.pool)}function $_(){var i=zm();return i===null?null:{parent:$t._currentValue,pool:i}}var Fi=0,et=null,mt=null,zt=null,sd=!1,Zs=!1,Ga=!1,od=0,kl=0,Xs=null,nL=0;function jt(){throw Error(r(321))}function Um(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Mn(i[c],s[c]))return!1;return!0}function Hm(i,s,c,h,p,x){return Fi=x,et=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,V.H=i===null||i.memoizedState===null?$a:Gi,Ga=!1,x=c(h,p),Ga=!1,Zs&&(x=K_(s,c,h,p)),q_(i),x}function q_(i){V.H=Dr;var s=mt!==null&&mt.next!==null;if(Fi=0,zt=mt=et=null,sd=!1,kl=0,Xs=null,s)throw Error(r(300));i===null||Xt||(i=i.dependencies,i!==null&&gd(i)&&(Xt=!0))}function K_(i,s,c,h){et=i;var p=0;do{if(Zs&&(Xs=null),kl=0,Zs=!1,25<=p)throw Error(r(301));if(p+=1,zt=mt=null,i.updateQueue!=null){var x=i.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}V.H=qa,x=s(c,h)}while(Zs);return x}function rL(){var i=V.H,s=i.useState()[0];return s=typeof s.then=="function"?Dl(s):s,i=i.useState()[0],(mt!==null?mt.memoizedState:null)!==i&&(et.flags|=1024),s}function Fm(){var i=od!==0;return od=0,i}function Gm(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function $m(i){if(sd){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}sd=!1}Fi=0,zt=mt=et=null,Zs=!1,kl=od=0,Xs=null}function Rn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?et.memoizedState=zt=i:zt=zt.next=i,zt}function Ut(){if(mt===null){var i=et.alternate;i=i!==null?i.memoizedState:null}else i=mt.next;var s=zt===null?et.memoizedState:zt.next;if(s!==null)zt=s,mt=i;else{if(i===null)throw et.alternate===null?Error(r(467)):Error(r(310));mt=i,i={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},zt===null?et.memoizedState=zt=i:zt=zt.next=i}return zt}var ld;ld=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Dl(i){var s=kl;return kl+=1,Xs===null&&(Xs=[]),i=j_(Xs,i,s),s=et,(zt===null?s.memoizedState:zt.next)===null&&(s=s.alternate,V.H=s===null||s.memoizedState===null?$a:Gi),i}function cd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Dl(i);if(i.$$typeof===b)return dn(i)}throw Error(r(438,String(i)))}function qm(i){var s=null,c=et.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=et.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(p){return p.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=ld(),et.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),h=0;h<i;h++)c[h]=D;return s.index++,c}function si(i,s){return typeof s=="function"?s(i):s}function ud(i){var s=Ut();return Km(s,mt,i)}function Km(i,s,c){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var p=i.baseQueue,x=h.pending;if(x!==null){if(p!==null){var C=p.next;p.next=x.next,x.next=C}s.baseQueue=p=x,h.pending=null}if(x=i.baseState,p===null)i.memoizedState=x;else{s=p.next;var O=C=null,M=null,$=s,oe=!1;do{var he=$.lane&-536870913;if(he!==$.lane?(ct&he)===he:(Fi&he)===he){var Q=$.revertLane;if(Q===0)M!==null&&(M=M.next={lane:0,revertLane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),he===Ws&&(oe=!0);else if((Fi&Q)===Q){$=$.next,Q===Ws&&(oe=!0);continue}else he={lane:0,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},M===null?(O=M=he,C=x):M=M.next=he,et.lanes|=Q,Ji|=Q;he=$.action,Ga&&c(x,he),x=$.hasEagerState?$.eagerState:c(x,he)}else Q={lane:he,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},M===null?(O=M=Q,C=x):M=M.next=Q,et.lanes|=he,Ji|=he;$=$.next}while($!==null&&$!==s);if(M===null?C=x:M.next=O,!Mn(x,i.memoizedState)&&(Xt=!0,oe&&(c=Ys,c!==null)))throw c;i.memoizedState=x,i.baseState=C,i.baseQueue=M,h.lastRenderedState=x}return p===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function Wm(i){var s=Ut(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var h=c.dispatch,p=c.pending,x=s.memoizedState;if(p!==null){c.pending=null;var C=p=p.next;do x=i(x,C.action),C=C.next;while(C!==p);Mn(x,s.memoizedState)||(Xt=!0),s.memoizedState=x,s.baseQueue===null&&(s.baseState=x),c.lastRenderedState=x}return[x,h]}function W_(i,s,c){var h=et,p=Ut(),x=dt;if(x){if(c===void 0)throw Error(r(407));c=c()}else c=s();var C=!Mn((mt||p).memoizedState,c);if(C&&(p.memoizedState=c,Xt=!0),p=p.queue,Xm(X_.bind(null,h,p,i),[i]),p.getSnapshot!==s||C||zt!==null&&zt.memoizedState.tag&1){if(h.flags|=2048,Qs(9,Z_.bind(null,h,p,c,s),{destroy:void 0},null),vt===null)throw Error(r(349));x||(Fi&60)!==0||Y_(h,s,c)}return c}function Y_(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=et.updateQueue,s===null?(s=ld(),et.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Z_(i,s,c,h){s.value=c,s.getSnapshot=h,Q_(s)&&J_(i)}function X_(i,s,c){return c(function(){Q_(s)&&J_(i)})}function Q_(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Mn(i,c)}catch{return!0}}function J_(i){var s=zi(i,2);s!==null&&xn(s,i,2)}function Ym(i){var s=Rn();if(typeof i=="function"){var c=i;if(i=c(),Ga){Pi(!0);try{c()}finally{Pi(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:i},s}function ex(i,s,c,h){return i.baseState=c,Km(i,mt,typeof h=="function"?h:si)}function iL(i,s,c,h,p){if(hd(i))throw Error(r(485));if(i=s.action,i!==null){var x={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};V.T!==null?c(!0):x.isTransition=!1,h(x),c=s.pending,c===null?(x.next=s.pending=x,tx(s,x)):(x.next=c.next,s.pending=c.next=x)}}function tx(i,s){var c=s.action,h=s.payload,p=i.state;if(s.isTransition){var x=V.T,C={};V.T=C;try{var O=c(p,h),M=V.S;M!==null&&M(C,O),nx(i,s,O)}catch($){Zm(i,s,$)}finally{V.T=x}}else try{x=c(p,h),nx(i,s,x)}catch($){Zm(i,s,$)}}function nx(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){rx(i,s,h)},function(h){return Zm(i,s,h)}):rx(i,s,c)}function rx(i,s,c){s.status="fulfilled",s.value=c,ix(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,tx(i,c)))}function Zm(i,s,c){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,ix(s),s=s.next;while(s!==h)}i.action=null}function ix(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function ax(i,s){return s}function sx(i,s){if(dt){var c=vt.formState;if(c!==null){e:{var h=et;if(dt){if(an){t:{for(var p=an,x=Or;p.nodeType!==8;){if(!x){p=null;break t}if(p=br(p.nextSibling),p===null){p=null;break t}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){an=br(p.nextSibling),h=p.data==="F!";break e}}Ua(h)}h=!1}h&&(s=c[0])}}return c=Rn(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ax,lastRenderedState:s},c.queue=h,c=Ax.bind(null,et,h),h.dispatch=c,h=Ym(!1),x=np.bind(null,et,!1,h.queue),h=Rn(),p={state:s,dispatch:null,action:i,pending:null},h.queue=p,c=iL.bind(null,et,p,x,c),p.dispatch=c,h.memoizedState=i,[s,c,!1]}function ox(i){var s=Ut();return lx(s,mt,i)}function lx(i,s,c){s=Km(i,s,ax)[0],i=ud(si)[0],s=typeof s=="object"&&s!==null&&typeof s.then=="function"?Dl(s):s;var h=Ut(),p=h.queue,x=p.dispatch;return c!==h.memoizedState&&(et.flags|=2048,Qs(9,aL.bind(null,p,c),{destroy:void 0},null)),[s,x,i]}function aL(i,s){i.action=s}function cx(i){var s=Ut(),c=mt;if(c!==null)return lx(s,c,i);Ut(),s=s.memoizedState,c=Ut();var h=c.queue.dispatch;return c.memoizedState=i,[s,h,!1]}function Qs(i,s,c,h){return i={tag:i,create:s,inst:c,deps:h,next:null},s=et.updateQueue,s===null&&(s=ld(),et.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i),i}function ux(){return Ut().memoizedState}function dd(i,s,c,h){var p=Rn();et.flags|=i,p.memoizedState=Qs(1|s,c,{destroy:void 0},h===void 0?null:h)}function fd(i,s,c,h){var p=Ut();h=h===void 0?null:h;var x=p.memoizedState.inst;mt!==null&&h!==null&&Um(h,mt.memoizedState.deps)?p.memoizedState=Qs(s,c,x,h):(et.flags|=i,p.memoizedState=Qs(1|s,c,x,h))}function dx(i,s){dd(8390656,8,i,s)}function Xm(i,s){fd(2048,8,i,s)}function fx(i,s){return fd(4,2,i,s)}function hx(i,s){return fd(4,4,i,s)}function mx(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function px(i,s,c){c=c!=null?c.concat([i]):null,fd(4,4,mx.bind(null,s,i),c)}function Qm(){}function gx(i,s){var c=Ut();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&Um(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function yx(i,s){var c=Ut();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&Um(s,h[1]))return h[0];if(h=i(),Ga){Pi(!0);try{i()}finally{Pi(!1)}}return c.memoizedState=[h,s],h}function Jm(i,s,c){return c===void 0||(Fi&1073741824)!==0?i.memoizedState=s:(i.memoizedState=c,i=bE(),et.lanes|=i,Ji|=i,c)}function vx(i,s,c,h){return Mn(c,s)?c:Ks.current!==null?(i=Jm(i,c,h),Mn(i,s)||(Xt=!0),i):(Fi&42)===0?(Xt=!0,i.memoizedState=c):(i=bE(),et.lanes|=i,Ji|=i,s)}function bx(i,s,c,h,p){var x=re.p;re.p=x!==0&&8>x?x:8;var C=V.T,O={};V.T=O,np(i,!1,s,c);try{var M=p(),$=V.S;if($!==null&&$(O,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var oe=tL(M,h);Il(i,s,oe,Bn(i))}else Il(i,s,h,Bn(i))}catch(he){Il(i,s,{then:function(){},status:"rejected",reason:he},Bn())}finally{re.p=x,V.T=C}}function sL(){}function ep(i,s,c,h){if(i.tag!==5)throw Error(r(476));var p=_x(i).queue;bx(i,p,s,de,c===null?sL:function(){return xx(i),c(h)})}function _x(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:de},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function xx(i){var s=_x(i).next.queue;Il(i,s,{},Bn())}function tp(){return dn(Jl)}function Ex(){return Ut().memoizedState}function Sx(){return Ut().memoizedState}function oL(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=Bn();i=Ki(c);var h=Wi(s,i,c);h!==null&&(xn(h,s,c),jl(h,s,c)),s={cache:Vm()},i.payload=s;return}s=s.return}}function lL(i,s,c){var h=Bn();c={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},hd(i)?wx(s,c):(c=km(i,s,c,h),c!==null&&(xn(c,i,h),Tx(c,s,h)))}function Ax(i,s,c){var h=Bn();Il(i,s,c,h)}function Il(i,s,c,h){var p={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(hd(i))wx(s,p);else{var x=i.alternate;if(i.lanes===0&&(x===null||x.lanes===0)&&(x=s.lastRenderedReducer,x!==null))try{var C=s.lastRenderedState,O=x(C,c);if(p.hasEagerState=!0,p.eagerState=O,Mn(O,C))return Zu(i,s,p,0),vt===null&&Yu(),!1}catch{}finally{}if(c=km(i,s,p,h),c!==null)return xn(c,i,h),Tx(c,s,h),!0}return!1}function np(i,s,c,h){if(h={lane:2,revertLane:$p(),action:h,hasEagerState:!1,eagerState:null,next:null},hd(i)){if(s)throw Error(r(479))}else s=km(i,c,h,2),s!==null&&xn(s,i,2)}function hd(i){var s=i.alternate;return i===et||s!==null&&s===et}function wx(i,s){Zs=sd=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function Tx(i,s,c){if((c&4194176)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,P0(i,c)}}var Dr={readContext:dn,use:cd,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt};Dr.useCacheRefresh=jt,Dr.useMemoCache=jt,Dr.useHostTransitionStatus=jt,Dr.useFormState=jt,Dr.useActionState=jt,Dr.useOptimistic=jt;var $a={readContext:dn,use:cd,useCallback:function(i,s){return Rn().memoizedState=[i,s===void 0?null:s],i},useContext:dn,useEffect:dx,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,dd(4194308,4,mx.bind(null,s,i),c)},useLayoutEffect:function(i,s){return dd(4194308,4,i,s)},useInsertionEffect:function(i,s){dd(4,2,i,s)},useMemo:function(i,s){var c=Rn();s=s===void 0?null:s;var h=i();if(Ga){Pi(!0);try{i()}finally{Pi(!1)}}return c.memoizedState=[h,s],h},useReducer:function(i,s,c){var h=Rn();if(c!==void 0){var p=c(s);if(Ga){Pi(!0);try{c(s)}finally{Pi(!1)}}}else p=s;return h.memoizedState=h.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},h.queue=i,i=i.dispatch=lL.bind(null,et,i),[h.memoizedState,i]},useRef:function(i){var s=Rn();return i={current:i},s.memoizedState=i},useState:function(i){i=Ym(i);var s=i.queue,c=Ax.bind(null,et,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:Qm,useDeferredValue:function(i,s){var c=Rn();return Jm(c,i,s)},useTransition:function(){var i=Ym(!1);return i=bx.bind(null,et,i.queue,!0,!1),Rn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var h=et,p=Rn();if(dt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),vt===null)throw Error(r(349));(ct&60)!==0||Y_(h,s,c)}p.memoizedState=c;var x={value:c,getSnapshot:s};return p.queue=x,dx(X_.bind(null,h,x,i),[i]),h.flags|=2048,Qs(9,Z_.bind(null,h,x,c,s),{destroy:void 0},null),c},useId:function(){var i=Rn(),s=vt.identifierPrefix;if(dt){var c=ii,h=ri;c=(h&~(1<<32-Ln(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=od++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=nL++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},useCacheRefresh:function(){return Rn().memoizedState=oL.bind(null,et)}};$a.useMemoCache=qm,$a.useHostTransitionStatus=tp,$a.useFormState=sx,$a.useActionState=sx,$a.useOptimistic=function(i){var s=Rn();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=np.bind(null,et,!0,c),c.dispatch=s,[i,s]};var Gi={readContext:dn,use:cd,useCallback:gx,useContext:dn,useEffect:Xm,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:hx,useMemo:yx,useReducer:ud,useRef:ux,useState:function(){return ud(si)},useDebugValue:Qm,useDeferredValue:function(i,s){var c=Ut();return vx(c,mt.memoizedState,i,s)},useTransition:function(){var i=ud(si)[0],s=Ut().memoizedState;return[typeof i=="boolean"?i:Dl(i),s]},useSyncExternalStore:W_,useId:Ex};Gi.useCacheRefresh=Sx,Gi.useMemoCache=qm,Gi.useHostTransitionStatus=tp,Gi.useFormState=ox,Gi.useActionState=ox,Gi.useOptimistic=function(i,s){var c=Ut();return ex(c,mt,i,s)};var qa={readContext:dn,use:cd,useCallback:gx,useContext:dn,useEffect:Xm,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:hx,useMemo:yx,useReducer:Wm,useRef:ux,useState:function(){return Wm(si)},useDebugValue:Qm,useDeferredValue:function(i,s){var c=Ut();return mt===null?Jm(c,i,s):vx(c,mt.memoizedState,i,s)},useTransition:function(){var i=Wm(si)[0],s=Ut().memoizedState;return[typeof i=="boolean"?i:Dl(i),s]},useSyncExternalStore:W_,useId:Ex};qa.useCacheRefresh=Sx,qa.useMemoCache=qm,qa.useHostTransitionStatus=tp,qa.useFormState=cx,qa.useActionState=cx,qa.useOptimistic=function(i,s){var c=Ut();return mt!==null?ex(c,mt,i,s):(c.baseState=i,[i,c.queue.dispatch])};function rp(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:H({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ip={isMounted:function(i){return(i=i._reactInternals)?ee(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=Ki(h);p.payload=s,c!=null&&(p.callback=c),s=Wi(i,p,h),s!==null&&(xn(s,i,h),jl(s,i,h))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=Ki(h);p.tag=1,p.payload=s,c!=null&&(p.callback=c),s=Wi(i,p,h),s!==null&&(xn(s,i,h),jl(s,i,h))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=Bn(),h=Ki(c);h.tag=2,s!=null&&(h.callback=s),s=Wi(i,h,c),s!==null&&(xn(s,i,c),jl(s,i,c))}};function Cx(i,s,c,h,p,x,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,x,C):s.prototype&&s.prototype.isPureReactComponent?!_l(c,h)||!_l(p,x):!0}function Rx(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&ip.enqueueReplaceState(s,s.state,null)}function Ka(i,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(i=i.defaultProps){c===s&&(c=H({},c));for(var p in i)c[p]===void 0&&(c[p]=i[p])}return c}var md=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function Nx(i){md(i)}function Ox(i){console.error(i)}function kx(i){md(i)}function pd(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function Dx(i,s,c){try{var h=i.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ap(i,s,c){return c=Ki(c),c.tag=3,c.payload={element:null},c.callback=function(){pd(i,s)},c}function Ix(i){return i=Ki(i),i.tag=3,i}function Lx(i,s,c,h){var p=c.type.getDerivedStateFromError;if(typeof p=="function"){var x=h.value;i.payload=function(){return p(x)},i.callback=function(){Dx(s,c,h)}}var C=c.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){Dx(s,c,h),typeof p!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var O=h.stack;this.componentDidCatch(h.value,{componentStack:O!==null?O:""})})}function cL(i,s,c,h,p){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&Ml(s,c,p,!0),c=er.current,c!==null){switch(c.tag){case 13:return kr===null?zp():c.alternate===null&&kt===0&&(kt=3),c.flags&=-257,c.flags|=65536,c.lanes=p,h===Mm?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),Hp(i,h,p)),!1;case 22:return c.flags|=65536,h===Mm?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),Hp(i,h,p)),!1}throw Error(r(435,c.tag))}return Hp(i,h,p),zp(),!1}if(dt)return s=er.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=p,h!==Lm&&(i=Error(r(422),{cause:h}),Al(Xn(i,c)))):(h!==Lm&&(s=Error(r(423),{cause:h}),Al(Xn(s,c))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,h=Xn(h,c),p=ap(i.stateNode,h,p),_p(i,p),kt!==4&&(kt=2)),!1;var x=Error(r(520),{cause:h});if(x=Xn(x,c),Gl===null?Gl=[x]:Gl.push(x),kt!==4&&(kt=2),s===null)return!0;h=Xn(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=p&-p,c.lanes|=i,i=ap(c.stateNode,h,i),_p(c,i),!1;case 1:if(s=c.type,x=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ea===null||!ea.has(x))))return c.flags|=65536,p&=-p,c.lanes|=p,p=Ix(p),Lx(p,i,c,h),_p(c,p),!1}c=c.return}while(c!==null);return!1}var Mx=Error(r(461)),Xt=!1;function sn(i,s,c,h){s.child=i===null?z_(s,null,c,h):Ha(s,i.child,c,h)}function jx(i,s,c,h,p){c=c.render;var x=s.ref;if("ref"in h){var C={};for(var O in h)O!=="ref"&&(C[O]=h[O])}else C=h;return Ya(s),h=Hm(i,s,c,C,x,p),O=Fm(),i!==null&&!Xt?(Gm(i,s,p),oi(i,s,p)):(dt&&O&&Dm(s),s.flags|=1,sn(i,s,h,p),s.child)}function Px(i,s,c,h,p){if(i===null){var x=c.type;return typeof x=="function"&&!Rp(x)&&x.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=x,Vx(i,s,x,h,p)):(i=_d(c.type,null,h,s,s.mode,p),i.ref=s.ref,i.return=s,s.child=i)}if(x=i.child,!mp(i,p)){var C=x.memoizedProps;if(c=c.compare,c=c!==null?c:_l,c(C,h)&&i.ref===s.ref)return oi(i,s,p)}return s.flags|=1,i=Qi(x,h),i.ref=s.ref,i.return=s,s.child=i}function Vx(i,s,c,h,p){if(i!==null){var x=i.memoizedProps;if(_l(x,h)&&i.ref===s.ref)if(Xt=!1,s.pendingProps=h=x,mp(i,p))(i.flags&131072)!==0&&(Xt=!0);else return s.lanes=i.lanes,oi(i,s,p)}return sp(i,s,c,h,p)}function Bx(i,s,c){var h=s.pendingProps,p=h.children,x=(s.stateNode._pendingVisibility&2)!==0,C=i!==null?i.memoizedState:null;if(Ll(i,s),h.mode==="hidden"||x){if((s.flags&128)!==0){if(h=C!==null?C.baseLanes|c:c,i!==null){for(p=s.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;s.childLanes=x&~h}else s.childLanes=0,s.child=null;return zx(i,s,h,c)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&ad(s,C!==null?C.cachePool:null),C!==null?U_(s,C):jm(),H_(s);else return s.lanes=s.childLanes=536870912,zx(i,s,C!==null?C.baseLanes|c:c,c)}else C!==null?(ad(s,C.cachePool),U_(s,C),Hi(),s.memoizedState=null):(i!==null&&ad(s,null),jm(),Hi());return sn(i,s,p,c),s.child}function zx(i,s,c,h){var p=zm();return p=p===null?null:{parent:$t._currentValue,pool:p},s.memoizedState={baseLanes:c,cachePool:p},i!==null&&ad(s,null),jm(),H_(s),i!==null&&Ml(i,s,h,!0),null}function Ll(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=2097664);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(s.flags|=2097664)}}function sp(i,s,c,h,p){return Ya(s),c=Hm(i,s,c,h,void 0,p),h=Fm(),i!==null&&!Xt?(Gm(i,s,p),oi(i,s,p)):(dt&&h&&Dm(s),s.flags|=1,sn(i,s,c,p),s.child)}function Ux(i,s,c,h,p,x){return Ya(s),s.updateQueue=null,c=K_(s,h,c,p),q_(i),h=Fm(),i!==null&&!Xt?(Gm(i,s,x),oi(i,s,x)):(dt&&h&&Dm(s),s.flags|=1,sn(i,s,c,x),s.child)}function Hx(i,s,c,h,p){if(Ya(s),s.stateNode===null){var x=Fs,C=c.contextType;typeof C=="object"&&C!==null&&(x=dn(C)),x=new c(h,x),s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=ip,s.stateNode=x,x._reactInternals=s,x=s.stateNode,x.props=h,x.state=s.memoizedState,x.refs={},vp(s),C=c.contextType,x.context=typeof C=="object"&&C!==null?dn(C):Fs,x.state=s.memoizedState,C=c.getDerivedStateFromProps,typeof C=="function"&&(rp(s,c,C,h),x.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&ip.enqueueReplaceState(x,x.state,null),Vl(s,h,x,p),Pl(),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(i===null){x=s.stateNode;var O=s.memoizedProps,M=Ka(c,O);x.props=M;var $=x.context,oe=c.contextType;C=Fs,typeof oe=="object"&&oe!==null&&(C=dn(oe));var he=c.getDerivedStateFromProps;oe=typeof he=="function"||typeof x.getSnapshotBeforeUpdate=="function",O=s.pendingProps!==O,oe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O||$!==C)&&Rx(s,x,h,C),qi=!1;var Q=s.memoizedState;x.state=Q,Vl(s,h,x,p),Pl(),$=s.memoizedState,O||Q!==$||qi?(typeof he=="function"&&(rp(s,c,he,h),$=s.memoizedState),(M=qi||Cx(s,c,M,h,Q,$,C))?(oe||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=$),x.props=h,x.state=$,x.context=C,h=M):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,bp(i,s),C=s.memoizedProps,oe=Ka(c,C),x.props=oe,he=s.pendingProps,Q=x.context,$=c.contextType,M=Fs,typeof $=="object"&&$!==null&&(M=dn($)),O=c.getDerivedStateFromProps,($=typeof O=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==he||Q!==M)&&Rx(s,x,h,M),qi=!1,Q=s.memoizedState,x.state=Q,Vl(s,h,x,p),Pl();var se=s.memoizedState;C!==he||Q!==se||qi||i!==null&&i.dependencies!==null&&gd(i.dependencies)?(typeof O=="function"&&(rp(s,c,O,h),se=s.memoizedState),(oe=qi||Cx(s,c,oe,h,Q,se,M)||i!==null&&i.dependencies!==null&&gd(i.dependencies))?($||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,se,M),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,se,M)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=se),x.props=h,x.state=se,x.context=M,h=oe):(typeof x.componentDidUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=1024),h=!1)}return x=h,Ll(i,s),h=(s.flags&128)!==0,x||h?(x=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:x.render(),s.flags|=1,i!==null&&h?(s.child=Ha(s,i.child,null,p),s.child=Ha(s,null,c,p)):sn(i,s,c,p),s.memoizedState=x.state,i=s.child):i=oi(i,s,p),i}function Fx(i,s,c,h){return Sl(),s.flags|=256,sn(i,s,c,h),s.child}var op={dehydrated:null,treeContext:null,retryLane:0};function lp(i){return{baseLanes:i,cachePool:$_()}}function cp(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=ir),i}function Gx(i,s,c){var h=s.pendingProps,p=!1,x=(s.flags&128)!==0,C;if((C=x)||(C=i!==null&&i.memoizedState===null?!1:(Gt.current&2)!==0),C&&(p=!0,s.flags&=-129),C=(s.flags&32)!==0,s.flags&=-33,i===null){if(dt){if(p?Ui(s):Hi(),dt){var O=an,M;if(M=O){e:{for(M=O,O=Or;M.nodeType!==8;){if(!O){O=null;break e}if(M=br(M.nextSibling),M===null){O=null;break e}}O=M}O!==null?(s.memoizedState={dehydrated:O,treeContext:Ba!==null?{id:ri,overflow:ii}:null,retryLane:536870912},M=rr(18,null,null,0),M.stateNode=O,M.return=s,s.child=M,_n=s,an=null,M=!0):M=!1}M||Ua(s)}if(O=s.memoizedState,O!==null&&(O=O.dehydrated,O!==null))return O.data==="$!"?s.lanes=16:s.lanes=536870912,null;ai(s)}return O=h.children,h=h.fallback,p?(Hi(),p=s.mode,O=dp({mode:"hidden",children:O},p),h=Xa(h,p,c,null),O.return=s,h.return=s,O.sibling=h,s.child=O,p=s.child,p.memoizedState=lp(c),p.childLanes=cp(i,C,c),s.memoizedState=op,h):(Ui(s),up(s,O))}if(M=i.memoizedState,M!==null&&(O=M.dehydrated,O!==null)){if(x)s.flags&256?(Ui(s),s.flags&=-257,s=fp(i,s,c)):s.memoizedState!==null?(Hi(),s.child=i.child,s.flags|=128,s=null):(Hi(),p=h.fallback,O=s.mode,h=dp({mode:"visible",children:h.children},O),p=Xa(p,O,c,null),p.flags|=2,h.return=s,p.return=s,h.sibling=p,s.child=h,Ha(s,i.child,null,c),h=s.child,h.memoizedState=lp(c),h.childLanes=cp(i,C,c),s.memoizedState=op,s=p);else if(Ui(s),O.data==="$!"){if(C=O.nextSibling&&O.nextSibling.dataset,C)var $=C.dgst;C=$,h=Error(r(419)),h.stack="",h.digest=C,Al({value:h,source:null,stack:null}),s=fp(i,s,c)}else if(Xt||Ml(i,s,c,!1),C=(c&i.childLanes)!==0,Xt||C){if(C=vt,C!==null){if(h=c&-c,(h&42)!==0)h=1;else switch(h){case 2:h=1;break;case 8:h=4;break;case 32:h=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:h=64;break;case 268435456:h=134217728;break;default:h=0}if(h=(h&(C.suspendedLanes|c))!==0?0:h,h!==0&&h!==M.retryLane)throw M.retryLane=h,zi(i,h),xn(C,i,h),Mx}O.data==="$?"||zp(),s=fp(i,s,c)}else O.data==="$?"?(s.flags|=128,s.child=i.child,s=AL.bind(null,i),O._reactRetry=s,s=null):(i=M.treeContext,an=br(O.nextSibling),_n=s,dt=!0,yr=null,Or=!1,i!==null&&(Qn[Jn++]=ri,Qn[Jn++]=ii,Qn[Jn++]=Ba,ri=i.id,ii=i.overflow,Ba=s),s=up(s,h.children),s.flags|=4096);return s}return p?(Hi(),p=h.fallback,O=s.mode,M=i.child,$=M.sibling,h=Qi(M,{mode:"hidden",children:h.children}),h.subtreeFlags=M.subtreeFlags&31457280,$!==null?p=Qi($,p):(p=Xa(p,O,c,null),p.flags|=2),p.return=s,h.return=s,h.sibling=p,s.child=h,h=p,p=s.child,O=i.child.memoizedState,O===null?O=lp(c):(M=O.cachePool,M!==null?($=$t._currentValue,M=M.parent!==$?{parent:$,pool:$}:M):M=$_(),O={baseLanes:O.baseLanes|c,cachePool:M}),p.memoizedState=O,p.childLanes=cp(i,C,c),s.memoizedState=op,h):(Ui(s),c=i.child,i=c.sibling,c=Qi(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,i!==null&&(C=s.deletions,C===null?(s.deletions=[i],s.flags|=16):C.push(i)),s.child=c,s.memoizedState=null,c)}function up(i,s){return s=dp({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function dp(i,s){return gE(i,s,0,null)}function fp(i,s,c){return Ha(s,i.child,null,c),i=up(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function $x(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),gp(i.return,s,c)}function hp(i,s,c,h,p){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:p}:(x.isBackwards=s,x.rendering=null,x.renderingStartTime=0,x.last=h,x.tail=c,x.tailMode=p)}function qx(i,s,c){var h=s.pendingProps,p=h.revealOrder,x=h.tail;if(sn(i,s,h.children,c),h=Gt.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&$x(i,c,s);else if(i.tag===19)$x(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}switch(Me(Gt,h),p){case"forwards":for(c=s.child,p=null;c!==null;)i=c.alternate,i!==null&&id(i)===null&&(p=c),c=c.sibling;c=p,c===null?(p=s.child,s.child=null):(p=c.sibling,c.sibling=null),hp(s,!1,p,c,x);break;case"backwards":for(c=null,p=s.child,s.child=null;p!==null;){if(i=p.alternate,i!==null&&id(i)===null){s.child=p;break}i=p.sibling,p.sibling=c,c=p,p=i}hp(s,!0,c,null,x);break;case"together":hp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function oi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Ji|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Ml(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,c=Qi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Qi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function mp(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&gd(i)))}function uL(i,s,c){switch(s.tag){case 3:pr(s,s.stateNode.containerInfo),$i(s,$t,i.memoizedState.cache),Sl();break;case 27:case 5:Nr(s);break;case 4:pr(s,s.stateNode.containerInfo);break;case 10:$i(s,s.type,s.memoizedProps.value);break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Ui(s),s.flags|=128,null):(c&s.child.childLanes)!==0?Gx(i,s,c):(Ui(s),i=oi(i,s,c),i!==null?i.sibling:null);Ui(s);break;case 19:var p=(i.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(Ml(i,s,c,!1),h=(c&s.childLanes)!==0),p){if(h)return qx(i,s,c);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Me(Gt,Gt.current),h)break;return null;case 22:case 23:return s.lanes=0,Bx(i,s,c);case 24:$i(s,$t,i.memoizedState.cache)}return oi(i,s,c)}function Kx(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)Xt=!0;else{if(!mp(i,c)&&(s.flags&128)===0)return Xt=!1,uL(i,s,c);Xt=(i.flags&131072)!==0}else Xt=!1,dt&&(s.flags&1048576)!==0&&k_(s,Ju,s.index);switch(s.lanes=0,s.tag){case 16:e:{i=s.pendingProps;var h=s.elementType,p=h._init;if(h=p(h._payload),s.type=h,typeof h=="function")Rp(h)?(i=Ka(h,i),s.tag=1,s=Hx(null,s,h,i,c)):(s.tag=0,s=sp(null,s,h,i,c));else{if(h!=null){if(p=h.$$typeof,p===v){s.tag=11,s=jx(null,s,h,i,c);break e}else if(p===w){s.tag=14,s=Px(null,s,h,i,c);break e}}throw s=P(h)||h,Error(r(306,s,""))}}return s;case 0:return sp(i,s,s.type,s.pendingProps,c);case 1:return h=s.type,p=Ka(h,s.pendingProps),Hx(i,s,h,p,c);case 3:e:{if(pr(s,s.stateNode.containerInfo),i===null)throw Error(r(387));var x=s.pendingProps;p=s.memoizedState,h=p.element,bp(i,s),Vl(s,x,null,c);var C=s.memoizedState;if(x=C.cache,$i(s,$t,x),x!==p.cache&&yp(s,[$t],c,!0),Pl(),x=C.element,p.isDehydrated)if(p={element:x,isDehydrated:!1,cache:C.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=Fx(i,s,x,c);break e}else if(x!==h){h=Xn(Error(r(424)),s),Al(h),s=Fx(i,s,x,c);break e}else for(an=br(s.stateNode.containerInfo.firstChild),_n=s,dt=!0,yr=null,Or=!0,c=z_(s,null,x,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Sl(),x===h){s=oi(i,s,c);break e}sn(i,s,x,c)}s=s.child}return s;case 26:return Ll(i,s),i===null?(c=ZE(s.type,null,s.pendingProps,null))?s.memoizedState=c:dt||(c=s.type,i=s.pendingProps,h=Dd(Et.current).createElement(c),h[un]=s,h[Tn]=i,on(h,c,i),Zt(h),s.stateNode=h):s.memoizedState=ZE(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return Nr(s),i===null&&dt&&(h=s.stateNode=KE(s.type,s.pendingProps,Et.current),_n=s,Or=!0,an=br(h.firstChild)),h=s.pendingProps.children,i!==null||dt?sn(i,s,h,c):s.child=Ha(s,null,h,c),Ll(i,s),s.child;case 5:return i===null&&dt&&((p=h=an)&&(h=zL(h,s.type,s.pendingProps,Or),h!==null?(s.stateNode=h,_n=s,an=br(h.firstChild),Or=!1,p=!0):p=!1),p||Ua(s)),Nr(s),p=s.type,x=s.pendingProps,C=i!==null?i.memoizedProps:null,h=x.children,eg(p,x)?h=null:C!==null&&eg(p,C)&&(s.flags|=32),s.memoizedState!==null&&(p=Hm(i,s,rL,null,null,c),Jl._currentValue=p),Ll(i,s),sn(i,s,h,c),s.child;case 6:return i===null&&dt&&((i=c=an)&&(c=UL(c,s.pendingProps,Or),c!==null?(s.stateNode=c,_n=s,an=null,i=!0):i=!1),i||Ua(s)),null;case 13:return Gx(i,s,c);case 4:return pr(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Ha(s,null,h,c):sn(i,s,h,c),s.child;case 11:return jx(i,s,s.type,s.pendingProps,c);case 7:return sn(i,s,s.pendingProps,c),s.child;case 8:return sn(i,s,s.pendingProps.children,c),s.child;case 12:return sn(i,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,$i(s,s.type,h.value),sn(i,s,h.children,c),s.child;case 9:return p=s.type._context,h=s.pendingProps.children,Ya(s),p=dn(p),h=h(p),s.flags|=1,sn(i,s,h,c),s.child;case 14:return Px(i,s,s.type,s.pendingProps,c);case 15:return Vx(i,s,s.type,s.pendingProps,c);case 19:return qx(i,s,c);case 22:return Bx(i,s,c);case 24:return Ya(s),h=dn($t),i===null?(p=zm(),p===null&&(p=vt,x=Vm(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=c),p=x),s.memoizedState={parent:h,cache:p},vp(s),$i(s,$t,p)):((i.lanes&c)!==0&&(bp(i,s),Vl(s,null,null,c),Pl()),p=i.memoizedState,x=s.memoizedState,p.parent!==h?(p={parent:h,cache:h},s.memoizedState=p,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=p),$i(s,$t,h)):(h=x.cache,$i(s,$t,h),h!==p.cache&&yp(s,[$t],c,!0))),sn(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}var pp=we(null),Wa=null,li=null;function $i(i,s,c){Me(pp,s._currentValue),s._currentValue=c}function ci(i){i._currentValue=pp.current,He(pp)}function gp(i,s,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===c)break;i=i.return}}function yp(i,s,c,h){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var x=p.dependencies;if(x!==null){var C=p.child;x=x.firstContext;e:for(;x!==null;){var O=x;x=p;for(var M=0;M<s.length;M++)if(O.context===s[M]){x.lanes|=c,O=x.alternate,O!==null&&(O.lanes|=c),gp(x.return,c,i),h||(C=null);break e}x=O.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(r(341));C.lanes|=c,x=C.alternate,x!==null&&(x.lanes|=c),gp(C,c,i),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===i){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function Ml(i,s,c,h){i=null;for(var p=s,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var C=p.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var O=p.type;Mn(p.pendingProps.value,C.value)||(i!==null?i.push(O):i=[O])}}else if(p===Yt.current){if(C=p.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(Jl):i=[Jl])}p=p.return}i!==null&&yp(s,i,c,h),s.flags|=262144}function gd(i){for(i=i.firstContext;i!==null;){if(!Mn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ya(i){Wa=i,li=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function dn(i){return Wx(Wa,i)}function yd(i,s){return Wa===null&&Ya(i),Wx(i,s)}function Wx(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},li===null){if(i===null)throw Error(r(308));li=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else li=li.next=s;return c}var qi=!1;function vp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bp(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ki(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Wi(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(wt&2)!==0){var p=h.pending;return p===null?s.next=s:(s.next=p.next,p.next=s),h.pending=s,s=Xu(i),N_(i,null,c),s}return Zu(i,h,s,c),Xu(i)}function jl(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194176)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,P0(i,c)}}function _p(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var p=null,x=null;if(c=c.firstBaseUpdate,c!==null){do{var C={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};x===null?p=x=C:x=x.next=C,c=c.next}while(c!==null);x===null?p=x=s:x=x.next=s}else p=x=s;c={baseState:h.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:h.shared,callbacks:h.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var xp=!1;function Pl(){if(xp){var i=Ys;if(i!==null)throw i}}function Vl(i,s,c,h){xp=!1;var p=i.updateQueue;qi=!1;var x=p.firstBaseUpdate,C=p.lastBaseUpdate,O=p.shared.pending;if(O!==null){p.shared.pending=null;var M=O,$=M.next;M.next=null,C===null?x=$:C.next=$,C=M;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,O=oe.lastBaseUpdate,O!==C&&(O===null?oe.firstBaseUpdate=$:O.next=$,oe.lastBaseUpdate=M))}if(x!==null){var he=p.baseState;C=0,oe=$=M=null,O=x;do{var Q=O.lane&-536870913,se=Q!==O.lane;if(se?(ct&Q)===Q:(h&Q)===Q){Q!==0&&Q===Ws&&(xp=!0),oe!==null&&(oe=oe.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var Le=i,qe=O;Q=s;var Dt=c;switch(qe.tag){case 1:if(Le=qe.payload,typeof Le=="function"){he=Le.call(Dt,he,Q);break e}he=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=qe.payload,Q=typeof Le=="function"?Le.call(Dt,he,Q):Le,Q==null)break e;he=H({},he,Q);break e;case 2:qi=!0}}Q=O.callback,Q!==null&&(i.flags|=64,se&&(i.flags|=8192),se=p.callbacks,se===null?p.callbacks=[Q]:se.push(Q))}else se={lane:Q,tag:O.tag,payload:O.payload,callback:O.callback,next:null},oe===null?($=oe=se,M=he):oe=oe.next=se,C|=Q;if(O=O.next,O===null){if(O=p.shared.pending,O===null)break;se=O,O=se.next,se.next=null,p.lastBaseUpdate=se,p.shared.pending=null}}while(!0);oe===null&&(M=he),p.baseState=M,p.firstBaseUpdate=$,p.lastBaseUpdate=oe,x===null&&(p.shared.lanes=0),Ji|=C,i.lanes=C,i.memoizedState=he}}function Yx(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function Zx(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Yx(c[i],s)}function Bl(i,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&i)===i){h=void 0;var x=c.create,C=c.inst;h=x(),C.destroy=h}c=c.next}while(c!==p)}}catch(O){yt(s,s.return,O)}}function Yi(i,s,c){try{var h=s.updateQueue,p=h!==null?h.lastEffect:null;if(p!==null){var x=p.next;h=x;do{if((h.tag&i)===i){var C=h.inst,O=C.destroy;if(O!==void 0){C.destroy=void 0,p=s;var M=c;try{O()}catch($){yt(p,M,$)}}}h=h.next}while(h!==x)}}catch($){yt(s,s.return,$)}}function Xx(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{Zx(s,c)}catch(h){yt(i,i.return,h)}}}function Qx(i,s,c){c.props=Ka(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(h){yt(i,s,h)}}function Za(i,s){try{var c=i.ref;if(c!==null){var h=i.stateNode;switch(i.tag){case 26:case 27:case 5:var p=h;break;default:p=h}typeof c=="function"?i.refCleanup=c(p):c.current=p}}catch(x){yt(i,s,x)}}function jn(i,s){var c=i.ref,h=i.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(p){yt(i,s,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(p){yt(i,s,p)}else c.current=null}function Jx(i){var s=i.type,c=i.memoizedProps,h=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(p){yt(i,i.return,p)}}function eE(i,s,c){try{var h=i.stateNode;ML(h,i.type,c,s),h[Tn]=s}catch(p){yt(i,i.return,p)}}function tE(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27||i.tag===4}function Ep(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||tE(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==27&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Sp(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=kd));else if(h!==4&&h!==27&&(i=i.child,i!==null))for(Sp(i,s,c),i=i.sibling;i!==null;)Sp(i,s,c),i=i.sibling}function vd(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&h!==27&&(i=i.child,i!==null))for(vd(i,s,c),i=i.sibling;i!==null;)vd(i,s,c),i=i.sibling}var ui=!1,Ot=!1,Ap=!1,nE=typeof WeakSet=="function"?WeakSet:Set,Qt=null,rE=!1;function dL(i,s){if(i=i.containerInfo,Qp=Vd,i=__(i),Tm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var p=h.anchorOffset,x=h.focusNode;h=h.focusOffset;try{c.nodeType,x.nodeType}catch{c=null;break e}var C=0,O=-1,M=-1,$=0,oe=0,he=i,Q=null;t:for(;;){for(var se;he!==c||p!==0&&he.nodeType!==3||(O=C+p),he!==x||h!==0&&he.nodeType!==3||(M=C+h),he.nodeType===3&&(C+=he.nodeValue.length),(se=he.firstChild)!==null;)Q=he,he=se;for(;;){if(he===i)break t;if(Q===c&&++$===p&&(O=C),Q===x&&++oe===h&&(M=C),(se=he.nextSibling)!==null)break;he=Q,Q=he.parentNode}he=se}c=O===-1||M===-1?null:{start:O,end:M}}else c=null}c=c||{start:0,end:0}}else c=null;for(Jp={focusedElem:i,selectionRange:c},Vd=!1,Qt=s;Qt!==null;)if(s=Qt,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Qt=i;else for(;Qt!==null;){switch(s=Qt,x=s.alternate,i=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&x!==null){i=void 0,c=s,p=x.memoizedProps,x=x.memoizedState,h=c.stateNode;try{var Le=Ka(c.type,p,c.elementType===c.type);i=h.getSnapshotBeforeUpdate(Le,x),h.__reactInternalSnapshotBeforeUpdate=i}catch(qe){yt(c,c.return,qe)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)rg(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":rg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,Qt=i;break}Qt=s.return}return Le=rE,rE=!1,Le}function iE(i,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:fi(i,c),h&4&&Bl(5,c);break;case 1:if(fi(i,c),h&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(O){yt(c,c.return,O)}else{var p=Ka(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(p,s,i.__reactInternalSnapshotBeforeUpdate)}catch(O){yt(c,c.return,O)}}h&64&&Xx(c),h&512&&Za(c,c.return);break;case 3:if(fi(i,c),h&64&&(h=c.updateQueue,h!==null)){if(i=null,c.child!==null)switch(c.child.tag){case 27:case 5:i=c.child.stateNode;break;case 1:i=c.child.stateNode}try{Zx(h,i)}catch(O){yt(c,c.return,O)}}break;case 26:fi(i,c),h&512&&Za(c,c.return);break;case 27:case 5:fi(i,c),s===null&&h&4&&Jx(c),h&512&&Za(c,c.return);break;case 12:fi(i,c);break;case 13:fi(i,c),h&4&&oE(i,c);break;case 22:if(p=c.memoizedState!==null||ui,!p){s=s!==null&&s.memoizedState!==null||Ot;var x=ui,C=Ot;ui=p,(Ot=s)&&!C?Zi(i,c,(c.subtreeFlags&8772)!==0):fi(i,c),ui=x,Ot=C}h&512&&(c.memoizedProps.mode==="manual"?Za(c,c.return):jn(c,c.return));break;default:fi(i,c)}}function aE(i){var s=i.alternate;s!==null&&(i.alternate=null,aE(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&um(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Ht=null,Pn=!1;function di(i,s,c){for(c=c.child;c!==null;)sE(i,s,c),c=c.sibling}function sE(i,s,c){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(ji,c)}catch{}switch(c.tag){case 26:Ot||jn(c,s),di(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Ot||jn(c,s);var h=Ht,p=Pn;for(Ht=c.stateNode,di(i,s,c),c=c.stateNode,s=c.attributes;s.length;)c.removeAttributeNode(s[0]);um(c),Ht=h,Pn=p;break;case 5:Ot||jn(c,s);case 6:p=Ht;var x=Pn;if(Ht=null,di(i,s,c),Ht=p,Pn=x,Ht!==null)if(Pn)try{i=Ht,h=c.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)}catch(C){yt(c,s,C)}else try{Ht.removeChild(c.stateNode)}catch(C){yt(c,s,C)}break;case 18:Ht!==null&&(Pn?(s=Ht,c=c.stateNode,s.nodeType===8?ng(s.parentNode,c):s.nodeType===1&&ng(s,c),rc(s)):ng(Ht,c.stateNode));break;case 4:h=Ht,p=Pn,Ht=c.stateNode.containerInfo,Pn=!0,di(i,s,c),Ht=h,Pn=p;break;case 0:case 11:case 14:case 15:Ot||Yi(2,c,s),Ot||Yi(4,c,s),di(i,s,c);break;case 1:Ot||(jn(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&Qx(c,s,h)),di(i,s,c);break;case 21:di(i,s,c);break;case 22:Ot||jn(c,s),Ot=(h=Ot)||c.memoizedState!==null,di(i,s,c),Ot=h;break;default:di(i,s,c)}}function oE(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{rc(i)}catch(c){yt(s,s.return,c)}}function fL(i){switch(i.tag){case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new nE),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new nE),s;default:throw Error(r(435,i.tag))}}function wp(i,s){var c=fL(i);s.forEach(function(h){var p=wL.bind(null,i,h);c.has(h)||(c.add(h),h.then(p,p))})}function tr(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var p=c[h],x=i,C=s,O=C;e:for(;O!==null;){switch(O.tag){case 27:case 5:Ht=O.stateNode,Pn=!1;break e;case 3:Ht=O.stateNode.containerInfo,Pn=!0;break e;case 4:Ht=O.stateNode.containerInfo,Pn=!0;break e}O=O.return}if(Ht===null)throw Error(r(160));sE(x,C,p),Ht=null,Pn=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(s.subtreeFlags&13878)for(s=s.child;s!==null;)lE(s,i),s=s.sibling}var vr=null;function lE(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:tr(s,i),nr(i),h&4&&(Yi(3,i,i.return),Bl(3,i),Yi(5,i,i.return));break;case 1:tr(s,i),nr(i),h&512&&(Ot||c===null||jn(c,c.return)),h&64&&ui&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var p=vr;if(tr(s,i),nr(i),h&512&&(Ot||c===null||jn(c,c.return)),h&4){var x=c!==null?c.memoizedState:null;if(h=i.memoizedState,c===null)if(h===null)if(i.stateNode===null){e:{h=i.type,c=i.memoizedProps,p=p.ownerDocument||p;t:switch(h){case"title":x=p.getElementsByTagName("title")[0],(!x||x[dl]||x[un]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(h),p.head.insertBefore(x,p.querySelector("head > title"))),on(x,h,c),x[un]=i,Zt(x),h=x;break e;case"link":var C=JE("link","href",p).get(h+(c.href||""));if(C){for(var O=0;O<C.length;O++)if(x=C[O],x.getAttribute("href")===(c.href==null?null:c.href)&&x.getAttribute("rel")===(c.rel==null?null:c.rel)&&x.getAttribute("title")===(c.title==null?null:c.title)&&x.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){C.splice(O,1);break t}}x=p.createElement(h),on(x,h,c),p.head.appendChild(x);break;case"meta":if(C=JE("meta","content",p).get(h+(c.content||""))){for(O=0;O<C.length;O++)if(x=C[O],x.getAttribute("content")===(c.content==null?null:""+c.content)&&x.getAttribute("name")===(c.name==null?null:c.name)&&x.getAttribute("property")===(c.property==null?null:c.property)&&x.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&x.getAttribute("charset")===(c.charSet==null?null:c.charSet)){C.splice(O,1);break t}}x=p.createElement(h),on(x,h,c),p.head.appendChild(x);break;default:throw Error(r(468,h))}x[un]=i,Zt(x),h=x}i.stateNode=h}else eS(p,i.type,i.stateNode);else i.stateNode=QE(p,h,i.memoizedProps);else x!==h?(x===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):x.count--,h===null?eS(p,i.type,i.stateNode):QE(p,h,i.memoizedProps)):h===null&&i.stateNode!==null&&eE(i,i.memoizedProps,c.memoizedProps)}break;case 27:if(h&4&&i.alternate===null){p=i.stateNode,x=i.memoizedProps;try{for(var M=p.firstChild;M;){var $=M.nextSibling,oe=M.nodeName;M[dl]||oe==="HEAD"||oe==="BODY"||oe==="SCRIPT"||oe==="STYLE"||oe==="LINK"&&M.rel.toLowerCase()==="stylesheet"||p.removeChild(M),M=$}for(var he=i.type,Q=p.attributes;Q.length;)p.removeAttributeNode(Q[0]);on(p,he,x),p[un]=i,p[Tn]=x}catch(Le){yt(i,i.return,Le)}}case 5:if(tr(s,i),nr(i),h&512&&(Ot||c===null||jn(c,c.return)),i.flags&32){p=i.stateNode;try{js(p,"")}catch(Le){yt(i,i.return,Le)}}h&4&&i.stateNode!=null&&(p=i.memoizedProps,eE(i,p,c!==null?c.memoizedProps:p)),h&1024&&(Ap=!0);break;case 6:if(tr(s,i),nr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,c=i.stateNode;try{c.nodeValue=h}catch(Le){yt(i,i.return,Le)}}break;case 3:if(Md=null,p=vr,vr=Id(s.containerInfo),tr(s,i),vr=p,nr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{rc(s.containerInfo)}catch(Le){yt(i,i.return,Le)}Ap&&(Ap=!1,cE(i));break;case 4:h=vr,vr=Id(i.stateNode.containerInfo),tr(s,i),nr(i),vr=h;break;case 12:tr(s,i),nr(i);break;case 13:tr(s,i),nr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Lp=ke()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,wp(i,h)));break;case 22:if(h&512&&(Ot||c===null||jn(c,c.return)),M=i.memoizedState!==null,$=c!==null&&c.memoizedState!==null,oe=ui,he=Ot,ui=oe||M,Ot=he||$,tr(s,i),Ot=he,ui=oe,nr(i),s=i.stateNode,s._current=i,s._visibility&=-3,s._visibility|=s._pendingVisibility&2,h&8192&&(s._visibility=M?s._visibility&-2:s._visibility|1,M&&(s=ui||Ot,c===null||$||s||Js(i)),i.memoizedProps===null||i.memoizedProps.mode!=="manual"))e:for(c=null,s=i;;){if(s.tag===5||s.tag===26||s.tag===27){if(c===null){$=c=s;try{if(p=$.stateNode,M)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{C=$.stateNode,O=$.memoizedProps.style;var se=O!=null&&O.hasOwnProperty("display")?O.display:null;C.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Le){yt($,$.return,Le)}}}else if(s.tag===6){if(c===null){$=s;try{$.stateNode.nodeValue=M?"":$.memoizedProps}catch(Le){yt($,$.return,Le)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=i.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,wp(i,c))));break;case 19:tr(s,i),nr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,wp(i,h)));break;case 21:break;default:tr(s,i),nr(i)}}function nr(i){var s=i.flags;if(s&2){try{if(i.tag!==27){e:{for(var c=i.return;c!==null;){if(tE(c)){var h=c;break e}c=c.return}throw Error(r(160))}switch(h.tag){case 27:var p=h.stateNode,x=Ep(i);vd(i,x,p);break;case 5:var C=h.stateNode;h.flags&32&&(js(C,""),h.flags&=-33);var O=Ep(i);vd(i,O,C);break;case 3:case 4:var M=h.stateNode.containerInfo,$=Ep(i);Sp(i,$,M);break;default:throw Error(r(161))}}}catch(oe){yt(i,i.return,oe)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function cE(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;cE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function fi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)iE(i,s.alternate,s),s=s.sibling}function Js(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Yi(4,s,s.return),Js(s);break;case 1:jn(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&Qx(s,s.return,c),Js(s);break;case 26:case 27:case 5:jn(s,s.return),Js(s);break;case 22:jn(s,s.return),s.memoizedState===null&&Js(s);break;default:Js(s)}i=i.sibling}}function Zi(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,p=i,x=s,C=x.flags;switch(x.tag){case 0:case 11:case 15:Zi(p,x,c),Bl(4,x);break;case 1:if(Zi(p,x,c),h=x,p=h.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch($){yt(h,h.return,$)}if(h=x,p=h.updateQueue,p!==null){var O=h.stateNode;try{var M=p.shared.hiddenCallbacks;if(M!==null)for(p.shared.hiddenCallbacks=null,p=0;p<M.length;p++)Yx(M[p],O)}catch($){yt(h,h.return,$)}}c&&C&64&&Xx(x),Za(x,x.return);break;case 26:case 27:case 5:Zi(p,x,c),c&&h===null&&C&4&&Jx(x),Za(x,x.return);break;case 12:Zi(p,x,c);break;case 13:Zi(p,x,c),c&&C&4&&oE(p,x);break;case 22:x.memoizedState===null&&Zi(p,x,c),Za(x,x.return);break;default:Zi(p,x,c)}s=s.sibling}}function Tp(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&Nl(c))}function Cp(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Nl(i))}function Xi(i,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)uE(i,s,c,h),s=s.sibling}function uE(i,s,c,h){var p=s.flags;switch(s.tag){case 0:case 11:case 15:Xi(i,s,c,h),p&2048&&Bl(9,s);break;case 3:Xi(i,s,c,h),p&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Nl(i)));break;case 12:if(p&2048){Xi(i,s,c,h),i=s.stateNode;try{var x=s.memoizedProps,C=x.id,O=x.onPostCommit;typeof O=="function"&&O(C,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(M){yt(s,s.return,M)}}else Xi(i,s,c,h);break;case 23:break;case 22:x=s.stateNode,s.memoizedState!==null?x._visibility&4?Xi(i,s,c,h):zl(i,s):x._visibility&4?Xi(i,s,c,h):(x._visibility|=4,eo(i,s,c,h,(s.subtreeFlags&10256)!==0)),p&2048&&Tp(s.alternate,s);break;case 24:Xi(i,s,c,h),p&2048&&Cp(s.alternate,s);break;default:Xi(i,s,c,h)}}function eo(i,s,c,h,p){for(p=p&&(s.subtreeFlags&10256)!==0,s=s.child;s!==null;){var x=i,C=s,O=c,M=h,$=C.flags;switch(C.tag){case 0:case 11:case 15:eo(x,C,O,M,p),Bl(8,C);break;case 23:break;case 22:var oe=C.stateNode;C.memoizedState!==null?oe._visibility&4?eo(x,C,O,M,p):zl(x,C):(oe._visibility|=4,eo(x,C,O,M,p)),p&&$&2048&&Tp(C.alternate,C);break;case 24:eo(x,C,O,M,p),p&&$&2048&&Cp(C.alternate,C);break;default:eo(x,C,O,M,p)}s=s.sibling}}function zl(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,h=s,p=h.flags;switch(h.tag){case 22:zl(c,h),p&2048&&Tp(h.alternate,h);break;case 24:zl(c,h),p&2048&&Cp(h.alternate,h);break;default:zl(c,h)}s=s.sibling}}var Ul=8192;function to(i){if(i.subtreeFlags&Ul)for(i=i.child;i!==null;)dE(i),i=i.sibling}function dE(i){switch(i.tag){case 26:to(i),i.flags&Ul&&i.memoizedState!==null&&eM(vr,i.memoizedState,i.memoizedProps);break;case 5:to(i);break;case 3:case 4:var s=vr;vr=Id(i.stateNode.containerInfo),to(i),vr=s;break;case 22:i.memoizedState===null&&(s=i.alternate,s!==null&&s.memoizedState!==null?(s=Ul,Ul=16777216,to(i),Ul=s):to(i));break;default:to(i)}}function fE(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function Hl(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Qt=h,mE(h,i)}fE(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)hE(i),i=i.sibling}function hE(i){switch(i.tag){case 0:case 11:case 15:Hl(i),i.flags&2048&&Yi(9,i,i.return);break;case 3:Hl(i);break;case 12:Hl(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&4&&(i.return===null||i.return.tag!==13)?(s._visibility&=-5,bd(i)):Hl(i);break;default:Hl(i)}}function bd(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Qt=h,mE(h,i)}fE(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Yi(8,s,s.return),bd(s);break;case 22:c=s.stateNode,c._visibility&4&&(c._visibility&=-5,bd(s));break;default:bd(s)}i=i.sibling}}function mE(i,s){for(;Qt!==null;){var c=Qt;switch(c.tag){case 0:case 11:case 15:Yi(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Nl(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Qt=h;else e:for(c=i;Qt!==null;){h=Qt;var p=h.sibling,x=h.return;if(aE(h),h===c){Qt=null;break e}if(p!==null){p.return=x,Qt=p;break e}Qt=x}}}function hL(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(i,s,c,h){return new hL(i,s,c,h)}function Rp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Qi(i,s){var c=i.alternate;return c===null?(c=rr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&31457280,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function pE(i,s){i.flags&=31457282;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function _d(i,s,c,h,p,x){var C=0;if(h=i,typeof i=="function")Rp(i)&&(C=1);else if(typeof i=="string")C=QL(i,c,Ke.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case d:return Xa(c.children,p,x,s);case f:C=8,p|=24;break;case m:return i=rr(12,c,s,p|2),i.elementType=m,i.lanes=x,i;case S:return i=rr(13,c,s,p),i.elementType=S,i.lanes=x,i;case A:return i=rr(19,c,s,p),i.elementType=A,i.lanes=x,i;case R:return gE(c,p,x,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case g:case b:C=10;break e;case y:C=9;break e;case v:C=11;break e;case w:C=14;break e;case T:C=16,h=null;break e}C=29,c=Error(r(130,i===null?"null":typeof i,"")),h=null}return s=rr(C,c,s,p),s.elementType=i,s.type=h,s.lanes=x,s}function Xa(i,s,c,h){return i=rr(7,i,h,s),i.lanes=c,i}function gE(i,s,c,h){i=rr(22,i,h,s),i.elementType=R,i.lanes=c;var p={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var x=p._current;if(x===null)throw Error(r(456));if((p._pendingVisibility&2)===0){var C=zi(x,2);C!==null&&(p._pendingVisibility|=2,xn(C,x,2))}},attach:function(){var x=p._current;if(x===null)throw Error(r(456));if((p._pendingVisibility&2)!==0){var C=zi(x,2);C!==null&&(p._pendingVisibility&=-3,xn(C,x,2))}}};return i.stateNode=p,i}function Np(i,s,c){return i=rr(6,i,null,s),i.lanes=c,i}function Op(i,s,c){return s=rr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function hi(i){i.flags|=4}function yE(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!tS(s)){if(s=er.current,s!==null&&((ct&4194176)===ct?kr!==null:(ct&62914560)!==ct&&(ct&536870912)===0||s!==kr))throw Tl=Mm,L_;i.flags|=8192}}function xd(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?M0():536870912,i.lanes|=s,ro|=s)}function Fl(i,s){if(!dt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function At(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags&31457280,h|=p.flags&31457280,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags,h|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function mL(i,s,c){var h=s.pendingProps;switch(Im(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(s),null;case 1:return At(s),null;case 3:return c=s.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),ci($t),Dn(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(El(s)?hi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,yr!==null&&(Vp(yr),yr=null))),At(s),null;case 26:return c=s.memoizedState,i===null?(hi(s),c!==null?(At(s),yE(s,c)):(At(s),s.flags&=-16777217)):c?c!==i.memoizedState?(hi(s),At(s),yE(s,c)):(At(s),s.flags&=-16777217):(i.memoizedProps!==h&&hi(s),At(s),s.flags&=-16777217),null;case 27:z(s),c=Et.current;var p=s.type;if(i!==null&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}i=Ke.current,El(s)?D_(s):(i=KE(p,h,c),s.stateNode=i,hi(s))}return At(s),null;case 5:if(z(s),c=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}if(i=Ke.current,El(s))D_(s);else{switch(p=Dd(Et.current),i){case 1:i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":i=p.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?p.createElement("select",{is:h.is}):p.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?p.createElement(c,{is:h.is}):p.createElement(c)}}i[un]=s,i[Tn]=h;e:for(p=s.child;p!==null;){if(p.tag===5||p.tag===6)i.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===s)break e;for(;p.sibling===null;){if(p.return===null||p.return===s)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}s.stateNode=i;e:switch(on(i,c,h),c){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&hi(s)}}return At(s),s.flags&=-16777217,null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(i=Et.current,El(s)){if(i=s.stateNode,c=s.memoizedProps,h=null,p=_n,p!==null)switch(p.tag){case 27:case 5:h=p.memoizedProps}i[un]=s,i=!!(i.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||UE(i.nodeValue,c)),i||Ua(s)}else i=Dd(i).createTextNode(h),i[un]=s,s.stateNode=i}return At(s),null;case 13:if(h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=El(s),h!==null&&h.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=s.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[un]=s}else Sl(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),p=!1}else yr!==null&&(Vp(yr),yr=null),p=!0;if(!p)return s.flags&256?(ai(s),s):(ai(s),null)}if(ai(s),(s.flags&128)!==0)return s.lanes=c,s;if(c=h!==null,i=i!==null&&i.memoizedState!==null,c){h=s.child,p=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(p=h.alternate.memoizedState.cachePool.pool);var x=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(x=h.memoizedState.cachePool.pool),x!==p&&(h.flags|=2048)}return c!==i&&c&&(s.child.flags|=8192),xd(s,s.updateQueue),At(s),null;case 4:return Dn(),i===null&&Yp(s.stateNode.containerInfo),At(s),null;case 10:return ci(s.type),At(s),null;case 19:if(He(Gt),p=s.memoizedState,p===null)return At(s),null;if(h=(s.flags&128)!==0,x=p.rendering,x===null)if(h)Fl(p,!1);else{if(kt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=id(i),x!==null){for(s.flags|=128,Fl(p,!1),i=x.updateQueue,s.updateQueue=i,xd(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)pE(c,i),c=c.sibling;return Me(Gt,Gt.current&1|2),s.child}i=i.sibling}p.tail!==null&&ke()>Ed&&(s.flags|=128,h=!0,Fl(p,!1),s.lanes=4194304)}else{if(!h)if(i=id(x),i!==null){if(s.flags|=128,h=!0,i=i.updateQueue,s.updateQueue=i,xd(s,i),Fl(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!dt)return At(s),null}else 2*ke()-p.renderingStartTime>Ed&&c!==536870912&&(s.flags|=128,h=!0,Fl(p,!1),s.lanes=4194304);p.isBackwards?(x.sibling=s.child,s.child=x):(i=p.last,i!==null?i.sibling=x:s.child=x,p.last=x)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=ke(),s.sibling=null,i=Gt.current,Me(Gt,h?i&1|2:i&1),s):(At(s),null);case 22:case 23:return ai(s),Pm(),h=s.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(At(s),s.subtreeFlags&6&&(s.flags|=8192)):At(s),c=s.updateQueue,c!==null&&xd(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),i!==null&&He(Fa),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),ci($t),At(s),null;case 25:return null}throw Error(r(156,s.tag))}function pL(i,s){switch(Im(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ci($t),Dn(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return z(s),null;case 13:if(ai(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Sl()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return He(Gt),null;case 4:return Dn(),null;case 10:return ci(s.type),null;case 22:case 23:return ai(s),Pm(),i!==null&&He(Fa),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return ci($t),null;case 25:return null;default:return null}}function vE(i,s){switch(Im(s),s.tag){case 3:ci($t),Dn();break;case 26:case 27:case 5:z(s);break;case 4:Dn();break;case 13:ai(s);break;case 19:He(Gt);break;case 10:ci(s.type);break;case 22:case 23:ai(s),Pm(),i!==null&&He(Fa);break;case 24:ci($t)}}var gL={getCacheForType:function(i){var s=dn($t),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c}},yL=typeof WeakMap=="function"?WeakMap:Map,wt=0,vt=null,it=null,ct=0,bt=0,Vn=null,mi=!1,no=!1,kp=!1,pi=0,kt=0,Ji=0,Qa=0,Dp=0,ir=0,ro=0,Gl=null,Ir=null,Ip=!1,Lp=0,Ed=1/0,Sd=null,ea=null,Ad=!1,Ja=null,$l=0,Mp=0,jp=null,ql=0,Pp=null;function Bn(){if((wt&2)!==0&&ct!==0)return ct&-ct;if(V.T!==null){var i=Ws;return i!==0?i:$p()}return B0()}function bE(){ir===0&&(ir=(ct&536870912)===0||dt?L0():536870912);var i=er.current;return i!==null&&(i.flags|=32),ir}function xn(i,s,c){(i===vt&&bt===2||i.cancelPendingCommit!==null)&&(io(i,0),gi(i,ct,ir,!1)),ul(i,c),((wt&2)===0||i!==vt)&&(i===vt&&((wt&2)===0&&(Qa|=c),kt===4&&gi(i,ct,ir,!1)),Lr(i))}function _E(i,s,c){if((wt&6)!==0)throw Error(r(327));var h=!c&&(s&60)===0&&(s&i.expiredLanes)===0||cl(i,s),p=h?_L(i,s):Up(i,s,!0),x=h;do{if(p===0){no&&!h&&gi(i,s,0,!1);break}else if(p===6)gi(i,s,0,!mi);else{if(c=i.current.alternate,x&&!vL(c)){p=Up(i,s,!1),x=!1;continue}if(p===2){if(x=s,i.errorRecoveryDisabledLanes&x)var C=0;else C=i.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){s=C;e:{var O=i;p=Gl;var M=O.current.memoizedState.isDehydrated;if(M&&(io(O,C).flags|=256),C=Up(O,C,!1),C!==2){if(kp&&!M){O.errorRecoveryDisabledLanes|=x,Qa|=x,p=4;break e}x=Ir,Ir=p,x!==null&&Vp(x)}p=C}if(x=!1,p!==2)continue}}if(p===1){io(i,0),gi(i,s,0,!0);break}e:{switch(h=i,p){case 0:case 1:throw Error(r(345));case 4:if((s&4194176)===s){gi(h,s,ir,!mi);break e}break;case 2:Ir=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=c,h.finishedLanes=s,(s&62914560)===s&&(x=Lp+300-ke(),10<x)){if(gi(h,s,ir,!mi),Pu(h,0)!==0)break e;h.timeoutHandle=GE(xE.bind(null,h,c,Ir,Sd,Ip,s,ir,Qa,ro,mi,2,-0,0),x);break e}xE(h,c,Ir,Sd,Ip,s,ir,Qa,ro,mi,0,-0,0)}}break}while(!0);Lr(i)}function Vp(i){Ir===null?Ir=i:Ir.push.apply(Ir,i)}function xE(i,s,c,h,p,x,C,O,M,$,oe,he,Q){var se=s.subtreeFlags;if((se&8192||(se&16785408)===16785408)&&(Ql={stylesheets:null,count:0,unsuspend:JL},dE(s),s=tM(),s!==null)){i.cancelPendingCommit=s(RE.bind(null,i,c,h,p,C,O,M,1,he,Q)),gi(i,x,C,!$);return}RE(i,c,h,p,C,O,M,oe,he,Q)}function vL(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var p=c[h],x=p.getSnapshot;p=p.value;try{if(!Mn(x(),p))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function gi(i,s,c,h){s&=~Dp,s&=~Qa,i.suspendedLanes|=s,i.pingedLanes&=~s,h&&(i.warmLanes|=s),h=i.expirationTimes;for(var p=s;0<p;){var x=31-Ln(p),C=1<<x;h[x]=-1,p&=~C}c!==0&&j0(i,c,s)}function wd(){return(wt&6)===0?(Kl(0),!1):!0}function Bp(){if(it!==null){if(bt===0)var i=it.return;else i=it,li=Wa=null,$m(i),qs=null,Cl=0,i=it;for(;i!==null;)vE(i.alternate,i),i=i.return;it=null}}function io(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,PL(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),Bp(),vt=i,it=c=Qi(i.current,null),ct=s,bt=0,Vn=null,mi=!1,no=cl(i,s),kp=!1,ro=ir=Dp=Qa=Ji=kt=0,Ir=Gl=null,Ip=!1,(s&8)!==0&&(s|=s&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=s;0<h;){var p=31-Ln(h),x=1<<p;s|=i[p],h&=~x}return pi=s,Yu(),c}function EE(i,s){et=null,V.H=Dr,s===wl?(s=P_(),bt=3):s===L_?(s=P_(),bt=4):bt=s===Mx?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Vn=s,it===null&&(kt=1,pd(i,Xn(s,i.current)))}function SE(){var i=V.H;return V.H=Dr,i===null?Dr:i}function AE(){var i=V.A;return V.A=gL,i}function zp(){kt=4,mi||(ct&4194176)!==ct&&er.current!==null||(no=!0),(Ji&134217727)===0&&(Qa&134217727)===0||vt===null||gi(vt,ct,ir,!1)}function Up(i,s,c){var h=wt;wt|=2;var p=SE(),x=AE();(vt!==i||ct!==s)&&(Sd=null,io(i,s)),s=!1;var C=kt;e:do try{if(bt!==0&&it!==null){var O=it,M=Vn;switch(bt){case 8:Bp(),C=6;break e;case 3:case 2:case 6:er.current===null&&(s=!0);var $=bt;if(bt=0,Vn=null,ao(i,O,M,$),c&&no){C=0;break e}break;default:$=bt,bt=0,Vn=null,ao(i,O,M,$)}}bL(),C=kt;break}catch(oe){EE(i,oe)}while(!0);return s&&i.shellSuspendCounter++,li=Wa=null,wt=h,V.H=p,V.A=x,it===null&&(vt=null,ct=0,Yu()),C}function bL(){for(;it!==null;)wE(it)}function _L(i,s){var c=wt;wt|=2;var h=SE(),p=AE();vt!==i||ct!==s?(Sd=null,Ed=ke()+500,io(i,s)):no=cl(i,s);e:do try{if(bt!==0&&it!==null){s=it;var x=Vn;t:switch(bt){case 1:bt=0,Vn=null,ao(i,s,x,1);break;case 2:if(M_(x)){bt=0,Vn=null,TE(s);break}s=function(){bt===2&&vt===i&&(bt=7),Lr(i)},x.then(s,s);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:M_(x)?(bt=0,Vn=null,TE(s)):(bt=0,Vn=null,ao(i,s,x,7));break;case 5:var C=null;switch(it.tag){case 26:C=it.memoizedState;case 5:case 27:var O=it;if(!C||tS(C)){bt=0,Vn=null;var M=O.sibling;if(M!==null)it=M;else{var $=O.return;$!==null?(it=$,Td($)):it=null}break t}}bt=0,Vn=null,ao(i,s,x,5);break;case 6:bt=0,Vn=null,ao(i,s,x,6);break;case 8:Bp(),kt=6;break e;default:throw Error(r(462))}}xL();break}catch(oe){EE(i,oe)}while(!0);return li=Wa=null,V.H=h,V.A=p,wt=c,it!==null?0:(vt=null,ct=0,Yu(),kt)}function xL(){for(;it!==null&&!Ee();)wE(it)}function wE(i){var s=Kx(i.alternate,i,pi);i.memoizedProps=i.pendingProps,s===null?Td(i):it=s}function TE(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=Ux(c,s,s.pendingProps,s.type,void 0,ct);break;case 11:s=Ux(c,s,s.pendingProps,s.type.render,s.ref,ct);break;case 5:$m(s);default:vE(c,s),s=it=pE(s,pi),s=Kx(c,s,pi)}i.memoizedProps=i.pendingProps,s===null?Td(i):it=s}function ao(i,s,c,h){li=Wa=null,$m(s),qs=null,Cl=0;var p=s.return;try{if(cL(i,p,s,c,ct)){kt=1,pd(i,Xn(c,i.current)),it=null;return}}catch(x){if(p!==null)throw it=p,x;kt=1,pd(i,Xn(c,i.current)),it=null;return}s.flags&32768?(dt||h===1?i=!0:no||(ct&536870912)!==0?i=!1:(mi=i=!0,(h===2||h===3||h===6)&&(h=er.current,h!==null&&h.tag===13&&(h.flags|=16384))),CE(s,i)):Td(s)}function Td(i){var s=i;do{if((s.flags&32768)!==0){CE(s,mi);return}i=s.return;var c=mL(s.alternate,s,pi);if(c!==null){it=c;return}if(s=s.sibling,s!==null){it=s;return}it=s=i}while(s!==null);kt===0&&(kt=5)}function CE(i,s){do{var c=pL(i.alternate,i);if(c!==null){c.flags&=32767,it=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){it=i;return}it=i=c}while(i!==null);kt=6,it=null}function RE(i,s,c,h,p,x,C,O,M,$){var oe=V.T,he=re.p;try{re.p=2,V.T=null,EL(i,s,c,h,he,p,x,C,O,M,$)}finally{V.T=oe,re.p=he}}function EL(i,s,c,h,p,x,C,O){do so();while(Ja!==null);if((wt&6)!==0)throw Error(r(327));var M=i.finishedWork;if(h=i.finishedLanes,M===null)return null;if(i.finishedWork=null,i.finishedLanes=0,M===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0,i.cancelPendingCommit=null;var $=M.lanes|M.childLanes;if($|=Om,eI(i,h,$,x,C,O),i===vt&&(it=vt=null,ct=0),(M.subtreeFlags&10256)===0&&(M.flags&10256)===0||Ad||(Ad=!0,Mp=$,jp=c,TL(In,function(){return so(),null})),c=(M.flags&15990)!==0,(M.subtreeFlags&15990)!==0||c?(c=V.T,V.T=null,x=re.p,re.p=2,C=wt,wt|=4,dL(i,M),lE(M,i),qI(Jp,i.containerInfo),Vd=!!Qp,Jp=Qp=null,i.current=M,iE(i,M.alternate,M),_e(),wt=C,re.p=x,V.T=c):i.current=M,Ad?(Ad=!1,Ja=i,$l=h):NE(i,$),$=i.pendingLanes,$===0&&(ea=null),Lu(M.stateNode),Lr(i),s!==null)for(p=i.onRecoverableError,M=0;M<s.length;M++)$=s[M],p($.value,{componentStack:$.stack});return($l&3)!==0&&so(),$=i.pendingLanes,(h&4194218)!==0&&($&42)!==0?i===Pp?ql++:(ql=0,Pp=i):ql=0,Kl(0),null}function NE(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,Nl(s)))}function so(){if(Ja!==null){var i=Ja,s=Mp;Mp=0;var c=V0($l),h=V.T,p=re.p;try{if(re.p=32>c?32:c,V.T=null,Ja===null)var x=!1;else{c=jp,jp=null;var C=Ja,O=$l;if(Ja=null,$l=0,(wt&6)!==0)throw Error(r(331));var M=wt;if(wt|=4,hE(C.current),uE(C,C.current,O,c),wt=M,Kl(0,!1),bn&&typeof bn.onPostCommitFiberRoot=="function")try{bn.onPostCommitFiberRoot(ji,C)}catch{}x=!0}return x}finally{re.p=p,V.T=h,NE(i,s)}}return!1}function OE(i,s,c){s=Xn(c,s),s=ap(i.stateNode,s,2),i=Wi(i,s,2),i!==null&&(ul(i,2),Lr(i))}function yt(i,s,c){if(i.tag===3)OE(i,i,c);else for(;s!==null;){if(s.tag===3){OE(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ea===null||!ea.has(h))){i=Xn(c,i),c=Ix(2),h=Wi(s,c,2),h!==null&&(Lx(c,h,s,i),ul(h,2),Lr(h));break}}s=s.return}}function Hp(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new yL;var p=new Set;h.set(s,p)}else p=h.get(s),p===void 0&&(p=new Set,h.set(s,p));p.has(c)||(kp=!0,p.add(c),i=SL.bind(null,i,s,c),s.then(i,i))}function SL(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,vt===i&&(ct&c)===c&&(kt===4||kt===3&&(ct&62914560)===ct&&300>ke()-Lp?(wt&2)===0&&io(i,0):Dp|=c,ro===ct&&(ro=0)),Lr(i)}function kE(i,s){s===0&&(s=M0()),i=zi(i,s),i!==null&&(ul(i,s),Lr(i))}function AL(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),kE(i,c)}function wL(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,p=i.memoizedState;p!==null&&(c=p.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),kE(i,c)}function TL(i,s){return ae(i,s)}var Cd=null,oo=null,Fp=!1,Rd=!1,Gp=!1,es=0;function Lr(i){i!==oo&&i.next===null&&(oo===null?Cd=oo=i:oo=oo.next=i),Rd=!0,Fp||(Fp=!0,RL(CL))}function Kl(i,s){if(!Gp&&Rd){Gp=!0;do for(var c=!1,h=Cd;h!==null;){if(i!==0){var p=h.pendingLanes;if(p===0)var x=0;else{var C=h.suspendedLanes,O=h.pingedLanes;x=(1<<31-Ln(42|i)+1)-1,x&=p&~(C&~O),x=x&201326677?x&201326677|1:x?x|2:0}x!==0&&(c=!0,LE(h,x))}else x=ct,x=Pu(h,h===vt?x:0),(x&3)===0||cl(h,x)||(c=!0,LE(h,x));h=h.next}while(c);Gp=!1}}function CL(){Rd=Fp=!1;var i=0;es!==0&&(jL()&&(i=es),es=0);for(var s=ke(),c=null,h=Cd;h!==null;){var p=h.next,x=DE(h,s);x===0?(h.next=null,c===null?Cd=p:c.next=p,p===null&&(oo=c)):(c=h,(i!==0||(x&3)!==0)&&(Rd=!0)),h=p}Kl(i)}function DE(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,p=i.expirationTimes,x=i.pendingLanes&-62914561;0<x;){var C=31-Ln(x),O=1<<C,M=p[C];M===-1?((O&c)===0||(O&h)!==0)&&(p[C]=JD(O,s)):M<=s&&(i.expiredLanes|=O),x&=~O}if(s=vt,c=ct,c=Pu(i,i===s?c:0),h=i.callbackNode,c===0||i===s&&bt===2||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Ae(h),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||cl(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(h!==null&&Ae(h),V0(c)){case 2:case 8:c=Mt;break;case 32:c=In;break;case 268435456:c=Os;break;default:c=In}return h=IE.bind(null,i),c=ae(c,h),i.callbackPriority=s,i.callbackNode=c,s}return h!==null&&h!==null&&Ae(h),i.callbackPriority=2,i.callbackNode=null,2}function IE(i,s){var c=i.callbackNode;if(so()&&i.callbackNode!==c)return null;var h=ct;return h=Pu(i,i===vt?h:0),h===0?null:(_E(i,h,s),DE(i,ke()),i.callbackNode!=null&&i.callbackNode===c?IE.bind(null,i):null)}function LE(i,s){if(so())return null;_E(i,s,!0)}function RL(i){VL(function(){(wt&6)!==0?ae(Lt,i):i()})}function $p(){return es===0&&(es=L0()),es}function ME(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Hu(""+i)}function jE(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function NL(i,s,c,h,p){if(s==="submit"&&c&&c.stateNode===p){var x=ME((p[Tn]||null).action),C=h.submitter;C&&(s=(s=C[Tn]||null)?ME(s.formAction):C.getAttribute("formAction"),s!==null&&(x=s,C=null));var O=new qu("action","action",null,h,p);i.push({event:O,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(es!==0){var M=C?jE(p,C):new FormData(p);ep(c,{pending:!0,data:M,method:p.method,action:x},null,M)}}else typeof x=="function"&&(O.preventDefault(),M=C?jE(p,C):new FormData(p),ep(c,{pending:!0,data:M,method:p.method,action:x},x,M))},currentTarget:p}]})}}for(var qp=0;qp<R_.length;qp++){var Kp=R_[qp],OL=Kp.toLowerCase(),kL=Kp[0].toUpperCase()+Kp.slice(1);gr(OL,"on"+kL)}gr(S_,"onAnimationEnd"),gr(A_,"onAnimationIteration"),gr(w_,"onAnimationStart"),gr("dblclick","onDoubleClick"),gr("focusin","onFocus"),gr("focusout","onBlur"),gr(WI,"onTransitionRun"),gr(YI,"onTransitionStart"),gr(ZI,"onTransitionCancel"),gr(T_,"onTransitionEnd"),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),Ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wl="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(" "),DL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wl));function PE(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],p=h.event;h=h.listeners;e:{var x=void 0;if(s)for(var C=h.length-1;0<=C;C--){var O=h[C],M=O.instance,$=O.currentTarget;if(O=O.listener,M!==x&&p.isPropagationStopped())break e;x=O,p.currentTarget=$;try{x(p)}catch(oe){md(oe)}p.currentTarget=null,x=M}else for(C=0;C<h.length;C++){if(O=h[C],M=O.instance,$=O.currentTarget,O=O.listener,M!==x&&p.isPropagationStopped())break e;x=O,p.currentTarget=$;try{x(p)}catch(oe){md(oe)}p.currentTarget=null,x=M}}}}function ot(i,s){var c=s[cm];c===void 0&&(c=s[cm]=new Set);var h=i+"__bubble";c.has(h)||(VE(s,i,2,!1),c.add(h))}function Wp(i,s,c){var h=0;s&&(h|=4),VE(c,i,h,s)}var Nd="_reactListening"+Math.random().toString(36).slice(2);function Yp(i){if(!i[Nd]){i[Nd]=!0,U0.forEach(function(c){c!=="selectionchange"&&(DL.has(c)||Wp(c,!1,i),Wp(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Nd]||(s[Nd]=!0,Wp("selectionchange",!1,s))}}function VE(i,s,c,h){switch(oS(s)){case 2:var p=iM;break;case 8:p=aM;break;default:p=lg}c=p.bind(null,s,c,i),p=void 0,!ym||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(p=!0),h?p!==void 0?i.addEventListener(s,c,{capture:!0,passive:p}):i.addEventListener(s,c,!0):p!==void 0?i.addEventListener(s,c,{passive:p}):i.addEventListener(s,c,!1)}function Zp(i,s,c,h,p){var x=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var C=h.tag;if(C===3||C===4){var O=h.stateNode.containerInfo;if(O===p||O.nodeType===8&&O.parentNode===p)break;if(C===4)for(C=h.return;C!==null;){var M=C.tag;if((M===3||M===4)&&(M=C.stateNode.containerInfo,M===p||M.nodeType===8&&M.parentNode===p))return;C=C.return}for(;O!==null;){if(C=La(O),C===null)return;if(M=C.tag,M===5||M===6||M===26||M===27){h=x=C;continue e}O=O.parentNode}}h=h.return}J0(function(){var $=x,oe=pm(c),he=[];e:{var Q=C_.get(i);if(Q!==void 0){var se=qu,Le=i;switch(i){case"keypress":if(Gu(c)===0)break e;case"keydown":case"keyup":se=wI;break;case"focusin":Le="focus",se=xm;break;case"focusout":Le="blur",se=xm;break;case"beforeblur":case"afterblur":se=xm;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=n_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=hI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=RI;break;case S_:case A_:case w_:se=gI;break;case T_:se=OI;break;case"scroll":case"scrollend":se=dI;break;case"wheel":se=DI;break;case"copy":case"cut":case"paste":se=vI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=i_;break;case"toggle":case"beforetoggle":se=LI}var qe=(s&4)!==0,Dt=!qe&&(i==="scroll"||i==="scrollend"),K=qe?Q!==null?Q+"Capture":null:Q;qe=[];for(var G=$,Z;G!==null;){var ce=G;if(Z=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||Z===null||K===null||(ce=hl(G,K),ce!=null&&qe.push(Yl(G,ce,Z))),Dt)break;G=G.return}0<qe.length&&(Q=new se(Q,Le,null,c,oe),he.push({event:Q,listeners:qe}))}}if((s&7)===0){e:{if(Q=i==="mouseover"||i==="pointerover",se=i==="mouseout"||i==="pointerout",Q&&c!==mm&&(Le=c.relatedTarget||c.fromElement)&&(La(Le)||Le[ks]))break e;if((se||Q)&&(Q=oe.window===oe?oe:(Q=oe.ownerDocument)?Q.defaultView||Q.parentWindow:window,se?(Le=c.relatedTarget||c.toElement,se=$,Le=Le?La(Le):null,Le!==null&&(Dt=ee(Le),qe=Le.tag,Le!==Dt||qe!==5&&qe!==27&&qe!==6)&&(Le=null)):(se=null,Le=$),se!==Le)){if(qe=n_,ce="onMouseLeave",K="onMouseEnter",G="mouse",(i==="pointerout"||i==="pointerover")&&(qe=i_,ce="onPointerLeave",K="onPointerEnter",G="pointer"),Dt=se==null?Q:fl(se),Z=Le==null?Q:fl(Le),Q=new qe(ce,G+"leave",se,c,oe),Q.target=Dt,Q.relatedTarget=Z,ce=null,La(oe)===$&&(qe=new qe(K,G+"enter",Le,c,oe),qe.target=Z,qe.relatedTarget=Dt,ce=qe),Dt=ce,se&&Le)t:{for(qe=se,K=Le,G=0,Z=qe;Z;Z=lo(Z))G++;for(Z=0,ce=K;ce;ce=lo(ce))Z++;for(;0<G-Z;)qe=lo(qe),G--;for(;0<Z-G;)K=lo(K),Z--;for(;G--;){if(qe===K||K!==null&&qe===K.alternate)break t;qe=lo(qe),K=lo(K)}qe=null}else qe=null;se!==null&&BE(he,Q,se,qe,!1),Le!==null&&Dt!==null&&BE(he,Dt,Le,qe,!0)}}e:{if(Q=$?fl($):window,se=Q.nodeName&&Q.nodeName.toLowerCase(),se==="select"||se==="input"&&Q.type==="file")var Re=f_;else if(u_(Q))if(h_)Re=GI;else{Re=HI;var nt=UI}else se=Q.nodeName,!se||se.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?$&&hm($.elementType)&&(Re=f_):Re=FI;if(Re&&(Re=Re(i,$))){d_(he,Re,c,oe);break e}nt&&nt(i,Q,$),i==="focusout"&&$&&Q.type==="number"&&$.memoizedProps.value!=null&&fm(Q,"number",Q.value)}switch(nt=$?fl($):window,i){case"focusin":(u_(nt)||nt.contentEditable==="true")&&(zs=nt,Cm=$,xl=null);break;case"focusout":xl=Cm=zs=null;break;case"mousedown":Rm=!0;break;case"contextmenu":case"mouseup":case"dragend":Rm=!1,x_(he,c,oe);break;case"selectionchange":if(KI)break;case"keydown":case"keyup":x_(he,c,oe)}var Pe;if(Sm)e:{switch(i){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Bs?l_(i,c)&&(Ve="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ve="onCompositionStart");Ve&&(a_&&c.locale!=="ko"&&(Bs||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Bs&&(Pe=e_()):(Bi=oe,vm="value"in Bi?Bi.value:Bi.textContent,Bs=!0)),nt=Od($,Ve),0<nt.length&&(Ve=new r_(Ve,i,null,c,oe),he.push({event:Ve,listeners:nt}),Pe?Ve.data=Pe:(Pe=c_(c),Pe!==null&&(Ve.data=Pe)))),(Pe=jI?PI(i,c):VI(i,c))&&(Ve=Od($,"onBeforeInput"),0<Ve.length&&(nt=new r_("onBeforeInput","beforeinput",null,c,oe),he.push({event:nt,listeners:Ve}),nt.data=Pe)),NL(he,i,$,c,oe)}PE(he,s)})}function Yl(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Od(i,s){for(var c=s+"Capture",h=[];i!==null;){var p=i,x=p.stateNode;p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=hl(i,c),p!=null&&h.unshift(Yl(i,p,x)),p=hl(i,s),p!=null&&h.push(Yl(i,p,x))),i=i.return}return h}function lo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function BE(i,s,c,h,p){for(var x=s._reactName,C=[];c!==null&&c!==h;){var O=c,M=O.alternate,$=O.stateNode;if(O=O.tag,M!==null&&M===h)break;O!==5&&O!==26&&O!==27||$===null||(M=$,p?($=hl(c,x),$!=null&&C.unshift(Yl(c,$,M))):p||($=hl(c,x),$!=null&&C.push(Yl(c,$,M)))),c=c.return}C.length!==0&&i.push({event:s,listeners:C})}var IL=/\r\n?/g,LL=/\u0000|\uFFFD/g;function zE(i){return(typeof i=="string"?i:""+i).replace(IL,`
50
- `).replace(LL,"")}function UE(i,s){return s=zE(s),zE(i)===s}function kd(){}function pt(i,s,c,h,p,x){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||js(i,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&js(i,""+h);break;case"className":Bu(i,"class",h);break;case"tabIndex":Bu(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Bu(i,c,h);break;case"style":X0(i,h,x);break;case"data":if(s!=="object"){Bu(i,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=Hu(""+h),i.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(c,"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 x=="function"&&(c==="formAction"?(s!=="input"&&pt(i,s,"name",p.name,p,null),pt(i,s,"formEncType",p.formEncType,p,null),pt(i,s,"formMethod",p.formMethod,p,null),pt(i,s,"formTarget",p.formTarget,p,null)):(pt(i,s,"encType",p.encType,p,null),pt(i,s,"method",p.method,p,null),pt(i,s,"target",p.target,p,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=Hu(""+h),i.setAttribute(c,h);break;case"onClick":h!=null&&(i.onclick=kd);break;case"onScroll":h!=null&&ot("scroll",i);break;case"onScrollEnd":h!=null&&ot("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}c=Hu(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""+h):i.removeAttribute(c);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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":h===!0?i.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,h):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(c,h):i.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(c):i.setAttribute(c,h);break;case"popover":ot("beforetoggle",i),ot("toggle",i),Vu(i,"popover",h);break;case"xlinkActuate":ni(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ni(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ni(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ni(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ni(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ni(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ni(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ni(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ni(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Vu(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=cI.get(c)||c,Vu(i,c,h))}}function Xp(i,s,c,h,p,x){switch(c){case"style":X0(i,h,x);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof h=="string"?js(i,h):(typeof h=="number"||typeof h=="bigint")&&js(i,""+h);break;case"onScroll":h!=null&&ot("scroll",i);break;case"onScrollEnd":h!=null&&ot("scrollend",i);break;case"onClick":h!=null&&(i.onclick=kd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!H0.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(p=c.endsWith("Capture"),s=c.slice(2,p?c.length-7:void 0),x=i[Tn]||null,x=x!=null?x[c]:null,typeof x=="function"&&i.removeEventListener(s,x,p),typeof h=="function")){typeof x!="function"&&x!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,h,p);break e}c in i?i[c]=h:h===!0?i.setAttribute(c,""):Vu(i,c,h)}}}function on(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",i),ot("load",i);var h=!1,p=!1,x;for(x in c)if(c.hasOwnProperty(x)){var C=c[x];if(C!=null)switch(x){case"src":h=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:pt(i,s,x,C,c,null)}}p&&pt(i,s,"srcSet",c.srcSet,c,null),h&&pt(i,s,"src",c.src,c,null);return;case"input":ot("invalid",i);var O=x=C=p=null,M=null,$=null;for(h in c)if(c.hasOwnProperty(h)){var oe=c[h];if(oe!=null)switch(h){case"name":p=oe;break;case"type":C=oe;break;case"checked":M=oe;break;case"defaultChecked":$=oe;break;case"value":x=oe;break;case"defaultValue":O=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,s));break;default:pt(i,s,h,oe,c,null)}}K0(i,x,O,M,$,C,p,!1),zu(i);return;case"select":ot("invalid",i),h=C=x=null;for(p in c)if(c.hasOwnProperty(p)&&(O=c[p],O!=null))switch(p){case"value":x=O;break;case"defaultValue":C=O;break;case"multiple":h=O;default:pt(i,s,p,O,c,null)}s=x,c=C,i.multiple=!!h,s!=null?Ms(i,!!h,s,!1):c!=null&&Ms(i,!!h,c,!0);return;case"textarea":ot("invalid",i),x=p=h=null;for(C in c)if(c.hasOwnProperty(C)&&(O=c[C],O!=null))switch(C){case"value":h=O;break;case"defaultValue":p=O;break;case"children":x=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(91));break;default:pt(i,s,C,O,c,null)}Y0(i,h,p,x),zu(i);return;case"option":for(M in c)if(c.hasOwnProperty(M)&&(h=c[M],h!=null))switch(M){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:pt(i,s,M,h,c,null)}return;case"dialog":ot("cancel",i),ot("close",i);break;case"iframe":case"object":ot("load",i);break;case"video":case"audio":for(h=0;h<Wl.length;h++)ot(Wl[h],i);break;case"image":ot("error",i),ot("load",i);break;case"details":ot("toggle",i);break;case"embed":case"source":case"link":ot("error",i),ot("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in c)if(c.hasOwnProperty($)&&(h=c[$],h!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:pt(i,s,$,h,c,null)}return;default:if(hm(s)){for(oe in c)c.hasOwnProperty(oe)&&(h=c[oe],h!==void 0&&Xp(i,s,oe,h,c,void 0));return}}for(O in c)c.hasOwnProperty(O)&&(h=c[O],h!=null&&pt(i,s,O,h,c,null))}function ML(i,s,c,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,C=null,O=null,M=null,$=null,oe=null;for(se in c){var he=c[se];if(c.hasOwnProperty(se)&&he!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":M=he;default:h.hasOwnProperty(se)||pt(i,s,se,null,h,he)}}for(var Q in h){var se=h[Q];if(he=c[Q],h.hasOwnProperty(Q)&&(se!=null||he!=null))switch(Q){case"type":x=se;break;case"name":p=se;break;case"checked":$=se;break;case"defaultChecked":oe=se;break;case"value":C=se;break;case"defaultValue":O=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:se!==he&&pt(i,s,Q,se,h,he)}}dm(i,C,O,M,$,oe,x,p);return;case"select":se=C=O=Q=null;for(x in c)if(M=c[x],c.hasOwnProperty(x)&&M!=null)switch(x){case"value":break;case"multiple":se=M;default:h.hasOwnProperty(x)||pt(i,s,x,null,h,M)}for(p in h)if(x=h[p],M=c[p],h.hasOwnProperty(p)&&(x!=null||M!=null))switch(p){case"value":Q=x;break;case"defaultValue":O=x;break;case"multiple":C=x;default:x!==M&&pt(i,s,p,x,h,M)}s=O,c=C,h=se,Q!=null?Ms(i,!!c,Q,!1):!!h!=!!c&&(s!=null?Ms(i,!!c,s,!0):Ms(i,!!c,c?[]:"",!1));return;case"textarea":se=Q=null;for(O in c)if(p=c[O],c.hasOwnProperty(O)&&p!=null&&!h.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:pt(i,s,O,null,h,p)}for(C in h)if(p=h[C],x=c[C],h.hasOwnProperty(C)&&(p!=null||x!=null))switch(C){case"value":Q=p;break;case"defaultValue":se=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==x&&pt(i,s,C,p,h,x)}W0(i,Q,se);return;case"option":for(var Le in c)if(Q=c[Le],c.hasOwnProperty(Le)&&Q!=null&&!h.hasOwnProperty(Le))switch(Le){case"selected":i.selected=!1;break;default:pt(i,s,Le,null,h,Q)}for(M in h)if(Q=h[M],se=c[M],h.hasOwnProperty(M)&&Q!==se&&(Q!=null||se!=null))switch(M){case"selected":i.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:pt(i,s,M,Q,h,se)}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 qe in c)Q=c[qe],c.hasOwnProperty(qe)&&Q!=null&&!h.hasOwnProperty(qe)&&pt(i,s,qe,null,h,Q);for($ in h)if(Q=h[$],se=c[$],h.hasOwnProperty($)&&Q!==se&&(Q!=null||se!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,s));break;default:pt(i,s,$,Q,h,se)}return;default:if(hm(s)){for(var Dt in c)Q=c[Dt],c.hasOwnProperty(Dt)&&Q!==void 0&&!h.hasOwnProperty(Dt)&&Xp(i,s,Dt,void 0,h,Q);for(oe in h)Q=h[oe],se=c[oe],!h.hasOwnProperty(oe)||Q===se||Q===void 0&&se===void 0||Xp(i,s,oe,Q,h,se);return}}for(var K in c)Q=c[K],c.hasOwnProperty(K)&&Q!=null&&!h.hasOwnProperty(K)&&pt(i,s,K,null,h,Q);for(he in h)Q=h[he],se=c[he],!h.hasOwnProperty(he)||Q===se||Q==null&&se==null||pt(i,s,he,Q,h,se)}var Qp=null,Jp=null;function Dd(i){return i.nodeType===9?i:i.ownerDocument}function HE(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function FE(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function eg(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var tg=null;function jL(){var i=window.event;return i&&i.type==="popstate"?i===tg?!1:(tg=i,!0):(tg=null,!1)}var GE=typeof setTimeout=="function"?setTimeout:void 0,PL=typeof clearTimeout=="function"?clearTimeout:void 0,$E=typeof Promise=="function"?Promise:void 0,VL=typeof queueMicrotask=="function"?queueMicrotask:typeof $E<"u"?function(i){return $E.resolve(null).then(i).catch(BL)}:GE;function BL(i){setTimeout(function(){throw i})}function ng(i,s){var c=s,h=0;do{var p=c.nextSibling;if(i.removeChild(c),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(h===0){i.removeChild(p),rc(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=p}while(c);rc(s)}function rg(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":rg(c),um(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function zL(i,s,c,h){for(;i.nodeType===1;){var p=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[dl])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(x=i.getAttribute("rel"),x==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(x!==p.rel||i.getAttribute("href")!==(p.href==null?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(x=i.getAttribute("src"),(x!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===x)return i}else return i;if(i=br(i.nextSibling),i===null)break}return null}function UL(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=br(i.nextSibling),i===null))return null;return i}function br(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="F!"||s==="F")break;if(s==="/$")return null}}return i}function qE(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}function KE(i,s,c){switch(s=Dd(c),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}var ar=new Map,WE=new Set;function Id(i){return typeof i.getRootNode=="function"?i.getRootNode():i.ownerDocument}var yi=re.d;re.d={f:HL,r:FL,D:GL,C:$L,L:qL,m:KL,X:YL,S:WL,M:ZL};function HL(){var i=yi.f(),s=wd();return i||s}function FL(i){var s=Ds(i);s!==null&&s.tag===5&&s.type==="form"?xx(s):yi.r(i)}var co=typeof document>"u"?null:document;function YE(i,s,c){var h=co;if(h&&typeof s=="string"&&s){var p=Yn(s);p='link[rel="'+i+'"][href="'+p+'"]',typeof c=="string"&&(p+='[crossorigin="'+c+'"]'),WE.has(p)||(WE.add(p),i={rel:i,crossOrigin:c,href:s},h.querySelector(p)===null&&(s=h.createElement("link"),on(s,"link",i),Zt(s),h.head.appendChild(s)))}}function GL(i){yi.D(i),YE("dns-prefetch",i,null)}function $L(i,s){yi.C(i,s),YE("preconnect",i,s)}function qL(i,s,c){yi.L(i,s,c);var h=co;if(h&&i&&s){var p='link[rel="preload"][as="'+Yn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(p+='[imagesrcset="'+Yn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(p+='[imagesizes="'+Yn(c.imageSizes)+'"]')):p+='[href="'+Yn(i)+'"]';var x=p;switch(s){case"style":x=uo(i);break;case"script":x=fo(i)}ar.has(x)||(i=H({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),ar.set(x,i),h.querySelector(p)!==null||s==="style"&&h.querySelector(Zl(x))||s==="script"&&h.querySelector(Xl(x))||(s=h.createElement("link"),on(s,"link",i),Zt(s),h.head.appendChild(s)))}}function KL(i,s){yi.m(i,s);var c=co;if(c&&i){var h=s&&typeof s.as=="string"?s.as:"script",p='link[rel="modulepreload"][as="'+Yn(h)+'"][href="'+Yn(i)+'"]',x=p;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=fo(i)}if(!ar.has(x)&&(i=H({rel:"modulepreload",href:i},s),ar.set(x,i),c.querySelector(p)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Xl(x)))return}h=c.createElement("link"),on(h,"link",i),Zt(h),c.head.appendChild(h)}}}function WL(i,s,c){yi.S(i,s,c);var h=co;if(h&&i){var p=Is(h).hoistableStyles,x=uo(i);s=s||"default";var C=p.get(x);if(!C){var O={loading:0,preload:null};if(C=h.querySelector(Zl(x)))O.loading=5;else{i=H({rel:"stylesheet",href:i,"data-precedence":s},c),(c=ar.get(x))&&ig(i,c);var M=C=h.createElement("link");Zt(M),on(M,"link",i),M._p=new Promise(function($,oe){M.onload=$,M.onerror=oe}),M.addEventListener("load",function(){O.loading|=1}),M.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Ld(C,s,h)}C={type:"stylesheet",instance:C,count:1,state:O},p.set(x,C)}}}function YL(i,s){yi.X(i,s);var c=co;if(c&&i){var h=Is(c).hoistableScripts,p=fo(i),x=h.get(p);x||(x=c.querySelector(Xl(p)),x||(i=H({src:i,async:!0},s),(s=ar.get(p))&&ag(i,s),x=c.createElement("script"),Zt(x),on(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},h.set(p,x))}}function ZL(i,s){yi.M(i,s);var c=co;if(c&&i){var h=Is(c).hoistableScripts,p=fo(i),x=h.get(p);x||(x=c.querySelector(Xl(p)),x||(i=H({src:i,async:!0,type:"module"},s),(s=ar.get(p))&&ag(i,s),x=c.createElement("script"),Zt(x),on(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},h.set(p,x))}}function ZE(i,s,c,h){var p=(p=Et.current)?Id(p):null;if(!p)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=uo(c.href),c=Is(p).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=uo(c.href);var x=Is(p).hoistableStyles,C=x.get(i);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(i,C),(x=p.querySelector(Zl(i)))&&!x._p&&(C.instance=x,C.state.loading=5),ar.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},ar.set(i,c),x||XL(p,i,c,C.state))),s&&h===null)throw Error(r(528,""));return C}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=fo(c),c=Is(p).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function uo(i){return'href="'+Yn(i)+'"'}function Zl(i){return'link[rel="stylesheet"]['+i+"]"}function XE(i){return H({},i,{"data-precedence":i.precedence,precedence:null})}function XL(i,s,c,h){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=i.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),on(s,"link",c),Zt(s),i.head.appendChild(s))}function fo(i){return'[src="'+Yn(i)+'"]'}function Xl(i){return"script[async]"+i}function QE(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=i.querySelector('style[data-href~="'+Yn(c.href)+'"]');if(h)return s.instance=h,Zt(h),h;var p=H({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Zt(h),on(h,"style",p),Ld(h,c.precedence,i),s.instance=h;case"stylesheet":p=uo(c.href);var x=i.querySelector(Zl(p));if(x)return s.state.loading|=4,s.instance=x,Zt(x),x;h=XE(c),(p=ar.get(p))&&ig(h,p),x=(i.ownerDocument||i).createElement("link"),Zt(x);var C=x;return C._p=new Promise(function(O,M){C.onload=O,C.onerror=M}),on(x,"link",h),s.state.loading|=4,Ld(x,c.precedence,i),s.instance=x;case"script":return x=fo(c.src),(p=i.querySelector(Xl(x)))?(s.instance=p,Zt(p),p):(h=c,(p=ar.get(x))&&(h=H({},c),ag(h,p)),i=i.ownerDocument||i,p=i.createElement("script"),Zt(p),on(p,"link",h),i.head.appendChild(p),s.instance=p);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,Ld(h,c.precedence,i));return s.instance}function Ld(i,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=h.length?h[h.length-1]:null,x=p,C=0;C<h.length;C++){var O=h[C];if(O.dataset.precedence===s)x=O;else if(x!==p)break}x?x.parentNode.insertBefore(i,x.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function ig(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function ag(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var Md=null;function JE(i,s,c){if(Md===null){var h=new Map,p=Md=new Map;p.set(c,h)}else p=Md,h=p.get(c),h||(h=new Map,p.set(c,h));if(h.has(i))return h;for(h.set(i,null),c=c.getElementsByTagName(i),p=0;p<c.length;p++){var x=c[p];if(!(x[dl]||x[un]||i==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(s)||"";C=i+C;var O=h.get(C);O?O.push(x):h.set(C,[x])}}return h}function eS(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function QL(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function tS(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var Ql=null;function JL(){}function eM(i,s,c){if(Ql===null)throw Error(r(475));var h=Ql;if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=uo(c.href),x=i.querySelector(Zl(p));if(x){i=x._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=jd.bind(h),i.then(h,h)),s.state.loading|=4,s.instance=x,Zt(x);return}x=i.ownerDocument||i,c=XE(c),(p=ar.get(p))&&ig(c,p),x=x.createElement("link"),Zt(x);var C=x;C._p=new Promise(function(O,M){C.onload=O,C.onerror=M}),on(x,"link",c),s.instance=x}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(h.count++,s=jd.bind(h),i.addEventListener("load",s),i.addEventListener("error",s))}}function tM(){if(Ql===null)throw Error(r(475));var i=Ql;return i.stylesheets&&i.count===0&&sg(i,i.stylesheets),0<i.count?function(s){var c=setTimeout(function(){if(i.stylesheets&&sg(i,i.stylesheets),i.unsuspend){var h=i.unsuspend;i.unsuspend=null,h()}},6e4);return i.unsuspend=s,function(){i.unsuspend=null,clearTimeout(c)}}:null}function jd(){if(this.count--,this.count===0){if(this.stylesheets)sg(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Pd=null;function sg(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Pd=new Map,s.forEach(nM,i),Pd=null,jd.call(i))}function nM(i,s){if(!(s.state.loading&4)){var c=Pd.get(i);if(c)var h=c.get(null);else{c=new Map,Pd.set(i,c);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var C=p[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(c.set(C.dataset.precedence,C),h=C)}h&&c.set(null,h)}p=s.instance,C=p.getAttribute("data-precedence"),x=c.get(C)||h,x===h&&c.set(null,p),c.set(C,p),this.count++,h=jd.bind(this),p.addEventListener("load",h),p.addEventListener("error",h),x?x.parentNode.insertBefore(p,x.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),s.state.loading|=4}}var Jl={$$typeof:b,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function rM(i,s,c,h,p,x,C,O){this.tag=1,this.containerInfo=i,this.finishedWork=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=lm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lm(0),this.hiddenUpdates=lm(null),this.identifierPrefix=h,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function nS(i,s,c,h,p,x,C,O,M,$,oe,he){return i=new rM(i,s,c,C,O,M,$,he),s=1,x===!0&&(s|=24),x=rr(3,null,null,s),i.current=x,x.stateNode=i,s=Vm(),s.refCount++,i.pooledCache=s,s.refCount++,x.memoizedState={element:h,isDehydrated:c,cache:s},vp(x),i}function rS(i){return i?(i=Fs,i):Fs}function iS(i,s,c,h,p,x){p=rS(p),h.context===null?h.context=p:h.pendingContext=p,h=Ki(s),h.payload={element:c},x=x===void 0?null:x,x!==null&&(h.callback=x),c=Wi(i,h,s),c!==null&&(xn(c,i,s),jl(c,i,s))}function aS(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function og(i,s){aS(i,s),(i=i.alternate)&&aS(i,s)}function sS(i){if(i.tag===13){var s=zi(i,67108864);s!==null&&xn(s,i,67108864),og(i,67108864)}}var Vd=!0;function iM(i,s,c,h){var p=V.T;V.T=null;var x=re.p;try{re.p=2,lg(i,s,c,h)}finally{re.p=x,V.T=p}}function aM(i,s,c,h){var p=V.T;V.T=null;var x=re.p;try{re.p=8,lg(i,s,c,h)}finally{re.p=x,V.T=p}}function lg(i,s,c,h){if(Vd){var p=cg(h);if(p===null)Zp(i,s,h,Bd,c),lS(i,h);else if(oM(p,i,s,c,h))h.stopPropagation();else if(lS(i,h),s&4&&-1<sM.indexOf(i)){for(;p!==null;){var x=Ds(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=Ia(x.pendingLanes);if(C!==0){var O=x;for(O.pendingLanes|=2,O.entangledLanes|=2;C;){var M=1<<31-Ln(C);O.entanglements[1]|=M,C&=~M}Lr(x),(wt&6)===0&&(Ed=ke()+500,Kl(0))}}break;case 13:O=zi(x,2),O!==null&&xn(O,x,2),wd(),og(x,2)}if(x=cg(h),x===null&&Zp(i,s,h,Bd,c),x===p)break;p=x}p!==null&&h.stopPropagation()}else Zp(i,s,h,null,c)}}function cg(i){return i=pm(i),ug(i)}var Bd=null;function ug(i){if(Bd=null,i=La(i),i!==null){var s=ee(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=ve(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Bd=i,null}function oS(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xe()){case Lt:return 2;case Mt:return 8;case In:case sm:return 32;case Os:return 268435456;default:return 32}default:return 32}}var dg=!1,ta=null,na=null,ra=null,ec=new Map,tc=new Map,ia=[],sM="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 lS(i,s){switch(i){case"focusin":case"focusout":ta=null;break;case"dragenter":case"dragleave":na=null;break;case"mouseover":case"mouseout":ra=null;break;case"pointerover":case"pointerout":ec.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":tc.delete(s.pointerId)}}function nc(i,s,c,h,p,x){return i===null||i.nativeEvent!==x?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:x,targetContainers:[p]},s!==null&&(s=Ds(s),s!==null&&sS(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),i)}function oM(i,s,c,h,p){switch(s){case"focusin":return ta=nc(ta,i,s,c,h,p),!0;case"dragenter":return na=nc(na,i,s,c,h,p),!0;case"mouseover":return ra=nc(ra,i,s,c,h,p),!0;case"pointerover":var x=p.pointerId;return ec.set(x,nc(ec.get(x)||null,i,s,c,h,p)),!0;case"gotpointercapture":return x=p.pointerId,tc.set(x,nc(tc.get(x)||null,i,s,c,h,p)),!0}return!1}function cS(i){var s=La(i.target);if(s!==null){var c=ee(s);if(c!==null){if(s=c.tag,s===13){if(s=ve(c),s!==null){i.blockedOn=s,tI(i.priority,function(){if(c.tag===13){var h=Bn(),p=zi(c,h);p!==null&&xn(p,c,h),og(c,h)}});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function zd(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=cg(i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);mm=h,c.target.dispatchEvent(h),mm=null}else return s=Ds(c),s!==null&&sS(s),i.blockedOn=c,!1;s.shift()}return!0}function uS(i,s,c){zd(i)&&c.delete(s)}function lM(){dg=!1,ta!==null&&zd(ta)&&(ta=null),na!==null&&zd(na)&&(na=null),ra!==null&&zd(ra)&&(ra=null),ec.forEach(uS),tc.forEach(uS)}function Ud(i,s){i.blockedOn===s&&(i.blockedOn=null,dg||(dg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,lM)))}var Hd=null;function dS(i){Hd!==i&&(Hd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hd===i&&(Hd=null);for(var s=0;s<i.length;s+=3){var c=i[s],h=i[s+1],p=i[s+2];if(typeof h!="function"){if(ug(h||c)===null)continue;break}var x=Ds(c);x!==null&&(i.splice(s,3),s-=3,ep(x,{pending:!0,data:p,method:c.method,action:h},h,p))}}))}function rc(i){function s(M){return Ud(M,i)}ta!==null&&Ud(ta,i),na!==null&&Ud(na,i),ra!==null&&Ud(ra,i),ec.forEach(s),tc.forEach(s);for(var c=0;c<ia.length;c++){var h=ia[c];h.blockedOn===i&&(h.blockedOn=null)}for(;0<ia.length&&(c=ia[0],c.blockedOn===null);)cS(c),c.blockedOn===null&&ia.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var p=c[h],x=c[h+1],C=p[Tn]||null;if(typeof x=="function")C||dS(c);else if(C){var O=null;if(x&&x.hasAttribute("formAction")){if(p=x,C=x[Tn]||null)O=C.formAction;else if(ug(p)!==null)continue}else O=C.action;typeof O=="function"?c[h+1]=O:(c.splice(h,3),h-=3),dS(c)}}}function fg(i){this._internalRoot=i}Fd.prototype.render=fg.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Bn();iS(c,h,i,s,null,null)},Fd.prototype.unmount=fg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;i.tag===0&&so(),iS(i.current,2,null,i,null,null),wd(),s[ks]=null}};function Fd(i){this._internalRoot=i}Fd.prototype.unstable_scheduleHydration=function(i){if(i){var s=B0();i={blockedOn:null,target:i,priority:s};for(var c=0;c<ia.length&&s!==0&&s<ia[c].priority;c++);ia.splice(c,0,i),c===0&&cS(i)}};var fS=t.version;if(fS!=="19.0.0")throw Error(r(527,fS,"19.0.0"));re.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=W(s),i=i!==null?F(i):null,i=i===null?null:i.stateNode,i};var cM={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:V,findFiberByHostInstance:La,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gd.isDisabled&&Gd.supportsFiber)try{ji=Gd.inject(cM),bn=Gd}catch{}}return ac.createRoot=function(i,s){if(!a(i))throw Error(r(299));var c=!1,h="",p=Nx,x=Ox,C=kx,O=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(O=s.unstable_transitionCallbacks)),s=nS(i,1,!1,null,null,c,h,p,x,C,O,null),i[ks]=s.current,Yp(i.nodeType===8?i.parentNode:i),new fg(s)},ac.hydrateRoot=function(i,s,c){if(!a(i))throw Error(r(299));var h=!1,p="",x=Nx,C=Ox,O=kx,M=null,$=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(x=c.onUncaughtError),c.onCaughtError!==void 0&&(C=c.onCaughtError),c.onRecoverableError!==void 0&&(O=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(M=c.unstable_transitionCallbacks),c.formState!==void 0&&($=c.formState)),s=nS(i,1,!0,s,c??null,h,p,x,C,O,M,$),s.context=rS(null),c=s.current,h=Bn(),p=Ki(h),p.callback=null,Wi(c,p,h),s.current.lanes=h,ul(s,h),Lr(s),i[ks]=s.current,Yp(i),new Fd(s)},ac.version="19.0.0",ac}var ES;function EM(){if(ES)return pg.exports;ES=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(),pg.exports=xM(),pg.exports}var SM=EM();const AM={locales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],defaultLocale:"en"},wM={cookieName:"INTLAYER_LOCALE",prefixDefault:!1},TM={applicationURL:"http://localhost:5173/",editorURL:"http://localhost:8000",cmsURL:"https://intlayer.org",backendURL:"https://back.intlayer.org",port:8e3,enabled:!0,dictionaryPriorityStrategy:"local_first",hotReload:!1},rt={internationalization:AM,middleware:wM,editor:TM};var q=(e=>(e.Translation="translation",e.Enumeration="enumeration",e.Condition="condition",e.Insertion="insertion",e.File="file",e.Object="object",e.Array="array",e.Nested="nested",e.ReactNode="reactNode",e.Markdown="markdown",e.Text="text",e.Number="number",e.Boolean="boolean",e.Unknown="unknown",e))(q||{});const CM=(e,t,n)=>({...n,nodeType:e,[e]:t}),SS=(e,t,n)=>{let r=e,a=null,o=[];if(t.length===0)return n;for(let l=0;l<t.length;l++){const u=t[l];if(a=r,(u.type===q.Object||u.type===q.Array)&&(o=[u.key],(!r[u.key]||typeof r[u.key]!="object")&&(r[u.key]={}),r=r[u.key]),(u.type===q.Translation||u.type===q.Enumeration)&&(o=[u.type,u.key],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]={}),(!r[u.type][u.key]||typeof r[u.type][u.key]!="object")&&(r[u.type][u.key]={}),r=r[u.type][u.key]),(u.type===q.Enumeration||u.type===q.Condition)&&(o=[u.type,u.key],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]={}),(!r[u.type][u.key]||typeof r[u.type][u.key]!="object")&&(r[u.type][u.key]={}),r=r[u.type][u.key]),(u.type===q.Markdown||u.type===q.Insertion)&&(o=[u.type],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]=""),r=r[u.type]),u.type===q.File&&(o=["content"],r=r.content),u.type&&(r=r),l===t.length-1&&a&&o.length>0){let d=a;for(const f of o.slice(0,-1))d=d[f];typeof n>"u"?delete d[o[o.length-1]]:d[o[o.length-1]]=n}}return e},Ur=(e,t)=>{let n=structuredClone(e);for(const r of t)r.type===q.Object||r.type===q.Array?n=n==null?void 0:n[r.key]:r.type===q.Translation||r.type===q.Condition||r.type===q.Enumeration?n=n==null?void 0:n[r.type][r.key]:(r.type===q.Markdown||r.type===q.Insertion||r.type===q.File)&&(n=n==null?void 0:n[r.type]);return n},YT=e=>{if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof(e==null?void 0:e.nodeType)=="string"){const t=e,n=t[t.nodeType];if(t.nodeType===q.Translation||t.nodeType===q.Enumeration||t.nodeType===q.Condition||t.nodeType===q.Insertion||t.nodeType===q.File){const r=Object.keys(n)[0];return n[r]}return t.nodeType===q.Nested?void 0:n}return!e||typeof e!="object"?e:Array.isArray(e)?e[0]:e},RM=(e,t,n)=>{let r=e,a=null,o=null;for(const l of n)a=r,(l.type===q.Object||l.type===q.Array)&&(o=l.key,r=r[l.key]),(l.type===q.Translation||l.type===q.Enumeration||l.type===q.Condition)&&(o=l.type,r=r[l.type][l.key]),(l.type===q.Markdown||l.type===q.ReactNode||l.type===q.Insertion||l.type===q.File)&&(o=l.type,r=r[l.type]);if(a&&o!==null)if(Array.isArray(a))a[o]=r;else{const l={};for(const u of Object.keys(a))u===o&&typeof t<"u"?l[t]=r:l[u]=a[u];Object.keys(a).forEach(u=>delete a[u]),Object.assign(a,l)}return e},NM=e=>typeof e=="object"&&typeof(e==null?void 0:e.key)<"u"&&typeof(e==null?void 0:e.props)<"u",qo=e=>typeof e=="string"?q.Text:typeof(e==null?void 0:e.nodeType)=="string"?e.nodeType:Array.isArray(e)?q.Array:NM(e)?q.ReactNode:typeof e=="number"?q.Number:typeof e=="boolean"?q.Boolean:e&&typeof e=="object"?q.Object:q.Unknown,sc=(e,t,n)=>{const r=structuredClone(n);switch(e){case q.Translation:return{nodeType:q.Translation,[q.Translation]:Object.assign({},...t.map(a=>({[a]:structuredClone(r)??""})))};case q.Enumeration:return{nodeType:q.Enumeration,[q.Enumeration]:{1:r??""}};case q.Condition:return{nodeType:q.Condition,[q.Condition]:{true:r??"",false:r??""}};case q.Insertion:return{nodeType:q.Insertion,[q.Insertion]:{insertion:r??""}};case q.Nested:return{nodeType:q.Nested,[q.Nested]:{dictionaryKey:""}};case q.Markdown:return{nodeType:q.Markdown,[q.Markdown]:r??""};case q.File:return{nodeType:q.File,[q.File]:r??""};case q.Object:return{newKey:r??""};case q.Array:return[r??""];case q.Text:return r??"";case q.Number:return r??0;case q.Boolean:return r??!0;default:return r??""}},dr=e=>{if(typeof e=="string")return"";if(typeof e=="number")return 0;if(typeof e=="boolean")return!0;if(typeof(e==null?void 0:e.nodeType)=="string"){const r=e,a=r[r.nodeType];return r.nodeType===q.Translation||r.nodeType===q.Enumeration||r.nodeType===q.Condition||r.nodeType===q.Insertion?dr(a):r.nodeType===q.Nested?"dictionary-key":r.nodeType===q.File?"file/path":r.nodeType===q.Markdown?dr(r):a}if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(dr);const t=Object.entries(e).map(([r,a])=>[r,dr(a)]);return Object.fromEntries(t)},gf=(e,t)=>{for(const r of t.plugins??[])if(r.canHandle(e))return r.transform(e,t,(a,o)=>gf(a,o));if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map((r,a)=>{const o={...t,children:r,keyPath:[...t.keyPath,{type:q.Array,key:a}]};return gf(r,o)});const n={};for(const r in e){const a={...t,children:e[r],keyPath:[...t.keyPath,{type:q.Object,key:r}]};n[r]=gf(e[r],a)}return n},OM=(e,t)=>{const n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},kM=(e,t)=>{const n=Object.keys(e);for(const r of n){const a=!r.startsWith(">")&&!r.startsWith("<")&&!r.startsWith("=")&&parseFloat(r)===t||r.startsWith("=")&&parseFloat(r.slice(1))===t,o=r.startsWith(">")&&t>parseFloat(r.slice(1)),l=r.startsWith(">=")&&t>=parseFloat(r.slice(2)),u=r.startsWith("<")&&t<parseFloat(r.slice(1)),d=r.startsWith("<=")&&t<=parseFloat(r.slice(2));if(a||o||l||u||d)return r}},DM=(e,t)=>{const n=kM(e,t)??"fallback";return e[n]},IM=(e,t)=>e.replace(/\{\{(.*?)\}\}/g,(n,r)=>(t[r]??"").toString()),AS={},ZT=(e,t,n)=>{const r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return Hv(e.content,r,t)},LM=(e,t,n)=>{const r=AS[e];if(!r)throw new Error(`Dictionary ${e} not found`,AS);return ZT(r,t,n)},MM=(e,t,n)=>{const r=LM(e,n==null?void 0:n.locale,n==null?void 0:n.plugins);if(typeof t=="string"){const a=t.split(".");let o=r;for(const l of a)if(o=o==null?void 0:o[l],o===void 0)return r;return o}return r},jM=(e,t,n=!0)=>{const{defaultLocale:r}=rt==null?void 0:rt.internationalization;let a=e[t??r];return n&&!a&&(a=e[r]),a},PM=(e,t=!0)=>({id:"translation-plugin",canHandle:n=>typeof n=="object"&&(n==null?void 0:n.nodeType)===q.Translation,transform:(n,r,a)=>{const o=structuredClone(n[q.Translation]);for(const l in o){const u={...r,children:o[l],keyPath:[...r.keyPath,{type:q.Translation,key:l}]};o[l]=a(o[l],u)}return jM(o,e,t)}}),VM={id:"enumeration-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Enumeration,transform:(e,t,n)=>{const r=structuredClone(e[q.Enumeration]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:q.Enumeration,key:a}]};r[a]=n(o,l)}return a=>DM(r,a)}},BM={id:"condition-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Condition,transform:(e,t,n)=>{const r=structuredClone(e[q.Condition]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:q.Condition,key:a}]};r[a]=n(o,l)}return a=>OM(r,a)}},zM={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Insertion,transform:(e,t,n)=>{const r=[...t.keyPath,{type:q.Insertion}],a=e[q.Insertion];return n(a,{...t,children:a,keyPath:r,plugins:[{id:"insertion-string-plugin",canHandle:l=>typeof l=="string",transform:(l,u,d)=>{const f=d(l,{...u,children:l,plugins:[...(t.plugins??[]).filter(m=>m.id!=="intlayer-node-plugin")]});return m=>{const g=IM(f,m);return d(g,{...u,plugins:t.plugins,children:g})}}},...t.plugins??[]]})}},UM={id:"nested-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Nested,transform:(e,t)=>MM(e.nested.dictionaryKey,e.nested.path,t)},HM={id:"file-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.File,transform:(e,t,n)=>n(e.content,{...t,children:e.content})},Hv=(e,t,n=rt.internationalization.defaultLocale)=>{const r=[zM,PM(n),VM,BM,UM,HM,...t.plugins??[]];return gf(e,{...t,plugins:r})},wS={method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"},FM=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),$d=e=>e.reduce((t,n)=>{const r=t??{},a=FM(n??{});return typeof r=="object"&&typeof a=="object"?{...r,...a}:a??r},{}),De=async(e,...t)=>{const{signal:n}=new AbortController;let r="",a;const o=t.map(({body:b,params:v,headers:S,...A})=>A),l=$d([wS,...o]),u=$d([wS.headers,...t.map(b=>b.headers)]),d=$d(t.map(b=>b.params)),f=l.method;if(f!=="GET"&&f!=="HEAD"){const b=$d(t.map(v=>v.body));(u==null?void 0:u["Content-Type"])==="application/x-www-form-urlencoded"?a=new URLSearchParams(b).toString():a=JSON.stringify(b)}Object.entries(d).length>0&&(r=`?${new URLSearchParams(d).toString()}`);const m={...l,headers:u,body:a,signal:n},g=`${e}${r}`,y=await fetch(g,m);if(!y.ok){const b=await y.json();throw new Error(JSON.stringify(b.error)??"An error occurred")}return await y.json()},GM=(e={},t)=>{var k,I;const n=((k=t==null?void 0:t.editor)==null?void 0:k.backendURL)??((I=rt.editor)==null?void 0:I.backendURL),{clientId:r,clientSecret:a}=(t==null?void 0:t.editor)??{};if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const o=`${n}/api/auth`;return{login:async(P,V={})=>await De(`${o}/login`,e,V,{method:"POST",body:P}),getLoginWithGitHubURL:P=>{const V=new URLSearchParams(P);return`${o}/login/github?${V.toString()}`},getLoginWithGoogleURL:P=>{const V=new URLSearchParams(P);return`${o}/login/google?${V.toString()}`},register:async(P,V={},H={})=>await De(`${o}/register`,e,H,{method:"POST",body:P,params:V}),logout:async(P={})=>await De(`${o}/logout`,e,P,{method:"POST"}),resetPassword:async(P,V={})=>await De(`${o}/password/reset`,e,V,{params:P,method:"POST"}),defineNewPassword:async(P,V={})=>await De(`${o}/password/define`,e,V,{method:"POST",body:P}),askResetPassword:async(P,V={})=>await De(`${o}/password/reset`,e,V,{method:"POST",body:{email:P}}),checkIfUserHasPassword:async(P={})=>await De(`${o}/password/has`,e,P,{method:"GET"}),verifyEmail:async({userId:P,secret:V},H={})=>await De(`${o}/active/${P}/${V}`,e,H,{method:"PUT"}),getVerifyEmailStatusURL:P=>`${o}/verify-email-status/${String(P)}`,changePassword:async(P,V={})=>await De(`${o}/password`,e,V,{method:"PUT",body:P}),createSession:async(P,V={})=>await De(`${o}/session`,e,V,{method:"POST",body:P}),getSession:async(P,V={})=>await De(`${n}/session`,e,V,{params:{session_token:P}}),getCSRFToken:async(P={})=>await De(`${n}/csrf-token`,e,P),getOAuth2AccessToken:async(P={})=>await De(`${n}/oauth2/token`,e,P,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{grant_type:"client_credentials",client_id:r,client_secret:a}})}},$M=(e={},t)=>{var g,y;const n=((g=t==null?void 0:t.editor)==null?void 0:g.backendURL)??((y=rt.editor)==null?void 0:y.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/dictionary`;return{getDictionaries:async(b,v={})=>await De(r,e,v,{params:b}),getDictionariesKeys:async(b={})=>await De(`${r}/keys`,e,b),getDictionary:async(b,v,S={})=>await De(`${r}/${b}`,e,S,{params:v?{version:v.toString()}:void 0}),pushDictionaries:async(b,v={})=>await De(`${r}`,e,v,{method:"PATCH",body:{dictionaries:b}}),addDictionary:async(b,v={})=>await De(`${r}`,e,v,{method:"POST",body:b}),updateDictionary:async(b,v,S={})=>await De(`${r}/${b}`,e,S,{method:"PUT",body:v}),deleteDictionary:async(b,v={})=>await De(`${r}/${b}`,e,v,{method:"DELETE"})}},qM=(e={},t)=>{var g,y;const n=((g=t==null?void 0:t.editor)==null?void 0:g.backendURL)??((y=rt.editor)==null?void 0:y.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/ai`;return{translateJSON:async(b,v={})=>await De(`${r}/translate/json`,e,v,{method:"POST",body:b}),auditContentDeclaration:async(b,v={})=>await De(`${r}/audit/dictionary`,e,v,{method:"POST",body:b}),auditContentDeclarationField:async(b,v={})=>await De(`${r}/audit/dictionary/field`,e,v,{method:"POST",body:b}),auditContentDeclarationMetadata:async(b,v={})=>await De(`${r}/audit/dictionary/metadata`,e,v,{method:"POST",body:b}),auditTag:async(b,v={})=>await De(`${r}/audit/tag`,e,v,{method:"POST",body:b}),askDocQuestion:async(b,v={})=>{var R;if(!b)return;const{onMessage:S,onDone:A,...w}=b,T=new AbortController;try{const D=await fetch(`${r}/ask`,{method:"POST",headers:{"Content-Type":"application/json",...e.headers,...v.headers},body:JSON.stringify(w),signal:T.signal});if(!D.ok){const P=await D.json().catch(()=>({}));throw new Error(P.message||"Failed to fetch response")}const N=(R=D.body)==null?void 0:R.getReader();if(!N)throw new Error("No reader available");const k=new TextDecoder;let I="";for(;;){const{done:P,value:V}=await N.read();if(P)break;I+=k.decode(V,{stream:!0});const H=I.split(`
51
- `);I=H.pop()??"";for(const fe of H)if(fe.startsWith("data: "))try{const te=JSON.parse(fe.slice(6));te.chunk&&(S==null||S(te.chunk)),te.done&&te.response&&(A==null||A(te.response))}catch(te){console.error("Failed to parse SSE data:",te)}}}catch(D){throw console.error("Error in askDocQuestion:",D),D}},autocomplete:async(b,v={})=>await De(`${r}/autocomplete`,e,v,{method:"POST",body:b})}},KM=(e={},t)=>{var l,u;const n=((l=t==null?void 0:t.editor)==null?void 0:l.editorURL)??((u=rt.editor)==null?void 0:u.editorURL);if(!n)throw new Error("Editor URL is not defined in the Intlayer configuration.");const r=`${n}/api`;return{getConfiguration:async(d={})=>(await De(`${r}/config`,e,d)).data,writeDictionary:async(d,f={})=>await De(`${r}/dictionary`,e,f,{method:"POST",body:{dictionary:d}})}},WM=(e={},t)=>{var b,v;const n=((b=t==null?void 0:t.editor)==null?void 0:b.backendURL)??((v=rt.editor)==null?void 0:v.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration--.");const r=`${n}/api/organization`;return{getOrganizations:async(S,A={})=>await De(r,e,A,{params:S}),getOrganization:async(S,A={})=>await De(`${r}/${String(S)}`,e,A),addOrganization:async(S,A={})=>await De(r,e,A,{method:"POST",body:S}),addOrganizationMember:async(S,A={})=>De(`${r}/member`,e,A,{method:"POST",body:S}),updateOrganization:async(S,A={})=>De(r,e,A,{method:"PUT",body:S}),updateOrganizationMembers:async(S,A={})=>De(`${r}/members`,e,A,{method:"PUT",body:S}),deleteOrganization:async(S={})=>await De(r,e,S,{method:"DELETE"}),selectOrganization:async(S,A={})=>await De(`${r}/${String(S)}`,e,A,{method:"PUT"}),unselectOrganization:async(S={})=>await De(`${r}/logout`,e,S,{method:"POST"})}},YM=(e={},t)=>{var S,A;const n=((S=t==null?void 0:t.editor)==null?void 0:S.backendURL)??((A=rt.editor)==null?void 0:A.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/project`;return{getProjects:async(w,T={})=>await De(r,e,T,{params:w}),addProject:async(w,T={})=>await De(`${r}`,e,T,{method:"POST",body:w}),updateProject:async(w,T={})=>await De(`${r}`,e,T,{method:"PUT",body:w}),updateProjectMembers:async(w,T={})=>await De(`${r}/members`,e,T,{method:"PUT",body:w}),pushProjectConfiguration:async(w,T={})=>await De(`${r}/configuration`,e,T,{method:"PUT",body:w}),deleteProject:async(w={})=>await De(`${r}`,e,w,{method:"DELETE"}),selectProject:async(w,T={})=>await De(`${r}/${String(w)}`,e,T,{method:"PUT"}),unselectProject:async(w={})=>await De(`${r}/logout`,e,w,{method:"POST"}),addNewAccessKey:async(w,T={})=>await De(`${r}/access_key`,e,T,{method:"POST",body:w}),deleteAccessKey:async(w,T={})=>await De(`${r}/access_key`,e,T,{method:"DELETE",body:{clientId:w}}),refreshAccessKey:async(w,T={})=>await De(`${r}/access_key`,e,T,{method:"PATCH",body:{clientId:w}})}},ZM=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.backendURL)??((d=rt.editor)==null?void 0:d.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/stripe`;return{getPricing:async(f,m={})=>await De(`${r}/pricing`,e,m,{method:"POST",body:f}),getSubscription:async(f,m={})=>await De(`${r}/create-subscription`,e,m,{method:"POST",body:f}),cancelSubscription:async(f={})=>await De(`${r}/cancel-subscription`,e,f,{method:"POST"})}},XM=(e={},t)=>{var d,f;const n=((d=t==null?void 0:t.editor)==null?void 0:d.backendURL)??((f=rt.editor)==null?void 0:f.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/tag`;return{getTags:async(m,g={})=>await De(r,e,g,{params:m}),addTag:async(m,g={})=>await De(`${r}`,e,g,{method:"POST",body:m}),updateTag:async(m,g,y={})=>await De(`${r}/${m}`,e,y,{method:"PUT",body:g}),deleteTag:async(m,g={})=>await De(`${r}/${m}`,e,g,{method:"DELETE"})}},QM=(e={},t)=>{var g,y;const n=((g=t==null?void 0:t.editor)==null?void 0:g.backendURL)??((y=rt.editor)==null?void 0:y.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/user`;return{createUser:async(b,v={})=>await De(`${r}/`,e,v,{method:"POST",body:b}),getUsers:async(b,v={})=>await De(r,e,v,{params:b}),getUserById:async(b,v={})=>await De(`${r}/${b}`,e,v),getUserByAccount:async(b,v,S={})=>await De(`${r}/account/${v}/${b}`,e,S),getUserByEmail:async(b,v={})=>await De(`${r}/email/${b}`,e,v),updateUser:async(b,v={})=>await De(`${r}`,e,v,{method:"PUT",body:b}),deleteUser:async(b,v={})=>await De(`${r}/${b}`,e,v,{method:"DELETE"})}},Eh=(e={},t)=>({organization:WM(e,t),project:YM(e,t),user:QM(e,t),auth:GM(e,t),dictionary:$M(e,t),stripe:ZM(e,t),ai:qM(e,t),tag:XM(e,t),editor:KM(e,t)});var B=(e=>(e.AFRIKAANS="af",e.AFRIKAANS_SOUTH_AFRICA="af-ZA",e.ARABIC="ar",e.ARABIC_UNITED_ARAB_EMIRATES="ar-AE",e.ARABIC_BAHRAIN="ar-BH",e.ARABIC_ALGERIA="ar-DZ",e.ARABIC_EGYPT="ar-EG",e.ARABIC_IRAQ="ar-IQ",e.ARABIC_JORDAN="ar-JO",e.ARABIC_KUWAIT="ar-KW",e.ARABIC_LEBANON="ar-LB",e.ARABIC_LIBYA="ar-LY",e.ARABIC_MOROCCO="ar-MA",e.ARABIC_OMAN="ar-OM",e.ARABIC_QATAR="ar-QA",e.ARABIC_SAUDI_ARABIA="ar-SA",e.ARABIC_SYRIA="ar-SY",e.ARABIC_TUNISIA="ar-TN",e.ARABIC_YEMEN="ar-YE",e.AZERI_LATIN="az",e.AZERI_LATIN_AZERBAIJAN="az-AZ",e.BELARUSIAN="be",e.BELARUSIAN_BELARUS="be-BY",e.BULGARIAN="bg",e.BULGARIAN_BULGARIA="bg-BG",e.BOSNIAN="bs",e.BOSNIAN_BOSNIA_AND_HERZEGOVINA="bs-BA",e.CATALAN="ca",e.CATALAN_SPAIN="ca-ES",e.CZECH="cs",e.CZECH_CZECH_REPUBLIC="cs-CZ",e.WELSH="cy",e.WELSH_UNITED_KINGDOM="cy-GB",e.DANISH="da",e.DANISH_DENMARK="da-DK",e.GERMAN="de",e.GERMAN_AUSTRIA="de-AT",e.GERMAN_SWITZERLAND="de-CH",e.GERMAN_GERMANY="de-DE",e.GERMAN_LIECHTENSTEIN="de-LI",e.GERMAN_LUXEMBOURG="de-LU",e.DIVEHI="dv",e.DIVEHI_MALDIVES="dv-MV",e.GREEK="el",e.GREEK_GREECE="el-GR",e.ENGLISH="en",e.ENGLISH_AUSTRALIA="en-AU",e.ENGLISH_BELIZE="en-BZ",e.ENGLISH_CANADA="en-CA",e.ENGLISH_CARIBBEAN="en-CB",e.ENGLISH_UNITED_KINGDOM="en-GB",e.ENGLISH_IRELAND="en-IE",e.ENGLISH_JAMAICA="en-JM",e.ENGLISH_NEW_ZEALAND="en-NZ",e.ENGLISH_PHILIPPINES="en-PH",e.ENGLISH_TRINIDAD_AND_TOBAGO="en-TT",e.ENGLISH_UNITED_STATES="en-US",e.ENGLISH_SOUTH_AFRICA="en-ZA",e.ENGLISH_ZIMBABWE="en-ZW",e.ESPERANTO="eo",e.SPANISH="es",e.SPANISH_ARGENTINA="es-AR",e.SPANISH_BOLIVIA="es-BO",e.SPANISH_CHILE="es-CL",e.SPANISH_COLOMBIA="es-CO",e.SPANISH_COSTA_RICA="es-CR",e.SPANISH_DOMINICAN_REPUBLIC="es-DO",e.SPANISH_ECUADOR="es-EC",e.SPANISH_SPAIN="es-ES",e.SPANISH_GUATEMALA="es-GT",e.SPANISH_HONDURAS="es-HN",e.SPANISH_MEXICO="es-MX",e.SPANISH_NICARAGUA="es-NI",e.SPANISH_PANAMA="es-PA",e.SPANISH_PERU="es-PE",e.SPANISH_PUERTO_RICO="es-PR",e.SPANISH_PARAGUAY="es-PY",e.SPANISH_EL_SALVADOR="es-SV",e.SPANISH_URUGUAY="es-UY",e.SPANISH_VENEZUELA="es-VE",e.ESTONIAN="et",e.ESTONIAN_ESTONIA="et-EE",e.BASQUE="eu",e.BASQUE_SPAIN="eu-ES",e.FARSI="fa",e.FARSI_IRAN="fa-IR",e.FINNISH="fi",e.FINNISH_FINLAND="fi-FI",e.FAROESE="fo",e.FAROESE_FAROE_ISLANDS="fo-FO",e.FRENCH="fr",e.FRENCH_BELGIUM="fr-BE",e.FRENCH_CANADA="fr-CA",e.FRENCH_SWITZERLAND="fr-CH",e.FRENCH_FRANCE="fr-FR",e.FRENCH_LUXEMBOURG="fr-LU",e.FRENCH_PRINCIPALITY_OF_MONACO="fr-MC",e.GALICIAN="gl",e.GALICIAN_SPAIN="gl-ES",e.GUJARATI="gu",e.GUJARATI_INDIA="gu-IN",e.HEBREW="he",e.HEBREW_ISRAEL="he-IL",e.HINDI="hi",e.HINDI_INDIA="hi-IN",e.CROATIAN="hr",e.CROATIAN_BOSNIA_AND_HERZEGOVINA="hr-BA",e.CROATIAN_CROATIA="hr-HR",e.HUNGARIAN="hu",e.HUNGARIAN_HUNGARY="hu-HU",e.ARMENIAN="hy",e.ARMENIAN_ARMENIA="hy-AM",e.INDONESIAN="id",e.INDONESIAN_INDONESIA="id-ID",e.ICELANDIC="is",e.ICELANDIC_ICELAND="is-IS",e.ITALIAN="it",e.ITALIAN_SWITZERLAND="it-CH",e.ITALIAN_ITALY="it-IT",e.JAPANESE="ja",e.JAPANESE_JAPAN="ja-JP",e.GEORGIAN="ka",e.GEORGIAN_GEORGIA="ka-GE",e.KAZAKH="kk",e.KAZAKH_KAZAKHSTAN="kk-KZ",e.KANNADA="kn",e.KANNADA_INDIA="kn-IN",e.KOREAN="ko",e.KOREAN_KOREA="ko-KR",e.KONKANI="kok",e.KONKANI_INDIA="kok-IN",e.KYRGYZ="ky",e.KYRGYZ_KYRGYZSTAN="ky-KG",e.LITHUANIAN="lt",e.LITHUANIAN_LITHUANIA="lt-LT",e.LATVIAN="lv",e.LATVIAN_LATVIA="lv-LV",e.MAORI="mi",e.MAORI_NEW_ZEALAND="mi-NZ",e.FYRO_MACEDONIAN="mk",e.FYRO_MACEDONIAN_MACEDONIA="mk-MK",e.MONGOLIAN="mn",e.MONGOLIAN_MONGOLIA="mn-MN",e.MARATHI="mr",e.MARATHI_INDIA="mr-IN",e.MALAY="ms",e.MALAY_BRUNEI_DARUSSALAM="ms-BN",e.MALAY_MALAYSIA="ms-MY",e.MALTESE="mt",e.MALTESE_MALTA="mt-MT",e.NORWEGIAN_BOKMAL="nb",e.NORWEGIAN_BOKMAL_NORWAY="nb-NO",e.DUTCH="nl",e.DUTCH_BELGIUM="nl-BE",e.DUTCH_NETHERLANDS="nl-NL",e.NORWEGIAN_NYNORSK_NORWAY="nn-NO",e.NORTHERN_SOTHO="ns",e.NORTHERN_SOTHO_SOUTH_AFRICA="ns-ZA",e.PUNJABI="pa",e.PUNJABI_INDIA="pa-IN",e.POLISH="pl",e.POLISH_POLAND="pl-PL",e.PASHTO="ps",e.PASHTO_AFGHANISTAN="ps-AR",e.PORTUGUESE="pt",e.PORTUGUESE_BRAZIL="pt-BR",e.PORTUGUESE_PORTUGAL="pt-PT",e.QUECHUA="qu",e.QUECHUA_BOLIVIA="qu-BO",e.QUECHUA_ECUADOR="qu-EC",e.QUECHUA_PERU="qu-PE",e.ROMANIAN="ro",e.ROMANIAN_ROMANIA="ro-RO",e.RUSSIAN="ru",e.RUSSIAN_RUSSIA="ru-RU",e.SANSKRIT="sa",e.SANSKRIT_INDIA="sa-IN",e.SAMI_NORTHERN="se",e.SAMI_NORTHERN_FINLAND="se-FI",e.SAMI_NORTHERN_NORWAY="se-NO",e.SAMI_NORTHERN_SWEDEN="se-SE",e.SLOVAK="sk",e.SLOVAK_SLOVAKIA="sk-SK",e.SLOVENIAN="sl",e.SLOVENIAN_SLOVENIA="sl-SI",e.ALBANIAN="sq",e.ALBANIAN_ALBANIA="sq-AL",e.SERBIAN_LATIN="sr",e.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA="sr-BA",e.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO="sr-SP",e.SWEDISH="sv",e.SWEDISH_FINLAND="sv-FI",e.SWEDISH_SWEDEN="sv-SE",e.SWAHILI="sw",e.SWAHILI_KENYA="sw-KE",e.SYRIAC="syr",e.SYRIAC_SYRIA="syr-SY",e.TAMIL="ta",e.TAMIL_INDIA="ta-IN",e.TELUGU="te",e.TELUGU_INDIA="te-IN",e.THAI="th",e.THAI_THAILAND="th-TH",e.TAGALOG="tl",e.TAGALOG_PHILIPPINES="tl-PH",e.TSWANA="tn",e.TSWANA_SOUTH_AFRICA="tn-ZA",e.TURKISH="tr",e.TURKISH_TURKEY="tr-TR",e.TATAR="tt",e.TATAR_RUSSIA="tt-RU",e.TSOGA="ts",e.UKRAINIAN="uk",e.UKRAINIAN_UKRAINE="uk-UA",e.URDU="ur",e.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN="ur-PK",e.UZBEK_LATIN="uz",e.UZBEK_LATIN_UZBEKISTAN="uz-UZ",e.VIETNAMESE="vi",e.VIETNAMESE_VIET_NAM="vi-VN",e.XHOSA="xh",e.XHOSA_SOUTH_AFRICA="xh-ZA",e.CHINESE="zh",e.CHINESE_SIMPLIFIED="zh-Hans",e.CHINESE_SIMPLIFIED_CHINA="zh-CN",e.CHINESE_HONG_KONG="zh-HK",e.CHINESE_MACAU="zh-MO",e.CHINESE_SINGAPORE="zh-SG",e.CHINESE_TRADITIONAL="zh-Hant",e.ZULU="zu",e.ZULU_SOUTH_AFRICA="zu-ZA",e))(B||{});const JM=e=>{switch(e){case B.ENGLISH:case B.FRENCH:case B.SPANISH:case B.PORTUGUESE:case B.GERMAN:case B.AFRIKAANS:case B.AZERI_LATIN:case B.BELARUSIAN:case B.BULGARIAN:case B.BOSNIAN:case B.CATALAN:case B.CZECH:case B.WELSH:case B.DANISH:case B.ESPERANTO:case B.ESTONIAN:case B.BASQUE:case B.FINNISH:case B.FAROESE:case B.GALICIAN:case B.GREEK:case B.CROATIAN:case B.HUNGARIAN:case B.ARMENIAN:case B.INDONESIAN:case B.ICELANDIC:case B.ITALIAN:case B.JAPANESE:case B.GEORGIAN:case B.KAZAKH:case B.KANNADA:case B.KOREAN:case B.KONKANI:case B.KYRGYZ:case B.LITHUANIAN:case B.LATVIAN:case B.MAORI:case B.FYRO_MACEDONIAN:case B.MONGOLIAN:case B.MARATHI:case B.MALAY:case B.MALTESE:case B.NORWEGIAN_BOKMAL:case B.DUTCH:case B.NORTHERN_SOTHO:case B.PUNJABI:case B.POLISH:case B.QUECHUA:case B.ROMANIAN:case B.RUSSIAN:case B.SANSKRIT:case B.SAMI_NORTHERN:case B.SLOVAK:case B.SLOVENIAN:case B.ALBANIAN:case B.SERBIAN_LATIN:case B.SWEDISH:case B.SWAHILI:case B.TAMIL:case B.TELUGU:case B.THAI:case B.TAGALOG:case B.TSWANA:case B.TURKISH:case B.UKRAINIAN:case B.UZBEK_LATIN:case B.VIETNAMESE:case B.XHOSA:case B.CHINESE_SIMPLIFIED:case B.CHINESE_TRADITIONAL:case B.ZULU:case B.AFRIKAANS_SOUTH_AFRICA:case B.AZERI_LATIN_AZERBAIJAN:case B.BELARUSIAN_BELARUS:case B.BULGARIAN_BULGARIA:case B.BOSNIAN_BOSNIA_AND_HERZEGOVINA:case B.CATALAN_SPAIN:case B.CZECH_CZECH_REPUBLIC:case B.WELSH_UNITED_KINGDOM:case B.DANISH_DENMARK:case B.GERMAN_AUSTRIA:case B.GERMAN_SWITZERLAND:case B.GERMAN_GERMANY:case B.GERMAN_LIECHTENSTEIN:case B.GERMAN_LUXEMBOURG:case B.GREEK_GREECE:case B.ENGLISH_AUSTRALIA:case B.ENGLISH_BELIZE:case B.ENGLISH_CANADA:case B.ENGLISH_CARIBBEAN:case B.ENGLISH_UNITED_KINGDOM:case B.ENGLISH_IRELAND:case B.ENGLISH_JAMAICA:case B.ENGLISH_NEW_ZEALAND:case B.ENGLISH_PHILIPPINES:case B.ENGLISH_TRINIDAD_AND_TOBAGO:case B.ENGLISH_UNITED_STATES:case B.ENGLISH_SOUTH_AFRICA:case B.ENGLISH_ZIMBABWE:case B.SPANISH_ARGENTINA:case B.SPANISH_BOLIVIA:case B.SPANISH_CHILE:case B.SPANISH_COLOMBIA:case B.SPANISH_COSTA_RICA:case B.SPANISH_DOMINICAN_REPUBLIC:case B.SPANISH_ECUADOR:case B.SPANISH_SPAIN:case B.SPANISH_GUATEMALA:case B.SPANISH_HONDURAS:case B.SPANISH_MEXICO:case B.SPANISH_NICARAGUA:case B.SPANISH_PANAMA:case B.SPANISH_PERU:case B.SPANISH_PUERTO_RICO:case B.SPANISH_PARAGUAY:case B.SPANISH_EL_SALVADOR:case B.SPANISH_URUGUAY:case B.SPANISH_VENEZUELA:case B.ESTONIAN_ESTONIA:case B.BASQUE_SPAIN:case B.FINNISH_FINLAND:case B.FAROESE_FAROE_ISLANDS:case B.FRENCH_BELGIUM:case B.FRENCH_CANADA:case B.FRENCH_SWITZERLAND:case B.FRENCH_FRANCE:case B.FRENCH_LUXEMBOURG:case B.FRENCH_PRINCIPALITY_OF_MONACO:case B.GALICIAN_SPAIN:case B.GUJARATI_INDIA:case B.HEBREW_ISRAEL:case B.HINDI_INDIA:case B.CROATIAN_BOSNIA_AND_HERZEGOVINA:case B.CROATIAN_CROATIA:case B.HUNGARIAN_HUNGARY:case B.ARMENIAN_ARMENIA:case B.INDONESIAN_INDONESIA:case B.ICELANDIC_ICELAND:case B.ITALIAN_SWITZERLAND:case B.ITALIAN_ITALY:case B.JAPANESE_JAPAN:case B.GEORGIAN_GEORGIA:case B.KAZAKH_KAZAKHSTAN:case B.KANNADA_INDIA:case B.KOREAN_KOREA:case B.KONKANI_INDIA:case B.KYRGYZ_KYRGYZSTAN:case B.LITHUANIAN_LITHUANIA:case B.LATVIAN_LATVIA:case B.MAORI_NEW_ZEALAND:case B.FYRO_MACEDONIAN_MACEDONIA:case B.MONGOLIAN_MONGOLIA:case B.MARATHI_INDIA:case B.MALAY_BRUNEI_DARUSSALAM:case B.MALAY_MALAYSIA:case B.MALTESE_MALTA:case B.NORWEGIAN_BOKMAL_NORWAY:case B.DUTCH_BELGIUM:case B.DUTCH_NETHERLANDS:case B.NORWEGIAN_NYNORSK_NORWAY:case B.NORTHERN_SOTHO_SOUTH_AFRICA:case B.PUNJABI_INDIA:case B.POLISH_POLAND:case B.PORTUGUESE_BRAZIL:case B.PORTUGUESE_PORTUGAL:case B.QUECHUA_BOLIVIA:case B.QUECHUA_ECUADOR:case B.QUECHUA_PERU:case B.ROMANIAN_ROMANIA:case B.RUSSIAN_RUSSIA:case B.SANSKRIT_INDIA:case B.SAMI_NORTHERN_FINLAND:case B.SAMI_NORTHERN_NORWAY:case B.SAMI_NORTHERN_SWEDEN:case B.SLOVAK_SLOVAKIA:case B.SLOVENIAN_SLOVENIA:case B.ALBANIAN_ALBANIA:case B.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA:case B.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO:case B.SWAHILI_KENYA:case B.TAMIL_INDIA:case B.TELUGU_INDIA:case B.THAI_THAILAND:case B.TAGALOG_PHILIPPINES:case B.TSWANA_SOUTH_AFRICA:case B.TURKISH_TURKEY:case B.TATAR_RUSSIA:case B.TSOGA:case B.UKRAINIAN_UKRAINE:case B.UZBEK_LATIN_UZBEKISTAN:case B.VIETNAMESE_VIET_NAM:case B.XHOSA_SOUTH_AFRICA:case B.CHINESE_HONG_KONG:case B.CHINESE_MACAU:case B.CHINESE_SINGAPORE:case B.ZULU_SOUTH_AFRICA:return"ltr";case B.ARABIC:case B.FARSI:case B.URDU:case B.PASHTO:case B.SYRIAC:case B.ARABIC_UNITED_ARAB_EMIRATES:case B.ARABIC_BAHRAIN:case B.ARABIC_ALGERIA:case B.ARABIC_EGYPT:case B.ARABIC_IRAQ:case B.ARABIC_JORDAN:case B.ARABIC_KUWAIT:case B.ARABIC_LEBANON:case B.ARABIC_LIBYA:case B.ARABIC_MOROCCO:case B.ARABIC_OMAN:case B.ARABIC_QATAR:case B.ARABIC_SAUDI_ARABIA:case B.ARABIC_SYRIA:case B.ARABIC_TUNISIA:case B.ARABIC_YEMEN:case B.FARSI_IRAN:case B.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN:case B.PASHTO_AFGHANISTAN:case B.SYRIAC_SYRIA:return"rtl";default:return"auto"}},XT=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),TS=new Map,yf=(e,t=e)=>{if(typeof(Intl==null?void 0:Intl.DisplayNames)!="function")return e;let n=TS.get(t);return n||(n=new Intl.DisplayNames([t],{type:"language"}),TS.set(t,n)),n.of(e)??"Unknown locale"},ej=(e,t=rt.internationalization.locales)=>{const n=XT(e);let r=e;e.endsWith("/")&&(r=e.slice(0,-1));const a=n?new URL(r):new URL(r,"http://example.com"),o=a.pathname;o.startsWith("/")||(a.pathname=`/${o}`);const l=o.split("/"),u=l[1];if(t.includes(u)){l.splice(1,1);const d=l.join("/")??"/";a.pathname=d}return n?a.toString():a.toString().replace("http://example.com","")},tj=(e,t=rt.internationalization.locales,n=rt.internationalization.defaultLocale,r=rt.middleware.prefixDefault)=>{const a=ej(e,t),o=XT(a),l=o?new URL(a):new URL(a,"http://example.com");let u=l.pathname;u.startsWith("/")||(u=`/${u}`);const d=o?`${l.protocol}//${l.host}`:"";return t.reduce((m,g)=>{const y=g.toString()===n.toString();let v=r||!y?`/${g}${u}`:u;v.length>1&&v.endsWith("/")&&(v=v.slice(0,-1));const S=o?`${d}${v}${l.search}${l.hash}`:`${v}${l.search}${l.hash}`;return m[g]=S,m},{})},nj=(e,t,n=rt.internationalization.locales,r=rt.internationalization.defaultLocale,a=rt.middleware.prefixDefault)=>tj(e,n,r,a)[t],rj=(e,t=rt.internationalization.locales,n=rt.internationalization.defaultLocale)=>{const r=[e].flat(),a=o=>o.trim().toLowerCase();try{for(const o of r){const l=a(o),u=t.find(m=>a(m)===l);if(u)return u;const[d]=l.split("-"),f=t.find(m=>a(m).split("-")[0]===d);if(f)return f}}catch{}return n},me=e=>CM(q.Translation,e),ij=e=>{let t=e.trim().replace(/^\[/,"[").replace(/^\{/,"{").replace(/\]$/,"]").replace(/\}$/,"}").replace(/([\w\d_]+)\s*:/g,'"$1":').replace(/:\s*([a-zA-Z_][\w\d_]*)/g,': "$1"');return t=t.replace(/\[([^\[\]]+?)\]/g,(n,r)=>`[${r.split(",").map(o=>{const l=o.trim();return l.startsWith('"')&&l.endsWith('"')||!isNaN(Number(l))?l:`"${l}"`}).join(", ")}]`),JSON.parse(t)},QT=e=>{try{const t=e.split(/\r?\n/),n=t.find(o=>o.trim()!=="");if(!n||n.trim()!=="---")return{};const r={};let a=!1;for(const o of t){if(o.trim()==="---"){if(a)break;a=!0;continue}if(a){const u=o.match(/^([^:]+)\s*:\s*(.*)$/);if(u){const d=u[1].trim(),f=u[2].trim();try{r[d]=ij(f)}catch{r[d]=f}}}}return r}catch{return}},fu=(e,t)=>e.every((n,r)=>t[r]&&t[r].key===n.key&&t[r].type===n.type),aj=(e,t)=>{try{const n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;const a=n.pathname.replace(/\/$/,""),o=r.pathname.replace(/\/$/,"");return!(a!==""&&o!==""&&a!==o)}catch(n){return console.error("Invalid URL(s)",n),!1}},sj=e=>{const t=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window}),n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});Object.assign(n,{iframeData:e}),Object.assign(t,{iframeData:e}),window.dispatchEvent(n),window.dispatchEvent(t)};var hr=(e=>(e.INTLAYER_CONFIGURATION="INTLAYER_CONFIGURATION",e.INTLAYER_CURRENT_LOCALE="INTLAYER_CURRENT_LOCALE",e.INTLAYER_EDITOR_ENABLED="INTLAYER_EDITOR_ENABLED",e.INTLAYER_URL_CHANGE="INTLAYER_URL_CHANGE",e.INTLAYER_FOCUSED_CONTENT_CHANGED="INTLAYER_FOCUSED_CONTENT_CHANGED",e.INTLAYER_LOCALE_DICTIONARIES_CHANGED="INTLAYER_LOCALE_DICTIONARIES_CHANGED",e.INTLAYER_DISTANT_DICTIONARIES_CHANGED="INTLAYER_DISTANT_DICTIONARIES_CHANGED",e.INTLAYER_EDITED_CONTENT_CHANGED="INTLAYER_EDITED_CONTENT_CHANGED",e.INTLAYER_IFRAME_CLICKED="INTLAYER_IFRAME_CLICKED",e))(hr||{});const oj=E.createContext(void 0),lj=E.createContext(void 0),cj=({children:e})=>{const[t,n]=E.useState({}),r=(a,o)=>{n(l=>({...l,[a]:{...l==null?void 0:l[a],content:o}}))};return _.jsx(oj.Provider,{value:{changedContent:t},children:_.jsx(lj.Provider,{value:{setChangedContent:r},children:e})})},ln=[];for(let e=0;e<256;++e)ln.push((e+256).toString(16).slice(1));function uj(e,t=0){return(ln[e[t+0]]+ln[e[t+1]]+ln[e[t+2]]+ln[e[t+3]]+"-"+ln[e[t+4]]+ln[e[t+5]]+"-"+ln[e[t+6]]+ln[e[t+7]]+"-"+ln[e[t+8]]+ln[e[t+9]]+"-"+ln[e[t+10]]+ln[e[t+11]]+ln[e[t+12]]+ln[e[t+13]]+ln[e[t+14]]+ln[e[t+15]]).toLowerCase()}let bg;const dj=new Uint8Array(16);function fj(){if(!bg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bg=crypto.getRandomValues.bind(crypto)}return bg(dj)}const hj=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),CS={randomUUID:hj};function mj(e,t,n){var a;if(CS.randomUUID&&!e)return CS.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??fj();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,uj(r)}const{editor:vi}=rt,JT=E.createContext({postMessage:()=>null,allowedOrigins:[vi==null?void 0:vi.applicationURL,vi==null?void 0:vi.editorURL,vi==null?void 0:vi.cmsURL],senderId:""}),RS=({children:e,allowedOrigins:t,postMessage:n})=>{const r=E.useRef(mj()),a=E.useMemo(()=>({postMessage:n,allowedOrigins:t,senderId:r.current}),[n,t,r.current]);return _.jsx(JT.Provider,{value:a,children:e})},e1=()=>E.useContext(JT),Mo=(e,t,n)=>{const{allowedOrigins:r,postMessage:a,senderId:o}=e1();return E.useEffect(()=>{if(t){const u=d=>{const{type:f,data:m,senderId:g}=d.data;f===e&&g!==o&&(typeof r>"u"||r!=null&&r.some(y=>aj(y,d.origin))||r!=null&&r.includes("*"))&&t(m)};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)}},[r,a,o,n]),u=>{a({type:e,data:u,senderId:o})}},pj=(e,t)=>typeof e=="function"?e(t):e,As=(e,t,n)=>{const{postMessage:r,senderId:a}=e1(),{emit:o,receive:l}=n??{emit:!0,receive:!0},u=(b,v)=>{const S=pj(b,v);return o&&typeof r=="function"&&typeof S<"u"&&r({type:`${e}/post`,data:S,senderId:a}),S},d=()=>{typeof r=="function"&&r({type:`${e}/post`,data:f,senderId:a})},[f,m]=E.useState(()=>u(t)),g=b=>m(v=>u(b,v));Mo(`${e}/post`,l?b=>{m(b)}:void 0);const y=(b,v)=>{o&&typeof r=="function"&&v!==a&&(typeof f>"u"||r({type:`${e}/post`,data:f,senderId:a}))};return Mo(`${e}/get`,o?y:void 0,f),E.useEffect(()=>{l&&typeof r=="function"&&typeof f>"u"&&r({type:`${e}/get`,senderId:a})},[]),[f,g,d]},t1=E.createContext(void 0),gj=({children:e,configuration:t})=>_.jsx(t1.Provider,{value:t,children:e}),Zr=()=>E.useContext(t1),n1=E.createContext(void 0),r1=E.createContext(void 0),yj=({children:e})=>{const[t,n]=As(hr.INTLAYER_LOCALE_DICTIONARIES_CHANGED,void 0),r=E.useMemo(()=>({localeDictionaries:t??{}}),[t]),a=E.useMemo(()=>({setLocaleDictionaries:n,setLocaleDictionary:o=>{n(l=>({...l,[o.key]:o}))}}),[n]);return _.jsx(n1.Provider,{value:r,children:_.jsx(r1.Provider,{value:a,children:e})})},Fv=()=>E.useContext(r1),i1=()=>{const e=Fv(),t=E.useContext(n1);if(!t)throw new Error("useDictionariesRecordStates must be used within a DictionariesRecordProvider");return{...t,...e}},a1=E.createContext(void 0),vj=e=>Mo(`${hr.INTLAYER_EDITED_CONTENT_CHANGED}/get`,e),s1=E.createContext(void 0),NS=(e,t)=>typeof e=="function"?e(t):e,bj=({children:e})=>{const{localeDictionaries:t}=i1(),[n,r]=As(hr.INTLAYER_EDITED_CONTENT_CHANGED),a=b=>{let v=NS(b);return r(S=>(v=NS(b,S==null?void 0:S[v.key]),{...S,[v.key]:v})),v},o=(b,v)=>{r(S=>({...S,[b]:{...S==null?void 0:S[b],content:v}}))},l=(b,v,S=[],A=!0)=>{r(w=>{var k,I;const T=(k=t[b])==null?void 0:k.content,R=structuredClone(((I=w==null?void 0:w[b])==null?void 0:I.content)??T);let D=S;if(!A){let P=0;const V=S.slice(0,-1),H=S[S.length-1];let fe=H.key;for(;typeof Ur(R,D)<"u";)P++,fe=P===0?H.key:`${H.key} (${P})`,D=[...V,{...H,key:fe}]}const N=SS(R,D,v);return{...w,[b]:{...w==null?void 0:w[b],content:N}}})},u=(b,v,S=[])=>{r(A=>{var D,N;const w=(D=t[b])==null?void 0:D.content,T=structuredClone(((N=A==null?void 0:A[b])==null?void 0:N.content)??w),R=RM(T,v,S);return{...A,[b]:{...A==null?void 0:A[b],content:R}}})},d=(b,v)=>{r(S=>{var D,N;const A=(D=t[b])==null?void 0:D.content,w=structuredClone(((N=S==null?void 0:S[b])==null?void 0:N.content)??A),T=Ur(A,v),R=SS(w,v,T);return{...S,[b]:{...S==null?void 0:S[b],content:R}}})},f=b=>{r(v=>{const S={...v};return delete S[b],S})},m=b=>{r(v=>Object.entries(v).reduce((A,[w,T])=>w===b?A:{...A,[w]:T},{}))},g=()=>{r({})},y=(b,v)=>{var A;const S=((A=n==null?void 0:n[b])==null?void 0:A.content)??{};return Ur(S,v)};return _.jsx(a1.Provider,{value:{editedContent:n},children:_.jsx(s1.Provider,{value:{setEditedContentState:r,setEditedDictionary:a,setEditedContent:o,addEditedContent:l,renameEditedContent:u,removeEditedContent:d,restoreEditedContent:f,clearEditedDictionaryContent:m,clearEditedContent:g,getEditedContentValue:y},children:e})})},Ko=()=>E.useContext(s1),wn=()=>{const e=E.useContext(a1),t=Ko();return{...e,...t}},o1=E.createContext({enabled:!1}),_j=e=>As(hr.INTLAYER_EDITOR_ENABLED,!1,e),xj=e=>Mo(`${hr.INTLAYER_EDITOR_ENABLED}/post`,e),l1=e=>Mo(`${hr.INTLAYER_EDITOR_ENABLED}/get`,e),Ej=({children:e})=>{const[t]=_j({emit:!1,receive:!0});return _.jsx(o1.Provider,{value:{enabled:t},children:e})},c1=()=>E.useContext(o1),u1=E.createContext(void 0),d1=E.createContext(void 0),Sj=({children:e})=>{const[t,n]=As(hr.INTLAYER_FOCUSED_CONTENT_CHANGED,null),r=a=>{n(o=>o&&{...o,keyPath:a})};return _.jsx(u1.Provider,{value:{focusedContent:t},children:_.jsx(d1.Provider,{value:{setFocusedContent:n,setFocusedContentKeyPath:r},children:e})})},Gv=()=>{const e=E.useContext(d1);if(e===void 0)throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");return e},Sa=()=>{const e=Gv(),t=E.useContext(u1);if(t===void 0)throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");return{...t,...e}},OS=({children:e})=>{const t=vj();return E.useEffect(()=>{t()},[]),_.jsx(yj,{children:_.jsx(bj,{children:_.jsx(Sj,{children:e})})})},Aj=({children:e,fallback:t})=>{const n=l1(),{enabled:r}=c1();return E.useEffect(()=>{r||n()},[r]),r?e:t},wj=({children:e,fallback:t})=>{const[n,r]=E.useState(!1);return E.useEffect(()=>{r(window.self!==window.top)},[]),n?e:t},Tj=({children:e,configuration:t,...n})=>_.jsx(cj,{children:_.jsx(Ej,{children:_.jsx(gj,{configuration:t,children:n.mode==="editor"?_.jsx(RS,{...n,children:_.jsx(OS,{children:e})}):_.jsx(wj,{fallback:e,children:_.jsx(RS,{...n,children:_.jsx(Aj,{fallback:e,children:_.jsx(OS,{children:e})})})})})})}),Cj=(e,t)=>As(hr.INTLAYER_URL_CHANGE,e,t),Rj=()=>Mo(hr.INTLAYER_IFRAME_CLICKED,sj);/*! js-cookie v3.0.5 | MIT */function qd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Nj={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Cy(e,t){function n(a,o,l){if(!(typeof document>"u")){l=qd({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var d in l)l[d]&&(u+="; "+d,l[d]!==!0&&(u+="="+l[d].split(";")[0]));return document.cookie=a+"="+e.write(o,a)+u}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var o=document.cookie?document.cookie.split("; "):[],l={},u=0;u<o.length;u++){var d=o[u].split("="),f=d.slice(1).join("=");try{var m=decodeURIComponent(d[0]);if(l[m]=e.read(f,m),a===m)break}catch{}}return a?l[a]:l}}return Object.create({set:n,get:r,remove:function(a,o){n(a,"",qd({},o,{expires:-1}))},withAttributes:function(a){return Cy(this.converter,qd({},this.attributes,a))},withConverter:function(a){return Cy(qd({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var f1=Cy(Nj,{path:"/"});const{cookieName:h1}=rt.middleware,Oj={path:"/",expires:void 0,domain:void 0,secure:!1,sameSite:"strict"},$v=f1.get(h1),m1=e=>{f1.set(h1,e,Oj)},kj=()=>({localeCookie:$v,setLocaleCookie:m1});var KT;const Sh=E.createContext({locale:$v??((KT=rt==null?void 0:rt.internationalization)==null?void 0:KT.defaultLocale),setLocale:()=>null,disableEditor:!1}),Dj=()=>E.useContext(Sh),Ij=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:a})=>{const{internationalization:o}=rt??{},{defaultLocale:l,locales:u}=o??{},d=e??$v??t??l,[f,m]=As(hr.INTLAYER_CURRENT_LOCALE,d),y=r??(v=>{if(f.toString()!==v.toString()){if(!(u!=null&&u.map(String).includes(v))){console.error(`Locale ${v} is not available`);return}m(v),m1(v)}}),b=rj(e??f);return _.jsx(Sh.Provider,{value:{locale:b,setLocale:y,disableEditor:a},children:n})},If=({children:e,value:t,additionalProps:n})=>{const r=E.isValidElement(e)?e:_.jsx(_.Fragment,{children:e});return new Proxy(r,{get(a,o,l){return o==="value"?t:n&&Object.keys(n).includes(o)?n[o]:Reflect.get(a,o,l)}})},Lj=250,Mj=({children:e,onPress:t,onClickOutside:n,pressDuration:r=Lj,isSelecting:a,...o})=>{const l=E.useRef(null),[u,d]=E.useState(!1),[f,m]=E.useState(a),g=E.useRef(null),y=typeof e=="string",b=()=>{m(!0),t()},v=()=>{g.current=setTimeout(()=>{b()},r)},S=()=>{g.current&&(clearTimeout(g.current),g.current=null)},A=()=>{S(),v()},w=()=>{d(!0)},T=()=>{d(!1),S()},R=E.useCallback(k=>{l.current&&!l.current.contains(k.target)&&(m(!1),n==null||n())},[n]);E.useEffect(()=>(document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}),[R]);const D=k=>{f&&(k.preventDefault(),k.stopPropagation())},N=()=>{m(!1)};return _.jsx("span",{style:{display:y?"inline":"inline-block",cursor:"pointer",userSelect:"none",borderRadius:"0.375rem",outlineWidth:"2px",outlineOffset:"4px",outlineStyle:"solid",outlineColor:a||f||u?"inherit":"transparent",transition:"all 100ms 50ms ease-in-out"},role:"button",tabIndex:0,onKeyUp:()=>null,onClick:D,onMouseDown:A,onMouseUp:T,onMouseLeave:T,onTouchStart:A,onTouchEnd:T,onTouchCancel:T,onBlur:N,onMouseEnter:w,ref:l,...o,children:e})},jj=({children:e,dictionaryKey:t,keyPath:n})=>{const{focusedContent:r,setFocusedContent:a}=Sa(),o=E.useCallback(()=>a({dictionaryKey:t,keyPath:n}),[t,n]),l=E.useMemo(()=>{var u;return((r==null?void 0:r.dictionaryKey)===t&&(((u=r==null?void 0:r.keyPath)==null?void 0:u.length)??0)>0&&fu((r==null?void 0:r.keyPath)??[],n))??!1},[r,n,t]);return _.jsx(Mj,{onPress:o,isSelecting:l,children:e})},Lf=({children:e,...t})=>{const{enabled:n}=c1(),{disableEditor:r}=Dj();return n&&!r?_.jsx(jj,{...t,children:e}):e},qv=({dictionaryKey:e,keyPath:t,children:n})=>{const r=Ko();return r?r.getEditedContentValue(e,t)??n:n},Pj=e=>{const t=qv(e);if(typeof t=="object"){const n=Hv(t,e,e.locale);return typeof n!="string"?(console.error(`Incorrect edited content format. Content type: ${typeof n}. Expected string. Value ${JSON.stringify(n)}`),e.children):n}return t},Vj=E.createContext({renderMarkdown:e=>e}),Bj=()=>E.useContext(Vj),zj=({dictionaryKey:e,keyPath:t,children:n,locale:r})=>{const{renderMarkdown:a}=Bj(),o=qv({dictionaryKey:e,keyPath:t,children:n});if(typeof o!="string"){const l=Hv(o,{dictionaryKey:e,keyPath:t},r);return typeof l!="string"?(console.error(`Incorrect Markdown content. Edited Markdown content type: ${typeof l}. Expected string. Value ${JSON.stringify(l)}`),a(n)):a(l)}return a(o)},Uj=({dictionaryKey:e,keyPath:t,children:n,metadataKeyPath:r})=>{const a=qv({dictionaryKey:e,keyPath:t,children:n}),o=QT(a);return Ur(o,r)},p1=e=>{if(typeof e=="string")return e;const n=(o=>{var l;if(o!=null&&o.props&&typeof o.props.children=="object"){const u=[],{children:d}=o.props;return Object.keys(d??{}).forEach(f=>{u.push(p1((d??{})[f]))}),{...o,props:{...o.props,children:u}}}return{...o,props:{...o.props,children:((l=o.props)==null?void 0:l.children)??[]}}})(e),{type:r,props:a}=n;return E.createElement(r??"span",a,...a.children)},Hj={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:t,...n})=>If({...n,value:n.children,children:E.createElement(Lf,{...n,key:n.children},_.jsx(Pj,{...n,children:n.children}))})},Fj={id:"react-node-plugin",canHandle:e=>typeof e=="object"&&typeof e.props<"u"&&typeof e.key<"u",transform:(e,{plugins:t,...n})=>If({...n,value:"[[react-element]]",children:_.jsx(Lf,{...n,children:p1(e)})})},Gj={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,t,n)=>{const{plugins:r,...a}=t,o=QT(e),u=n(o,{plugins:[{id:"markdown-metadata-plugin",canHandle:d=>typeof d=="string"||typeof d=="number"||typeof d=="boolean"||!d,transform:(d,f)=>If({...f,value:d,children:_.jsx(Lf,{...a,children:_.jsx(Uj,{...a,metadataKeyPath:f.keyPath,children:e})})})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return If({...t,value:e,children:_.jsx(Lf,{...a,children:_.jsx(zj,{...a,children:e})}),additionalProps:{metadata:u}})}},$j={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Markdown,transform:(e,t,n)=>{const r=[...t.keyPath,{type:q.Markdown}],a=e[q.Markdown];return n(a,{...t,children:a,keyPath:r,plugins:[Gj,...t.plugins??[]]})}},qj=(e,t,n)=>ZT(e,t,[Hj,Fj,$j]),rn=(e,t)=>{const{locale:n}=E.useContext(Sh);return qj(e,n)},Kv=({onLocaleChange:e}={})=>{const{defaultLocale:t,locales:n}=(rt==null?void 0:rt.internationalization)??{},{locale:r,setLocale:a}=E.useContext(Sh),{setLocaleCookie:o}=kj();return{locale:r,defaultLocale:t,availableLocales:n,setLocale:u=>{if(!(n!=null&&n.map(String).includes(u))){console.error(`Locale ${u} is not available`);return}a(u),o(u),e==null||e(u)}}};var oc={},kS;function Kj(){if(kS)return oc;kS=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.parse=l,oc.serialize=f;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,o=(()=>{const y=function(){};return y.prototype=Object.create(null),y})();function l(y,b){const v=new o,S=y.length;if(S<2)return v;const A=(b==null?void 0:b.decode)||m;let w=0;do{const T=y.indexOf("=",w);if(T===-1)break;const R=y.indexOf(";",w),D=R===-1?S:R;if(T>D){w=y.lastIndexOf(";",T-1)+1;continue}const N=u(y,w,T),k=d(y,T,N),I=y.slice(N,k);if(v[I]===void 0){let P=u(y,T+1,D),V=d(y,D,P);const H=A(y.slice(P,V));v[I]=H}w=D+1}while(w<S);return v}function u(y,b,v){do{const S=y.charCodeAt(b);if(S!==32&&S!==9)return b}while(++b<v);return v}function d(y,b,v){for(;b>v;){const S=y.charCodeAt(--b);if(S!==32&&S!==9)return b+1}return v}function f(y,b,v){const S=(v==null?void 0:v.encode)||encodeURIComponent;if(!e.test(y))throw new TypeError(`argument name is invalid: ${y}`);const A=S(b);if(!t.test(A))throw new TypeError(`argument val is invalid: ${b}`);let w=y+"="+A;if(!v)return w;if(v.maxAge!==void 0){if(!Number.isInteger(v.maxAge))throw new TypeError(`option maxAge is invalid: ${v.maxAge}`);w+="; Max-Age="+v.maxAge}if(v.domain){if(!n.test(v.domain))throw new TypeError(`option domain is invalid: ${v.domain}`);w+="; Domain="+v.domain}if(v.path){if(!r.test(v.path))throw new TypeError(`option path is invalid: ${v.path}`);w+="; Path="+v.path}if(v.expires){if(!g(v.expires)||!Number.isFinite(v.expires.valueOf()))throw new TypeError(`option expires is invalid: ${v.expires}`);w+="; Expires="+v.expires.toUTCString()}if(v.httpOnly&&(w+="; HttpOnly"),v.secure&&(w+="; Secure"),v.partitioned&&(w+="; Partitioned"),v.priority)switch(typeof v.priority=="string"?v.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${v.priority}`)}if(v.sameSite)switch(typeof v.sameSite=="string"?v.sameSite.toLowerCase():v.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${v.sameSite}`)}return w}function m(y){if(y.indexOf("%")===-1)return y;try{return decodeURIComponent(y)}catch{return y}}function g(y){return a.call(y)==="[object Date]"}return oc}Kj();/**
52
- * react-router v7.4.0
53
- *
54
- * Copyright (c) Remix Software Inc.
55
- *
56
- * This source code is licensed under the MIT license found in the
57
- * LICENSE.md file in the root directory of this source tree.
58
- *
59
- * @license MIT
60
- */var DS="popstate";function Wj(e={}){function t(r,a){let{pathname:o,search:l,hash:u}=r.location;return Ry("",{pathname:o,search:l,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:Lc(a)}return Zj(t,n,null,e)}function Rt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Yj(){return Math.random().toString(36).substring(2,10)}function IS(e,t){return{usr:e.state,key:e.key,idx:t}}function Ry(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wo(t):t,state:n,key:t&&t.key||r||Yj()}}function Lc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Wo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Zj(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,u="POP",d=null,f=m();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function m(){return(l.state||{idx:null}).idx}function g(){u="POP";let A=m(),w=A==null?null:A-f;f=A,d&&d({action:u,location:S.location,delta:w})}function y(A,w){u="PUSH";let T=Ry(S.location,A,w);f=m()+1;let R=IS(T,f),D=S.createHref(T);try{l.pushState(R,"",D)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(D)}o&&d&&d({action:u,location:S.location,delta:1})}function b(A,w){u="REPLACE";let T=Ry(S.location,A,w);f=m();let R=IS(T,f),D=S.createHref(T);l.replaceState(R,"",D),o&&d&&d({action:u,location:S.location,delta:0})}function v(A){let w=a.location.origin!=="null"?a.location.origin:a.location.href,T=typeof A=="string"?A:Lc(A);return T=T.replace(/ $/,"%20"),Rt(w,`No window.location.(origin|href) available to create URL for href: ${T}`),new URL(T,w)}let S={get action(){return u},get location(){return e(a,l)},listen(A){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(DS,g),d=A,()=>{a.removeEventListener(DS,g),d=null}},createHref(A){return t(a,A)},createURL:v,encodeLocation(A){let w=v(A);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:y,replace:b,go(A){return l.go(A)}};return S}function g1(e,t,n="/"){return Xj(e,t,n,!1)}function Xj(e,t,n,r){let a=typeof t=="string"?Wo(t):t,o=Ri(a.pathname||"/",n);if(o==null)return null;let l=y1(e);Qj(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=cP(o);u=oP(l[d],f,r)}return u}function y1(e,t=[],n=[],r=""){let a=(o,l,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};d.relativePath.startsWith("/")&&(Rt(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let f=wi([r,d.relativePath]),m=n.concat(d);o.children&&o.children.length>0&&(Rt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),y1(o.children,t,m,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:aP(f,o.index),routesMeta:m})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))a(o,l);else for(let d of v1(o.path))a(o,l,d)}),t}function v1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=v1(r.join("/")),u=[];return u.push(...l.map(d=>d===""?o:[o,d].join("/"))),a&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function Qj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Jj=/^:[\w-]+$/,eP=3,tP=2,nP=1,rP=10,iP=-2,LS=e=>e==="*";function aP(e,t){let n=e.split("/"),r=n.length;return n.some(LS)&&(r+=iP),t&&(r+=tP),n.filter(a=>!LS(a)).reduce((a,o)=>a+(Jj.test(o)?eP:o===""?nP:rP),r)}function sP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function oP(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",g=Mf({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),y=d.route;if(!g&&f&&n&&!r[r.length-1].route.index&&(g=Mf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(a,g.params),l.push({params:a,pathname:wi([o,g.pathname]),pathnameBase:hP(wi([o,g.pathnameBase])),route:y}),g.pathnameBase!=="/"&&(o=wi([o,g.pathnameBase]))}return l}function Mf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=lP(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:g},y)=>{if(m==="*"){let v=u[y]||"";l=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const b=u[y];return g&&!b?f[m]=void 0:f[m]=(b||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:l,pattern:e}}function lP(e,t=!1,n=!0){qr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function cP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ri(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function uP(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Wo(e):e;return{pathname:n?n.startsWith("/")?n:dP(n,t):t,search:mP(r),hash:pP(a)}}function dP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function _g(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function b1(e){let t=fP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function _1(e,t,n,r=!1){let a;typeof e=="string"?a=Wo(e):(a={...e},Rt(!a.pathname||!a.pathname.includes("?"),_g("?","pathname","search",a)),Rt(!a.pathname||!a.pathname.includes("#"),_g("#","pathname","hash",a)),Rt(!a.search||!a.search.includes("#"),_g("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),g-=1;a.pathname=y.join("/")}u=g>=0?t[g]:"/"}let d=uP(a,u),f=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var wi=e=>e.join("/").replace(/\/\/+/g,"/"),hP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function gP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var x1=["POST","PUT","PATCH","DELETE"];new Set(x1);var yP=["GET",...x1];new Set(yP);var Yo=E.createContext(null);Yo.displayName="DataRouter";var Ah=E.createContext(null);Ah.displayName="DataRouterState";var E1=E.createContext({isTransitioning:!1});E1.displayName="ViewTransition";var vP=E.createContext(new Map);vP.displayName="Fetchers";var bP=E.createContext(null);bP.displayName="Await";var Xr=E.createContext(null);Xr.displayName="Navigation";var hu=E.createContext(null);hu.displayName="Location";var Li=E.createContext({outlet:null,matches:[],isDataRoute:!1});Li.displayName="Route";var Wv=E.createContext(null);Wv.displayName="RouteError";function _P(e,{relative:t}={}){Rt(mu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(Xr),{hash:a,pathname:o,search:l}=pu(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:wi([n,o])),r.createHref({pathname:u,search:l,hash:a})}function mu(){return E.useContext(hu)!=null}function Aa(){return Rt(mu(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(hu).location}var S1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function A1(e){E.useContext(Xr).static||E.useLayoutEffect(e)}function xP(){let{isDataRoute:e}=E.useContext(Li);return e?LP():EP()}function EP(){Rt(mu(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Yo),{basename:t,navigator:n}=E.useContext(Xr),{matches:r}=E.useContext(Li),{pathname:a}=Aa(),o=JSON.stringify(b1(r)),l=E.useRef(!1);return A1(()=>{l.current=!0}),E.useCallback((d,f={})=>{if(qr(l.current,S1),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=_1(d,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:wi([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,o,a,e])}E.createContext(null);function pu(e,{relative:t}={}){let{matches:n}=E.useContext(Li),{pathname:r}=Aa(),a=JSON.stringify(b1(n));return E.useMemo(()=>_1(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function SP(e,t){return w1(e,t)}function w1(e,t,n,r){var T;Rt(mu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a,static:o}=E.useContext(Xr),{matches:l}=E.useContext(Li),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",m=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";T1(f,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
61
-
62
- Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let y=Aa(),b;if(t){let R=typeof t=="string"?Wo(t):t;Rt(m==="/"||((T=R.pathname)==null?void 0:T.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${R.pathname}" was given in the \`location\` prop.`),b=R}else b=y;let v=b.pathname||"/",S=v;if(m!=="/"){let R=m.replace(/^\//,"").split("/");S="/"+v.replace(/^\//,"").split("/").slice(R.length).join("/")}let A=!o&&n&&n.matches&&n.matches.length>0?n.matches:g1(e,{pathname:S});qr(g||A!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),qr(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=RP(A&&A.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:wi([m,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:wi([m,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),l,n,r);return t&&w?E.createElement(hu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},w):w}function AP(){let e=IP(),t=gP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:a},n):null,l)}var wP=E.createElement(AP,null),TP=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?E.createElement(Li.Provider,{value:this.props.routeContext},E.createElement(Wv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function CP({routeContext:e,match:t,children:n}){let r=E.useContext(Yo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Li.Provider,{value:e},n)}function RP(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let d=a.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);Rt(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(n)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:g}=n,y=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||y){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,m)=>{let g,y=!1,b=null,v=null;n&&(g=o&&f.route.id?o[f.route.id]:void 0,b=f.route.errorElement||wP,l&&(u<0&&m===0?(T1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,v=null):u===m&&(y=!0,v=f.route.hydrateFallbackElement||null)));let S=t.concat(a.slice(0,m+1)),A=()=>{let w;return g?w=b:y?w=v:f.route.Component?w=E.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,E.createElement(CP,{match:f,routeContext:{outlet:d,matches:S,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?E.createElement(TP,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},null)}function Yv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function NP(e){let t=E.useContext(Yo);return Rt(t,Yv(e)),t}function OP(e){let t=E.useContext(Ah);return Rt(t,Yv(e)),t}function kP(e){let t=E.useContext(Li);return Rt(t,Yv(e)),t}function Zv(e){let t=kP(e),n=t.matches[t.matches.length-1];return Rt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DP(){return Zv("useRouteId")}function IP(){var r;let e=E.useContext(Wv),t=OP("useRouteError"),n=Zv("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function LP(){let{router:e}=NP("useNavigate"),t=Zv("useNavigate"),n=E.useRef(!1);return A1(()=>{n.current=!0}),E.useCallback(async(a,o={})=>{qr(n.current,S1),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var MS={};function T1(e,t,n){!t&&!MS[e]&&(MS[e]=!0,qr(!1,n))}E.memo(MP);function MP({routes:e,future:t,state:n}){return w1(e,void 0,n,t)}function C1(e){Rt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){Rt(!mu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:l,navigator:a,static:o,future:{}}),[l,a,o]);typeof n=="string"&&(n=Wo(n));let{pathname:d="/",search:f="",hash:m="",state:g=null,key:y="default"}=n,b=E.useMemo(()=>{let v=Ri(d,l);return v==null?null:{location:{pathname:v,search:f,hash:m,state:g,key:y},navigationType:r}},[l,d,f,m,g,y,r]);return qr(b!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:E.createElement(Xr.Provider,{value:u},E.createElement(hu.Provider,{children:t,value:b}))}function PP({children:e,location:t}){return SP(Ny(e),t)}function Ny(e,t=[]){let n=[];return E.Children.forEach(e,(r,a)=>{if(!E.isValidElement(r))return;let o=[...t,a];if(r.type===E.Fragment){n.push.apply(n,Ny(r.props.children,o));return}Rt(r.type===C1,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Rt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Ny(r.props.children,o)),n.push(l)}),n}var vf="get",bf="application/x-www-form-urlencoded";function wh(e){return e!=null&&typeof e.tagName=="string"}function VP(e){return wh(e)&&e.tagName.toLowerCase()==="button"}function BP(e){return wh(e)&&e.tagName.toLowerCase()==="form"}function zP(e){return wh(e)&&e.tagName.toLowerCase()==="input"}function UP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HP(e,t){return e.button===0&&(!t||t==="_self")&&!UP(e)}var Kd=null;function FP(){if(Kd===null)try{new FormData(document.createElement("form"),0),Kd=!1}catch{Kd=!0}return Kd}var GP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xg(e){return e!=null&&!GP.has(e)?(qr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bf}"`),null):e}function $P(e,t){let n,r,a,o,l;if(BP(e)){let u=e.getAttribute("action");r=u?Ri(u,t):null,n=e.getAttribute("method")||vf,a=xg(e.getAttribute("enctype"))||bf,o=new FormData(e)}else if(VP(e)||zP(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?Ri(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||vf,a=xg(e.getAttribute("formenctype"))||xg(u.getAttribute("enctype"))||bf,o=new FormData(u,e),!FP()){let{name:f,type:m,value:g}=e;if(m==="image"){let y=f?`${f}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else f&&o.append(f,g)}}else{if(wh(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=vf,r=null,a=bf,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}function Xv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function qP(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function KP(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function WP(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await qP(o,n);return l.links?l.links():[]}return[]}));return QP(r.flat(1).filter(KP).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function jS(e,t,n,r,a,o){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var m;return n[f].pathname!==d.pathname||((m=n[f].route.path)==null?void 0:m.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,f)=>l(d,f)||u(d,f)):o==="data"?t.filter((d,f)=>{var g;let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function YP(e,t,{includeHydrateFallback:n}={}){return ZP(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function ZP(e){return[...new Set(e)]}function XP(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function QP(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(XP(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function JP(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&Ri(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function R1(){let e=E.useContext(Yo);return Xv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function eV(){let e=E.useContext(Ah);return Xv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qv=E.createContext(void 0);Qv.displayName="FrameworkContext";function N1(){let e=E.useContext(Qv);return Xv(e,"You must render this element inside a <HydratedRouter> element"),e}function tV(e,t){let n=E.useContext(Qv),[r,a]=E.useState(!1),[o,l]=E.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:g}=t,y=E.useRef(null);E.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=w=>{w.forEach(T=>{l(T.isIntersecting)})},A=new IntersectionObserver(S,{threshold:.5});return y.current&&A.observe(y.current),()=>{A.disconnect()}}},[e]),E.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let b=()=>{a(!0)},v=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,y,{}]:[o,y,{onFocus:lc(u,b),onBlur:lc(d,v),onMouseEnter:lc(f,b),onMouseLeave:lc(m,v),onTouchStart:lc(g,b)}]:[!1,y,{}]}function lc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function nV({page:e,...t}){let{router:n}=R1(),r=E.useMemo(()=>g1(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?E.createElement(iV,{page:e,matches:r,...t}):null}function rV(e){let{manifest:t,routeModules:n}=N1(),[r,a]=E.useState([]);return E.useEffect(()=>{let o=!1;return WP(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function iV({page:e,matches:t,...n}){let r=Aa(),{manifest:a,routeModules:o}=N1(),{basename:l}=R1(),{loaderData:u,matches:d}=eV(),f=E.useMemo(()=>jS(e,t,d,a,r,"data"),[e,t,d,a,r]),m=E.useMemo(()=>jS(e,t,d,a,r,"assets"),[e,t,d,a,r]),g=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,S=!1;if(t.forEach(w=>{var R;let T=a.routes[w.route.id];!T||!T.hasLoader||(!f.some(D=>D.route.id===w.route.id)&&w.route.id in u&&((R=o[w.route.id])!=null&&R.shouldRevalidate)||T.hasClientLoader?S=!0:v.add(w.route.id))}),v.size===0)return[];let A=JP(e,l);return S&&v.size>0&&A.searchParams.set("_routes",t.filter(w=>v.has(w.route.id)).map(w=>w.route.id).join(",")),[A.pathname+A.search]},[l,u,r,a,f,t,e,o]),y=E.useMemo(()=>YP(m,a),[m,a]),b=rV(m);return E.createElement(E.Fragment,null,g.map(v=>E.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),y.map(v=>E.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),b.map(({key:v,link:S})=>E.createElement("link",{key:v,...S})))}function aV(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var O1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{O1&&(window.__reactRouterVersion="7.4.0")}catch{}function sV({basename:e,children:t,window:n}){let r=E.useRef();r.current==null&&(r.current=Wj({window:n,v5Compat:!0}));let a=r.current,[o,l]=E.useState({action:a.action,location:a.location}),u=E.useCallback(d=>{E.startTransition(()=>l(d))},[l]);return E.useLayoutEffect(()=>a.listen(u),[a,u]),E.createElement(jP,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}var k1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D1=E.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,state:u,target:d,to:f,preventScrollReset:m,viewTransition:g,...y},b){let{basename:v}=E.useContext(Xr),S=typeof f=="string"&&k1.test(f),A,w=!1;if(typeof f=="string"&&S&&(A=f,O1))try{let V=new URL(window.location.href),H=f.startsWith("//")?new URL(V.protocol+f):new URL(f),fe=Ri(H.pathname,v);H.origin===V.origin&&fe!=null?f=fe+H.search+H.hash:w=!0}catch{qr(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=_P(f,{relative:a}),[R,D,N]=tV(r,y),k=uV(f,{replace:l,state:u,target:d,preventScrollReset:m,relative:a,viewTransition:g});function I(V){t&&t(V),V.defaultPrevented||k(V)}let P=E.createElement("a",{...y,...N,href:A||T,onClick:w||o?t:I,ref:aV(b,D),target:d,"data-discover":!S&&n==="render"?"true":void 0});return R&&!S?E.createElement(E.Fragment,null,P,E.createElement(nV,{page:T})):P});D1.displayName="Link";var oV=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:u,children:d,...f},m){let g=pu(l,{relative:f.relative}),y=Aa(),b=E.useContext(Ah),{navigator:v,basename:S}=E.useContext(Xr),A=b!=null&&pV(g)&&u===!0,w=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,T=y.pathname,R=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(T=T.toLowerCase(),R=R?R.toLowerCase():null,w=w.toLowerCase()),R&&S&&(R=Ri(R,S)||R);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let N=T===w||!a&&T.startsWith(w)&&T.charAt(D)==="/",k=R!=null&&(R===w||!a&&R.startsWith(w)&&R.charAt(w.length)==="/"),I={isActive:N,isPending:k,isTransitioning:A},P=N?t:void 0,V;typeof r=="function"?V=r(I):V=[r,N?"active":null,k?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let H=typeof o=="function"?o(I):o;return E.createElement(D1,{...f,"aria-current":P,className:V,ref:m,style:H,to:l,viewTransition:u},typeof d=="function"?d(I):d)});oV.displayName="NavLink";var lV=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=vf,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:g,...y},b)=>{let v=hV(),S=mV(u,{relative:f}),A=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&k1.test(u),T=R=>{if(d&&d(R),R.defaultPrevented)return;R.preventDefault();let D=R.nativeEvent.submitter,N=(D==null?void 0:D.getAttribute("formmethod"))||l;v(D||R.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:f,preventScrollReset:m,viewTransition:g})};return E.createElement("form",{ref:b,method:A,action:S,onSubmit:r?d:T,...y,"data-discover":!w&&e==="render"?"true":void 0})});lV.displayName="Form";function cV(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function I1(e){let t=E.useContext(Yo);return Rt(t,cV(e)),t}function uV(e,{target:t,replace:n,state:r,preventScrollReset:a,relative:o,viewTransition:l}={}){let u=xP(),d=Aa(),f=pu(e,{relative:o});return E.useCallback(m=>{if(HP(m,t)){m.preventDefault();let g=n!==void 0?n:Lc(d)===Lc(f);u(e,{replace:g,state:r,preventScrollReset:a,relative:o,viewTransition:l})}},[d,u,f,n,r,t,e,a,o,l])}var dV=0,fV=()=>`__${String(++dV)}__`;function hV(){let{router:e}=I1("useSubmit"),{basename:t}=E.useContext(Xr),n=DP();return E.useCallback(async(r,a={})=>{let{action:o,method:l,encType:u,formData:d,body:f}=$P(r,t);if(a.navigate===!1){let m=a.fetcherKey||fV();await e.fetch(m,n,a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,n])}function mV(e,{relative:t}={}){let{basename:n}=E.useContext(Xr),r=E.useContext(Li);Rt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...pu(e||".",{relative:t})},l=Aa();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(g=>g).forEach(g=>u.append("index",g));let m=u.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:wi([n,o.pathname])),Lc(o)}function pV(e,t={}){let n=E.useContext(E1);Rt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=I1("useViewTransitionState"),a=pu(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Ri(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ri(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Mf(a.pathname,l)!=null||Mf(a.pathname,o)!=null}new TextEncoder;var ws=WT();const gV=xh(ws);/**
63
- * @license lucide-react v0.488.0 - ISC
64
- *
65
- * This source code is licensed under the ISC license.
66
- * See the LICENSE file in the root directory of this source tree.
67
- */const yV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),PS=e=>{const t=vV(e);return t.charAt(0).toUpperCase()+t.slice(1)},L1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
68
- * @license lucide-react v0.488.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */var bV={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"};/**
73
- * @license lucide-react v0.488.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */const _V=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},d)=>E.createElement("svg",{ref:d,...bV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:L1("lucide",a),...u},[...l.map(([f,m])=>E.createElement(f,m)),...Array.isArray(o)?o:[o]]));/**
78
- * @license lucide-react v0.488.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */const St=(e,t)=>{const n=E.forwardRef(({className:r,...a},o)=>E.createElement(_V,{ref:o,iconNode:t,className:L1(`lucide-${yV(PS(e))}`,`lucide-${e}`,r),...a}));return n.displayName=PS(e),n};/**
83
- * @license lucide-react v0.488.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */const xV=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],EV=St("arrow-left",xV);/**
88
- * @license lucide-react v0.488.0 - ISC
89
- *
90
- * This source code is licensed under the ISC license.
91
- * See the LICENSE file in the root directory of this source tree.
92
- */const SV=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],AV=St("arrow-up-from-line",SV);/**
93
- * @license lucide-react v0.488.0 - ISC
94
- *
95
- * This source code is licensed under the ISC license.
96
- * See the LICENSE file in the root directory of this source tree.
97
- */const wV=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zo=St("check",wV);/**
98
- * @license lucide-react v0.488.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */const TV=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],M1=St("chevron-down",TV);/**
103
- * @license lucide-react v0.488.0 - ISC
104
- *
105
- * This source code is licensed under the ISC license.
106
- * See the LICENSE file in the root directory of this source tree.
107
- */const CV=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],RV=St("chevron-left",CV);/**
108
- * @license lucide-react v0.488.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const NV=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],jf=St("chevron-right",NV);/**
113
- * @license lucide-react v0.488.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */const OV=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],kV=St("chevron-up",OV);/**
118
- * @license lucide-react v0.488.0 - ISC
119
- *
120
- * This source code is licensed under the ISC license.
121
- * See the LICENSE file in the root directory of this source tree.
122
- */const DV=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],IV=St("chevrons-up-down",DV);/**
123
- * @license lucide-react v0.488.0 - ISC
124
- *
125
- * This source code is licensed under the ISC license.
126
- * See the LICENSE file in the root directory of this source tree.
127
- */const LV=[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],MV=St("copy-check",LV);/**
128
- * @license lucide-react v0.488.0 - ISC
129
- *
130
- * This source code is licensed under the ISC license.
131
- * See the LICENSE file in the root directory of this source tree.
132
- */const jV=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],PV=St("copy",jV);/**
133
- * @license lucide-react v0.488.0 - ISC
134
- *
135
- * This source code is licensed under the ISC license.
136
- * See the LICENSE file in the root directory of this source tree.
137
- */const VV=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],BV=St("download",VV);/**
138
- * @license lucide-react v0.488.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- */const zV=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],UV=St("external-link",zV);/**
143
- * @license lucide-react v0.488.0 - ISC
144
- *
145
- * This source code is licensed under the ISC license.
146
- * See the LICENSE file in the root directory of this source tree.
147
- */const HV=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],FV=St("eye-off",HV);/**
148
- * @license lucide-react v0.488.0 - ISC
149
- *
150
- * This source code is licensed under the ISC license.
151
- * See the LICENSE file in the root directory of this source tree.
152
- */const GV=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$V=St("eye",GV);/**
153
- * @license lucide-react v0.488.0 - ISC
154
- *
155
- * This source code is licensed under the ISC license.
156
- * See the LICENSE file in the root directory of this source tree.
157
- */const qV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],KV=St("globe",qV);/**
158
- * @license lucide-react v0.488.0 - ISC
159
- *
160
- * This source code is licensed under the ISC license.
161
- * See the LICENSE file in the root directory of this source tree.
162
- */const WV=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]],YV=St("move-vertical",WV);/**
163
- * @license lucide-react v0.488.0 - ISC
164
- *
165
- * This source code is licensed under the ISC license.
166
- * See the LICENSE file in the root directory of this source tree.
167
- */const ZV=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],j1=St("pencil",ZV);/**
168
- * @license lucide-react v0.488.0 - ISC
169
- *
170
- * This source code is licensed under the ISC license.
171
- * See the LICENSE file in the root directory of this source tree.
172
- */const XV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Th=St("plus",XV);/**
173
- * @license lucide-react v0.488.0 - ISC
174
- *
175
- * This source code is licensed under the ISC license.
176
- * See the LICENSE file in the root directory of this source tree.
177
- */const QV=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],JV=St("rotate-ccw",QV);/**
178
- * @license lucide-react v0.488.0 - ISC
179
- *
180
- * This source code is licensed under the ISC license.
181
- * See the LICENSE file in the root directory of this source tree.
182
- */const eB=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],VS=St("save",eB);/**
183
- * @license lucide-react v0.488.0 - ISC
184
- *
185
- * This source code is licensed under the ISC license.
186
- * See the LICENSE file in the root directory of this source tree.
187
- */const tB=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],nB=St("search",tB);/**
188
- * @license lucide-react v0.488.0 - ISC
189
- *
190
- * This source code is licensed under the ISC license.
191
- * See the LICENSE file in the root directory of this source tree.
192
- */const rB=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Ch=St("trash",rB);/**
193
- * @license lucide-react v0.488.0 - ISC
194
- *
195
- * This source code is licensed under the ISC license.
196
- * See the LICENSE file in the root directory of this source tree.
197
- */const iB=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],P1=St("wand-sparkles",iB);/**
198
- * @license lucide-react v0.488.0 - ISC
199
- *
200
- * This source code is licensed under the ISC license.
201
- * See the LICENSE file in the root directory of this source tree.
202
- */const aB=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ts=St("x",aB);function V1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=V1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Rh(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=V1(e))&&(r&&(r+=" "),r+=t);return r}const Jv="-",sB=e=>{const t=lB(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Jv);return u[0]===""&&u.length!==1&&u.shift(),B1(u,t)||oB(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},B1=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?B1(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Jv);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},BS=/^\[(.+)\]$/,oB=e=>{if(BS.test(e)){const t=BS.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},lB=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)Oy(n[a],r,a,t);return r},Oy=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:zS(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(cB(a)){Oy(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{Oy(l,zS(t,o),n,r)})})},zS=(e,t)=>{let n=e;return t.split(Jv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},cB=e=>e.isThemeGetter,uB=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return a(o,l),l},set(o,l){n.has(o)?n.set(o,l):a(o,l)}}},ky="!",Dy=":",dB=Dy.length,fB=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const o=[];let l=0,u=0,d=0,f;for(let v=0;v<a.length;v++){let S=a[v];if(l===0&&u===0){if(S===Dy){o.push(a.slice(d,v)),d=v+dB;continue}if(S==="/"){f=v;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const m=o.length===0?a:a.substring(d),g=hB(m),y=g!==m,b=f&&f>d?f-d:void 0;return{modifiers:o,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:b}};if(t){const a=t+Dy,o=r;r=l=>l.startsWith(a)?o(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const a=r;r=o=>n({className:o,parseClassName:a})}return r},hB=e=>e.endsWith(ky)?e.substring(0,e.length-1):e.startsWith(ky)?e.substring(1):e,mB=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const a=[];let o=[];return r.forEach(l=>{l[0]==="["||t[l]?(a.push(...o.sort(),l),o=[]):o.push(l)}),a.push(...o.sort()),a}},pB=e=>({cache:uB(e.cacheSize),parseClassName:fB(e),sortModifiers:mB(e),...sB(e)}),gB=/\s+/,yB=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o}=t,l=[],u=e.trim().split(gB);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:g,modifiers:y,hasImportantModifier:b,baseClassName:v,maybePostfixModifierPosition:S}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let A=!!S,w=r(A?v.substring(0,S):v);if(!w){if(!A){d=m+(d.length>0?" "+d:d);continue}if(w=r(v),!w){d=m+(d.length>0?" "+d:d);continue}A=!1}const T=o(y).join(":"),R=b?T+ky:T,D=R+w;if(l.includes(D))continue;l.push(D);const N=a(w,A);for(let k=0;k<N.length;++k){const I=N[k];l.push(R+I)}d=m+(d.length>0?" "+d:d)}return d};function vB(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=z1(t))&&(r&&(r+=" "),r+=n);return r}const z1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=z1(e[r]))&&(n&&(n+=" "),n+=t);return n};function bB(e,...t){let n,r,a,o=l;function l(d){const f=t.reduce((m,g)=>g(m),e());return n=pB(f),r=n.cache.get,a=n.cache.set,o=u,u(d)}function u(d){const f=r(d);if(f)return f;const m=yB(d,n);return a(d,m),m}return function(){return o(vB.apply(null,arguments))}}const en=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},U1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,H1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_B=/^\d+\/\d+$/,xB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EB=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,AB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>_B.test(e),st=e=>!!e&&!Number.isNaN(Number(e)),ts=e=>!!e&&Number.isInteger(Number(e)),US=e=>e.endsWith("%")&&st(e.slice(0,-1)),sa=e=>xB.test(e),TB=()=>!0,CB=e=>EB.test(e)&&!SB.test(e),eb=()=>!1,RB=e=>AB.test(e),NB=e=>wB.test(e),OB=e=>!Ne(e)&&!Oe(e),kB=e=>Xo(e,$1,eb),Ne=e=>U1.test(e),ns=e=>Xo(e,q1,CB),Eg=e=>Xo(e,HB,st),DB=e=>Xo(e,F1,eb),IB=e=>Xo(e,G1,NB),LB=e=>Xo(e,eb,RB),Oe=e=>H1.test(e),Wd=e=>Qo(e,q1),MB=e=>Qo(e,FB),jB=e=>Qo(e,F1),PB=e=>Qo(e,$1),VB=e=>Qo(e,G1),BB=e=>Qo(e,GB,!0),Xo=(e,t,n)=>{const r=U1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Qo=(e,t,n=!1)=>{const r=H1.exec(e);return r?r[1]?t(r[1]):n:!1},F1=e=>e==="position",zB=new Set(["image","url"]),G1=e=>zB.has(e),UB=new Set(["length","size","percentage"]),$1=e=>UB.has(e),q1=e=>e==="length",HB=e=>e==="number",FB=e=>e==="family-name",GB=e=>e==="shadow",$B=()=>{const e=en("color"),t=en("font"),n=en("text"),r=en("font-weight"),a=en("tracking"),o=en("leading"),l=en("breakpoint"),u=en("container"),d=en("spacing"),f=en("radius"),m=en("shadow"),g=en("inset-shadow"),y=en("drop-shadow"),b=en("blur"),v=en("perspective"),S=en("aspect"),A=en("ease"),w=en("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],k=()=>[Oe,Ne,d],I=()=>[ho,"full","auto",...k()],P=()=>[ts,"none","subgrid",Oe,Ne],V=()=>["auto",{span:["full",ts,Oe,Ne]},Oe,Ne],H=()=>[ts,"auto",Oe,Ne],fe=()=>["auto","min","max","fr",Oe,Ne],te=()=>["start","end","center","between","around","evenly","stretch","baseline"],ue=()=>["start","end","center","stretch"],Y=()=>["auto",...k()],J=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],U=()=>[e,Oe,Ne],ne=()=>[US,ns],ee=()=>["","none","full",f,Oe,Ne],ve=()=>["",st,Wd,ns],j=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["","none",b,Oe,Ne],ie=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Oe,Ne],re=()=>["none",st,Oe,Ne],de=()=>["none",st,Oe,Ne],ye=()=>[st,Oe,Ne],ge=()=>[ho,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[sa],breakpoint:[sa],color:[TB],container:[sa],"drop-shadow":[sa],ease:["in","out","in-out"],font:[OB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[sa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[sa],shadow:[sa],spacing:["px",st],text:[sa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,Ne,Oe,S]}],container:["container"],columns:[{columns:[st,Ne,Oe,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...R(),Ne,Oe]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[ts,"auto",Oe,Ne]}],basis:[{basis:[ho,"full","auto",u,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[st,ho,"auto","initial","none",Ne]}],grow:[{grow:["",st,Oe,Ne]}],shrink:[{shrink:["",st,Oe,Ne]}],order:[{order:[ts,"first","last","none",Oe,Ne]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...ue(),"baseline"]}],"align-self":[{self:["auto",...ue(),"baseline"]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[u,"screen",...J()]}],"min-w":[{"min-w":[u,"screen","none",...J()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...J()]}],h:[{h:["screen",...J()]}],"min-h":[{"min-h":["screen","none",...J()]}],"max-h":[{"max-h":["screen",...J()]}],"font-size":[{text:["base",n,Wd,ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Oe,Eg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",US,Ne]}],"font-family":[{font:[MB,Ne,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Oe,Ne]}],"line-clamp":[{"line-clamp":[st,"none",Oe,Eg]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",Oe,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:[st,"from-font","auto",Oe,ns]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[st,"auto",Oe,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),jB,DB]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",PB,kB]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ts,Oe,Ne],radial:["",Oe,Ne],conic:[ts,Oe,Ne]},VB,IB]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...j(),"hidden","none"]}],"divide-style":[{divide:[...j(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...j(),"none","hidden"]}],"outline-offset":[{"outline-offset":[st,Oe,Ne]}],"outline-w":[{outline:["",st,Wd,ns]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,BB,LB]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",Oe,Ne,g]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[st,ns]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":U()}],opacity:[{opacity:[st,Oe,Ne]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none",Oe,Ne]}],blur:[{blur:F()}],brightness:[{brightness:[st,Oe,Ne]}],contrast:[{contrast:[st,Oe,Ne]}],"drop-shadow":[{"drop-shadow":["","none",y,Oe,Ne]}],grayscale:[{grayscale:["",st,Oe,Ne]}],"hue-rotate":[{"hue-rotate":[st,Oe,Ne]}],invert:[{invert:["",st,Oe,Ne]}],saturate:[{saturate:[st,Oe,Ne]}],sepia:[{sepia:["",st,Oe,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Ne]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[st,Oe,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[st,Oe,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",st,Oe,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[st,Oe,Ne]}],"backdrop-invert":[{"backdrop-invert":["",st,Oe,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[st,Oe,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[st,Oe,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",st,Oe,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[st,"initial",Oe,Ne]}],ease:[{ease:["linear","initial",A,Oe,Ne]}],delay:[{delay:[st,Oe,Ne]}],animate:[{animate:["none",w,Oe,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Oe,Ne]}],"perspective-origin":[{"perspective-origin":ie()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Oe,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:ie()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oe,Ne]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[st,Wd,ns,Eg]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},K1=bB($B),Te=(...e)=>K1(Rh(e)),HS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,FS=Rh,mr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return FS(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(f=>{const m=n==null?void 0:n[f],g=o==null?void 0:o[f];if(m===null)return null;const y=HS(m)||HS(g);return a[f][y]}),u=n&&Object.entries(n).reduce((f,m)=>{let[g,y]=m;return y===void 0||(f[g]=y),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:g,className:y,...b}=m;return Object.entries(b).every(v=>{let[S,A]=v;return Array.isArray(A)?A.includes({...o,...u}[S]):{...o,...u}[S]===A})?[...f,g,y]:f},[]);return FS(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},qB=({className:e,strokeWidth:t=4})=>_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"44",viewBox:"0 0 44 44",stroke:"currentColor",className:Te("size-full",e),children:_.jsxs("g",{fill:"none",fillRule:"evenodd",strokeWidth:t,children:[_.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[_.jsx("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),_.jsx("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]}),_.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[_.jsx("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),_.jsx("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]})]})}),jo=({children:e,isLoading:t=!0,className:n,...r})=>_.jsx(_.Fragment,{children:t?_.jsx("div",{className:Te("flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center",n),role:"status","aria-label":"Animated icon, meaning that the website is processing",...r,children:_.jsx(qB,{className:"size-10 max-h-full max-w-full"})}):e??_.jsx(_.Fragment,{})}),Sg=mr("",{variants:{size:{sm:"size-3 absolute top-1/2 -translate-y-1/2",md:"size-4 absolute top-1/2 -translate-y-1/2",lg:"size-5 absolute top-1/2 -translate-y-1/2",xl:"size-6 absolute top-1/2 -translate-y-1/2","icon-sm":"size-3","icon-md":"size-4","icon-lg":"size-5","icon-xl":"size-6"},position:{left:"left-3",right:"right-3"}},defaultVariants:{size:"md"}}),KB=mr("relative cursor-pointer truncate whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"min-h-7 px-3 max-md:py-1 text-xs",md:"min-h-8 px-6 max-md:py-2 text-sm",lg:"min-h-10 px-8 max-md:py-3 text-lg",xl:"min-h-11 px-10 max-md:py-4 text-xl","icon-sm":"p-1.5","icon-md":"p-1.5","icon-lg":"p-2","icon-xl":"p-3"},color:{primary:"text-primary *:text-text-light",secondary:"text-secondary *:text-text-light",destructive:"text-destructive *:text-text-light",neutral:"text-neutral *:text-text-light",light:"text-white *:text-text-light",dark:"text-neutral-800 *:text-text-light",text:"text-text *:text-text-opposite","text-inverse":"text-text-opposite *:text-text",error:"text-error *:text-text-light",success:"text-success *:text-text-light",custom:""},variant:{default:"rounded-lg bg-current",none:"border-none bg-current/0 text-inherit hover:bg-current/0",outline:"*:!text-current rounded-lg border-[1.5px] bg-current/0 hover:bg-current/30",link:"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline","invisible-link":"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent",hoverable:"*:!text-current rounded-lg border-none bg-current/0 transition hover:bg-current/10 aria-[current]:bg-current/5",input:["*:!text-current w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error","disabled:opacity-50"]},textAlign:{left:"text-left",center:"text-center",right:"text-right"},isFullWidth:{true:"w-full",false:""},hasIconLeft:{true:"px-12",false:""},hasIconRight:{true:"pr-8",false:""}},defaultVariants:{variant:"default",size:"md",color:"primary",textAlign:"center",isFullWidth:!1,hasIconRight:!1,hasIconLeft:!1}}),gt=({variant:e,size:t,color:n,children:r,Icon:a,IconRight:o,iconClassName:l,isLoading:u,isActive:d,isFullWidth:f=!1,textAlign:m,disabled:g,label:y,className:b,type:v="button",...S})=>{const A=e==="link"||e==="invisible-link";return _.jsxs("button",{disabled:u||g,"aria-current":d?"page":void 0,"aria-label":y,"aria-busy":u,role:A?"link":void 0,type:v,className:KB({variant:e,size:t,color:n,isFullWidth:f,textAlign:m??(o?"left":"center"),hasIconLeft:typeof r<"u"&&(typeof a<"u"||typeof u<"u"),hasIconRight:typeof r<"u"&&typeof o<"u",className:b}),...S,children:[a&&!u&&_.jsx(a,{className:Sg({size:t,className:l,position:"left"})}),_.jsx(jo,{className:Sg({size:t,className:l,position:"left"}),isLoading:u??!1}),_.jsx("span",{children:r}),o&&_.jsx(o,{className:Sg({size:t,className:l,position:"right"})})]})},W1=({children:e,isHidden:t,className:n="",isOverable:r=!1,isFocusable:a=!1,minHeight:o=0,...l})=>_.jsx("div",{"aria-hidden":a?t:void 0,tabIndex:a?0:void 0,role:a?"button":"none",className:Te("group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out",typeof t<"u"&&!t&&"grid-rows-[1fr] overflow-x-auto",r&&"hover:grid-rows-[1fr] hover:overflow-x-auto",a&&"focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto",n),...l,children:_.jsx("div",{style:{minHeight:`${o}px`},className:Te(r&&"group-hover/height-smoother:visible",a&&"group-focus/height-smoother:visible",n),children:e})}),Y1=({children:e,header:t,isOpen:n=!1,onClick:r,...a})=>{const[o,l]=E.useState(n),u=o==null?void 0:!o;return E.useEffect(()=>{n!=null&&l(n)},[n]),_.jsxs("div",{className:"w-full",children:[_.jsx(gt,{variant:"hoverable",color:"text",onClick:d=>{l(f=>!f),r==null||r(d)},isFullWidth:!0,className:"flex items-center justify-between gap-2",IconRight:M1,iconClassName:Te("transform transition-transform duration-500 ease-in-out",o?"rotate-0":"-rotate-180"),...a,children:t}),_.jsx(W1,{tabIndex:u!==!1?void 0:-1,isHidden:u,children:e})]})},WB={},GS=e=>{let t;const n=new Set,r=(m,g)=>{const y=typeof m=="function"?m(t):m;if(!Object.is(y,t)){const b=t;t=g??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(v=>v(t,b))}},a=()=>t,d={setState:r,getState:a,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(WB?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,a,d);return d},YB=e=>e?GS(e):GS;var Ag={exports:{}},wg={},Tg={exports:{}},Cg={};/**
203
- * @license React
204
- * use-sync-external-store-shim.production.js
205
- *
206
- * Copyright (c) Meta Platforms, Inc. and affiliates.
207
- *
208
- * This source code is licensed under the MIT license found in the
209
- * LICENSE file in the root directory of this source tree.
210
- */var $S;function ZB(){if($S)return Cg;$S=1;var e=du();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(g,y){var b=y(),v=r({inst:{value:b,getSnapshot:y}}),S=v[0].inst,A=v[1];return o(function(){S.value=b,S.getSnapshot=y,d(S)&&A({inst:S})},[g,b,y]),a(function(){return d(S)&&A({inst:S}),g(function(){d(S)&&A({inst:S})})},[g]),l(b),b}function d(g){var y=g.getSnapshot;g=g.value;try{var b=y();return!n(g,b)}catch{return!0}}function f(g,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Cg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Cg}var qS;function Z1(){return qS||(qS=1,Tg.exports=ZB()),Tg.exports}/**
211
- * @license React
212
- * use-sync-external-store-shim/with-selector.production.js
213
- *
214
- * Copyright (c) Meta Platforms, Inc. and affiliates.
215
- *
216
- * This source code is licensed under the MIT license found in the
217
- * LICENSE file in the root directory of this source tree.
218
- */var KS;function XB(){if(KS)return wg;KS=1;var e=du(),t=Z1();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return wg.useSyncExternalStoreWithSelector=function(f,m,g,y,b){var v=o(null);if(v.current===null){var S={hasValue:!1,value:null};v.current=S}else S=v.current;v=u(function(){function w(k){if(!T){if(T=!0,R=k,k=y(k),b!==void 0&&S.hasValue){var I=S.value;if(b(I,k))return D=I}return D=k}if(I=D,r(R,k))return I;var P=y(k);return b!==void 0&&b(I,P)?(R=k,I):(R=k,D=P)}var T=!1,R,D,N=g===void 0?null:g;return[function(){return w(m())},N===null?void 0:function(){return w(N())}]},[m,g,y,b]);var A=a(f,v[0],v[1]);return l(function(){S.hasValue=!0,S.value=A},[A]),d(A),A},wg}var WS;function QB(){return WS||(WS=1,Ag.exports=XB()),Ag.exports}var JB=QB();const ez=xh(JB),X1={},{useDebugValue:tz}=$e,{useSyncExternalStoreWithSelector:nz}=ez;let YS=!1;const rz=e=>e;function iz(e,t=rz,n){(X1?"production":void 0)!=="production"&&n&&!YS&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),YS=!0);const r=nz(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return tz(r),r}const ZS=e=>{(X1?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?YB(e):e,n=(r,a)=>iz(t,r,a);return Object.assign(n,t),n},Q1=e=>e?ZS(e):ZS,az=Q1((e,t)=>({scrollBlockers:[],addBlockage:(n,r)=>e(a=>{const o=a.scrollBlockers,l=o.find(u=>u.element===r);if(l){const d=l.blockers.includes(n)?l.blockers:[...l.blockers,n];return{scrollBlockers:o.map(f=>f.element===r?{...f,blockers:d}:f)}}return r.style.overflowY="hidden",r.style.overflowX="hidden",{scrollBlockers:[...o,{element:r,blockers:[n]}]}}),removeBlockage:(n,r)=>e(a=>{const o=a.scrollBlockers,l=o.find(u=>u.element===r);return l?l.blockers.length>1?{scrollBlockers:o.map(u=>u.element===r?{...u,blockers:u.blockers.filter(d=>d!==n)}:u)}:(r.style.overflowY="auto",{scrollBlockers:o.filter(u=>u.element!==r)}):{scrollBlockers:o}}),isElementScrollBlocked:n=>t().scrollBlockers.some(r=>r.element===n)})),vo=()=>({isFetched:!1,fetchedDateTime:null,isLoading:!1,isInvalidated:!1,error:null,isSuccess:!1,data:null,errorCount:0,isEnabled:!0}),Rg=(e,t)=>t.filter(n=>e.includes(n.split("/")[0])),sz=(e,t)=>{var n;switch(t.type){case"SET_QUERY_STATE":{const{key:r,value:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??vo(),...a}}}}case"MAKE_QUERY_IN_ERROR":{const{key:r,error:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??vo(),error:a,isFetched:!0,isSuccess:!1,errorCount:(((n=e.states[r])==null?void 0:n.errorCount)??0)+1,isLoading:!1,isInvalidated:!1}}}}case"SET_QUERIES_STATE":{const{keys:r,value:a}=t,o=[r].flat(),l=Object.keys(e.states),u=Rg(o,l);if(u.length===0)return e;const d=structuredClone(e.states);return u.forEach(f=>{d[f]={...e.states[f]??vo(),...a}}),{...e,states:d}}case"RESET_KEY_STATE":{const{keys:r}=t,a=[r].flat();if(a.length===0)return e;const o=Object.keys(e.states),l=Rg(a,o);if(l.length===0)return e;const u={...e.states};return l.forEach(d=>{u[d]=vo()}),{...e,states:u}}case"RESET_STATE":{const r=[t.excludeKeys].flat(),a=Object.keys(e.states),o=Rg(r,a),l={};return a.forEach(u=>{l[u]=o.includes(u)?e.states[u]:vo()}),{...e,states:l}}default:return e}},J1=E.createContext(null),oz=({children:e})=>{const[t,n]=E.useReducer(sz,{states:{}}),r=f=>t.states[f]??vo(),a=(f,m)=>{n({type:"SET_QUERY_STATE",key:f,value:m})},o=(f,m)=>{n({type:"SET_QUERIES_STATE",keys:f,value:m})},l=(f,m)=>{n({type:"MAKE_QUERY_IN_ERROR",key:f,error:m})},u=f=>{n({type:"RESET_KEY_STATE",keys:f})},d=f=>{n({type:"RESET_STATE",excludeKeys:f})};return _.jsx(J1.Provider,{value:{getStates:r,setQueryState:a,setQueriesState:o,makeQueryInError:l,resetKeyState:u,resetState:d},children:e})},lz=()=>{const e=E.useContext(J1);if(!e)throw new Error("useAsyncState must be used within an AsyncStateProvider");return e},Yd=new Map,cz=!1,uz=!1,dz=!0,fz=!1,hz=1,mz=!1,pz=5*60*1e3,gz=5*60*1e3,Iy=e=>e?Array.isArray(e)?e:[e]:[],XS=(e,t)=>Iy(t).length>0?`${e}/${JSON.stringify(t)}`:e,gu=(e,t,n)=>{const r=(n==null?void 0:n.retryLimit)??hz,a=(n==null?void 0:n.autoFetch)??fz,o=(n==null?void 0:n.retryTime)??gz,l=(n==null?void 0:n.cache)??cz,u=(n==null?void 0:n.store)??uz,d=(n==null?void 0:n.enable)??dz,f=(n==null?void 0:n.revalidation)??mz,m=(n==null?void 0:n.revalidateTime)??pz,g=(n==null?void 0:n.updateQueries)??[],y=(n==null?void 0:n.invalidateQueries)??[],b=n==null?void 0:n.onSuccess,v=n==null?void 0:n.onError,S=Iy((n==null?void 0:n.args)??[]),{getStates:A,setQueryState:w,setQueriesState:T,makeQueryInError:R}=lz(),D=E.useRef(S),N=E.useRef(null),k=XS(e,D.current),{isFetched:I,fetchedDateTime:P,isLoading:V,isEnabled:H,error:fe,isSuccess:te,isInvalidated:ue,data:Y,errorCount:J}=A(k),U=async(...W)=>{const F=XS(e,W);N.current&&N.current.abort();const ie=new AbortController;if(N.current=ie,Yd.has(F))return Yd.get(F);const re=(async()=>{w(F,{isLoading:!0});let de=null;return await t(...W).then(ye=>{de=ye,w(F,{data:ye,errorCount:0,isLoading:!1,isFetched:!0,fetchedDateTime:new Date,isSuccess:!0,isInvalidated:!1,error:null}),b==null||b(ye),y.length>0&&T(y,{isInvalidated:!0}),g.length>0&&T(g,{data:ye}),u&&localStorage.setItem(F,JSON.stringify(ye))}).catch(ye=>{console.error({error:ye});const ge=ye instanceof Error?ye.message:String(ye);R(F,ge),v==null||v(ye.message)}).finally(()=>{Yd.delete(F)}),de})();return Yd.set(F,re),await re},ne=async(...W)=>{if(!(!H||!d))return W&&(D.current=Iy(W)),await U(...D.current)},ee=async(...W)=>!H||!d||V?void 0:!ue&&te&&l&&Y?Y:await ne(...W);E.useEffect(()=>{d!==H&&w(k,{isEnabled:H})},[d,H,k]),E.useEffect(()=>{if(!H||!d||!u||ue||I||Y)return;const W=localStorage.getItem(k);try{W&&w(k,{data:JSON.parse(W)})}catch(F){console.error(F)}},[u,k,I,ue,H,d,Y]),E.useEffect(()=>{a&&(!H||!d||I&&!ue||V||U(...D.current))},[a,H,d,I,ue,V,U]),E.useEffect(()=>{const W=J>0&&r>0,F=J>r;if(!H||!d||!W||F||!(l||u)||V||te)return;const ie=setTimeout(()=>{U(...D.current)},o);return()=>clearTimeout(ie)},[H,J,r,d,o,l,u,te,V,U]),E.useEffect(()=>{if(!f||m<=0||!H||!d||V||!te||!P||!(l||u))return;const W=setTimeout(()=>{U(...D.current)},m);return()=>clearTimeout(W)},[f,m,l,u,te,P,V,H,d,U]);const ve=W=>{w(k,{data:W})},j={isFetched:I,isInvalidated:ue,error:fe,data:Y,errorCount:J,isSuccess:te,isEnabled:H,isDisabled:!H,isLoading:V,isWaitingData:V&&!I&&!Y,isRevalidating:V&&I,[e]:ee,revalidate:ne,setData:ve};return E.useEffect(()=>()=>{N.current&&N.current.abort()},[]),j},yz=e=>{var u;const t=Zr(),r=Eh(void 0,e??t??rt),{data:a,isFetched:o}=gu("getCSRFToken",r.auth.getCSRFToken,{cache:!0,autoFetch:!0});return{csrfToken:(u=a==null?void 0:a.data)==null?void 0:u.csrf_token,csrfTokenFetched:o}},vz=e=>{const t=Zr(),n=e??t??rt,r=Eh(void 0,n),{data:a}=gu("getOAuth2AccessToken",r.auth.getOAuth2AccessToken,{cache:!0,autoFetch:!0,enable:!!(n.editor.clientId&&n.editor.clientSecret)});return{oAuth2AccessToken:a==null?void 0:a.data}},bz=(e,t)=>{const n=Zr(),a=Eh(void 0,t??n??rt),{getSession:o,revalidate:l,data:u,setData:d,isFetched:f}=gu("getSession",async()=>{try{const g=await a.auth.getSession();if(g.data){const{user:y,organization:b,project:v}=g.data;return{user:y,organization:b,isOrganizationAdmin:(y&&((b==null?void 0:b.adminsIds)??[]).includes(y._id))??!1,project:v,isProjectAdmin:(y&&((v==null?void 0:v.adminsIds)??[]).includes(y._id))??!1}}}catch(g){console.error(g)}return null},{cache:!0,store:!0,autoFetch:!0,enable:!e,invalidateQueries:["getOrganizations","getProjects","getUsers","getDictionaries"]});return{session:E.useMemo(()=>u??(f?null:void 0),[u,f]),fetchSession:o,revalidateSession:l,setSession:d}},yu=({session:e,intlayerConfiguration:t}={})=>{const{csrfToken:n,csrfTokenFetched:r}=yz(t),{session:a,fetchSession:o,revalidateSession:l,setSession:u}=bz(e,t),{oAuth2AccessToken:d}=vz(t);return{session:a,fetchSession:o,setSession:u,revalidateSession:l,csrfToken:n,csrfTokenFetched:r,oAuth2AccessToken:d,isAuthenticated:!!(a!=null&&a.user||d),isProjectAdmin:a==null?void 0:a.isProjectAdmin,isOrganizationAdmin:a==null?void 0:a.isOrganizationAdmin}};function lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function QS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eC(...e){return t=>{let n=!1;const r=e.map(a=>{const o=QS(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():QS(e[a],null)}}}}function Nt(...e){return E.useCallback(eC(...e),e)}function _z(e,t){const n=E.createContext(t),r=o=>{const{children:l,...u}=o,d=E.useMemo(()=>u,Object.values(u));return _.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(o){const l=E.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function vu(e,t=[]){let n=[];function r(o,l){const u=E.createContext(l),d=n.length;n=[...n,l];const f=g=>{var w;const{scope:y,children:b,...v}=g,S=((w=y==null?void 0:y[e])==null?void 0:w[d])||u,A=E.useMemo(()=>v,Object.values(v));return _.jsx(S.Provider,{value:A,children:b})};f.displayName=o+"Provider";function m(g,y){var S;const b=((S=y==null?void 0:y[e])==null?void 0:S[d])||u,v=E.useContext(b);if(v)return v;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[f,m]}const a=()=>{const o=n.map(l=>E.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,xz(a,...t)]}function xz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const g=d(o)[`__scope${f}`];return{...u,...g}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var ps=E.forwardRef((e,t)=>{const{children:n,...r}=e,a=E.Children.toArray(n),o=a.find(Sz);if(o){const l=o.props.children,u=a.map(d=>d===o?E.Children.count(l)>1?E.Children.only(null):E.isValidElement(l)?l.props.children:null:d);return _.jsx(Ly,{...r,ref:t,children:E.isValidElement(l)?E.cloneElement(l,void 0,u):null})}return _.jsx(Ly,{...r,ref:t,children:n})});ps.displayName="Slot";var Ly=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const a=wz(n),o=Az(r,n.props);return n.type!==E.Fragment&&(o.ref=t?eC(t,a):a),E.cloneElement(n,o)}return E.Children.count(n)>1?E.Children.only(null):null});Ly.displayName="SlotClone";var Ez=({children:e})=>_.jsx(_.Fragment,{children:e});function Sz(e){return E.isValidElement(e)&&e.type===Ez}function Az(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{o(...u),a(...u)}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function wz(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function tC(e){const t=e+"CollectionProvider",[n,r]=vu(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=b=>{const{scope:v,children:S}=b,A=$e.useRef(null),w=$e.useRef(new Map).current;return _.jsx(a,{scope:v,itemMap:w,collectionRef:A,children:S})};l.displayName=t;const u=e+"CollectionSlot",d=$e.forwardRef((b,v)=>{const{scope:S,children:A}=b,w=o(u,S),T=Nt(v,w.collectionRef);return _.jsx(ps,{ref:T,children:A})});d.displayName=u;const f=e+"CollectionItemSlot",m="data-radix-collection-item",g=$e.forwardRef((b,v)=>{const{scope:S,children:A,...w}=b,T=$e.useRef(null),R=Nt(v,T),D=o(f,S);return $e.useEffect(()=>(D.itemMap.set(T,{ref:T,...w}),()=>void D.itemMap.delete(T))),_.jsx(ps,{[m]:"",ref:R,children:A})});g.displayName=f;function y(b){const v=o(e+"CollectionConsumer",b);return $e.useCallback(()=>{const A=v.collectionRef.current;if(!A)return[];const w=Array.from(A.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((D,N)=>w.indexOf(D.ref.current)-w.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:l,Slot:d,ItemSlot:g},y,r]}var Tz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tt=Tz.reduce((e,t)=>{const n=E.forwardRef((r,a)=>{const{asChild:o,...l}=r,u=o?ps:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nC(e,t){e&&ws.flushSync(()=>e.dispatchEvent(t))}function Kn(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Cz(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e);E.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Rz="DismissableLayer",My="dismissableLayer.update",Nz="dismissableLayer.pointerDownOutside",Oz="dismissableLayer.focusOutside",JS,rC=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nh=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=E.useContext(rC),[m,g]=E.useState(null),y=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=E.useState({}),v=Nt(t,I=>g(I)),S=Array.from(f.layers),[A]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=S.indexOf(A),T=m?S.indexOf(m):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,D=T>=w,N=Dz(I=>{const P=I.target,V=[...f.branches].some(H=>H.contains(P));!D||V||(a==null||a(I),l==null||l(I),I.defaultPrevented||u==null||u())},y),k=Iz(I=>{const P=I.target;[...f.branches].some(H=>H.contains(P))||(o==null||o(I),l==null||l(I),I.defaultPrevented||u==null||u())},y);return Cz(I=>{T===f.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&u&&(I.preventDefault(),u()))},y),E.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(JS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),eA(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=JS)}},[m,y,n,f]),E.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),eA())},[m,f]),E.useEffect(()=>{const I=()=>b({});return document.addEventListener(My,I),()=>document.removeEventListener(My,I)},[]),_.jsx(tt.div,{...d,ref:v,style:{pointerEvents:R?D?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,k.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,N.onPointerDownCapture)})});Nh.displayName=Rz;var kz="DismissableLayerBranch",iC=E.forwardRef((e,t)=>{const n=E.useContext(rC),r=E.useRef(null),a=Nt(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),_.jsx(tt.div,{...e,ref:a})});iC.displayName=kz;function Dz(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){aC(Nz,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Iz(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=E.useRef(!1);return E.useEffect(()=>{const a=o=>{o.target&&!r.current&&aC(Oz,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eA(){const e=new CustomEvent(My);document.dispatchEvent(e)}function aC(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?nC(a,o):a.dispatchEvent(o)}var Lz=Nh,Mz=iC,yn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},jz="Portal",Oh=E.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[a,o]=E.useState(!1);yn(()=>o(!0),[]);const l=n||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?gV.createPortal(_.jsx(tt.div,{...r,ref:t}),l):null});Oh.displayName=jz;function Pz(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var bu=e=>{const{present:t,children:n}=e,r=Vz(t),a=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Nt(r.ref,Bz(a));return typeof n=="function"||r.isPresent?E.cloneElement(a,{ref:o}):null};bu.displayName="Presence";function Vz(e){const[t,n]=E.useState(),r=E.useRef({}),a=E.useRef(e),o=E.useRef("none"),l=e?"mounted":"unmounted",[u,d]=Pz(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const f=Zd(r.current);o.current=u==="mounted"?f:"none"},[u]),yn(()=>{const f=r.current,m=a.current;if(m!==e){const y=o.current,b=Zd(f);e?d("MOUNT"):b==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(m&&y!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),yn(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,g=b=>{const S=Zd(r.current).includes(b.animationName);if(b.target===t&&S&&(d("ANIMATION_END"),!a.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},y=b=>{b.target===t&&(o.current=Zd(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:E.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function Zd(e){return(e==null?void 0:e.animationName)||"none"}function Bz(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Pf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=zz({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,u=Kn(n),d=E.useCallback(f=>{if(o){const g=typeof f=="function"?f(e):f;g!==e&&u(g)}else a(f)},[o,e,a,u]);return[l,d]}function zz({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,a=E.useRef(r),o=Kn(t);return E.useEffect(()=>{a.current!==r&&(o(r),a.current=r)},[r,a,o]),n}var Uz="VisuallyHidden",kh=E.forwardRef((e,t)=>_.jsx(tt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));kh.displayName=Uz;var tb="ToastProvider",[nb,Hz,Fz]=tC("Toast"),[sC,Gz]=vu("Toast",[Fz]),[$z,Dh]=sC(tb),rb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:l}=e,[u,d]=E.useState(null),[f,m]=E.useState(0),g=E.useRef(!1),y=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${tb}\`. Expected non-empty \`string\`.`),_.jsx(nb.Provider,{scope:t,children:_.jsx($z,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:f,viewport:u,onViewportChange:d,onToastAdd:E.useCallback(()=>m(b=>b+1),[]),onToastRemove:E.useCallback(()=>m(b=>b-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:y,children:l})})};rb.displayName=tb;var oC="ToastViewport",qz=["F8"],jy="toast.viewportPause",Py="toast.viewportResume",ib=E.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=qz,label:a="Notifications ({hotkey})",...o}=e,l=Dh(oC,n),u=Hz(n),d=E.useRef(null),f=E.useRef(null),m=E.useRef(null),g=E.useRef(null),y=Nt(t,g,l.onViewportChange),b=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=l.toastCount>0;E.useEffect(()=>{const A=w=>{var R;r.length!==0&&r.every(D=>w[D]||w.code===D)&&((R=g.current)==null||R.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[r]),E.useEffect(()=>{const A=d.current,w=g.current;if(v&&A&&w){const T=()=>{if(!l.isClosePausedRef.current){const k=new CustomEvent(jy);w.dispatchEvent(k),l.isClosePausedRef.current=!0}},R=()=>{if(l.isClosePausedRef.current){const k=new CustomEvent(Py);w.dispatchEvent(k),l.isClosePausedRef.current=!1}},D=k=>{!A.contains(k.relatedTarget)&&R()},N=()=>{A.contains(document.activeElement)||R()};return A.addEventListener("focusin",T),A.addEventListener("focusout",D),A.addEventListener("pointermove",T),A.addEventListener("pointerleave",N),window.addEventListener("blur",T),window.addEventListener("focus",R),()=>{A.removeEventListener("focusin",T),A.removeEventListener("focusout",D),A.removeEventListener("pointermove",T),A.removeEventListener("pointerleave",N),window.removeEventListener("blur",T),window.removeEventListener("focus",R)}}},[v,l.isClosePausedRef]);const S=E.useCallback(({tabbingDirection:A})=>{const T=u().map(R=>{const D=R.ref.current,N=[D,...a2(D)];return A==="forwards"?N:N.reverse()});return(A==="forwards"?T.reverse():T).flat()},[u]);return E.useEffect(()=>{const A=g.current;if(A){const w=T=>{var N,k,I;const R=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!R){const P=document.activeElement,V=T.shiftKey;if(T.target===A&&V){(N=f.current)==null||N.focus();return}const te=S({tabbingDirection:V?"backwards":"forwards"}),ue=te.findIndex(Y=>Y===P);Ng(te.slice(ue+1))?T.preventDefault():V?(k=f.current)==null||k.focus():(I=m.current)==null||I.focus()}};return A.addEventListener("keydown",w),()=>A.removeEventListener("keydown",w)}},[u,S]),_.jsxs(Mz,{ref:d,role:"region","aria-label":a.replace("{hotkey}",b),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&_.jsx(Vy,{ref:f,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"forwards"});Ng(A)}}),_.jsx(nb.Slot,{scope:n,children:_.jsx(tt.ol,{tabIndex:-1,...o,ref:y})}),v&&_.jsx(Vy,{ref:m,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"backwards"});Ng(A)}})]})});ib.displayName=oC;var lC="ToastFocusProxy",Vy=E.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=Dh(lC,n);return _.jsx(kh,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var f;const u=l.relatedTarget;!((f=o.viewport)!=null&&f.contains(u))&&r()}})});Vy.displayName=lC;var Ih="Toast",Kz="toast.swipeStart",Wz="toast.swipeMove",Yz="toast.swipeCancel",Zz="toast.swipeEnd",ab=E.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...l}=e,[u=!0,d]=Pf({prop:r,defaultProp:a,onChange:o});return _.jsx(bu,{present:n||u,children:_.jsx(Jz,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:Kn(e.onPause),onResume:Kn(e.onResume),onSwipeStart:lt(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:lt(e.onSwipeMove,f=>{const{x:m,y:g}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:lt(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:lt(e.onSwipeEnd,f=>{const{x:m,y:g}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),d(!1)})})})});ab.displayName=Ih;var[Xz,Qz]=sC(Ih,{onClose(){}}),Jz=E.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:y,onSwipeEnd:b,...v}=e,S=Dh(Ih,n),[A,w]=E.useState(null),T=Nt(t,Y=>w(Y)),R=E.useRef(null),D=E.useRef(null),N=a||S.duration,k=E.useRef(0),I=E.useRef(N),P=E.useRef(0),{onToastAdd:V,onToastRemove:H}=S,fe=Kn(()=>{var J;(A==null?void 0:A.contains(document.activeElement))&&((J=S.viewport)==null||J.focus()),l()}),te=E.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(P.current),k.current=new Date().getTime(),P.current=window.setTimeout(fe,Y))},[fe]);E.useEffect(()=>{const Y=S.viewport;if(Y){const J=()=>{te(I.current),f==null||f()},U=()=>{const ne=new Date().getTime()-k.current;I.current=I.current-ne,window.clearTimeout(P.current),d==null||d()};return Y.addEventListener(jy,U),Y.addEventListener(Py,J),()=>{Y.removeEventListener(jy,U),Y.removeEventListener(Py,J)}}},[S.viewport,N,d,f,te]),E.useEffect(()=>{o&&!S.isClosePausedRef.current&&te(N)},[o,N,S.isClosePausedRef,te]),E.useEffect(()=>(V(),()=>H()),[V,H]);const ue=E.useMemo(()=>A?fC(A):null,[A]);return S.viewport?_.jsxs(_.Fragment,{children:[ue&&_.jsx(e2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:ue}),_.jsx(Xz,{scope:n,onClose:fe,children:ws.createPortal(_.jsx(nb.ItemSlot,{scope:n,children:_.jsx(Lz,{asChild:!0,onEscapeKeyDown:lt(u,()=>{S.isFocusedToastEscapeKeyDownRef.current||fe(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:_.jsx(tt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":S.swipeDirection,...v,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:lt(e.onKeyDown,Y=>{Y.key==="Escape"&&(u==null||u(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,fe()))}),onPointerDown:lt(e.onPointerDown,Y=>{Y.button===0&&(R.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:lt(e.onPointerMove,Y=>{if(!R.current)return;const J=Y.clientX-R.current.x,U=Y.clientY-R.current.y,ne=!!D.current,ee=["left","right"].includes(S.swipeDirection),ve=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,j=ee?ve(0,J):0,W=ee?0:ve(0,U),F=Y.pointerType==="touch"?10:2,ie={x:j,y:W},re={originalEvent:Y,delta:ie};ne?(D.current=ie,Xd(Wz,g,re,{discrete:!1})):tA(ie,S.swipeDirection,F)?(D.current=ie,Xd(Kz,m,re,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(J)>F||Math.abs(U)>F)&&(R.current=null)}),onPointerUp:lt(e.onPointerUp,Y=>{const J=D.current,U=Y.target;if(U.hasPointerCapture(Y.pointerId)&&U.releasePointerCapture(Y.pointerId),D.current=null,R.current=null,J){const ne=Y.currentTarget,ee={originalEvent:Y,delta:J};tA(J,S.swipeDirection,S.swipeThreshold)?Xd(Zz,b,ee,{discrete:!0}):Xd(Yz,y,ee,{discrete:!0}),ne.addEventListener("click",ve=>ve.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),e2=e=>{const{__scopeToast:t,children:n,...r}=e,a=Dh(Ih,t),[o,l]=E.useState(!1),[u,d]=E.useState(!1);return r2(()=>l(!0)),E.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:_.jsx(Oh,{asChild:!0,children:_.jsx(kh,{...r,children:o&&_.jsxs(_.Fragment,{children:[a.label," ",n]})})})},t2="ToastTitle",sb=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return _.jsx(tt.div,{...r,ref:t})});sb.displayName=t2;var n2="ToastDescription",ob=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return _.jsx(tt.div,{...r,ref:t})});ob.displayName=n2;var cC="ToastAction",lb=E.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?_.jsx(dC,{altText:n,asChild:!0,children:_.jsx(Lh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${cC}\`. Expected non-empty \`string\`.`),null)});lb.displayName=cC;var uC="ToastClose",Lh=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=Qz(uC,n);return _.jsx(dC,{asChild:!0,children:_.jsx(tt.button,{type:"button",...r,ref:t,onClick:lt(e.onClick,a.onClose)})})});Lh.displayName=uC;var dC=E.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return _.jsx(tt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function fC(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),i2(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...fC(r))}}),t}function Xd(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?nC(a,o):a.dispatchEvent(o)}var tA=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function r2(e=()=>{}){const t=Kn(e);yn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function i2(e){return e.nodeType===e.ELEMENT_NODE}function a2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ng(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var s2=rb,hC=ib,mC=ab,pC=sb,gC=ob,o2=lb,yC=Lh;const l2=Object.freeze(Object.defineProperty({__proto__:null,Action:o2,Close:yC,Description:gC,Provider:s2,Root:mC,Title:pC,Toast:ab,ToastAction:lb,ToastClose:Lh,ToastDescription:ob,ToastProvider:rb,ToastTitle:sb,ToastViewport:ib,Viewport:hC,createToastScope:Gz},Symbol.toStringTag,{value:"Module"})),c2=l2,u2=({className:e,...t})=>_.jsx(hC,{className:Te("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}),d2=mr("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{error:"bg-error/40 text-text",success:"bg-success/30 text-text",default:"bg-card/80 text-text"}},defaultVariants:{variant:"default"}}),f2=({className:e,variant:t,...n})=>_.jsx(mC,{className:Te(d2({variant:t}),e),...n}),h2=({className:e,...t})=>_.jsx(yC,{className:Te("text-text/50 hover:text-text/80 focus:outline-hidden absolute right-1 top-1 rounded-md p-1 opacity-0 transition-opacity focus:opacity-100 focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:_.jsx(Ts,{className:"size-5"})}),m2=({className:e,...t})=>_.jsx(pC,{className:Te("text-sm font-semibold [&+div]:text-xs",e),...t}),p2=({className:e,...t})=>_.jsx(gC,{className:Te("text-sm opacity-90",e),...t}),g2=1,y2=15*60*1e3;let Og=0;const v2=()=>(Og=(Og+1)%Number.MAX_SAFE_INTEGER,Og.toString()),kg=new Map,nA=e=>{if(kg.has(e))return;const t=setTimeout(()=>{kg.delete(e),Sc({type:"REMOVE_TOAST",toastId:e})},y2);kg.set(e,t)},b2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,g2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?nA(n):e.toasts.forEach(r=>{nA(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},_f=[];let xf={toasts:[]};const Sc=e=>{xf=b2(xf,e),_f.forEach(t=>{t(xf)})},_2=({...e})=>{const t=v2(),n=a=>Sc({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Sc({type:"DISMISS_TOAST",toastId:t});return Sc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}},vC=()=>{const[e,t]=E.useState(xf);return E.useEffect(()=>(_f.push(t),()=>{const n=_f.indexOf(t);n>-1&&_f.splice(n,1)}),[e]),{...e,toast:_2,dismiss:n=>Sc({type:"DISMISS_TOAST",toastId:n})}},Qr=e=>{const t=Zr(),{csrfToken:n,oAuth2AccessToken:r}=yu(),a=r!=null&&r.accessToken?{Authorization:`Bearer ${r.accessToken}`}:void 0;return Eh({headers:a,body:n?{csrf_token:n}:void 0},t)};var x2={};const bC=e=>{const{toast:t}=vC();return{...e,onError:n=>{var a;let r;try{if(typeof n>"u")return;r=JSON.parse(n)}catch{r=n}[r].flatMap(o=>o).forEach(o=>t({title:(x2.NODE_ENV==="production"?o.title:o.code)??"Error",description:o.message??n??"An error occurred",variant:"error"})),(a=e.onError)==null||a.call(e,n)},onSuccess:n=>{var r;n!=null&&n.message&&t({title:n.message,description:n.description,variant:"success"}),(r=e.onSuccess)==null||r.call(e,n)}}},E2=(e,{requireUser:t,requireProject:n,requireOrganization:r}={})=>{const a=Zr(),{csrfToken:o,oAuth2AccessToken:l,session:u}=yu({intlayerConfiguration:a}),d=(e==null?void 0:e.enable)??!0,f=u?u.user:l==null?void 0:l.user,m=u?u.organization:l==null?void 0:l.organization,g=u?u.project:l==null?void 0:l.project;return{...e,enable:d&&(t?!!f:!0)&&(n?!!g:!0)&&(r?!!m:!0)&&(!!o||!u&&!!l)}},Mi=(e,t,n,r)=>{const a=E2(n??{},r),o=bC(a);return gu(e,t,o)},S2=(e,t,n)=>{const r=bC({});return gu(e,t,r)},A2=e=>Mi("logout",Qr().auth.logout,{invalidateQueries:["getSession"],...e}),w2=e=>Mi("getProjects",Qr().project.getProjects,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),T2=e=>Mi("getDictionaries",Qr().dictionary.getDictionaries,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0,requireProject:!0}),C2=e=>Mi("pushDictionaries",Qr().dictionary.pushDictionaries,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),R2=e=>Mi("deleteDictionary",Qr().dictionary.deleteDictionary,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),N2=e=>Mi("getTags",Qr().tag.getTags,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),O2=e=>Mi("auditContentDeclaration",Qr().ai.auditContentDeclarationMetadata,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),k2=e=>Mi("auditContentDeclarationField",Qr().ai.auditContentDeclarationField,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),D2=e=>Mi("autocomplete",Qr().ai.autocomplete,e),I2=e=>S2("writeDictionary",Qr().editor.writeDictionary);var Dg,rA;function L2(){if(rA)return Dg;rA=1;var e=function(T){return t(T)&&!n(T)};function t(w){return!!w&&typeof w=="object"}function n(w){var T=Object.prototype.toString.call(w);return T==="[object RegExp]"||T==="[object Date]"||o(w)}var r=typeof Symbol=="function"&&Symbol.for,a=r?Symbol.for("react.element"):60103;function o(w){return w.$$typeof===a}function l(w){return Array.isArray(w)?[]:{}}function u(w,T){return T.clone!==!1&&T.isMergeableObject(w)?S(l(w),w,T):w}function d(w,T,R){return w.concat(T).map(function(D){return u(D,R)})}function f(w,T){if(!T.customMerge)return S;var R=T.customMerge(w);return typeof R=="function"?R:S}function m(w){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(w).filter(function(T){return Object.propertyIsEnumerable.call(w,T)}):[]}function g(w){return Object.keys(w).concat(m(w))}function y(w,T){try{return T in w}catch{return!1}}function b(w,T){return y(w,T)&&!(Object.hasOwnProperty.call(w,T)&&Object.propertyIsEnumerable.call(w,T))}function v(w,T,R){var D={};return R.isMergeableObject(w)&&g(w).forEach(function(N){D[N]=u(w[N],R)}),g(T).forEach(function(N){b(w,N)||(y(w,N)&&R.isMergeableObject(T[N])?D[N]=f(N,R)(w[N],T[N],R):D[N]=u(T[N],R))}),D}function S(w,T,R){R=R||{},R.arrayMerge=R.arrayMerge||d,R.isMergeableObject=R.isMergeableObject||e,R.cloneUnlessOtherwiseSpecified=u;var D=Array.isArray(T),N=Array.isArray(w),k=D===N;return k?D?R.arrayMerge(w,T,R):v(w,T,R):u(T,R)}S.all=function(T,R){if(!Array.isArray(T))throw new Error("first argument should be an array");return T.reduce(function(D,N){return S(D,N,R)},{})};var A=S;return Dg=A,Dg}var M2=L2();const j2=xh(M2),P2=()=>{const{session:e,revalidateSession:t,setSession:n}=yu(),{logout:r}=A2(),a=e!=null&&e.user?"authenticated":"unauthenticated",o=a==="authenticated",l=a==="unauthenticated",u=e==null?void 0:e.user;return{isAuthenticated:o,isUnauthenticated:l,user:u,revalidateSession:t,logout:async()=>{n(null),await r()}}};var _u=e=>e.type==="checkbox",ls=e=>e instanceof Date,En=e=>e==null;const _C=e=>typeof e=="object";var Bt=e=>!En(e)&&!Array.isArray(e)&&_C(e)&&!ls(e),xC=e=>Bt(e)&&e.target?_u(e.target)?e.target.checked:e.target.value:e,V2=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,EC=(e,t)=>e.has(V2(t)),B2=e=>{const t=e.constructor&&e.constructor.prototype;return Bt(t)&&t.hasOwnProperty("isPrototypeOf")},cb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nn(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(cb&&(e instanceof Blob||r))&&(n||Bt(e)))if(t=n?[]:{},!n&&!B2(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=Nn(e[a]));else return e;return t}var Mh=e=>Array.isArray(e)?e.filter(Boolean):[],Vt=e=>e===void 0,xe=(e,t,n)=>{if(!t||!Bt(e))return n;const r=Mh(t.split(/[,[\].]+?/)).reduce((a,o)=>En(a)?a:a[o],e);return Vt(r)||r===e?Vt(e[t])?n:e[t]:r},cr=e=>typeof e=="boolean",ub=e=>/^\w*$/.test(e),SC=e=>Mh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ht=(e,t,n)=>{let r=-1;const a=ub(t)?[t]:SC(t),o=a.length,l=o-1;for(;++r<o;){const u=a[r];let d=n;if(r!==l){const f=e[u];d=Bt(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}return e};const Vf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Er={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},bi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},AC=$e.createContext(null),wa=()=>$e.useContext(AC),z2=e=>{const{children:t,...n}=e;return $e.createElement(AC.Provider,{value:n},t)};var wC=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return t._proxyFormState[l]!==Er.all&&(t._proxyFormState[l]=!r||Er.all),n&&(n[l]=!0),e[l]}});return a},On=e=>Bt(e)&&!Object.keys(e).length,TC=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return On(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||Er.all))},Ac=e=>Array.isArray(e)?e:[e],CC=(e,t,n)=>!e||!t||e===t||Ac(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function db(e){const t=$e.useRef(e);t.current=e,$e.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function U2(e){const t=wa(),{control:n=t.control,disabled:r,name:a,exact:o}=e||{},[l,u]=$e.useState(n._formState),d=$e.useRef(!0),f=$e.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),m=$e.useRef(a);return m.current=a,db({disabled:r,next:g=>d.current&&CC(m.current,g.name,o)&&TC(g,f.current,n._updateFormState)&&u({...n._formState,...g}),subject:n._subjects.state}),$e.useEffect(()=>(d.current=!0,f.current.isValid&&n._updateValid(!0),()=>{d.current=!1}),[n]),$e.useMemo(()=>wC(l,n,f.current,!1),[l,n])}var Br=e=>typeof e=="string",RC=(e,t,n,r,a)=>Br(e)?(r&&t.watch.add(e),xe(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),xe(n,o))):(r&&(t.watchAll=!0),n);function H2(e){const t=wa(),{control:n=t.control,name:r,defaultValue:a,disabled:o,exact:l}=e||{},u=$e.useRef(r);u.current=r,db({disabled:o,subject:n._subjects.values,next:m=>{CC(u.current,m.name,l)&&f(Nn(RC(u.current,n._names,m.values||n._formValues,!1,a)))}});const[d,f]=$e.useState(n._getWatch(r,a));return $e.useEffect(()=>n._removeUnmounted()),d}function F2(e){const t=wa(),{name:n,disabled:r,control:a=t.control,shouldUnregister:o}=e,l=EC(a._names.array,n),u=H2({control:a,name:n,defaultValue:xe(a._formValues,n,xe(a._defaultValues,n,e.defaultValue)),exact:!0}),d=U2({control:a,name:n,exact:!0}),f=$e.useRef(a.register(n,{...e.rules,value:u,...cr(e.disabled)?{disabled:e.disabled}:{}})),m=$e.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!xe(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!xe(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!xe(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!xe(d.validatingFields,n)},error:{enumerable:!0,get:()=>xe(d.errors,n)}}),[d,n]),g=$e.useMemo(()=>({name:n,value:u,...cr(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:y=>f.current.onChange({target:{value:xC(y),name:n},type:Vf.CHANGE}),onBlur:()=>f.current.onBlur({target:{value:xe(a._formValues,n),name:n},type:Vf.BLUR}),ref:y=>{const b=xe(a._fields,n);b&&y&&(b._f.ref={focus:()=>y.focus(),select:()=>y.select(),setCustomValidity:v=>y.setCustomValidity(v),reportValidity:()=>y.reportValidity()})}}),[n,a._formValues,r,d.disabled,u,a._fields]);return $e.useEffect(()=>{const y=a._options.shouldUnregister||o,b=(v,S)=>{const A=xe(a._fields,v);A&&A._f&&(A._f.mount=S)};if(b(n,!0),y){const v=Nn(xe(a._options.defaultValues,n));ht(a._defaultValues,n,v),Vt(xe(a._formValues,n))&&ht(a._formValues,n,v)}return!l&&a.register(n),()=>{(l?y&&!a._state.action:y)?a.unregister(n):b(n,!1)}},[n,a,l,o]),$e.useEffect(()=>{a._updateDisabledField({disabled:r,fields:a._fields,name:n})},[r,n,a]),$e.useMemo(()=>({field:g,formState:d,fieldState:m}),[g,d,m])}const G2=e=>e.render(F2(e));var NC=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},iA=e=>({isOnSubmit:!e||e===Er.onSubmit,isOnBlur:e===Er.onBlur,isOnChange:e===Er.onChange,isOnAll:e===Er.all,isOnTouch:e===Er.onTouched}),aA=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const wc=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=xe(e,a);if(o){const{_f:l,...u}=o;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(wc(u,t))break}else if(Bt(u)&&wc(u,t))break}}};var $2=(e,t,n)=>{const r=Ac(xe(e,n));return ht(r,"root",t[n]),ht(e,n,r),e},fb=e=>e.type==="file",Pr=e=>typeof e=="function",Bf=e=>{if(!cb)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ef=e=>Br(e),hb=e=>e.type==="radio",zf=e=>e instanceof RegExp;const sA={value:!1,isValid:!1},oA={value:!0,isValid:!0};var OC=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Vt(e[0].attributes.value)?Vt(e[0].value)||e[0].value===""?oA:{value:e[0].value,isValid:!0}:oA:sA}return sA};const lA={isValid:!1,value:null};var kC=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,lA):lA;function cA(e,t,n="validate"){if(Ef(e)||Array.isArray(e)&&e.every(Ef)||cr(e)&&!e)return{type:n,message:Ef(e)?e:"",ref:t}}var mo=e=>Bt(e)&&!zf(e)?e:{value:e,message:""},uA=async(e,t,n,r,a,o)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:m,min:g,max:y,pattern:b,validate:v,name:S,valueAsNumber:A,mount:w}=e._f,T=xe(n,S);if(!w||t.has(S))return{};const R=u?u[0]:l,D=te=>{a&&R.reportValidity&&(R.setCustomValidity(cr(te)?"":te||""),R.reportValidity())},N={},k=hb(l),I=_u(l),P=k||I,V=(A||fb(l))&&Vt(l.value)&&Vt(T)||Bf(l)&&l.value===""||T===""||Array.isArray(T)&&!T.length,H=NC.bind(null,S,r,N),fe=(te,ue,Y,J=bi.maxLength,U=bi.minLength)=>{const ne=te?ue:Y;N[S]={type:te?J:U,message:ne,ref:l,...H(te?J:U,ne)}};if(o?!Array.isArray(T)||!T.length:d&&(!P&&(V||En(T))||cr(T)&&!T||I&&!OC(u).isValid||k&&!kC(u).isValid)){const{value:te,message:ue}=Ef(d)?{value:!!d,message:d}:mo(d);if(te&&(N[S]={type:bi.required,message:ue,ref:R,...H(bi.required,ue)},!r))return D(ue),N}if(!V&&(!En(g)||!En(y))){let te,ue;const Y=mo(y),J=mo(g);if(!En(T)&&!isNaN(T)){const U=l.valueAsNumber||T&&+T;En(Y.value)||(te=U>Y.value),En(J.value)||(ue=U<J.value)}else{const U=l.valueAsDate||new Date(T),ne=j=>new Date(new Date().toDateString()+" "+j),ee=l.type=="time",ve=l.type=="week";Br(Y.value)&&T&&(te=ee?ne(T)>ne(Y.value):ve?T>Y.value:U>new Date(Y.value)),Br(J.value)&&T&&(ue=ee?ne(T)<ne(J.value):ve?T<J.value:U<new Date(J.value))}if((te||ue)&&(fe(!!te,Y.message,J.message,bi.max,bi.min),!r))return D(N[S].message),N}if((f||m)&&!V&&(Br(T)||o&&Array.isArray(T))){const te=mo(f),ue=mo(m),Y=!En(te.value)&&T.length>+te.value,J=!En(ue.value)&&T.length<+ue.value;if((Y||J)&&(fe(Y,te.message,ue.message),!r))return D(N[S].message),N}if(b&&!V&&Br(T)){const{value:te,message:ue}=mo(b);if(zf(te)&&!T.match(te)&&(N[S]={type:bi.pattern,message:ue,ref:l,...H(bi.pattern,ue)},!r))return D(ue),N}if(v){if(Pr(v)){const te=await v(T,n),ue=cA(te,R);if(ue&&(N[S]={...ue,...H(bi.validate,ue.message)},!r))return D(ue.message),N}else if(Bt(v)){let te={};for(const ue in v){if(!On(te)&&!r)break;const Y=cA(await v[ue](T,n),R,ue);Y&&(te={...Y,...H(ue,Y.message)},D(Y.message),r&&(N[S]=te))}if(!On(te)&&(N[S]={ref:R,...te},!r))return N}}return D(!0),N};function q2(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Vt(e)?r++:e[t[r++]];return e}function K2(e){for(const t in e)if(e.hasOwnProperty(t)&&!Vt(e[t]))return!1;return!0}function qt(e,t){const n=Array.isArray(t)?t:ub(t)?[t]:SC(t),r=n.length===1?e:q2(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(Bt(r)&&On(r)||Array.isArray(r)&&K2(r))&&qt(e,n.slice(0,-1)),e}var Ig=()=>{let e=[];return{get observers(){return e},next:a=>{for(const o of e)o.next&&o.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(o=>o!==a)}}),unsubscribe:()=>{e=[]}}},By=e=>En(e)||!_C(e);function fa(e,t){if(By(e)||By(t))return e===t;if(ls(e)&&ls(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const o=e[a];if(!r.includes(a))return!1;if(a!=="ref"){const l=t[a];if(ls(o)&&ls(l)||Bt(o)&&Bt(l)||Array.isArray(o)&&Array.isArray(l)?!fa(o,l):o!==l)return!1}}return!0}var DC=e=>e.type==="select-multiple",W2=e=>hb(e)||_u(e),Lg=e=>Bf(e)&&e.isConnected,IC=e=>{for(const t in e)if(Pr(e[t]))return!0;return!1};function Uf(e,t={}){const n=Array.isArray(e);if(Bt(e)||n)for(const r in e)Array.isArray(e[r])||Bt(e[r])&&!IC(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Uf(e[r],t[r])):En(e[r])||(t[r]=!0);return t}function LC(e,t,n){const r=Array.isArray(e);if(Bt(e)||r)for(const a in e)Array.isArray(e[a])||Bt(e[a])&&!IC(e[a])?Vt(t)||By(n[a])?n[a]=Array.isArray(e[a])?Uf(e[a],[]):{...Uf(e[a])}:LC(e[a],En(t)?{}:t[a],n[a]):n[a]=!fa(e[a],t[a]);return n}var cc=(e,t)=>LC(e,t,Uf(t)),MC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Vt(e)?e:t?e===""?NaN:e&&+e:n&&Br(e)?new Date(e):r?r(e):e;function Mg(e){const t=e.ref;return fb(t)?t.files:hb(t)?kC(e.refs).value:DC(t)?[...t.selectedOptions].map(({value:n})=>n):_u(t)?OC(e.refs).value:MC(Vt(t.value)?e.ref.value:t.value,e)}var Y2=(e,t,n,r)=>{const a={};for(const o of e){const l=xe(t,o);l&&ht(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},uc=e=>Vt(e)?e:zf(e)?e.source:Bt(e)?zf(e.value)?e.value.source:e.value:e;const dA="AsyncFunction";var Z2=e=>!!e&&!!e.validate&&!!(Pr(e.validate)&&e.validate.constructor.name===dA||Bt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===dA)),X2=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function fA(e,t,n){const r=xe(e,n);if(r||ub(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=xe(t,o),u=xe(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};a.pop()}return{name:n}}var Q2=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,J2=(e,t)=>!Mh(xe(e,t)).length&&qt(e,t);const eU={mode:Er.onSubmit,reValidateMode:Er.onChange,shouldFocusError:!0};function tU(e={}){let t={...eU,...e},n={submitCount:0,isDirty:!1,isLoading:Pr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},a=Bt(t.defaultValues)||Bt(t.values)?Nn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Nn(a),l={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:Ig(),array:Ig(),state:Ig()},y=iA(t.mode),b=iA(t.reValidateMode),v=t.criteriaMode===Er.all,S=z=>X=>{clearTimeout(f),f=setTimeout(z,X)},A=async z=>{if(!t.disabled&&(m.isValid||z)){const X=t.resolver?On((await P()).errors):await H(r,!0);X!==n.isValid&&g.state.next({isValid:X})}},w=(z,X)=>{!t.disabled&&(m.isValidating||m.validatingFields)&&((z||Array.from(u.mount)).forEach(ae=>{ae&&(X?ht(n.validatingFields,ae,X):qt(n.validatingFields,ae))}),g.state.next({validatingFields:n.validatingFields,isValidating:!On(n.validatingFields)}))},T=(z,X=[],ae,Ae,Ee=!0,_e=!0)=>{if(Ae&&ae&&!t.disabled){if(l.action=!0,_e&&Array.isArray(xe(r,z))){const ke=ae(xe(r,z),Ae.argA,Ae.argB);Ee&&ht(r,z,ke)}if(_e&&Array.isArray(xe(n.errors,z))){const ke=ae(xe(n.errors,z),Ae.argA,Ae.argB);Ee&&ht(n.errors,z,ke),J2(n.errors,z)}if(m.touchedFields&&_e&&Array.isArray(xe(n.touchedFields,z))){const ke=ae(xe(n.touchedFields,z),Ae.argA,Ae.argB);Ee&&ht(n.touchedFields,z,ke)}m.dirtyFields&&(n.dirtyFields=cc(a,o)),g.state.next({name:z,isDirty:te(z,X),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ht(o,z,X)},R=(z,X)=>{ht(n.errors,z,X),g.state.next({errors:n.errors})},D=z=>{n.errors=z,g.state.next({errors:n.errors,isValid:!1})},N=(z,X,ae,Ae)=>{const Ee=xe(r,z);if(Ee){const _e=xe(o,z,Vt(ae)?xe(a,z):ae);Vt(_e)||Ae&&Ae.defaultChecked||X?ht(o,z,X?_e:Mg(Ee._f)):J(z,_e),l.mount&&A()}},k=(z,X,ae,Ae,Ee)=>{let _e=!1,ke=!1;const Xe={name:z};if(!t.disabled){const Lt=!!(xe(r,z)&&xe(r,z)._f&&xe(r,z)._f.disabled);if(!ae||Ae){m.isDirty&&(ke=n.isDirty,n.isDirty=Xe.isDirty=te(),_e=ke!==Xe.isDirty);const Mt=Lt||fa(xe(a,z),X);ke=!!(!Lt&&xe(n.dirtyFields,z)),Mt||Lt?qt(n.dirtyFields,z):ht(n.dirtyFields,z,!0),Xe.dirtyFields=n.dirtyFields,_e=_e||m.dirtyFields&&ke!==!Mt}if(ae){const Mt=xe(n.touchedFields,z);Mt||(ht(n.touchedFields,z,ae),Xe.touchedFields=n.touchedFields,_e=_e||m.touchedFields&&Mt!==ae)}_e&&Ee&&g.state.next(Xe)}return _e?Xe:{}},I=(z,X,ae,Ae)=>{const Ee=xe(n.errors,z),_e=m.isValid&&cr(X)&&n.isValid!==X;if(t.delayError&&ae?(d=S(()=>R(z,ae)),d(t.delayError)):(clearTimeout(f),d=null,ae?ht(n.errors,z,ae):qt(n.errors,z)),(ae?!fa(Ee,ae):Ee)||!On(Ae)||_e){const ke={...Ae,..._e&&cr(X)?{isValid:X}:{},errors:n.errors,name:z};n={...n,...ke},g.state.next(ke)}},P=async z=>{w(z,!0);const X=await t.resolver(o,t.context,Y2(z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(z),X},V=async z=>{const{errors:X}=await P(z);if(z)for(const ae of z){const Ae=xe(X,ae);Ae?ht(n.errors,ae,Ae):qt(n.errors,ae)}else n.errors=X;return X},H=async(z,X,ae={valid:!0})=>{for(const Ae in z){const Ee=z[Ae];if(Ee){const{_f:_e,...ke}=Ee;if(_e){const Xe=u.array.has(_e.name),Lt=Ee._f&&Z2(Ee._f);Lt&&m.validatingFields&&w([Ae],!0);const Mt=await uA(Ee,u.disabled,o,v,t.shouldUseNativeValidation&&!X,Xe);if(Lt&&m.validatingFields&&w([Ae]),Mt[_e.name]&&(ae.valid=!1,X))break;!X&&(xe(Mt,_e.name)?Xe?$2(n.errors,Mt,_e.name):ht(n.errors,_e.name,Mt[_e.name]):qt(n.errors,_e.name))}!On(ke)&&await H(ke,X,ae)}}return ae.valid},fe=()=>{for(const z of u.unMount){const X=xe(r,z);X&&(X._f.refs?X._f.refs.every(ae=>!Lg(ae)):!Lg(X._f.ref))&&ye(z)}u.unMount=new Set},te=(z,X)=>!t.disabled&&(z&&X&&ht(o,z,X),!fa(W(),a)),ue=(z,X,ae)=>RC(z,u,{...l.mount?o:Vt(X)?a:Br(z)?{[z]:X}:X},ae,X),Y=z=>Mh(xe(l.mount?o:a,z,t.shouldUnregister?xe(a,z,[]):[])),J=(z,X,ae={})=>{const Ae=xe(r,z);let Ee=X;if(Ae){const _e=Ae._f;_e&&(!_e.disabled&&ht(o,z,MC(X,_e)),Ee=Bf(_e.ref)&&En(X)?"":X,DC(_e.ref)?[..._e.ref.options].forEach(ke=>ke.selected=Ee.includes(ke.value)):_e.refs?_u(_e.ref)?_e.refs.length>1?_e.refs.forEach(ke=>(!ke.defaultChecked||!ke.disabled)&&(ke.checked=Array.isArray(Ee)?!!Ee.find(Xe=>Xe===ke.value):Ee===ke.value)):_e.refs[0]&&(_e.refs[0].checked=!!Ee):_e.refs.forEach(ke=>ke.checked=ke.value===Ee):fb(_e.ref)?_e.ref.value="":(_e.ref.value=Ee,_e.ref.type||g.values.next({name:z,values:{...o}})))}(ae.shouldDirty||ae.shouldTouch)&&k(z,Ee,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&j(z)},U=(z,X,ae)=>{for(const Ae in X){const Ee=X[Ae],_e=`${z}.${Ae}`,ke=xe(r,_e);(u.array.has(z)||Bt(Ee)||ke&&!ke._f)&&!ls(Ee)?U(_e,Ee,ae):J(_e,Ee,ae)}},ne=(z,X,ae={})=>{const Ae=xe(r,z),Ee=u.array.has(z),_e=Nn(X);ht(o,z,_e),Ee?(g.array.next({name:z,values:{...o}}),(m.isDirty||m.dirtyFields)&&ae.shouldDirty&&g.state.next({name:z,dirtyFields:cc(a,o),isDirty:te(z,_e)})):Ae&&!Ae._f&&!En(_e)?U(z,_e,ae):J(z,_e,ae),aA(z,u)&&g.state.next({...n}),g.values.next({name:l.mount?z:void 0,values:{...o}})},ee=async z=>{l.mount=!0;const X=z.target;let ae=X.name,Ae=!0;const Ee=xe(r,ae),_e=()=>X.type?Mg(Ee._f):xC(z),ke=Xe=>{Ae=Number.isNaN(Xe)||ls(Xe)&&isNaN(Xe.getTime())||fa(Xe,xe(o,ae,Xe))};if(Ee){let Xe,Lt;const Mt=_e(),In=z.type===Vf.BLUR||z.type===Vf.FOCUS_OUT,sm=!X2(Ee._f)&&!t.resolver&&!xe(n.errors,ae)&&!Ee._f.deps||Q2(In,xe(n.touchedFields,ae),n.isSubmitted,b,y),Os=aA(ae,u,In);ht(o,ae,Mt),In?(Ee._f.onBlur&&Ee._f.onBlur(z),d&&d(0)):Ee._f.onChange&&Ee._f.onChange(z);const ll=k(ae,Mt,In,!1),om=!On(ll)||Os;if(!In&&g.values.next({name:ae,type:z.type,values:{...o}}),sm)return m.isValid&&(t.mode==="onBlur"&&In?A():In||A()),om&&g.state.next({name:ae,...Os?{}:ll});if(!In&&Os&&g.state.next({...n}),t.resolver){const{errors:ji}=await P([ae]);if(ke(Mt),Ae){const bn=fA(n.errors,r,ae),Lu=fA(ji,r,bn.name||ae);Xe=Lu.error,ae=Lu.name,Lt=On(ji)}}else w([ae],!0),Xe=(await uA(Ee,u.disabled,o,v,t.shouldUseNativeValidation))[ae],w([ae]),ke(Mt),Ae&&(Xe?Lt=!1:m.isValid&&(Lt=await H(r,!0)));Ae&&(Ee._f.deps&&j(Ee._f.deps),I(ae,Lt,Xe,ll))}},ve=(z,X)=>{if(xe(n.errors,X)&&z.focus)return z.focus(),1},j=async(z,X={})=>{let ae,Ae;const Ee=Ac(z);if(t.resolver){const _e=await V(Vt(z)?z:Ee);ae=On(_e),Ae=z?!Ee.some(ke=>xe(_e,ke)):ae}else z?(Ae=(await Promise.all(Ee.map(async _e=>{const ke=xe(r,_e);return await H(ke&&ke._f?{[_e]:ke}:ke)}))).every(Boolean),!(!Ae&&!n.isValid)&&A()):Ae=ae=await H(r);return g.state.next({...!Br(z)||m.isValid&&ae!==n.isValid?{}:{name:z},...t.resolver||!z?{isValid:ae}:{},errors:n.errors}),X.shouldFocus&&!Ae&&wc(r,ve,z?Ee:u.mount),Ae},W=z=>{const X={...l.mount?o:a};return Vt(z)?X:Br(z)?xe(X,z):z.map(ae=>xe(X,ae))},F=(z,X)=>({invalid:!!xe((X||n).errors,z),isDirty:!!xe((X||n).dirtyFields,z),error:xe((X||n).errors,z),isValidating:!!xe(n.validatingFields,z),isTouched:!!xe((X||n).touchedFields,z)}),ie=z=>{z&&Ac(z).forEach(X=>qt(n.errors,X)),g.state.next({errors:z?n.errors:{}})},re=(z,X,ae)=>{const Ae=(xe(r,z,{_f:{}})._f||{}).ref,Ee=xe(n.errors,z)||{},{ref:_e,message:ke,type:Xe,...Lt}=Ee;ht(n.errors,z,{...Lt,...X,ref:Ae}),g.state.next({name:z,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&Ae&&Ae.focus&&Ae.focus()},de=(z,X)=>Pr(z)?g.values.subscribe({next:ae=>z(ue(void 0,X),ae)}):ue(z,X,!0),ye=(z,X={})=>{for(const ae of z?Ac(z):u.mount)u.mount.delete(ae),u.array.delete(ae),X.keepValue||(qt(r,ae),qt(o,ae)),!X.keepError&&qt(n.errors,ae),!X.keepDirty&&qt(n.dirtyFields,ae),!X.keepTouched&&qt(n.touchedFields,ae),!X.keepIsValidating&&qt(n.validatingFields,ae),!t.shouldUnregister&&!X.keepDefaultValue&&qt(a,ae);g.values.next({values:{...o}}),g.state.next({...n,...X.keepDirty?{isDirty:te()}:{}}),!X.keepIsValid&&A()},ge=({disabled:z,name:X,field:ae,fields:Ae})=>{(cr(z)&&l.mount||z||u.disabled.has(X))&&(z?u.disabled.add(X):u.disabled.delete(X),k(X,Mg(ae?ae._f:xe(Ae,X)._f),!1,!1,!0))},we=(z,X={})=>{let ae=xe(r,z);const Ae=cr(X.disabled)||cr(t.disabled);return ht(r,z,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:z}},name:z,mount:!0,...X}}),u.mount.add(z),ae?ge({field:ae,disabled:cr(X.disabled)?X.disabled:t.disabled,name:z}):N(z,!0,X.value),{...Ae?{disabled:X.disabled||t.disabled}:{},...t.progressive?{required:!!X.required,min:uc(X.min),max:uc(X.max),minLength:uc(X.minLength),maxLength:uc(X.maxLength),pattern:uc(X.pattern)}:{},name:z,onChange:ee,onBlur:ee,ref:Ee=>{if(Ee){we(z,X),ae=xe(r,z);const _e=Vt(Ee.value)&&Ee.querySelectorAll&&Ee.querySelectorAll("input,select,textarea")[0]||Ee,ke=W2(_e),Xe=ae._f.refs||[];if(ke?Xe.find(Lt=>Lt===_e):_e===ae._f.ref)return;ht(r,z,{_f:{...ae._f,...ke?{refs:[...Xe.filter(Lg),_e,...Array.isArray(xe(a,z))?[{}]:[]],ref:{type:_e.type,name:z}}:{ref:_e}}}),N(z,!1,void 0,_e)}else ae=xe(r,z,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||X.shouldUnregister)&&!(EC(u.array,z)&&l.action)&&u.unMount.add(z)}}},He=()=>t.shouldFocusError&&wc(r,ve,u.mount),Me=z=>{cr(z)&&(g.state.next({disabled:z}),wc(r,(X,ae)=>{const Ae=xe(r,ae);Ae&&(X.disabled=Ae._f.disabled||z,Array.isArray(Ae._f.refs)&&Ae._f.refs.forEach(Ee=>{Ee.disabled=Ae._f.disabled||z}))},0,!1))},Ke=(z,X)=>async ae=>{let Ae;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let Ee=Nn(o);if(u.disabled.size)for(const _e of u.disabled)ht(Ee,_e,void 0);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:_e,values:ke}=await P();n.errors=_e,Ee=ke}else await H(r);if(qt(n.errors,"root"),On(n.errors)){g.state.next({errors:{}});try{await z(Ee,ae)}catch(_e){Ae=_e}}else X&&await X({...n.errors},ae),He(),setTimeout(He);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:On(n.errors)&&!Ae,submitCount:n.submitCount+1,errors:n.errors}),Ae)throw Ae},at=(z,X={})=>{xe(r,z)&&(Vt(X.defaultValue)?ne(z,Nn(xe(a,z))):(ne(z,X.defaultValue),ht(a,z,Nn(X.defaultValue))),X.keepTouched||qt(n.touchedFields,z),X.keepDirty||(qt(n.dirtyFields,z),n.isDirty=X.defaultValue?te(z,Nn(xe(a,z))):te()),X.keepError||(qt(n.errors,z),m.isValid&&A()),g.state.next({...n}))},Et=(z,X={})=>{const ae=z?Nn(z):a,Ae=Nn(ae),Ee=On(z),_e=Ee?a:Ae;if(X.keepDefaultValues||(a=ae),!X.keepValues){if(X.keepDirtyValues){const ke=new Set([...u.mount,...Object.keys(cc(a,o))]);for(const Xe of Array.from(ke))xe(n.dirtyFields,Xe)?ht(_e,Xe,xe(o,Xe)):ne(Xe,xe(_e,Xe))}else{if(cb&&Vt(z))for(const ke of u.mount){const Xe=xe(r,ke);if(Xe&&Xe._f){const Lt=Array.isArray(Xe._f.refs)?Xe._f.refs[0]:Xe._f.ref;if(Bf(Lt)){const Mt=Lt.closest("form");if(Mt){Mt.reset();break}}}}r={}}o=t.shouldUnregister?X.keepDefaultValues?Nn(a):{}:Nn(_e),g.array.next({values:{..._e}}),g.values.next({values:{..._e}})}u={mount:X.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!X.keepIsValid||!!X.keepDirtyValues,l.watch=!!t.shouldUnregister,g.state.next({submitCount:X.keepSubmitCount?n.submitCount:0,isDirty:Ee?!1:X.keepDirty?n.isDirty:!!(X.keepDefaultValues&&!fa(z,a)),isSubmitted:X.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ee?{}:X.keepDirtyValues?X.keepDefaultValues&&o?cc(a,o):n.dirtyFields:X.keepDefaultValues&&z?cc(a,z):X.keepDirty?n.dirtyFields:{},touchedFields:X.keepTouched?n.touchedFields:{},errors:X.keepErrors?n.errors:{},isSubmitSuccessful:X.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Yt=(z,X)=>Et(Pr(z)?z(o):z,X);return{control:{register:we,unregister:ye,getFieldState:F,handleSubmit:Ke,setError:re,_executeSchema:P,_getWatch:ue,_getDirty:te,_updateValid:A,_removeUnmounted:fe,_updateFieldArray:T,_updateDisabledField:ge,_getFieldArray:Y,_reset:Et,_resetDefaultValues:()=>Pr(t.defaultValues)&&t.defaultValues().then(z=>{Yt(z,t.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:z=>{n={...n,...z}},_disableForm:Me,_subjects:g,_proxyFormState:m,_setErrors:D,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(z){l=z},get _defaultValues(){return a},get _names(){return u},set _names(z){u=z},get _formState(){return n},set _formState(z){n=z},get _options(){return t},set _options(z){t={...t,...z}}},trigger:j,register:we,handleSubmit:Ke,watch:de,setValue:ne,getValues:W,reset:Yt,resetField:at,clearErrors:ie,unregister:ye,setError:re,setFocus:(z,X={})=>{const ae=xe(r,z),Ae=ae&&ae._f;if(Ae){const Ee=Ae.refs?Ae.refs[0]:Ae.ref;Ee.focus&&(Ee.focus(),X.shouldSelect&&Pr(Ee.select)&&Ee.select())}},getFieldState:F}}function nU(e={}){const t=$e.useRef(void 0),n=$e.useRef(void 0),[r,a]=$e.useState({isDirty:!1,isValidating:!1,isLoading:Pr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Pr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...tU(e),formState:r});const o=t.current.control;return o._options=e,db({subject:o._subjects.state,next:l=>{TC(l,o._proxyFormState,o._updateFormState,!0)&&a({...o._formState})}}),$e.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),$e.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),$e.useEffect(()=>{e.values&&!fa(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a(l=>({...l}))):o._resetDefaultValues()},[e.values,o]),$e.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),$e.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),$e.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=wC(r,o),t.current}const hA=(e,t,n)=>{if(e&&"reportValidity"in e){const r=xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},jC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?hA(r.ref,n,e):r.refs&&r.refs.forEach(a=>hA(a,n,e))}},rU=(e,t)=>{t.shouldUseNativeValidation&&jC(e,t);const n={};for(const r in e){const a=xe(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if(iU(t.names||Object.keys(e),r)){const l=Object.assign({},xe(n,r));ht(l,"root",o),ht(n,r,l)}else ht(n,r,o)}return n},iU=(e,t)=>e.some(n=>n.startsWith(t+"."));var aU=function(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:o,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(g){return e.push(g)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=NC(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n},sU=function(e,t,n){return n===void 0&&(n={}),function(r,a,o){try{return Promise.resolve(function(l,u){try{var d=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(f){return o.shouldUseNativeValidation&&jC({},o),{errors:{},values:n.raw?r:f}})}catch(f){return u(f)}return d&&d.then?d.then(void 0,u):d}(0,function(l){if(function(u){return Array.isArray(u==null?void 0:u.errors)}(l))return{values:{},errors:rU(aU(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}}};const jg=async e=>e&&typeof e.then=="function"?await e:e,oU=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:a,children:o,autoComplete:l,...u})=>{const d=async f=>{const m=(e==null?void 0:e.safeParse(f))??{success:!0,data:void 0};await jg(t==null?void 0:t(f)),m.success?await jg(n==null?void 0:n(m.data)):await jg(r==null?void 0:r(new Error(m.error.errors.map(g=>g.message).join(", "))))};return _.jsx(z2,{...u,children:_.jsx("form",{className:Te("flex size-full flex-col gap-y-6",a),onSubmit:u.handleSubmit(d),autoComplete:l?"on":"off",children:o})})},lU=(e,t)=>{const n=nU({resolver:sU(e),...t}),r=n.formState.isSubmitting,a=n.formState.isSubmitted,o=n.formState.isLoading,l=n.formState.isValid;return{form:n,isSubmitting:r,isSubmitted:a,isLoading:o,isValid:l}},cU=e=>{const t=E.useId(),n=E.useMemo(()=>({id:t}),[t]);return _.jsx(PC,{value:n,children:_.jsx("div",{className:"flex flex-col gap-2 p-2",...e})})},PC=E.createContext({}),VC=E.createContext({}),uU=({...e})=>{const t=E.useMemo(()=>({name:e.name}),[e.name]);return _.jsx(VC,{value:t,children:_.jsx(G2,{...e})})},Ta=()=>{const e=E.useContext(VC),t=E.useContext(PC),{getFieldState:n,formState:r}=wa(),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...a}},BC=mr("",{variants:{variant:{default:["w-full select-text resize-none rounded-xl border-2 bg-input-background text-base md:text-sm text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error","disabled:opacity-50"],invisible:["w-full border-none bg-inherit text-inherit outline-hidden ring-0"]},size:{md:"px-2 md:py-1 py-3",lg:"p-4 md:py-2"},validationStyleEnabled:{disabled:"",enabled:"valid:border-success invalid:border-error"}},defaultVariants:{variant:"default",size:"md",validationStyleEnabled:"disabled"}}),Jo=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...a})=>_.jsx("input",{className:BC({variant:t,size:n,validationStyleEnabled:e?"enabled":"disabled",className:r}),...a}),dU=mr("",{variants:{variant:{default:["pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","checked:bg-checkbox-checked checked:border-checkbox-checked-border","disabled:opacity-50"]},size:{sm:"size-4",md:"size-5",lg:"size-6"},color:{primary:"accent-primary",secondary:"accent-secondary",destructive:"accent-destructive",neutral:"accent-neutral",light:"accent-light",text:"accent-text",dark:"accent-dark",error:"accent-error",success:"accent-success",custom:"accent-custom"},validationStyleEnabled:{disabled:"",enabled:"valid:border-success invalid:border-error"}},defaultVariants:{variant:"default",color:"primary",validationStyleEnabled:"disabled",size:"md"}}),fU=({validationStyleEnabled:e=!1,label:t,size:n,color:r,variant:a,className:o,...l})=>{const u=E.useId();return _.jsxs(_.Fragment,{children:[_.jsx("input",{type:"checkbox",className:dU({variant:a,size:n,color:r,validationStyleEnabled:e?"enabled":"disabled",className:o}),id:u,...l}),_.jsx("label",{htmlFor:u,children:t})]})},hU=e=>{const[t,n]=E.useState(!1),r=o=>{o.preventDefault(),o.stopPropagation(),n(l=>!l)},a=t?$V:FV;return _.jsxs("div",{className:"relative",children:[_.jsx(Jo,{...e,"aria-label":"password",type:t?"text":"password"}),_.jsx("button",{"data-testid":"eye-icon",className:"absolute right-2 h-full flex-row items-center",onClick:r,"aria-label":t?"Hide password":"Show password",children:_.jsx(a,{className:"text-neutral mr-2 inline-block",size:20})})]})},zC=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>_.jsx("textarea",{className:Te("resize-none",BC({variant:t,validationStyleEnabled:n?"enabled":"disabled",className:e})),...r}),UC=({value:e="",onCancel:t,onSave:n,onClick:r,children:a,isDisabled:o,...l})=>{const[u,d]=E.useState(!1),f=E.useRef(null),m=v=>{v.stopPropagation(),d(!1),n()},g=v=>{v.stopPropagation(),d(!1),t()},y=!e||e===""?"-":e,b=E.useCallback(v=>{const S=window.getSelection();S&&S.toString().trim()!==""||f.current&&!f.current.contains(v.target)&&(d(!1),n())},[n]);return E.useEffect(()=>(u?document.addEventListener("click",b):document.removeEventListener("click",b),()=>document.removeEventListener("click",b)),[b,u]),_.jsxs("span",{className:"group/editable-field flex gap-2",role:"button",tabIndex:0,onClick:v=>{d(!0),r==null||r(v)},ref:f,...l,children:[_.jsxs("div",{className:Te("flex flex-1 gap-2",u?"display":"hidden"),children:[a,_.jsx(gt,{label:"Save",variant:"hoverable",size:"icon-sm",color:"text",Icon:Zo,onClick:m,disabled:o,className:"!text-current"}),_.jsx(gt,{label:"Cancel",color:"text",variant:"hoverable",className:"!text-current",size:"icon-sm",Icon:Ts,onClick:g,disabled:o})]},String(u)),_.jsxs("div",{className:Te("flex flex-1 gap-2",u?"hidden":"display"),children:[_.jsx("span",{className:"ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6",children:y}),_.jsx(gt,{label:"Edit",Icon:j1,color:"text",variant:"hoverable",size:"icon-sm",className:"invisible !text-current group-hover/editable-field:visible",disabled:o,onClick:v=>{v.stopPropagation(),d(!0)}})]})]})},HC=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null),o=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()};E.useImperativeHandle(n,()=>a.current);const u=E.useMemo(()=>{var f;return r.value??((f=a.current)==null?void 0:f.value)??r.defaultValue},[r.value,r.defaultValue,(d=a.current)==null?void 0:d.value]);return _.jsx(UC,{value:u,onCancel:l,onSave:o,children:_.jsx(Jo,{ref:a,...r})})},mA=24,pA=12,mb=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:a,...o})=>{const l=E.useRef(null);E.useImperativeHandle(a,()=>l.current);const u=()=>{const m=l.current;if(!m||!t)return;const g=m.style;g.height="auto";const y=m.scrollHeight,b=mA*r+pA,v=mA+pA;g.height=Math.max(Math.min(y,b),v)+"px"};E.useEffect(()=>{u()},[o.value,o.defaultValue,u]);const d=m=>{n==null||n(m),u()},f=m=>{l.current=m,m&&u()};return _.jsx(zC,{ref:f,onChange:d,className:Te("overflow-y-scroll",t?"resize-none":"",e),...o})},FC=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null);E.useImperativeHandle(n,()=>a.current);const o=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()},u=r.value??((d=a.current)==null?void 0:d.value)??r.defaultValue??"";return _.jsx(UC,{value:u,onCancel:l,onSave:o,onClick:f=>{f.preventDefault(),f.stopPropagation()},children:_.jsx(mb,{className:"leading-6",ref:a,onClick:f=>{f.preventDefault(),f.stopPropagation()},...r})})},mU=mr("focus:ring-ring inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-offset-2",{variants:{color:{primary:"border-primary bg-primary text-primary hover:bg-primary-500",secondary:"border-secondary bg-secondary text-secondary hover:bg-secondary-300",destructive:"border-destructive bg-destructive text-destructive hover:bg-destructive-500",neutral:"border-neutral bg-neutral text-neutral hover:bg-neutral-600",light:"border-white bg-white text-white hover:bg-neutral-500",dark:"border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900",text:"border-text bg-text text-text hover:opacity-80",custom:""},variant:{default:"rounded-lg text-text-opposite",none:"border-none bg-opacity-0 text-inherit hover:bg-opacity-0",outline:"rounded-lg border-[1.5px] bg-opacity-0 hover:bg-opacity-30",hoverable:"rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10"}},defaultVariants:{variant:"default",color:"primary"}}),pU=({className:e,variant:t,color:n,...r})=>_.jsx("div",{className:Te(mU({variant:t,color:n}),e),...r});var gU=yM.useId||(()=>{}),yU=0;function fr(e){const[t,n]=E.useState(gU());return yn(()=>{n(r=>r??String(yU++))},[e]),t?`radix-${t}`:""}var Pg="focusScope.autoFocusOnMount",Vg="focusScope.autoFocusOnUnmount",gA={bubbles:!1,cancelable:!0},vU="FocusScope",pb=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=E.useState(null),f=Kn(a),m=Kn(o),g=E.useRef(null),y=Nt(t,S=>d(S)),b=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let S=function(R){if(b.paused||!u)return;const D=R.target;u.contains(D)?g.current=D:ua(g.current,{select:!0})},A=function(R){if(b.paused||!u)return;const D=R.relatedTarget;D!==null&&(u.contains(D)||ua(g.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(const N of R)N.removedNodes.length>0&&ua(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",A);const T=new MutationObserver(w);return u&&T.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",A),T.disconnect()}}},[r,u,b.paused]),E.useEffect(()=>{if(u){vA.add(b);const S=document.activeElement;if(!u.contains(S)){const w=new CustomEvent(Pg,gA);u.addEventListener(Pg,f),u.dispatchEvent(w),w.defaultPrevented||(bU(AU(GC(u)),{select:!0}),document.activeElement===S&&ua(u))}return()=>{u.removeEventListener(Pg,f),setTimeout(()=>{const w=new CustomEvent(Vg,gA);u.addEventListener(Vg,m),u.dispatchEvent(w),w.defaultPrevented||ua(S??document.body,{select:!0}),u.removeEventListener(Vg,m),vA.remove(b)},0)}}},[u,f,m,b]);const v=E.useCallback(S=>{if(!n&&!r||b.paused)return;const A=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(A&&w){const T=S.currentTarget,[R,D]=_U(T);R&&D?!S.shiftKey&&w===D?(S.preventDefault(),n&&ua(R,{select:!0})):S.shiftKey&&w===R&&(S.preventDefault(),n&&ua(D,{select:!0})):w===T&&S.preventDefault()}},[n,r,b.paused]);return _.jsx(tt.div,{tabIndex:-1,...l,ref:y,onKeyDown:v})});pb.displayName=vU;function bU(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ua(r,{select:t}),document.activeElement!==n)return}function _U(e){const t=GC(e),n=yA(t,e),r=yA(t.reverse(),e);return[n,r]}function GC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yA(e,t){for(const n of e)if(!xU(n,{upTo:t}))return n}function xU(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function EU(e){return e instanceof HTMLInputElement&&"select"in e}function ua(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&EU(e)&&t&&e.select()}}var vA=SU();function SU(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=bA(e,t),e.unshift(t)},remove(t){var n;e=bA(e,t),(n=e[0])==null||n.resume()}}}function bA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function AU(e){return e.filter(t=>t.tagName!=="A")}var Bg=0;function $C(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_A()),document.body.insertAdjacentElement("beforeend",e[1]??_A()),Bg++,()=>{Bg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bg--}},[])}function _A(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Vr=function(){return Vr=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Vr.apply(this,arguments)};function qC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function wU(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Sf="right-scroll-bar-position",Af="width-before-scroll-bar",TU="with-scroll-bars-hidden",CU="--removed-body-scroll-bar-size";function zg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function RU(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var NU=typeof window<"u"?E.useLayoutEffect:E.useEffect,xA=new WeakMap;function OU(e,t){var n=RU(null,function(r){return e.forEach(function(a){return zg(a,r)})});return NU(function(){var r=xA.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(u){o.has(u)||zg(u,null)}),o.forEach(function(u){a.has(u)||zg(u,l)})}xA.set(n,e)},[e]),n}function kU(e){return e}function DU(e,t){t===void 0&&(t=kU);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var m=l;l=[],m.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return a}function IU(e){e===void 0&&(e={});var t=DU(null);return t.options=Vr({async:!0,ssr:!1},e),t}var KC=function(e){var t=e.sideCar,n=qC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Vr({},n))};KC.isSideCarExport=!0;function LU(e,t){return e.useMedium(t),KC}var WC=IU(),Ug=function(){},jh=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:Ug,onWheelCapture:Ug,onTouchMoveCapture:Ug}),a=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,g=e.shards,y=e.sideCar,b=e.noIsolation,v=e.inert,S=e.allowPinchZoom,A=e.as,w=A===void 0?"div":A,T=e.gapMode,R=qC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=y,N=OU([n,t]),k=Vr(Vr({},R),a);return E.createElement(E.Fragment,null,m&&E.createElement(D,{sideCar:WC,removeScrollBar:f,shards:g,noIsolation:b,inert:v,setCallbacks:o,allowPinchZoom:!!S,lockRef:n,gapMode:T}),l?E.cloneElement(E.Children.only(u),Vr(Vr({},k),{ref:N})):E.createElement(w,Vr({},k,{className:d,ref:N}),u))});jh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jh.classNames={fullWidth:Af,zeroRight:Sf};var MU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=MU();return t&&e.setAttribute("nonce",t),e}function PU(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function VU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var BU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jU())&&(PU(t,n),VU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zU=function(){var e=BU();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},YC=function(){var e=zU(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},UU={left:0,top:0,right:0,gap:0},Hg=function(e){return parseInt(e||"",10)||0},HU=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Hg(n),Hg(r),Hg(a)]},FU=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return UU;var t=HU(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},GU=YC(),Oo="data-scroll-locked",$U=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
219
- .`.concat(TU,` {
220
- overflow: hidden `).concat(r,`;
221
- padding-right: `).concat(u,"px ").concat(r,`;
222
- }
223
- body[`).concat(Oo,`] {
224
- overflow: hidden `).concat(r,`;
225
- overscroll-behavior: contain;
226
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
227
- padding-left: `.concat(a,`px;
228
- padding-top: `).concat(o,`px;
229
- padding-right: `).concat(l,`px;
230
- margin-left:0;
231
- margin-top:0;
232
- margin-right: `).concat(u,"px ").concat(r,`;
233
- `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
234
- }
235
-
236
- .`).concat(Sf,` {
237
- right: `).concat(u,"px ").concat(r,`;
238
- }
239
-
240
- .`).concat(Af,` {
241
- margin-right: `).concat(u,"px ").concat(r,`;
242
- }
243
-
244
- .`).concat(Sf," .").concat(Sf,` {
245
- right: 0 `).concat(r,`;
246
- }
247
-
248
- .`).concat(Af," .").concat(Af,` {
249
- margin-right: 0 `).concat(r,`;
250
- }
251
-
252
- body[`).concat(Oo,`] {
253
- `).concat(CU,": ").concat(u,`px;
254
- }
255
- `)},EA=function(){var e=parseInt(document.body.getAttribute(Oo)||"0",10);return isFinite(e)?e:0},qU=function(){E.useEffect(function(){return document.body.setAttribute(Oo,(EA()+1).toString()),function(){var e=EA()-1;e<=0?document.body.removeAttribute(Oo):document.body.setAttribute(Oo,e.toString())}},[])},KU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;qU();var o=E.useMemo(function(){return FU(a)},[a]);return E.createElement(GU,{styles:$U(o,!t,a,n?"":"!important")})},zy=!1;if(typeof window<"u")try{var Qd=Object.defineProperty({},"passive",{get:function(){return zy=!0,!0}});window.addEventListener("test",Qd,Qd),window.removeEventListener("test",Qd,Qd)}catch{zy=!1}var po=zy?{passive:!1}:!1,WU=function(e){return e.tagName==="TEXTAREA"},ZC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!WU(e)&&n[t]==="visible")},YU=function(e){return ZC(e,"overflowY")},ZU=function(e){return ZC(e,"overflowX")},SA=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=XC(e,r);if(a){var o=QC(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},XU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},QU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},XC=function(e,t){return e==="v"?YU(t):ZU(t)},QC=function(e,t){return e==="v"?XU(t):QU(t)},JU=function(e,t){return e==="h"&&t==="rtl"?-1:1},eH=function(e,t,n,r,a){var o=JU(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),f=!1,m=l>0,g=0,y=0;do{var b=QC(e,u),v=b[0],S=b[1],A=b[2],w=S-A-o*v;(v||w)&&XC(e,u)&&(g+=w,y+=v),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(y)<1)&&(f=!0),f},Jd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},AA=function(e){return[e.deltaX,e.deltaY]},wA=function(e){return e&&"current"in e?e.current:e},tH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nH=function(e){return`
256
- .block-interactivity-`.concat(e,` {pointer-events: none;}
257
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
258
- `)},rH=0,go=[];function iH(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),a=E.useState(rH++)[0],o=E.useState(YC)[0],l=E.useRef(e);E.useEffect(function(){l.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=wU([e.lockRef.current],(e.shards||[]).map(wA),!0).filter(Boolean);return S.forEach(function(A){return A.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=E.useCallback(function(S,A){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var w=Jd(S),T=n.current,R="deltaX"in S?S.deltaX:T[0]-w[0],D="deltaY"in S?S.deltaY:T[1]-w[1],N,k=S.target,I=Math.abs(R)>Math.abs(D)?"h":"v";if("touches"in S&&I==="h"&&k.type==="range")return!1;var P=SA(I,k);if(!P)return!0;if(P?N=I:(N=I==="v"?"h":"v",P=SA(I,k)),!P)return!1;if(!r.current&&"changedTouches"in S&&(R||D)&&(r.current=N),!N)return!0;var V=r.current||N;return eH(V,A,S,V==="h"?R:D)},[]),d=E.useCallback(function(S){var A=S;if(!(!go.length||go[go.length-1]!==o)){var w="deltaY"in A?AA(A):Jd(A),T=t.current.filter(function(N){return N.name===A.type&&(N.target===A.target||A.target===N.shadowParent)&&tH(N.delta,w)})[0];if(T&&T.should){A.cancelable&&A.preventDefault();return}if(!T){var R=(l.current.shards||[]).map(wA).filter(Boolean).filter(function(N){return N.contains(A.target)}),D=R.length>0?u(A,R[0]):!l.current.noIsolation;D&&A.cancelable&&A.preventDefault()}}},[]),f=E.useCallback(function(S,A,w,T){var R={name:S,delta:A,target:w,should:T,shadowParent:aH(w)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(D){return D!==R})},1)},[]),m=E.useCallback(function(S){n.current=Jd(S),r.current=void 0},[]),g=E.useCallback(function(S){f(S.type,AA(S),S.target,u(S,e.lockRef.current))},[]),y=E.useCallback(function(S){f(S.type,Jd(S),S.target,u(S,e.lockRef.current))},[]);E.useEffect(function(){return go.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",d,po),document.addEventListener("touchmove",d,po),document.addEventListener("touchstart",m,po),function(){go=go.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,po),document.removeEventListener("touchmove",d,po),document.removeEventListener("touchstart",m,po)}},[]);var b=e.removeScrollBar,v=e.inert;return E.createElement(E.Fragment,null,v?E.createElement(o,{styles:nH(a)}):null,b?E.createElement(KU,{gapMode:e.gapMode}):null)}function aH(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sH=LU(WC,iH);var gb=E.forwardRef(function(e,t){return E.createElement(jh,Vr({},e,{ref:t,sideCar:sH}))});gb.classNames=jh.classNames;var oH=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yo=new WeakMap,ef=new WeakMap,tf={},Fg=0,JC=function(e){return e&&(e.host||JC(e.parentNode))},lH=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=JC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},cH=function(e,t,n,r){var a=lH(t,Array.isArray(e)?e:[e]);tf[n]||(tf[n]=new WeakMap);var o=tf[n],l=[],u=new Set,d=new Set(a),f=function(g){!g||u.has(g)||(u.add(g),f(g.parentNode))};a.forEach(f);var m=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(y){if(u.has(y))m(y);else try{var b=y.getAttribute(r),v=b!==null&&b!=="false",S=(yo.get(y)||0)+1,A=(o.get(y)||0)+1;yo.set(y,S),o.set(y,A),l.push(y),S===1&&v&&ef.set(y,!0),A===1&&y.setAttribute(n,"true"),v||y.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",y,w)}})};return m(t),u.clear(),Fg++,function(){l.forEach(function(g){var y=yo.get(g)-1,b=o.get(g)-1;yo.set(g,y),o.set(g,b),y||(ef.has(g)||g.removeAttribute(r),ef.delete(g)),b||g.removeAttribute(n)}),Fg--,Fg||(yo=new WeakMap,yo=new WeakMap,ef=new WeakMap,tf={})}},eR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=oH(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),cH(r,a,n,"aria-hidden")):function(){return null}},yb="Dialog",[tR,HQ]=vu(yb),[uH,Rr]=tR(yb),nR=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,u=E.useRef(null),d=E.useRef(null),[f=!1,m]=Pf({prop:r,defaultProp:a,onChange:o});return _.jsx(uH,{scope:t,triggerRef:u,contentRef:d,contentId:fr(),titleId:fr(),descriptionId:fr(),open:f,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(g=>!g),[m]),modal:l,children:n})};nR.displayName=yb;var rR="DialogTrigger",dH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(rR,n),o=Nt(t,a.triggerRef);return _.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":_b(a.open),...r,ref:o,onClick:lt(e.onClick,a.onOpenToggle)})});dH.displayName=rR;var vb="DialogPortal",[fH,iR]=tR(vb,{forceMount:void 0}),aR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Rr(vb,t);return _.jsx(fH,{scope:t,forceMount:n,children:E.Children.map(r,l=>_.jsx(bu,{present:n||o.open,children:_.jsx(Oh,{asChild:!0,container:a,children:l})}))})};aR.displayName=vb;var Hf="DialogOverlay",sR=E.forwardRef((e,t)=>{const n=iR(Hf,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Rr(Hf,e.__scopeDialog);return o.modal?_.jsx(bu,{present:r||o.open,children:_.jsx(hH,{...a,ref:t})}):null});sR.displayName=Hf;var hH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(Hf,n);return _.jsx(gb,{as:ps,allowPinchZoom:!0,shards:[a.contentRef],children:_.jsx(tt.div,{"data-state":_b(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gs="DialogContent",oR=E.forwardRef((e,t)=>{const n=iR(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Rr(gs,e.__scopeDialog);return _.jsx(bu,{present:r||o.open,children:o.modal?_.jsx(mH,{...a,ref:t}):_.jsx(pH,{...a,ref:t})})});oR.displayName=gs;var mH=E.forwardRef((e,t)=>{const n=Rr(gs,e.__scopeDialog),r=E.useRef(null),a=Nt(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return eR(o)},[]),_.jsx(lR,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:lt(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:lt(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:lt(e.onFocusOutside,o=>o.preventDefault())})}),pH=E.forwardRef((e,t)=>{const n=Rr(gs,e.__scopeDialog),r=E.useRef(!1),a=E.useRef(!1);return _.jsx(lR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),lR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,u=Rr(gs,n),d=E.useRef(null),f=Nt(t,d);return $C(),_.jsxs(_.Fragment,{children:[_.jsx(pb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:_.jsx(Nh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":_b(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),_.jsxs(_.Fragment,{children:[_.jsx(bH,{titleId:u.titleId}),_.jsx(xH,{contentRef:d,descriptionId:u.descriptionId})]})]})}),bb="DialogTitle",gH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(bb,n);return _.jsx(tt.h2,{id:a.titleId,...r,ref:t})});gH.displayName=bb;var cR="DialogDescription",yH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(cR,n);return _.jsx(tt.p,{id:a.descriptionId,...r,ref:t})});yH.displayName=cR;var uR="DialogClose",vH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(uR,n);return _.jsx(tt.button,{type:"button",...r,ref:t,onClick:lt(e.onClick,()=>a.onOpenChange(!1))})});vH.displayName=uR;function _b(e){return e?"open":"closed"}var dR="DialogTitleWarning",[FQ,fR]=_z(dR,{contentName:gs,titleName:bb,docsSlug:"dialog"}),bH=({titleId:e})=>{const t=fR(dR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
259
-
260
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
261
-
262
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_H="DialogDescriptionWarning",xH=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fR(_H).contentName}}.`;return E.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},EH=nR,SH=aR,AH=sR,wH=oR,TA=1,TH=.9,CH=.8,RH=.17,Gg=.1,$g=.999,NH=.9999,OH=.99,kH=/[\\\/_+.#"@\[\(\{&]/,DH=/[\\\/_+.#"@\[\(\{&]/g,IH=/[\s-]/,hR=/[\s-]/g;function Uy(e,t,n,r,a,o,l){if(o===t.length)return a===e.length?TA:OH;var u=`${a},${o}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(o),f=n.indexOf(d,a),m=0,g,y,b,v;f>=0;)g=Uy(e,t,n,r,f+1,o+1,l),g>m&&(f===a?g*=TA:kH.test(e.charAt(f-1))?(g*=CH,b=e.slice(a,f-1).match(DH),b&&a>0&&(g*=Math.pow($g,b.length))):IH.test(e.charAt(f-1))?(g*=TH,v=e.slice(a,f-1).match(hR),v&&a>0&&(g*=Math.pow($g,v.length))):(g*=RH,a>0&&(g*=Math.pow($g,f-a))),e.charAt(f)!==t.charAt(o)&&(g*=NH)),(g<Gg&&n.charAt(f-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(f-1)!==r.charAt(o))&&(y=Uy(e,t,n,r,f+1,o+2,l),y*Gg>g&&(g=y*Gg)),g>m&&(m=g),f=n.indexOf(d,f+1);return l[u]=m,m}function CA(e){return e.toLowerCase().replace(hR," ")}function LH(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Uy(e,t,CA(e),CA(t),0,0,{})}var MH=Z1(),dc='[cmdk-group=""]',qg='[cmdk-group-items=""]',jH='[cmdk-group-heading=""]',xb='[cmdk-item=""]',RA=`${xb}:not([aria-disabled="true"])`,Hy="cmdk-item-select",as="data-value",PH=(e,t,n)=>LH(e,t,n),mR=E.createContext(void 0),xu=()=>E.useContext(mR),pR=E.createContext(void 0),Eb=()=>E.useContext(pR),gR=E.createContext(void 0),yR=E.forwardRef((e,t)=>{let n=bo(()=>{var F,ie;return{search:"",value:(ie=(F=e.value)!=null?F:e.defaultValue)!=null?ie:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=bo(()=>new Set),a=bo(()=>new Map),o=bo(()=>new Map),l=bo(()=>new Set),u=vR(e),{label:d,children:f,value:m,onValueChange:g,filter:y,shouldFilter:b,loop:v,disablePointerSelection:S=!1,vimBindings:A=!0,...w}=e,T=fr(),R=fr(),D=fr(),N=E.useRef(null),k=WH();ys(()=>{if(m!==void 0){let F=m.trim();n.current.value=F,I.emit()}},[m]),ys(()=>{k(6,ue)},[]);let I=E.useMemo(()=>({subscribe:F=>(l.current.add(F),()=>l.current.delete(F)),snapshot:()=>n.current,setState:(F,ie,re)=>{var de,ye,ge;if(!Object.is(n.current[F],ie)){if(n.current[F]=ie,F==="search")te(),H(),k(1,fe);else if(F==="value"&&(re||k(5,ue),((de=u.current)==null?void 0:de.value)!==void 0)){let we=ie??"";(ge=(ye=u.current).onValueChange)==null||ge.call(ye,we);return}I.emit()}},emit:()=>{l.current.forEach(F=>F())}}),[]),P=E.useMemo(()=>({value:(F,ie,re)=>{var de;ie!==((de=o.current.get(F))==null?void 0:de.value)&&(o.current.set(F,{value:ie,keywords:re}),n.current.filtered.items.set(F,V(ie,re)),k(2,()=>{H(),I.emit()}))},item:(F,ie)=>(r.current.add(F),ie&&(a.current.has(ie)?a.current.get(ie).add(F):a.current.set(ie,new Set([F]))),k(3,()=>{te(),H(),n.current.value||fe(),I.emit()}),()=>{o.current.delete(F),r.current.delete(F),n.current.filtered.items.delete(F);let re=Y();k(4,()=>{te(),(re==null?void 0:re.getAttribute("id"))===F&&fe(),I.emit()})}),group:F=>(a.current.has(F)||a.current.set(F,new Set),()=>{o.current.delete(F),a.current.delete(F)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:T,inputId:D,labelId:R,listInnerRef:N}),[]);function V(F,ie){var re,de;let ye=(de=(re=u.current)==null?void 0:re.filter)!=null?de:PH;return F?ye(F,n.current.search,ie):0}function H(){if(!n.current.search||u.current.shouldFilter===!1)return;let F=n.current.filtered.items,ie=[];n.current.filtered.groups.forEach(de=>{let ye=a.current.get(de),ge=0;ye.forEach(we=>{let He=F.get(we);ge=Math.max(He,ge)}),ie.push([de,ge])});let re=N.current;J().sort((de,ye)=>{var ge,we;let He=de.getAttribute("id"),Me=ye.getAttribute("id");return((ge=F.get(Me))!=null?ge:0)-((we=F.get(He))!=null?we:0)}).forEach(de=>{let ye=de.closest(qg);ye?ye.appendChild(de.parentElement===ye?de:de.closest(`${qg} > *`)):re.appendChild(de.parentElement===re?de:de.closest(`${qg} > *`))}),ie.sort((de,ye)=>ye[1]-de[1]).forEach(de=>{var ye;let ge=(ye=N.current)==null?void 0:ye.querySelector(`${dc}[${as}="${encodeURIComponent(de[0])}"]`);ge==null||ge.parentElement.appendChild(ge)})}function fe(){let F=J().find(re=>re.getAttribute("aria-disabled")!=="true"),ie=F==null?void 0:F.getAttribute(as);I.setState("value",ie||void 0)}function te(){var F,ie,re,de;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ye=0;for(let ge of r.current){let we=(ie=(F=o.current.get(ge))==null?void 0:F.value)!=null?ie:"",He=(de=(re=o.current.get(ge))==null?void 0:re.keywords)!=null?de:[],Me=V(we,He);n.current.filtered.items.set(ge,Me),Me>0&&ye++}for(let[ge,we]of a.current)for(let He of we)if(n.current.filtered.items.get(He)>0){n.current.filtered.groups.add(ge);break}n.current.filtered.count=ye}function ue(){var F,ie,re;let de=Y();de&&(((F=de.parentElement)==null?void 0:F.firstChild)===de&&((re=(ie=de.closest(dc))==null?void 0:ie.querySelector(jH))==null||re.scrollIntoView({block:"nearest"})),de.scrollIntoView({block:"nearest"}))}function Y(){var F;return(F=N.current)==null?void 0:F.querySelector(`${xb}[aria-selected="true"]`)}function J(){var F;return Array.from(((F=N.current)==null?void 0:F.querySelectorAll(RA))||[])}function U(F){let ie=J()[F];ie&&I.setState("value",ie.getAttribute(as))}function ne(F){var ie;let re=Y(),de=J(),ye=de.findIndex(we=>we===re),ge=de[ye+F];(ie=u.current)!=null&&ie.loop&&(ge=ye+F<0?de[de.length-1]:ye+F===de.length?de[0]:de[ye+F]),ge&&I.setState("value",ge.getAttribute(as))}function ee(F){let ie=Y(),re=ie==null?void 0:ie.closest(dc),de;for(;re&&!de;)re=F>0?qH(re,dc):KH(re,dc),de=re==null?void 0:re.querySelector(RA);de?I.setState("value",de.getAttribute(as)):ne(F)}let ve=()=>U(J().length-1),j=F=>{F.preventDefault(),F.metaKey?ve():F.altKey?ee(1):ne(1)},W=F=>{F.preventDefault(),F.metaKey?U(0):F.altKey?ee(-1):ne(-1)};return E.createElement(tt.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:F=>{var ie;if((ie=w.onKeyDown)==null||ie.call(w,F),!F.defaultPrevented)switch(F.key){case"n":case"j":{A&&F.ctrlKey&&j(F);break}case"ArrowDown":{j(F);break}case"p":case"k":{A&&F.ctrlKey&&W(F);break}case"ArrowUp":{W(F);break}case"Home":{F.preventDefault(),U(0);break}case"End":{F.preventDefault(),ve();break}case"Enter":if(!F.nativeEvent.isComposing&&F.keyCode!==229){F.preventDefault();let re=Y();if(re){let de=new Event(Hy);re.dispatchEvent(de)}}}}},E.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:ZH},d),Ph(e,F=>E.createElement(pR.Provider,{value:I},E.createElement(mR.Provider,{value:P},F))))}),VH=E.forwardRef((e,t)=>{var n,r;let a=fr(),o=E.useRef(null),l=E.useContext(gR),u=xu(),d=vR(e),f=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;ys(()=>{if(!f)return u.item(a,l==null?void 0:l.id)},[f]);let m=bR(a,o,[e.value,e.children,o],e.keywords),g=Eb(),y=vs(k=>k.value&&k.value===m.current),b=vs(k=>f||u.filter()===!1?!0:k.search?k.filtered.items.get(a)>0:!0);E.useEffect(()=>{let k=o.current;if(!(!k||e.disabled))return k.addEventListener(Hy,v),()=>k.removeEventListener(Hy,v)},[b,e.onSelect,e.disabled]);function v(){var k,I;S(),(I=(k=d.current).onSelect)==null||I.call(k,m.current)}function S(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:A,value:w,onSelect:T,forceMount:R,keywords:D,...N}=e;return E.createElement(tt.div,{ref:Mc([o,t]),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!y,"data-disabled":!!A,"data-selected":!!y,onPointerMove:A||u.getDisablePointerSelection()?void 0:S,onClick:A?void 0:v},e.children)}),BH=E.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,l=fr(),u=E.useRef(null),d=E.useRef(null),f=fr(),m=xu(),g=vs(b=>a||m.filter()===!1?!0:b.search?b.filtered.groups.has(l):!0);ys(()=>m.group(l),[]),bR(l,u,[e.value,e.heading,d]);let y=E.useMemo(()=>({id:l,forceMount:a}),[a]);return E.createElement(tt.div,{ref:Mc([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&E.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Ph(e,b=>E.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},E.createElement(gR.Provider,{value:y},b))))}),zH=E.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=E.useRef(null),o=vs(l=>!l.search);return!n&&!o?null:E.createElement(tt.div,{ref:Mc([a,t]),...r,"cmdk-separator":"",role:"separator"})}),UH=E.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=Eb(),l=vs(m=>m.search),u=vs(m=>m.value),d=xu(),f=E.useMemo(()=>{var m;let g=(m=d.listInnerRef.current)==null?void 0:m.querySelector(`${xb}[${as}="${encodeURIComponent(u)}"]`);return g==null?void 0:g.getAttribute("id")},[]);return E.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),E.createElement(tt.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":f,id:d.inputId,type:"text",value:a?e.value:l,onChange:m=>{a||o.setState("search",m.target.value),n==null||n(m.target.value)}})}),HH=E.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=E.useRef(null),l=E.useRef(null),u=xu();return E.useEffect(()=>{if(l.current&&o.current){let d=l.current,f=o.current,m,g=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let y=d.offsetHeight;f.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(m),g.unobserve(d)}}},[]),E.createElement(tt.div,{ref:Mc([o,t]),...a,"cmdk-list":"",role:"listbox","aria-label":r,id:u.listId},Ph(e,d=>E.createElement("div",{ref:Mc([l,u.listInnerRef]),"cmdk-list-sizer":""},d)))}),FH=E.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:l,...u}=e;return E.createElement(EH,{open:n,onOpenChange:r},E.createElement(SH,{container:l},E.createElement(AH,{"cmdk-overlay":"",className:a}),E.createElement(wH,{"aria-label":e.label,"cmdk-dialog":"",className:o},E.createElement(yR,{ref:t,...u}))))}),GH=E.forwardRef((e,t)=>vs(n=>n.filtered.count===0)?E.createElement(tt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),$H=E.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return E.createElement(tt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Ph(e,l=>E.createElement("div",{"aria-hidden":!0},l)))}),Eu=Object.assign(yR,{List:HH,Item:VH,Input:UH,Group:BH,Separator:zH,Dialog:FH,Empty:GH,Loading:$H});function qH(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function KH(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function vR(e){let t=E.useRef(e);return ys(()=>{t.current=e}),t}var ys=typeof window>"u"?E.useEffect:E.useLayoutEffect;function bo(e){let t=E.useRef();return t.current===void 0&&(t.current=e()),t}function Mc(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function vs(e){let t=Eb(),n=()=>e(t.snapshot());return MH.useSyncExternalStore(t.subscribe,n,n)}function bR(e,t,n,r=[]){let a=E.useRef(),o=xu();return ys(()=>{var l;let u=(()=>{var f;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),d=r.map(f=>f.trim());o.value(e,u,d),(l=t.current)==null||l.setAttribute(as,u),a.current=u}),a}var WH=()=>{let[e,t]=E.useState(),n=bo(()=>new Map);return ys(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function YH(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ph({asChild:e,children:t},n){return e&&E.isValidElement(t)?E.cloneElement(YH(t),{ref:t.ref},n(t.props.children)):n(t)}var ZH={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const _R=({className:e,...t})=>_.jsx(Eu,{className:Te("flex size-full flex-col overflow-hidden rounded-md",e),...t}),XH=({className:e,...t})=>_.jsxs("div",{className:"flex w-full items-center","cmdk-input-wrapper":"",children:[_.jsx(nB,{className:"mr-2 size-4 shrink-0 opacity-50"}),_.jsx(Eu.Input,{className:Te("placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),QH=({className:e,...t})=>_.jsx(Eu.List,{className:Te("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),JH=e=>_.jsx(Eu.Empty,{className:"py-6 text-center text-sm",...e}),eF=({className:e,...t})=>_.jsx(Eu.Item,{className:Te("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}),Ff={..._R,Input:XH,List:QH,Empty:JH,Item:eF},xR=E.createContext(null),Vh=()=>{const e=E.useContext(xR);if(!e)throw new Error("useMultiSelect must be used within MultiSelectProvider");return e},tF=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:a,children:o,dir:l,...u})=>{const[d,f]=E.useState(t??[]),[m,g]=E.useState(""),[y,b]=E.useState(!1),[v,S]=E.useState(-1),A=E.useRef(null),[w,T]=E.useState(!1),[R,D]=E.useState("");E.useEffect(()=>{e&&f(e)},[e]);const N=E.useCallback(V=>{if(d.includes(V)){const H=d.filter(fe=>fe!==V);f(H),n==null||n(H)}else{const H=[...d,V];f(H),n==null||n(H)}},[d]),k=E.useCallback(V=>{V.preventDefault();const H=V.currentTarget,fe=H.value.substring(H.selectionStart??0,H.selectionEnd??0);D(fe),T(fe===m)},[m]),I=E.useCallback(V=>{V.stopPropagation();const H=A.current;if(!H)return;const fe=()=>{const Y=v+1;S(Y>d.length-1?r?0:-1:Y)},te=()=>{const Y=v-1;S(Y<0?d.length-1:Y)},ue=()=>{const Y=v-1<=0?d.length-1===0?-1:0:v-1;S(Y)};switch(V.key){case"ArrowLeft":l==="rtl"?d.length>0&&(v!==-1||r)&&fe():d.length>0&&H.selectionStart===0&&te();break;case"ArrowRight":l==="rtl"?d.length>0&&H.selectionStart===0&&te():d.length>0&&(v!==-1||r)&&fe();break;case"Backspace":case"Delete":d.length>0&&(v!==-1&&v<d.length?(N(d[v]),ue()):(H.selectionStart===0&&R===m||w)&&N(d[d.length-1]));break;case"Enter":b(!0);break;case"Escape":v!==-1?S(-1):y&&b(!1);break}},[d,m,v,r]),P=E.useMemo(()=>({value:d,onValueChange:N,open:y,setOpen:b,inputValue:m,setInputValue:g,activeIndex:v,setActiveIndex:S,ref:A,handleSelect:k}),[d,N,y,b,m,g,v,S,A,k]);return _.jsx(xR,{value:P,children:_.jsx(_R,{onKeyDown:I,className:Te("flex w-full flex-col gap-2 overflow-visible bg-transparent",a),dir:l,...u,children:o})})},nF=({className:e,getBadgeValue:t=o=>o,validationStyleEnabled:n=!1,children:r,...a})=>{const{value:o,onValueChange:l,activeIndex:u}=Vh(),d=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]);return _.jsxs("div",{className:Te("flex w-full flex-col gap-3 rounded-lg p-1 py-2","border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",n&&"valid:border-success invalid:border-error",e),...a,children:[o.length>0&&_.jsx("div",{className:"flex w-full flex-wrap gap-1",children:o.map((f,m)=>_.jsxs(pU,{className:Te("flex items-center gap-1 rounded-xl px-1",u===m&&"ring-muted-foreground ring-2"),color:"text",children:[_.jsx("span",{className:"text-xs",children:t(f)}),_.jsxs("button",{"aria-label":`Remove ${f} option`,"aria-roledescription":"button to remove option",onMouseDown:d,onClick:()=>l(f),children:[_.jsxs("span",{className:"sr-only",children:["Remove ",f," option"]}),_.jsx(Ts,{className:"size-4 cursor-pointer"})]})]},f))}),r]})},rF=({className:e,...t})=>{const{setOpen:n,inputValue:r,setInputValue:a,activeIndex:o,setActiveIndex:l,handleSelect:u,ref:d}=Vh();return _.jsx(Ff.Input,{...t,tabIndex:0,ref:d,value:r,onValueChange:o===-1?a:void 0,onSelect:u,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>l(-1),className:Te("outline-hidden ml-2 flex-1 cursor-pointer",e,o!==-1&&"caret-transparent")})},iF=({children:e})=>{const{open:t}=Vh();return _.jsx("div",{className:"relative",children:t&&e})},aF=({className:e,children:t})=>_.jsxs(Ff.List,{className:Te("border-muted bg-input-background absolute top-0 z-10 flex w-full flex-col gap-2 rounded-lg border p-2 shadow-md transition-colors",e),children:[t,_.jsx(Ff.Empty,{children:_.jsx("span",{className:"text-muted-foreground",children:"No results found"})})]}),sF=({className:e,value:t,children:n,...r})=>{const{value:a,onValueChange:o,setInputValue:l}=Vh(),u=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]),d=a.includes(t);return _.jsxs(Ff.Item,{...r,onSelect:()=>{o(t),l("")},className:Te("flex cursor-pointer justify-between rounded-lg px-2 py-1 transition-colors","hover:bg-neutral/10",e,d&&"opacity-50",r.disabled&&"cursor-not-allowed opacity-50"),onMouseDown:u,children:[n,d&&_.jsx(Zo,{className:"size-4"})]})},mn=tF;mn.Trigger=nF;mn.Input=rF;mn.Content=iF;mn.List=aF;mn.Item=sF;const oF=({className:e,children:t,...n})=>_.jsxs("i",{className:Te("text-xs text-neutral-400",e),...n,children:["ⓘ ",t]}),Fy=({htmlFor:e,...t})=>_.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",htmlFor:e,...t}),lF=({className:e,...t})=>{const{error:n,formItemId:r}=Ta();return _.jsx(Fy,{className:Te("mb-2",n&&"text-error",e),htmlFor:r,...t})},cF=({isRequired:e})=>e?_.jsx("span",{"aria-label":"Asterisk meaning the field is required",children:"*"}):_.jsx(_.Fragment,{}),ER=({children:e,isRequired:t,info:n,htmlFor:r,className:a})=>_.jsxs("div",{className:"ml-1 flex gap-1 align-middle text-base leading-none",children:[e&&_.jsxs(lF,{htmlFor:r,id:`${r}-label`,className:Rh("font-bold",a),children:[e,_.jsx(cF,{isRequired:t})]}),n&&_.jsx(oF,{content:n})]});function NA(e,[t,n]){return Math.min(n,Math.max(t,e))}var uF=E.createContext(void 0);function dF(e){const t=E.useContext(uF);return e||t||"ltr"}const fF=["top","right","bottom","left"],ma=Math.min,Hn=Math.max,Gf=Math.round,nf=Math.floor,Hr=e=>({x:e,y:e}),hF={left:"right",right:"left",bottom:"top",top:"bottom"},mF={start:"end",end:"start"};function Gy(e,t,n){return Hn(e,ma(t,n))}function Ni(e,t){return typeof e=="function"?e(t):e}function Oi(e){return e.split("-")[0]}function el(e){return e.split("-")[1]}function Sb(e){return e==="x"?"y":"x"}function Ab(e){return e==="y"?"height":"width"}function pa(e){return["top","bottom"].includes(Oi(e))?"y":"x"}function wb(e){return Sb(pa(e))}function pF(e,t,n){n===void 0&&(n=!1);const r=el(e),a=wb(e),o=Ab(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=$f(l)),[l,$f(l)]}function gF(e){const t=$f(e);return[$y(e),t,$y(t)]}function $y(e){return e.replace(/start|end/g,t=>mF[t])}function yF(e,t,n){const r=["left","right"],a=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?o:l;default:return[]}}function vF(e,t,n,r){const a=el(e);let o=yF(Oi(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map($y)))),o}function $f(e){return e.replace(/left|right|bottom|top/g,t=>hF[t])}function bF(e){return{top:0,right:0,bottom:0,left:0,...e}}function SR(e){return typeof e!="number"?bF(e):{top:e,right:e,bottom:e,left:e}}function qf(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function OA(e,t,n){let{reference:r,floating:a}=e;const o=pa(t),l=wb(t),u=Ab(l),d=Oi(t),f=o==="y",m=r.x+r.width/2-a.width/2,g=r.y+r.height/2-a.height/2,y=r[u]/2-a[u]/2;let b;switch(d){case"top":b={x:m,y:r.y-a.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-a.width,y:g};break;default:b={x:r.x,y:r.y}}switch(el(t)){case"start":b[l]-=y*(n&&f?-1:1);break;case"end":b[l]+=y*(n&&f?-1:1);break}return b}const _F=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=OA(f,r,d),y=r,b={},v=0;for(let S=0;S<u.length;S++){const{name:A,fn:w}=u[S],{x:T,y:R,data:D,reset:N}=await w({x:m,y:g,initialPlacement:r,placement:y,strategy:a,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});m=T??m,g=R??g,b={...b,[A]:{...b[A],...D}},N&&v<=50&&(v++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:m,y:g}=OA(f,y,d)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:b}};async function jc(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:b=0}=Ni(t,e),v=SR(b),A=u[y?g==="floating"?"reference":"floating":g],w=qf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(A)))==null||n?A:A.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),T=g==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),D=await(o.isElement==null?void 0:o.isElement(R))?await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1}:{x:1,y:1},N=qf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:T,offsetParent:R,strategy:d}):T);return{top:(w.top-N.top+v.top)/D.y,bottom:(N.bottom-w.bottom+v.bottom)/D.y,left:(w.left-N.left+v.left)/D.x,right:(N.right-w.right+v.right)/D.x}}const xF=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Ni(e,t)||{};if(f==null)return{};const g=SR(m),y={x:n,y:r},b=wb(a),v=Ab(b),S=await l.getDimensions(f),A=b==="y",w=A?"top":"left",T=A?"bottom":"right",R=A?"clientHeight":"clientWidth",D=o.reference[v]+o.reference[b]-y[b]-o.floating[v],N=y[b]-o.reference[b],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let I=k?k[R]:0;(!I||!await(l.isElement==null?void 0:l.isElement(k)))&&(I=u.floating[R]||o.floating[v]);const P=D/2-N/2,V=I/2-S[v]/2-1,H=ma(g[w],V),fe=ma(g[T],V),te=H,ue=I-S[v]-fe,Y=I/2-S[v]/2+P,J=Gy(te,Y,ue),U=!d.arrow&&el(a)!=null&&Y!==J&&o.reference[v]/2-(Y<te?H:fe)-S[v]/2<0,ne=U?Y<te?Y-te:Y-ue:0;return{[b]:y[b]+ne,data:{[b]:J,centerOffset:Y-J-ne,...U&&{alignmentOffset:ne}},reset:U}}}),EF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0,...A}=Ni(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Oi(a),T=pa(u),R=Oi(u)===u,D=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=y||(R||!S?[$f(u)]:gF(u)),k=v!=="none";!y&&k&&N.push(...vF(u,S,v,D));const I=[u,...N],P=await jc(t,A),V=[];let H=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&V.push(P[w]),g){const Y=pF(a,l,D);V.push(P[Y[0]],P[Y[1]])}if(H=[...H,{placement:a,overflows:V}],!V.every(Y=>Y<=0)){var fe,te;const Y=(((fe=o.flip)==null?void 0:fe.index)||0)+1,J=I[Y];if(J)return{data:{index:Y,overflows:H},reset:{placement:J}};let U=(te=H.filter(ne=>ne.overflows[0]<=0).sort((ne,ee)=>ne.overflows[1]-ee.overflows[1])[0])==null?void 0:te.placement;if(!U)switch(b){case"bestFit":{var ue;const ne=(ue=H.filter(ee=>{if(k){const ve=pa(ee.placement);return ve===T||ve==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ve=>ve>0).reduce((ve,j)=>ve+j,0)]).sort((ee,ve)=>ee[1]-ve[1])[0])==null?void 0:ue[0];ne&&(U=ne);break}case"initialPlacement":U=u;break}if(a!==U)return{reset:{placement:U}}}return{}}}};function kA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function DA(e){return fF.some(t=>e[t]>=0)}const SF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Ni(e,t);switch(r){case"referenceHidden":{const o=await jc(t,{...a,elementContext:"reference"}),l=kA(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:DA(l)}}}case"escaped":{const o=await jc(t,{...a,altBoundary:!0}),l=kA(o,n.floating);return{data:{escapedOffsets:l,escaped:DA(l)}}}default:return{}}}}};async function AF(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Oi(n),u=el(n),d=pa(n)==="y",f=["left","top"].includes(l)?-1:1,m=o&&d?-1:1,g=Ni(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:v}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof v=="number"&&(b=u==="end"?v*-1:v),d?{x:b*m,y:y*f}:{x:y*f,y:b*m}}const wF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:u}=t,d=await AF(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:l}}}}},TF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:w,y:T}=A;return{x:w,y:T}}},...d}=Ni(e,t),f={x:n,y:r},m=await jc(t,d),g=pa(Oi(a)),y=Sb(g);let b=f[y],v=f[g];if(o){const A=y==="y"?"top":"left",w=y==="y"?"bottom":"right",T=b+m[A],R=b-m[w];b=Gy(T,b,R)}if(l){const A=g==="y"?"top":"left",w=g==="y"?"bottom":"right",T=v+m[A],R=v-m[w];v=Gy(T,v,R)}const S=u.fn({...t,[y]:b,[g]:v});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:o,[g]:l}}}}}},CF=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ni(e,t),m={x:n,y:r},g=pa(a),y=Sb(g);let b=m[y],v=m[g];const S=Ni(u,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const R=y==="y"?"height":"width",D=o.reference[y]-o.floating[R]+A.mainAxis,N=o.reference[y]+o.reference[R]-A.mainAxis;b<D?b=D:b>N&&(b=N)}if(f){var w,T;const R=y==="y"?"width":"height",D=["top","left"].includes(Oi(a)),N=o.reference[g]-o.floating[R]+(D&&((w=l.offset)==null?void 0:w[g])||0)+(D?0:A.crossAxis),k=o.reference[g]+o.reference[R]+(D?0:((T=l.offset)==null?void 0:T[g])||0)-(D?A.crossAxis:0);v<N?v=N:v>k&&(v=k)}return{[y]:b,[g]:v}}}},RF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Ni(e,t),m=await jc(t,f),g=Oi(a),y=el(a),b=pa(a)==="y",{width:v,height:S}=o.floating;let A,w;g==="top"||g==="bottom"?(A=g,w=y===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(w=g,A=y==="end"?"top":"bottom");const T=S-m.top-m.bottom,R=v-m.left-m.right,D=ma(S-m[A],T),N=ma(v-m[w],R),k=!t.middlewareData.shift;let I=D,P=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=T),k&&!y){const H=Hn(m.left,0),fe=Hn(m.right,0),te=Hn(m.top,0),ue=Hn(m.bottom,0);b?P=v-2*(H!==0||fe!==0?H+fe:Hn(m.left,m.right)):I=S-2*(te!==0||ue!==0?te+ue:Hn(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:I});const V=await l.getDimensions(u.floating);return v!==V.width||S!==V.height?{reset:{rects:!0}}:{}}}};function Bh(){return typeof window<"u"}function tl(e){return AR(e)?(e.nodeName||"").toLowerCase():"#document"}function Gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jr(e){var t;return(t=(AR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AR(e){return Bh()?e instanceof Node||e instanceof Gn(e).Node:!1}function wr(e){return Bh()?e instanceof Element||e instanceof Gn(e).Element:!1}function Kr(e){return Bh()?e instanceof HTMLElement||e instanceof Gn(e).HTMLElement:!1}function IA(e){return!Bh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gn(e).ShadowRoot}function Su(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function NF(e){return["table","td","th"].includes(tl(e))}function zh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Tb(e){const t=Cb(),n=wr(e)?Tr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function OF(e){let t=ga(e);for(;Kr(t)&&!Po(t);){if(Tb(t))return t;if(zh(t))return null;t=ga(t)}return null}function Cb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Po(e){return["html","body","#document"].includes(tl(e))}function Tr(e){return Gn(e).getComputedStyle(e)}function Uh(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ga(e){if(tl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||IA(e)&&e.host||Jr(e);return IA(t)?t.host:t}function wR(e){const t=ga(e);return Po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&Su(t)?t:wR(t)}function Pc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=wR(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=Gn(a);if(o){const u=qy(l);return t.concat(l,l.visualViewport||[],Su(a)?a:[],u&&n?Pc(u):[])}return t.concat(a,Pc(a,[],n))}function qy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function TR(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Kr(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Gf(n)!==o||Gf(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function Rb(e){return wr(e)?e:e.contextElement}function ko(e){const t=Rb(e);if(!Kr(t))return Hr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=TR(t);let l=(o?Gf(n.width):n.width)/r,u=(o?Gf(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const kF=Hr(0);function CR(e){const t=Gn(e);return!Cb()||!t.visualViewport?kF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function DF(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gn(e)?!1:t}function bs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=Rb(e);let l=Hr(1);t&&(r?wr(r)&&(l=ko(r)):l=ko(e));const u=DF(o,n,r)?CR(o):Hr(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,g=a.height/l.y;if(o){const y=Gn(o),b=r&&wr(r)?Gn(r):r;let v=y,S=qy(v);for(;S&&r&&b!==v;){const A=ko(S),w=S.getBoundingClientRect(),T=Tr(S),R=w.left+(S.clientLeft+parseFloat(T.paddingLeft))*A.x,D=w.top+(S.clientTop+parseFloat(T.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,g*=A.y,d+=R,f+=D,v=Gn(S),S=qy(v)}}return qf({width:m,height:g,x:d,y:f})}function Nb(e,t){const n=Uh(e).scrollLeft;return t?t.left+n:bs(Jr(e)).left+n}function RR(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:Nb(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function IF(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=Jr(r),u=t?zh(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},f=Hr(1);const m=Hr(0),g=Kr(r);if((g||!g&&!o)&&((tl(r)!=="body"||Su(l))&&(d=Uh(r)),Kr(r))){const b=bs(r);f=ko(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const y=l&&!g&&!o?RR(l,d,!0):Hr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+y.x,y:n.y*f.y-d.scrollTop*f.y+m.y+y.y}}function LF(e){return Array.from(e.getClientRects())}function MF(e){const t=Jr(e),n=Uh(e),r=e.ownerDocument.body,a=Hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Nb(e);const u=-n.scrollTop;return Tr(r).direction==="rtl"&&(l+=Hn(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:u}}function jF(e,t){const n=Gn(e),r=Jr(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){o=a.width,l=a.height;const f=Cb();(!f||f&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}return{width:o,height:l,x:u,y:d}}function PF(e,t){const n=bs(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Kr(e)?ko(e):Hr(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=a*o.x,f=r*o.y;return{width:l,height:u,x:d,y:f}}function LA(e,t,n){let r;if(t==="viewport")r=jF(e,n);else if(t==="document")r=MF(Jr(e));else if(wr(t))r=PF(t,n);else{const a=CR(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return qf(r)}function NR(e,t){const n=ga(e);return n===t||!wr(n)||Po(n)?!1:Tr(n).position==="fixed"||NR(n,t)}function VF(e,t){const n=t.get(e);if(n)return n;let r=Pc(e,[],!1).filter(u=>wr(u)&&tl(u)!=="body"),a=null;const o=Tr(e).position==="fixed";let l=o?ga(e):e;for(;wr(l)&&!Po(l);){const u=Tr(l),d=Tb(l);!d&&u.position==="fixed"&&(a=null),(o?!d&&!a:!d&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Su(l)&&!d&&NR(e,l))?r=r.filter(m=>m!==l):a=u,l=ga(l)}return t.set(e,r),r}function BF(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?zh(t)?[]:VF(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const g=LA(t,m,a);return f.top=Hn(g.top,f.top),f.right=ma(g.right,f.right),f.bottom=ma(g.bottom,f.bottom),f.left=Hn(g.left,f.left),f},LA(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function zF(e){const{width:t,height:n}=TR(e);return{width:t,height:n}}function UF(e,t,n){const r=Kr(t),a=Jr(t),o=n==="fixed",l=bs(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=Hr(0);if(r||!r&&!o)if((tl(t)!=="body"||Su(a))&&(u=Uh(t)),r){const y=bs(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else a&&(d.x=Nb(a));const f=a&&!r&&!o?RR(a,u):Hr(0),m=l.left+u.scrollLeft-d.x-f.x,g=l.top+u.scrollTop-d.y-f.y;return{x:m,y:g,width:l.width,height:l.height}}function Kg(e){return Tr(e).position==="static"}function MA(e,t){if(!Kr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jr(e)===n&&(n=n.ownerDocument.body),n}function OR(e,t){const n=Gn(e);if(zh(e))return n;if(!Kr(e)){let a=ga(e);for(;a&&!Po(a);){if(wr(a)&&!Kg(a))return a;a=ga(a)}return n}let r=MA(e,t);for(;r&&NF(r)&&Kg(r);)r=MA(r,t);return r&&Po(r)&&Kg(r)&&!Tb(r)?n:r||OF(e)||n}const HF=async function(e){const t=this.getOffsetParent||OR,n=this.getDimensions,r=await n(e.floating);return{reference:UF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function FF(e){return Tr(e).direction==="rtl"}const GF={convertOffsetParentRelativeRectToViewportRelativeRect:IF,getDocumentElement:Jr,getClippingRect:BF,getOffsetParent:OR,getElementRects:HF,getClientRects:LF,getDimensions:zF,getScale:ko,isElement:wr,isRTL:FF};function kR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $F(e,t){let n=null,r;const a=Jr(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),o();const f=e.getBoundingClientRect(),{left:m,top:g,width:y,height:b}=f;if(u||t(),!y||!b)return;const v=nf(g),S=nf(a.clientWidth-(m+y)),A=nf(a.clientHeight-(g+b)),w=nf(m),R={rootMargin:-v+"px "+-S+"px "+-A+"px "+-w+"px",threshold:Hn(0,ma(1,d))||1};let D=!0;function N(k){const I=k[0].intersectionRatio;if(I!==d){if(!D)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!kR(f,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...R,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,R)}n.observe(e)}return l(!0),o}function qF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Rb(e),m=a||o?[...f?Pc(f):[],...Pc(t)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const g=f&&u?$F(f,n):null;let y=-1,b=null;l&&(b=new ResizeObserver(w=>{let[T]=w;T&&T.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let v,S=d?bs(e):null;d&&A();function A(){const w=bs(e);S&&!kR(S,w)&&n(),S=w,v=requestAnimationFrame(A)}return n(),()=>{var w;m.forEach(T=>{a&&T.removeEventListener("scroll",n),o&&T.removeEventListener("resize",n)}),g==null||g(),(w=b)==null||w.disconnect(),b=null,d&&cancelAnimationFrame(v)}}const KF=wF,WF=TF,YF=EF,ZF=RF,XF=SF,jA=xF,QF=CF,JF=(e,t,n)=>{const r=new Map,a={platform:GF,...n},o={...a.platform,_c:r};return _F(e,t,{...a,platform:o})};var wf=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Kf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Kf(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Kf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function DR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PA(e,t){const n=DR(e);return Math.round(t*n)/n}function Wg(e){const t=E.useRef(e);return wf(()=>{t.current=e}),t}function e4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,g]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=E.useState(r);Kf(y,r)||b(r);const[v,S]=E.useState(null),[A,w]=E.useState(null),T=E.useCallback(ee=>{ee!==k.current&&(k.current=ee,S(ee))},[]),R=E.useCallback(ee=>{ee!==I.current&&(I.current=ee,w(ee))},[]),D=o||v,N=l||A,k=E.useRef(null),I=E.useRef(null),P=E.useRef(m),V=d!=null,H=Wg(d),fe=Wg(a),te=Wg(f),ue=E.useCallback(()=>{if(!k.current||!I.current)return;const ee={placement:t,strategy:n,middleware:y};fe.current&&(ee.platform=fe.current),JF(k.current,I.current,ee).then(ve=>{const j={...ve,isPositioned:te.current!==!1};Y.current&&!Kf(P.current,j)&&(P.current=j,ws.flushSync(()=>{g(j)}))})},[y,t,n,fe,te]);wf(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(ee=>({...ee,isPositioned:!1})))},[f]);const Y=E.useRef(!1);wf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),wf(()=>{if(D&&(k.current=D),N&&(I.current=N),D&&N){if(H.current)return H.current(D,N,ue);ue()}},[D,N,ue,H,V]);const J=E.useMemo(()=>({reference:k,floating:I,setReference:T,setFloating:R}),[T,R]),U=E.useMemo(()=>({reference:D,floating:N}),[D,N]),ne=E.useMemo(()=>{const ee={position:n,left:0,top:0};if(!U.floating)return ee;const ve=PA(U.floating,m.x),j=PA(U.floating,m.y);return u?{...ee,transform:"translate("+ve+"px, "+j+"px)",...DR(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:j}},[n,u,U.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:ue,refs:J,elements:U,floatingStyles:ne}),[m,ue,J,U,ne])}const t4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jA({element:r.current,padding:a}).fn(n):{}:r?jA({element:r,padding:a}).fn(n):{}}}},n4=(e,t)=>({...KF(e),options:[e,t]}),r4=(e,t)=>({...WF(e),options:[e,t]}),i4=(e,t)=>({...QF(e),options:[e,t]}),a4=(e,t)=>({...YF(e),options:[e,t]}),s4=(e,t)=>({...ZF(e),options:[e,t]}),o4=(e,t)=>({...XF(e),options:[e,t]}),l4=(e,t)=>({...t4(e),options:[e,t]});var c4="Arrow",IR=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return _.jsx(tt.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});IR.displayName=c4;var u4=IR;function d4(e){const[t,n]=E.useState(void 0);return yn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ob="Popper",[LR,MR]=vu(Ob),[f4,jR]=LR(Ob),PR=e=>{const{__scopePopper:t,children:n}=e,[r,a]=E.useState(null);return _.jsx(f4,{scope:t,anchor:r,onAnchorChange:a,children:n})};PR.displayName=Ob;var VR="PopperAnchor",BR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=jR(VR,n),l=E.useRef(null),u=Nt(t,l);return E.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:_.jsx(tt.div,{...a,ref:u})});BR.displayName=VR;var kb="PopperContent",[h4,m4]=LR(kb),zR=E.forwardRef((e,t)=>{var ge,we,He,Me,Ke,at;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:v,...S}=e,A=jR(kb,n),[w,T]=E.useState(null),R=Nt(t,Et=>T(Et)),[D,N]=E.useState(null),k=d4(D),I=(k==null?void 0:k.width)??0,P=(k==null?void 0:k.height)??0,V=r+(o!=="center"?"-"+o:""),H=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},fe=Array.isArray(f)?f:[f],te=fe.length>0,ue={padding:H,boundary:fe.filter(g4),altBoundary:te},{refs:Y,floatingStyles:J,placement:U,isPositioned:ne,middlewareData:ee}=e4({strategy:"fixed",placement:V,whileElementsMounted:(...Et)=>qF(...Et,{animationFrame:b==="always"}),elements:{reference:A.anchor},middleware:[n4({mainAxis:a+P,alignmentAxis:l}),d&&r4({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?i4():void 0,...ue}),d&&a4({...ue}),s4({...ue,apply:({elements:Et,rects:Yt,availableWidth:pr,availableHeight:Dn})=>{const{width:Nr,height:z}=Yt.reference,X=Et.floating.style;X.setProperty("--radix-popper-available-width",`${pr}px`),X.setProperty("--radix-popper-available-height",`${Dn}px`),X.setProperty("--radix-popper-anchor-width",`${Nr}px`),X.setProperty("--radix-popper-anchor-height",`${z}px`)}}),D&&l4({element:D,padding:u}),y4({arrowWidth:I,arrowHeight:P}),y&&o4({strategy:"referenceHidden",...ue})]}),[ve,j]=FR(U),W=Kn(v);yn(()=>{ne&&(W==null||W())},[ne,W]);const F=(ge=ee.arrow)==null?void 0:ge.x,ie=(we=ee.arrow)==null?void 0:we.y,re=((He=ee.arrow)==null?void 0:He.centerOffset)!==0,[de,ye]=E.useState();return yn(()=>{w&&ye(window.getComputedStyle(w).zIndex)},[w]),_.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ne?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(Me=ee.transformOrigin)==null?void 0:Me.x,(Ke=ee.transformOrigin)==null?void 0:Ke.y].join(" "),...((at=ee.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(h4,{scope:n,placedSide:ve,onArrowChange:N,arrowX:F,arrowY:ie,shouldHideArrow:re,children:_.jsx(tt.div,{"data-side":ve,"data-align":j,...S,ref:R,style:{...S.style,animation:ne?void 0:"none"}})})})});zR.displayName=kb;var UR="PopperArrow",p4={top:"bottom",right:"left",bottom:"top",left:"right"},HR=E.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=m4(UR,r),l=p4[o.placedSide];return _.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:_.jsx(u4,{...a,ref:n,style:{...a.style,display:"block"}})})});HR.displayName=UR;function g4(e){return e!==null}var y4=e=>({name:"transformOrigin",options:e,fn(t){var A,w,T;const{placement:n,rects:r,middlewareData:a}=t,l=((A=a.arrow)==null?void 0:A.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=FR(n),g={start:"0%",center:"50%",end:"100%"}[m],y=(((w=a.arrow)==null?void 0:w.x)??0)+u/2,b=(((T=a.arrow)==null?void 0:T.y)??0)+d/2;let v="",S="";return f==="bottom"?(v=l?g:`${y}px`,S=`${-d}px`):f==="top"?(v=l?g:`${y}px`,S=`${r.floating.height+d}px`):f==="right"?(v=`${-d}px`,S=l?g:`${b}px`):f==="left"&&(v=`${r.floating.width+d}px`,S=l?g:`${b}px`),{data:{x:v,y:S}}}});function FR(e){const[t,n="center"]=e.split("-");return[t,n]}var v4=PR,b4=BR,_4=zR,x4=HR;function E4(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var S4=[" ","Enter","ArrowUp","ArrowDown"],A4=[" ","Enter"],Au="Select",[Hh,Fh,w4]=tC(Au),[nl,GQ]=vu(Au,[w4,MR]),Gh=MR(),[T4,Ca]=nl(Au),[C4,R4]=nl(Au),GR=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:g,disabled:y,required:b,form:v}=e,S=Gh(t),[A,w]=E.useState(null),[T,R]=E.useState(null),[D,N]=E.useState(!1),k=dF(f),[I=!1,P]=Pf({prop:r,defaultProp:a,onChange:o}),[V,H]=Pf({prop:l,defaultProp:u,onChange:d}),fe=E.useRef(null),te=A?v||!!A.closest("form"):!0,[ue,Y]=E.useState(new Set),J=Array.from(ue).map(U=>U.props.value).join(";");return _.jsx(v4,{...S,children:_.jsxs(T4,{required:b,scope:t,trigger:A,onTriggerChange:w,valueNode:T,onValueNodeChange:R,valueNodeHasChildren:D,onValueNodeHasChildrenChange:N,contentId:fr(),value:V,onValueChange:H,open:I,onOpenChange:P,dir:k,triggerPointerDownPosRef:fe,disabled:y,children:[_.jsx(Hh.Provider,{scope:t,children:_.jsx(C4,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(U=>{Y(ne=>new Set(ne).add(U))},[]),onNativeOptionRemove:E.useCallback(U=>{Y(ne=>{const ee=new Set(ne);return ee.delete(U),ee})},[]),children:n})}),te?_.jsxs(gN,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:g,value:V,onChange:U=>H(U.target.value),disabled:y,form:v,children:[V===void 0?_.jsx("option",{value:""}):null,Array.from(ue)]},J):null]})})};GR.displayName=Au;var $R="SelectTrigger",qR=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Gh(n),l=Ca($R,n),u=l.disabled||r,d=Nt(t,l.onTriggerChange),f=Fh(n),m=E.useRef("touch"),[g,y,b]=yN(S=>{const A=f().filter(R=>!R.disabled),w=A.find(R=>R.value===l.value),T=vN(A,S,w);T!==void 0&&l.onValueChange(T.value)}),v=S=>{u||(l.onOpenChange(!0),b()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return _.jsx(b4,{asChild:!0,...o,children:_.jsx(tt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":pN(l.value)?"":void 0,...a,ref:d,onClick:lt(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&v(S)}),onPointerDown:lt(a.onPointerDown,S=>{m.current=S.pointerType;const A=S.target;A.hasPointerCapture(S.pointerId)&&A.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(v(S),S.preventDefault())}),onKeyDown:lt(a.onKeyDown,S=>{const A=g.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&y(S.key),!(A&&S.key===" ")&&S4.includes(S.key)&&(v(),S.preventDefault())})})})});qR.displayName=$R;var KR="SelectValue",WR=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...u}=e,d=Ca(KR,n),{onValueNodeHasChildrenChange:f}=d,m=o!==void 0,g=Nt(t,d.onValueNodeChange);return yn(()=>{f(m)},[f,m]),_.jsx(tt.span,{...u,ref:g,style:{pointerEvents:"none"},children:pN(d.value)?_.jsx(_.Fragment,{children:l}):o})});WR.displayName=KR;var N4="SelectIcon",YR=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return _.jsx(tt.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});YR.displayName=N4;var O4="SelectPortal",ZR=e=>_.jsx(Oh,{asChild:!0,...e});ZR.displayName=O4;var _s="SelectContent",XR=E.forwardRef((e,t)=>{const n=Ca(_s,e.__scopeSelect),[r,a]=E.useState();if(yn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?ws.createPortal(_.jsx(QR,{scope:e.__scopeSelect,children:_.jsx(Hh.Slot,{scope:e.__scopeSelect,children:_.jsx("div",{children:e.children})})}),o):null}return _.jsx(JR,{...e,ref:t})});XR.displayName=_s;var _r=10,[QR,Ra]=nl(_s),k4="SelectContentImpl",JR=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:v,hideWhenDetached:S,avoidCollisions:A,...w}=e,T=Ca(_s,n),[R,D]=E.useState(null),[N,k]=E.useState(null),I=Nt(t,ge=>D(ge)),[P,V]=E.useState(null),[H,fe]=E.useState(null),te=Fh(n),[ue,Y]=E.useState(!1),J=E.useRef(!1);E.useEffect(()=>{if(R)return eR(R)},[R]),$C();const U=E.useCallback(ge=>{const[we,...He]=te().map(at=>at.ref.current),[Me]=He.slice(-1),Ke=document.activeElement;for(const at of ge)if(at===Ke||(at==null||at.scrollIntoView({block:"nearest"}),at===we&&N&&(N.scrollTop=0),at===Me&&N&&(N.scrollTop=N.scrollHeight),at==null||at.focus(),document.activeElement!==Ke))return},[te,N]),ne=E.useCallback(()=>U([P,R]),[U,P,R]);E.useEffect(()=>{ue&&ne()},[ue,ne]);const{onOpenChange:ee,triggerPointerDownPosRef:ve}=T;E.useEffect(()=>{if(R){let ge={x:0,y:0};const we=Me=>{var Ke,at;ge={x:Math.abs(Math.round(Me.pageX)-(((Ke=ve.current)==null?void 0:Ke.x)??0)),y:Math.abs(Math.round(Me.pageY)-(((at=ve.current)==null?void 0:at.y)??0))}},He=Me=>{ge.x<=10&&ge.y<=10?Me.preventDefault():R.contains(Me.target)||ee(!1),document.removeEventListener("pointermove",we),ve.current=null};return ve.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",He,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",He,{capture:!0})}}},[R,ee,ve]),E.useEffect(()=>{const ge=()=>ee(!1);return window.addEventListener("blur",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("blur",ge),window.removeEventListener("resize",ge)}},[ee]);const[j,W]=yN(ge=>{const we=te().filter(Ke=>!Ke.disabled),He=we.find(Ke=>Ke.ref.current===document.activeElement),Me=vN(we,ge,He);Me&&setTimeout(()=>Me.ref.current.focus())}),F=E.useCallback((ge,we,He)=>{const Me=!J.current&&!He;(T.value!==void 0&&T.value===we||Me)&&(V(ge),Me&&(J.current=!0))},[T.value]),ie=E.useCallback(()=>R==null?void 0:R.focus(),[R]),re=E.useCallback((ge,we,He)=>{const Me=!J.current&&!He;(T.value!==void 0&&T.value===we||Me)&&fe(ge)},[T.value]),de=r==="popper"?Ky:eN,ye=de===Ky?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:v,hideWhenDetached:S,avoidCollisions:A}:{};return _.jsx(QR,{scope:n,content:R,viewport:N,onViewportChange:k,itemRefCallback:F,selectedItem:P,onItemLeave:ie,itemTextRefCallback:re,focusSelectedItem:ne,selectedItemText:H,position:r,isPositioned:ue,searchRef:j,children:_.jsx(gb,{as:ps,allowPinchZoom:!0,children:_.jsx(pb,{asChild:!0,trapped:T.open,onMountAutoFocus:ge=>{ge.preventDefault()},onUnmountAutoFocus:lt(a,ge=>{var we;(we=T.trigger)==null||we.focus({preventScroll:!0}),ge.preventDefault()}),children:_.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:ge=>ge.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:_.jsx(de,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:ge=>ge.preventDefault(),...w,...ye,onPlaced:()=>Y(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:lt(w.onKeyDown,ge=>{const we=ge.ctrlKey||ge.altKey||ge.metaKey;if(ge.key==="Tab"&&ge.preventDefault(),!we&&ge.key.length===1&&W(ge.key),["ArrowUp","ArrowDown","Home","End"].includes(ge.key)){let Me=te().filter(Ke=>!Ke.disabled).map(Ke=>Ke.ref.current);if(["ArrowUp","End"].includes(ge.key)&&(Me=Me.slice().reverse()),["ArrowUp","ArrowDown"].includes(ge.key)){const Ke=ge.target,at=Me.indexOf(Ke);Me=Me.slice(at+1)}setTimeout(()=>U(Me)),ge.preventDefault()}})})})})})})});JR.displayName=k4;var D4="SelectItemAlignedPosition",eN=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Ca(_s,n),l=Ra(_s,n),[u,d]=E.useState(null),[f,m]=E.useState(null),g=Nt(t,I=>m(I)),y=Fh(n),b=E.useRef(!1),v=E.useRef(!0),{viewport:S,selectedItem:A,selectedItemText:w,focusSelectedItem:T}=l,R=E.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&f&&S&&A&&w){const I=o.trigger.getBoundingClientRect(),P=f.getBoundingClientRect(),V=o.valueNode.getBoundingClientRect(),H=w.getBoundingClientRect();if(o.dir!=="rtl"){const Ke=H.left-P.left,at=V.left-Ke,Et=I.left-at,Yt=I.width+Et,pr=Math.max(Yt,P.width),Dn=window.innerWidth-_r,Nr=NA(at,[_r,Math.max(_r,Dn-pr)]);u.style.minWidth=Yt+"px",u.style.left=Nr+"px"}else{const Ke=P.right-H.right,at=window.innerWidth-V.right-Ke,Et=window.innerWidth-I.right-at,Yt=I.width+Et,pr=Math.max(Yt,P.width),Dn=window.innerWidth-_r,Nr=NA(at,[_r,Math.max(_r,Dn-pr)]);u.style.minWidth=Yt+"px",u.style.right=Nr+"px"}const fe=y(),te=window.innerHeight-_r*2,ue=S.scrollHeight,Y=window.getComputedStyle(f),J=parseInt(Y.borderTopWidth,10),U=parseInt(Y.paddingTop,10),ne=parseInt(Y.borderBottomWidth,10),ee=parseInt(Y.paddingBottom,10),ve=J+U+ue+ee+ne,j=Math.min(A.offsetHeight*5,ve),W=window.getComputedStyle(S),F=parseInt(W.paddingTop,10),ie=parseInt(W.paddingBottom,10),re=I.top+I.height/2-_r,de=te-re,ye=A.offsetHeight/2,ge=A.offsetTop+ye,we=J+U+ge,He=ve-we;if(we<=re){const Ke=fe.length>0&&A===fe[fe.length-1].ref.current;u.style.bottom="0px";const at=f.clientHeight-S.offsetTop-S.offsetHeight,Et=Math.max(de,ye+(Ke?ie:0)+at+ne),Yt=we+Et;u.style.height=Yt+"px"}else{const Ke=fe.length>0&&A===fe[0].ref.current;u.style.top="0px";const Et=Math.max(re,J+S.offsetTop+(Ke?F:0)+ye)+He;u.style.height=Et+"px",S.scrollTop=we-re+S.offsetTop}u.style.margin=`${_r}px 0`,u.style.minHeight=j+"px",u.style.maxHeight=te+"px",r==null||r(),requestAnimationFrame(()=>b.current=!0)}},[y,o.trigger,o.valueNode,u,f,S,A,w,o.dir,r]);yn(()=>R(),[R]);const[D,N]=E.useState();yn(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const k=E.useCallback(I=>{I&&v.current===!0&&(R(),T==null||T(),v.current=!1)},[R,T]);return _.jsx(L4,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:b,onScrollButtonChange:k,children:_.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:_.jsx(tt.div,{...a,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});eN.displayName=D4;var I4="SelectPopperPosition",Ky=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=_r,...o}=e,l=Gh(n);return _.jsx(_4,{...l,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ky.displayName=I4;var[L4,Db]=nl(_s,{}),Wy="SelectViewport",tN=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Ra(Wy,n),l=Db(Wy,n),u=Nt(t,o.onViewportChange),d=E.useRef(0);return _.jsxs(_.Fragment,{children:[_.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),_.jsx(Hh.Slot,{scope:n,children:_.jsx(tt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:lt(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:y}=l;if(y!=null&&y.current&&g){const b=Math.abs(d.current-m.scrollTop);if(b>0){const v=window.innerHeight-_r*2,S=parseFloat(g.style.minHeight),A=parseFloat(g.style.height),w=Math.max(S,A);if(w<v){const T=w+b,R=Math.min(v,T),D=T-R;g.style.height=R+"px",g.style.bottom==="0px"&&(m.scrollTop=D>0?D:0,g.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});tN.displayName=Wy;var nN="SelectGroup",[M4,j4]=nl(nN),rN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=fr();return _.jsx(M4,{scope:n,id:a,children:_.jsx(tt.div,{role:"group","aria-labelledby":a,...r,ref:t})})});rN.displayName=nN;var iN="SelectLabel",aN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=j4(iN,n);return _.jsx(tt.div,{id:a.id,...r,ref:t})});aN.displayName=iN;var Wf="SelectItem",[P4,sN]=nl(Wf),oN=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,u=Ca(Wf,n),d=Ra(Wf,n),f=u.value===r,[m,g]=E.useState(o??""),[y,b]=E.useState(!1),v=Nt(t,T=>{var R;return(R=d.itemRefCallback)==null?void 0:R.call(d,T,r,a)}),S=fr(),A=E.useRef("touch"),w=()=>{a||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return _.jsx(P4,{scope:n,value:r,disabled:a,textId:S,isSelected:f,onItemTextChange:E.useCallback(T=>{g(R=>R||((T==null?void 0:T.textContent)??"").trim())},[]),children:_.jsx(Hh.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:_.jsx(tt.div,{role:"option","aria-labelledby":S,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:v,onFocus:lt(l.onFocus,()=>b(!0)),onBlur:lt(l.onBlur,()=>b(!1)),onClick:lt(l.onClick,()=>{A.current!=="mouse"&&w()}),onPointerUp:lt(l.onPointerUp,()=>{A.current==="mouse"&&w()}),onPointerDown:lt(l.onPointerDown,T=>{A.current=T.pointerType}),onPointerMove:lt(l.onPointerMove,T=>{var R;A.current=T.pointerType,a?(R=d.onItemLeave)==null||R.call(d):A.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:lt(l.onPointerLeave,T=>{var R;T.currentTarget===document.activeElement&&((R=d.onItemLeave)==null||R.call(d))}),onKeyDown:lt(l.onKeyDown,T=>{var D;((D=d.searchRef)==null?void 0:D.current)!==""&&T.key===" "||(A4.includes(T.key)&&w(),T.key===" "&&T.preventDefault())})})})})});oN.displayName=Wf;var gc="SelectItemText",lN=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=Ca(gc,n),u=Ra(gc,n),d=sN(gc,n),f=R4(gc,n),[m,g]=E.useState(null),y=Nt(t,w=>g(w),d.onItemTextChange,w=>{var T;return(T=u.itemTextRefCallback)==null?void 0:T.call(u,w,d.value,d.disabled)}),b=m==null?void 0:m.textContent,v=E.useMemo(()=>_.jsx("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:A}=f;return yn(()=>(S(v),()=>A(v)),[S,A,v]),_.jsxs(_.Fragment,{children:[_.jsx(tt.span,{id:d.textId,...o,ref:y}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ws.createPortal(o.children,l.valueNode):null]})});lN.displayName=gc;var cN="SelectItemIndicator",uN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return sN(cN,n).isSelected?_.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});uN.displayName=cN;var Yy="SelectScrollUpButton",dN=E.forwardRef((e,t)=>{const n=Ra(Yy,e.__scopeSelect),r=Db(Yy,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return yn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?_.jsx(hN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});dN.displayName=Yy;var Zy="SelectScrollDownButton",fN=E.forwardRef((e,t)=>{const n=Ra(Zy,e.__scopeSelect),r=Db(Zy,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return yn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;o(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?_.jsx(hN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});fN.displayName=Zy;var hN=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Ra("SelectScrollButton",n),l=E.useRef(null),u=Fh(n),d=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),yn(()=>{var m;const f=u().find(g=>g.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),_.jsx(tt.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:lt(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:lt(a.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:lt(a.onPointerLeave,()=>{d()})})}),V4="SelectSeparator",mN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});mN.displayName=V4;var Xy="SelectArrow",B4=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Gh(n),o=Ca(Xy,n),l=Ra(Xy,n);return o.open&&l.position==="popper"?_.jsx(x4,{...a,...r,ref:t}):null});B4.displayName=Xy;function pN(e){return e===""||e===void 0}var gN=E.forwardRef((e,t)=>{const{value:n,...r}=e,a=E.useRef(null),o=Nt(t,a),l=E4(n);return E.useEffect(()=>{const u=a.current,d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==n&&m){const g=new Event("change",{bubbles:!0});m.call(u,n),u.dispatchEvent(g)}},[l,n]),_.jsx(kh,{asChild:!0,children:_.jsx("select",{...r,ref:o,defaultValue:n})})});gN.displayName="BubbleSelect";function yN(e){const t=Kn(e),n=E.useRef(""),r=E.useRef(0),a=E.useCallback(l=>{const u=n.current+l;t(u),function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),o=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function vN(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=z4(e,Math.max(o,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function z4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var U4=GR,H4=qR,F4=WR,G4=YR,$4=ZR,q4=XR,K4=tN,W4=rN,Y4=aN,Z4=oN,X4=lN,Q4=uN,J4=dN,e3=fN,t3=mN;const n3=U4,r3=W4,i3=F4,a3=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>_.jsxs(H4,{className:Te("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap rounded-md border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",e&&"valid:border-success invalid:border-error",t),...r,children:[n,_.jsx(G4,{asChild:!0,children:_.jsx(IV,{className:"size-4 opacity-50"})})]}),bN=({className:e,...t})=>_.jsx(J4,{className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:_.jsx(kV,{})}),_N=({className:e,...t})=>_.jsx(e3,{className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:_.jsx(M1,{})}),s3=({className:e,children:t,position:n="popper",...r})=>_.jsx($4,{children:_.jsxs(q4,{className:Te("bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 p-1 text-sm shadow-none outline-0 transition-all","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[_.jsx(bN,{}),_.jsx(K4,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),_.jsx(_N,{})]})}),o3=({className:e,...t})=>_.jsx(Y4,{className:Te("px-1 py-0.5 text-sm font-semibold",e),...t}),l3=({className:e,children:t,...n})=>_.jsxs(Z4,{className:Te("focus:bg-neutral/10 outline-hidden relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[_.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:_.jsx(Q4,{children:_.jsx(Zo,{className:"size-4"})})}),_.jsx(X4,{children:t})]}),c3=({className:e,...t})=>_.jsx(t3,{className:Te("-mx-1 my-1 h-px bg-red-300",e),...t}),je=n3;je.Group=r3;je.Value=i3;je.Trigger=a3;je.ScrollUpButton=bN;je.ScrollDownButton=_N;je.Content=s3;je.Label=o3;je.Item=l3;je.Separator=c3;const u3=e=>(e==null?void 0:e.getAttribute("aria-selected"))==="true",d3=(e,t=u3,n=!1)=>{const[r,a]=E.useState(null),[o,l]=E.useState(null),u=e.current.length;return E.useEffect(()=>{const d=()=>{let S=null;if(o?S=o:S=e.current.find(t)??null,!S){a(T=>({left:0,width:0,...T,opacity:0}));return}const A=S.offsetLeft,w=S.offsetWidth;a({left:A,width:w,opacity:1})};d(),window.addEventListener("resize",d),window.addEventListener("DOMContentLoaded",d);const f=[];e.current.forEach(S=>{if(S){const A=new MutationObserver(w=>{for(const T of w)if(T.type==="attributes"&&T.attributeName==="aria-selected"){d();break}});A.observe(S,{attributes:!0,attributeFilter:["aria-selected"]}),f.push(A)}});const m=[],g=S=>{if(!S)return;const A=new ResizeObserver(()=>{d()});A.observe(S),m.push(A)},y=e.current.find(t)??null;y&&g(y),o&&g(o);const b=S=>{l(S.currentTarget)},v=()=>{l(null)};return n&&e.current.forEach(S=>{S==null||S.addEventListener("mouseenter",b,{passive:!0}),S==null||S.addEventListener("mouseleave",v,{passive:!0})}),()=>{window.removeEventListener("resize",d),window.removeEventListener("DOMContentLoaded",d),f.forEach(S=>S.disconnect()),m.forEach(S=>S.disconnect()),e.current.forEach(S=>{S==null||S.removeEventListener("mouseenter",b),S==null||S.removeEventListener("mouseleave",v)})}},[e,t,o,u]),{choiceIndicatorPosition:r}},f3=[{content:"Off",value:!1},{content:"On",value:!0}],h3=mr("flex flex-row gap-2 rounded-full w-fit border-[1.5px] p-[1.5px]",{variants:{color:{primary:"border-primary text-primary",secondary:"border-secondary text-secondary",destructive:"border-destructive bg-destructive text-destructive",neutral:"border-neutral text-neutral ",light:"border-white text-white",dark:"border-neutral-800 text-neutral-800",text:"border-text text-text"}},defaultVariants:{color:"primary"}}),m3=mr("z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",{variants:{size:{sm:"py-1 px-2 text-xs",md:"p-2 text-sm",lg:"p-4 text-base"}},defaultVariants:{size:"md"}}),p3=mr("absolute top-0 z-[-1] h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none",{variants:{color:{primary:"bg-primary aria-selected:text-text",secondary:"bg-secondary aria-selected:text-text",destructive:"bg-destructive aria-selected:text-text",neutral:"bg-neutral aria-selected:text-white ",light:"bg-white aria-selected:text-black",dark:"bg-neutral-800 aria-selected:text-white",text:"bg-text aria-selected:text-text-opposite"}}}),wu=({choices:e=f3,value:t,defaultValue:n,onChange:r,color:a="primary",size:o="md",className:l})=>{const[u,d]=E.useState(t??n??e[0].value),f=E.useRef([]),m=E.useRef(null),{choiceIndicatorPosition:g}=d3(f),y=b=>{d(b),r==null||r(b)};return E.useEffect(()=>{t!==void 0&&d(t)},[t]),_.jsx("div",{className:h3({color:a,className:l}),role:"tablist",children:_.jsxs("div",{className:"relative flex size-full flex-row items-center justify-center",children:[e.map((b,v)=>{const{content:S,value:A,...w}=b,T=typeof A=="string"||typeof A=="number",R=A===u;return E.createElement("button",{...w,className:Te(m3({size:o})),key:T?A:v,role:"tab",onClick:()=>y(A),"aria-selected":R,disabled:R,ref:D=>{f.current[v]=D}},S)}),g&&_.jsx("div",{className:Te(p3({color:a})),style:g,ref:m})]})})},g3=e=>{const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=Ta();return _.jsx(ps,{id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})},y3=e=>{const{formDescriptionId:t}=Ta();return _.jsx("p",{className:"text-neutral text-sm",id:t,...e})},v3=({children:e,...t})=>{const{error:n,formMessageId:r}=Ta(),a=n?String((n==null?void 0:n.message)??""):e;return a?_.jsx("p",{className:"text-error text-xs font-medium",role:"alert",id:r,...t,children:a}):null},$h=({label:e,description:t,isRequired:n,info:r,children:a,showErrorMessage:o=!0,htmlFor:l})=>_.jsxs(Qe.Item,{className:"flex w-full flex-col gap-2 p-2",children:[(t||e)&&_.jsxs("div",{className:"flex flex-col gap-1 p-1 leading-none",children:[e&&_.jsx(ER,{isRequired:n,info:r,htmlFor:l,children:e}),t&&_.jsx(Qe.Description,{children:t})]}),_.jsx(Qe.Control,{children:a}),o&&_.jsx(Qe.Message,{"data-testid":"error-message"})]}),b3=({field:e,name:t,label:n,Element:r,isRequired:a=!1,info:o,description:l,showErrorMessage:u=!0,...d})=>{const{error:f}=Ta();return _.jsx($h,{htmlFor:t,label:n,description:l,isRequired:a,info:o,showErrorMessage:u,"aria-invalid":!!f,children:_.jsx(r,{"data-testid":"element",id:t,...e,...d,children:d.children})})},Na=e=>{const{control:t}=wa();return _.jsx(Qe.Field,{control:t,name:e.name,render:({field:n})=>_.jsx(b3,{...e,field:n})})},_3=e=>_.jsx(Na,{id:e.name,"data-testid":e.name,Element:Jo,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),x3=({autoComplete:e,...t})=>_.jsx(Na,{Element:hU,id:t.name,"data-testid":t.name,"aria-labelledby":t.label?`${t.name}-label`:void 0,"aria-label":t.label?void 0:t.name,autoComplete:e,minLength:6,maxLength:255,...t}),E3=e=>_.jsx(Na,{Element:zC,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),S3=e=>_.jsx(Na,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:HC,...e}),A3=e=>_.jsx(Na,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:FC,...e}),w3=e=>_.jsx(Na,{Element:mb,id:e.name,"data-testid":e.name,...e}),T3=({inputLabel:e,...t})=>_.jsx(fU,{...t,label:e}),C3=({autoComplete:e,...t})=>_.jsx(Na,{Element:T3,id:t.name,"data-testid":t.name,autoComplete:e,minLength:6,maxLength:255,...t}),R3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=wa();return _.jsx(Qe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ta();return _.jsx($h,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:_.jsx(mn,{onValueChange:f.onChange,values:f.value,...u,children:l})})}})},N3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=wa();return _.jsx(Qe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ta();return _.jsx($h,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:_.jsx(je,{onValueChange:f.onChange,defaultValue:f.value,...u,children:l})})}})},O3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=wa();return _.jsx(Qe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ta();return _.jsx($h,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:_.jsx(wu,{...f,...u,children:l})})}})},Qe=oU;Qe.Description=y3;Qe.Control=g3;Qe.Field=uU;Qe.Item=cU;Qe.Label=ER;Qe.Message=v3;Qe.Element=Na;Qe.Input=_3;Qe.InputPassword=x3;Qe.Checkbox=C3;Qe.TextArea=E3;Qe.AutoSizedTextArea=w3;Qe.Button=gt;Qe.Select=N3;Qe.MultiSelect=R3;Qe.EditableFieldInput=S3;Qe.EditableFieldTextArea=A3;Qe.SwitchSelector=O3;var ut;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const o={};for(const l of a)o[l]=l;return o},e.getValidEnumValues=a=>{const o=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of o)l[u]=a[u];return e.objectValues(l)},e.objectValues=a=>e.objectKeys(a).map(function(o){return a[o]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const o=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&o.push(l);return o},e.find=(a,o)=>{for(const l of a)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function r(a,o=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(ut||(ut={}));var Qy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Qy||(Qy={}));const Ce=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ei=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},pe=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),k3=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class $n extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},a=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof $n))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}$n.create=e=>new $n(e);const Vo=(e,t)=>{let n;switch(e.code){case pe.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case pe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case pe.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case pe.invalid_union:n="Invalid input";break;case pe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case pe.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case pe.invalid_arguments:n="Invalid function arguments";break;case pe.invalid_return_type:n="Invalid function return type";break;case pe.invalid_date:n="Invalid date";break;case pe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case pe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case pe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case pe.custom:n="Invalid input";break;case pe.invalid_intersection_types:n="Intersection results could not be merged";break;case pe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case pe.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let xN=Vo;function D3(e){xN=e}function Yf(){return xN}const Zf=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,o=[...n,...a.path||[]],l={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(l,{data:t,defaultError:u}).message;return{...a,path:o,message:u}},I3=[];function Se(e,t){const n=Yf(),r=Zf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Vo?void 0:Vo].filter(a=>!!a)});e.common.issues.push(r)}class vn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return Ge;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const o=await a.key,l=await a.value;r.push({key:o,value:l})}return vn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:o,value:l}=a;if(o.status==="aborted"||l.status==="aborted")return Ge;o.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[o.value]=l.value)}return{status:t.value,value:r}}}const Ge=Object.freeze({status:"aborted"}),Eo=e=>({status:"dirty",value:e}),An=e=>({status:"valid",value:e}),Jy=e=>e.status==="aborted",ev=e=>e.status==="dirty",xs=e=>e.status==="valid",Vc=e=>typeof Promise<"u"&&e instanceof Promise;function Xf(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function EN(e,t,n,r,a){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ie||(Ie={}));var yc,vc;class Wr{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const VA=(e,t)=>{if(xs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new $n(e.common.issues);return this._error=n,this._error}}};function Ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(l,u)=>{var d,f;const{message:m}=e;return l.code==="invalid_enum_value"?{message:m??u.defaultError}:typeof u.data>"u"?{message:(d=m??r)!==null&&d!==void 0?d:u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:(f=m??n)!==null&&f!==void 0?f:u.defaultError}},description:a}}class Je{get description(){return this._def.description}_getType(t){return Ei(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ei(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new vn,ctx:{common:t.parent.common,data:t.data,parsedType:Ei(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Vc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const a={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ei(t)},o=this._parseSync({data:t,path:a.path,parent:a});return VA(a,o)}"~validate"(t){var n,r;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ei(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:a});return xs(o)?{value:o.value}:{issues:a.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:a}).then(o=>xs(o)?{value:o.value}:{issues:a.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ei(t)},a=this._parse({data:t,path:r.path,parent:r}),o=await(Vc(a)?a:Promise.resolve(a));return VA(r,o)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,o)=>{const l=t(a),u=()=>o.addIssue({code:pe.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new Cr({schema:this,typeName:Ue.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Fr.create(this,this._def)}nullable(){return _a.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ar.create(this)}promise(){return zo.create(this,this._def)}or(t){return Hc.create([this,t],this._def)}and(t){return Fc.create(this,t,this._def)}transform(t){return new Cr({...Ye(this._def),schema:this,typeName:Ue.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Wc({...Ye(this._def),innerType:this,defaultValue:n,typeName:Ue.ZodDefault})}brand(){return new Ib({typeName:Ue.ZodBranded,type:this,...Ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Yc({...Ye(this._def),innerType:this,catchValue:n,typeName:Ue.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Tu.create(this,t)}readonly(){return Zc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const L3=/^c[^\s-]{8,}$/i,M3=/^[0-9a-z]+$/,j3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,P3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,V3=/^[a-z0-9_-]{21}$/i,B3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,z3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,U3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Yg;const F3=/^(?:(?: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])$/,G3=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,$3=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,q3=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,K3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,W3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,SN="((\\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])))",Y3=new RegExp(`^${SN}$`);function AN(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Z3(e){return new RegExp(`^${AN(e)}$`)}function wN(e){let t=`${SN}T${AN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function X3(e,t){return!!((t==="v4"||!t)&&F3.test(e)||(t==="v6"||!t)&&$3.test(e))}function Q3(e,t){if(!B3.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||!a.typ||!a.alg||t&&a.alg!==t)}catch{return!1}}function J3(e,t){return!!((t==="v4"||!t)&&G3.test(e)||(t==="v6"||!t)&&q3.test(e))}class Sr extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const o=this._getOrReturnCtx(t);return Se(o,{code:pe.invalid_type,expected:Ce.string,received:o.parsedType}),Ge}const r=new vn;let a;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=t.data.length>o.value,u=t.data.length<o.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?Se(a,{code:pe.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&Se(a,{code:pe.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")U3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"email",code:pe.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Yg||(Yg=new RegExp(H3,"u")),Yg.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"emoji",code:pe.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")P3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"uuid",code:pe.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")V3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"nanoid",code:pe.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")L3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid",code:pe.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")M3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid2",code:pe.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")j3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ulid",code:pe.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Se(a,{validation:"url",code:pe.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"regex",code:pe.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?wN(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?Y3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Z3(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?z3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"duration",code:pe.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?X3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ip",code:pe.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?Q3(t.data,o.alg)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"jwt",code:pe.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?J3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cidr",code:pe.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?K3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64",code:pe.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?W3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64url",code:pe.invalid_string,message:o.message}),r.dirty()):ut.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:pe.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new Sr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Ie.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ie.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ie.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Sr.create=e=>{var t;return new Sr({checks:[],typeName:Ue.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ye(e)})};function e5(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,o=parseInt(e.toFixed(a).replace(".","")),l=parseInt(t.toFixed(a).replace(".",""));return o%l/Math.pow(10,a)}class ya extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const o=this._getOrReturnCtx(t);return Se(o,{code:pe.invalid_type,expected:Ce.number,received:o.parsedType}),Ge}let r;const a=new vn;for(const o of this._def.checks)o.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?e5(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.not_finite,message:o.message}),a.dirty()):ut.assertNever(o);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,a){return new ya({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(a)}]})}_addCheck(t){return new ya({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ya.create=e=>new ya({checks:[],typeName:Ue.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ye(e)});class va extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let r;const a=new vn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:pe.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):ut.assertNever(o);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Se(n,{code:pe.invalid_type,expected:Ce.bigint,received:n.parsedType}),Ge}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,a){return new va({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(a)}]})}_addCheck(t){return new va({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}va.create=e=>{var t;return new va({checks:[],typeName:Ue.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ye(e)})};class Bc extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return Se(r,{code:pe.invalid_type,expected:Ce.boolean,received:r.parsedType}),Ge}return An(t.data)}}Bc.create=e=>new Bc({typeName:Ue.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ye(e)});class Es extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const o=this._getOrReturnCtx(t);return Se(o,{code:pe.invalid_type,expected:Ce.date,received:o.parsedType}),Ge}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Se(o,{code:pe.invalid_date}),Ge}const r=new vn;let a;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:pe.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ut.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Es({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Es.create=e=>new Es({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ue.ZodDate,...Ye(e)});class Qf extends Je{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return Se(r,{code:pe.invalid_type,expected:Ce.symbol,received:r.parsedType}),Ge}return An(t.data)}}Qf.create=e=>new Qf({typeName:Ue.ZodSymbol,...Ye(e)});class zc extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:pe.invalid_type,expected:Ce.undefined,received:r.parsedType}),Ge}return An(t.data)}}zc.create=e=>new zc({typeName:Ue.ZodUndefined,...Ye(e)});class Uc extends Je{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return Se(r,{code:pe.invalid_type,expected:Ce.null,received:r.parsedType}),Ge}return An(t.data)}}Uc.create=e=>new Uc({typeName:Ue.ZodNull,...Ye(e)});class Bo extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return An(t.data)}}Bo.create=e=>new Bo({typeName:Ue.ZodAny,...Ye(e)});class hs extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return An(t.data)}}hs.create=e=>new hs({typeName:Ue.ZodUnknown,...Ye(e)});class ki extends Je{_parse(t){const n=this._getOrReturnCtx(t);return Se(n,{code:pe.invalid_type,expected:Ce.never,received:n.parsedType}),Ge}}ki.create=e=>new ki({typeName:Ue.ZodNever,...Ye(e)});class Jf extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:pe.invalid_type,expected:Ce.void,received:r.parsedType}),Ge}return An(t.data)}}Jf.create=e=>new Jf({typeName:Ue.ZodVoid,...Ye(e)});class Ar extends Je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Ce.array)return Se(n,{code:pe.invalid_type,expected:Ce.array,received:n.parsedType}),Ge;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(Se(n,{code:l?pe.too_big:pe.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Se(n,{code:pe.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Se(n,{code:pe.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>a.type._parseAsync(new Wr(n,l,n.path,u)))).then(l=>vn.mergeArray(r,l));const o=[...n.data].map((l,u)=>a.type._parseSync(new Wr(n,l,n.path,u)));return vn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ar({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new Ar({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new Ar({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}Ar.create=(e,t)=>new Ar({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ue.ZodArray,...Ye(t)});function _o(e){if(e instanceof Tt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Fr.create(_o(r))}return new Tt({...e._def,shape:()=>t})}else return e instanceof Ar?new Ar({...e._def,type:_o(e.element)}):e instanceof Fr?Fr.create(_o(e.unwrap())):e instanceof _a?_a.create(_o(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>_o(t))):e}class Tt extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const f=this._getOrReturnCtx(t);return Se(f,{code:pe.invalid_type,expected:Ce.object,received:f.parsedType}),Ge}const{status:r,ctx:a}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof ki&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=o[f],g=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Wr(a,g,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof ki){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(Se(a,{code:pe.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const g=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Wr(a,g,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const g=await m.key,y=await m.value;f.push({key:g,value:y,alwaysSet:m.alwaysSet})}return f}).then(f=>vn.mergeObjectSync(r,f)):vn.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Tt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,o,l,u;const d=(l=(o=(a=this._def).errorMap)===null||o===void 0?void 0:o.call(a,n,r).message)!==null&&l!==void 0?l:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=Ie.errToObj(t).message)!==null&&u!==void 0?u:d}:{message:d}}}:{}})}strip(){return new Tt({...this._def,unknownKeys:"strip"})}passthrough(){return new Tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ue.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Tt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Tt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Tt({...this._def,shape:()=>n})}deepPartial(){return _o(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}),new Tt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Fr;)o=o._def.innerType;n[r]=o}}),new Tt({...this._def,shape:()=>n})}keyof(){return TN(ut.objectKeys(this.shape))}}Tt.create=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strip",catchall:ki.create(),typeName:Ue.ZodObject,...Ye(t)});Tt.strictCreate=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strict",catchall:ki.create(),typeName:Ue.ZodObject,...Ye(t)});Tt.lazycreate=(e,t)=>new Tt({shape:e,unknownKeys:"strip",catchall:ki.create(),typeName:Ue.ZodObject,...Ye(t)});class Hc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=o.map(u=>new $n(u.ctx.common.issues));return Se(n,{code:pe.invalid_union,unionErrors:l}),Ge}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let o;const l=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!o&&(o={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=l.map(d=>new $n(d));return Se(n,{code:pe.invalid_union,unionErrors:u}),Ge}}get options(){return this._def.options}}Hc.create=(e,t)=>new Hc({options:e,typeName:Ue.ZodUnion,...Ye(t)});const xi=e=>e instanceof $c?xi(e.schema):e instanceof Cr?xi(e.innerType()):e instanceof qc?[e.value]:e instanceof ba?e.options:e instanceof Kc?ut.objectValues(e.enum):e instanceof Wc?xi(e._def.innerType):e instanceof zc?[void 0]:e instanceof Uc?[null]:e instanceof Fr?[void 0,...xi(e.unwrap())]:e instanceof _a?[null,...xi(e.unwrap())]:e instanceof Ib||e instanceof Zc?xi(e.unwrap()):e instanceof Yc?xi(e._def.innerType):[];class qh extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return Se(n,{code:pe.invalid_type,expected:Ce.object,received:n.parsedType}),Ge;const r=this.discriminator,a=n.data[r],o=this.optionsMap.get(a);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Se(n,{code:pe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const o of n){const l=xi(o.shape[t]);if(!l.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of l){if(a.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);a.set(u,o)}}return new qh({typeName:Ue.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...Ye(r)})}}function tv(e,t){const n=Ei(e),r=Ei(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const a=ut.objectKeys(t),o=ut.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of o){const d=tv(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let o=0;o<e.length;o++){const l=e[o],u=t[o],d=tv(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Fc extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(o,l)=>{if(Jy(o)||Jy(l))return Ge;const u=tv(o.value,l.value);return u.valid?((ev(o)||ev(l))&&n.dirty(),{status:n.value,value:u.data}):(Se(r,{code:pe.invalid_intersection_types}),Ge)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>a(o,l)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Fc.create=(e,t,n)=>new Fc({left:e,right:t,typeName:Ue.ZodIntersection,...Ye(n)});class Yr extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return Se(r,{code:pe.invalid_type,expected:Ce.array,received:r.parsedType}),Ge;if(r.data.length<this._def.items.length)return Se(r,{code:pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ge;!this._def.rest&&r.data.length>this._def.items.length&&(Se(r,{code:pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new Wr(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>vn.mergeArray(n,l)):vn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Yr({...this._def,rest:t})}}Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:Ue.ZodTuple,rest:null,...Ye(t)})};class Gc extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return Se(r,{code:pe.invalid_type,expected:Ce.object,received:r.parsedType}),Ge;const a=[],o=this._def.keyType,l=this._def.valueType;for(const u in r.data)a.push({key:o._parse(new Wr(r,u,r.path,u)),value:l._parse(new Wr(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?vn.mergeObjectAsync(n,a):vn.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Je?new Gc({keyType:t,valueType:n,typeName:Ue.ZodRecord,...Ye(r)}):new Gc({keyType:Sr.create(),valueType:t,typeName:Ue.ZodRecord,...Ye(n)})}}class eh extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return Se(r,{code:pe.invalid_type,expected:Ce.map,received:r.parsedType}),Ge;const a=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new Wr(r,u,r.path,[f,"key"])),value:o._parse(new Wr(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return Ge;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return Ge;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}eh.create=(e,t,n)=>new eh({valueType:t,keyType:e,typeName:Ue.ZodMap,...Ye(n)});class Ss extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return Se(r,{code:pe.invalid_type,expected:Ce.set,received:r.parsedType}),Ge;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Se(r,{code:pe.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Se(r,{code:pe.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const o=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return Ge;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>o._parse(new Wr(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new Ss({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new Ss({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ss.create=(e,t)=>new Ss({valueType:e,minSize:null,maxSize:null,typeName:Ue.ZodSet,...Ye(t)});class Do extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return Se(n,{code:pe.invalid_type,expected:Ce.function,received:n.parsedType}),Ge;function r(u,d){return Zf({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yf(),Vo].filter(f=>!!f),issueData:{code:pe.invalid_arguments,argumentsError:d}})}function a(u,d){return Zf({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yf(),Vo].filter(f=>!!f),issueData:{code:pe.invalid_return_type,returnTypeError:d}})}const o={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof zo){const u=this;return An(async function(...d){const f=new $n([]),m=await u._def.args.parseAsync(d,o).catch(b=>{throw f.addIssue(r(d,b)),f}),g=await Reflect.apply(l,this,m);return await u._def.returns._def.type.parseAsync(g,o).catch(b=>{throw f.addIssue(a(g,b)),f})})}else{const u=this;return An(function(...d){const f=u._def.args.safeParse(d,o);if(!f.success)throw new $n([r(d,f.error)]);const m=Reflect.apply(l,this,f.data),g=u._def.returns.safeParse(m,o);if(!g.success)throw new $n([a(m,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Do({...this._def,args:Yr.create(t).rest(hs.create())})}returns(t){return new Do({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Do({args:t||Yr.create([]).rest(hs.create()),returns:n||hs.create(),typeName:Ue.ZodFunction,...Ye(r)})}}class $c extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$c.create=(e,t)=>new $c({getter:e,typeName:Ue.ZodLazy,...Ye(t)});class qc extends Je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Se(n,{received:n.data,code:pe.invalid_literal,expected:this._def.value}),Ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}qc.create=(e,t)=>new qc({value:e,typeName:Ue.ZodLiteral,...Ye(t)});function TN(e,t){return new ba({values:e,typeName:Ue.ZodEnum,...Ye(t)})}class ba extends Je{constructor(){super(...arguments),yc.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{expected:ut.joinValues(r),received:n.parsedType,code:pe.invalid_type}),Ge}if(Xf(this,yc)||EN(this,yc,new Set(this._def.values)),!Xf(this,yc).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{received:n.data,code:pe.invalid_enum_value,options:r}),Ge}return An(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ba.create(t,{...this._def,...n})}exclude(t,n=this._def){return ba.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}yc=new WeakMap;ba.create=TN;class Kc extends Je{constructor(){super(...arguments),vc.set(this,void 0)}_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const a=ut.objectValues(n);return Se(r,{expected:ut.joinValues(a),received:r.parsedType,code:pe.invalid_type}),Ge}if(Xf(this,vc)||EN(this,vc,new Set(ut.getValidEnumValues(this._def.values))),!Xf(this,vc).has(t.data)){const a=ut.objectValues(n);return Se(r,{received:r.data,code:pe.invalid_enum_value,options:a}),Ge}return An(t.data)}get enum(){return this._def.values}}vc=new WeakMap;Kc.create=(e,t)=>new Kc({values:e,typeName:Ue.ZodNativeEnum,...Ye(t)});class zo extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return Se(n,{code:pe.invalid_type,expected:Ce.promise,received:n.parsedType}),Ge;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return An(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zo.create=(e,t)=>new zo({type:e,typeName:Ue.ZodPromise,...Ye(t)});class Cr extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,o={addIssue:l=>{Se(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){const l=a.transform(r.data,o);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return Ge;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?Ge:d.status==="dirty"||n.value==="dirty"?Eo(d.value):d});{if(n.value==="aborted")return Ge;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?Ge:u.status==="dirty"||n.value==="dirty"?Eo(u.value):u}}if(a.type==="refinement"){const l=u=>{const d=a.refinement(u,o);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ge:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ge:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!xs(l))return l;const u=a.transform(l.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>xs(l)?Promise.resolve(a.transform(l.value,o)).then(u=>({status:n.value,value:u})):l);ut.assertNever(a)}}Cr.create=(e,t,n)=>new Cr({schema:e,typeName:Ue.ZodEffects,effect:t,...Ye(n)});Cr.createWithPreprocess=(e,t,n)=>new Cr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ue.ZodEffects,...Ye(n)});class Fr extends Je{_parse(t){return this._getType(t)===Ce.undefined?An(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Fr.create=(e,t)=>new Fr({innerType:e,typeName:Ue.ZodOptional,...Ye(t)});class _a extends Je{_parse(t){return this._getType(t)===Ce.null?An(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}_a.create=(e,t)=>new _a({innerType:e,typeName:Ue.ZodNullable,...Ye(t)});class Wc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Wc.create=(e,t)=>new Wc({innerType:e,typeName:Ue.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ye(t)});class Yc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Vc(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new $n(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new $n(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Yc.create=(e,t)=>new Yc({innerType:e,typeName:Ue.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ye(t)});class th extends Je{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return Se(r,{code:pe.invalid_type,expected:Ce.nan,received:r.parsedType}),Ge}return{status:"valid",value:t.data}}}th.create=e=>new th({typeName:Ue.ZodNaN,...Ye(e)});const t5=Symbol("zod_brand");class Ib extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Tu extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ge:o.status==="dirty"?(n.dirty(),Eo(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ge:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Tu({in:t,out:n,typeName:Ue.ZodPipeline})}}class Zc extends Je{_parse(t){const n=this._def.innerType._parse(t),r=a=>(xs(a)&&(a.value=Object.freeze(a.value)),a);return Vc(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}Zc.create=(e,t)=>new Zc({innerType:e,typeName:Ue.ZodReadonly,...Ye(t)});function BA(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function CN(e,t={},n){return e?Bo.create().superRefine((r,a)=>{var o,l;const u=e(r);if(u instanceof Promise)return u.then(d=>{var f,m;if(!d){const g=BA(t,r),y=(m=(f=g.fatal)!==null&&f!==void 0?f:n)!==null&&m!==void 0?m:!0;a.addIssue({code:"custom",...g,fatal:y})}});if(!u){const d=BA(t,r),f=(l=(o=d.fatal)!==null&&o!==void 0?o:n)!==null&&l!==void 0?l:!0;a.addIssue({code:"custom",...d,fatal:f})}}):Bo.create()}const n5={object:Tt.lazycreate};var Ue;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ue||(Ue={}));const r5=(e,t={message:`Input not instance of ${e.name}`})=>CN(n=>n instanceof e,t),RN=Sr.create,NN=ya.create,i5=th.create,a5=va.create,ON=Bc.create,s5=Es.create,o5=Qf.create,l5=zc.create,c5=Uc.create,u5=Bo.create,d5=hs.create,f5=ki.create,h5=Jf.create,m5=Ar.create,p5=Tt.create,g5=Tt.strictCreate,y5=Hc.create,v5=qh.create,b5=Fc.create,_5=Yr.create,x5=Gc.create,E5=eh.create,S5=Ss.create,A5=Do.create,w5=$c.create,T5=qc.create,C5=ba.create,R5=Kc.create,N5=zo.create,zA=Cr.create,O5=Fr.create,k5=_a.create,D5=Cr.createWithPreprocess,I5=Tu.create,L5=()=>RN().optional(),M5=()=>NN().optional(),j5=()=>ON().optional(),P5={string:e=>Sr.create({...e,coerce:!0}),number:e=>ya.create({...e,coerce:!0}),boolean:e=>Bc.create({...e,coerce:!0}),bigint:e=>va.create({...e,coerce:!0}),date:e=>Es.create({...e,coerce:!0})},V5=Ge;var oa=Object.freeze({__proto__:null,defaultErrorMap:Vo,setErrorMap:D3,getErrorMap:Yf,makeIssue:Zf,EMPTY_PATH:I3,addIssueToContext:Se,ParseStatus:vn,INVALID:Ge,DIRTY:Eo,OK:An,isAborted:Jy,isDirty:ev,isValid:xs,isAsync:Vc,get util(){return ut},get objectUtil(){return Qy},ZodParsedType:Ce,getParsedType:Ei,ZodType:Je,datetimeRegex:wN,ZodString:Sr,ZodNumber:ya,ZodBigInt:va,ZodBoolean:Bc,ZodDate:Es,ZodSymbol:Qf,ZodUndefined:zc,ZodNull:Uc,ZodAny:Bo,ZodUnknown:hs,ZodNever:ki,ZodVoid:Jf,ZodArray:Ar,ZodObject:Tt,ZodUnion:Hc,ZodDiscriminatedUnion:qh,ZodIntersection:Fc,ZodTuple:Yr,ZodRecord:Gc,ZodMap:eh,ZodSet:Ss,ZodFunction:Do,ZodLazy:$c,ZodLiteral:qc,ZodEnum:ba,ZodNativeEnum:Kc,ZodPromise:zo,ZodEffects:Cr,ZodTransformer:Cr,ZodOptional:Fr,ZodNullable:_a,ZodDefault:Wc,ZodCatch:Yc,ZodNaN:th,BRAND:t5,ZodBranded:Ib,ZodPipeline:Tu,ZodReadonly:Zc,custom:CN,Schema:Je,ZodSchema:Je,late:n5,get ZodFirstPartyTypeKind(){return Ue},coerce:P5,any:u5,array:m5,bigint:a5,boolean:ON,date:s5,discriminatedUnion:v5,effect:zA,enum:C5,function:A5,instanceof:r5,intersection:b5,lazy:w5,literal:T5,map:E5,nan:i5,nativeEnum:R5,never:f5,null:c5,nullable:k5,number:NN,object:p5,oboolean:j5,onumber:M5,optional:O5,ostring:L5,pipeline:I5,preprocess:D5,promise:N5,record:x5,set:S5,strictObject:g5,string:RN,symbol:o5,transformer:zA,tuple:_5,undefined:l5,union:y5,unknown:d5,void:h5,NEVER:V5,ZodIssueCode:pe,quotelessJson:k3,ZodError:$n});const kN=E.createContext({});function B5(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Lb=typeof window<"u",z5=Lb?E.useLayoutEffect:E.useEffect,Mb=E.createContext(null),DN=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function U5(e=!0){const t=E.useContext(Mb);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,o=E.useId();E.useEffect(()=>{if(e)return a(o)},[e]);const l=E.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}function jb(e,t){e.indexOf(t)===-1&&e.push(t)}function Pb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const qn=e=>e;let IN=qn;const H5={useManualTiming:!1};function Vb(e){let t;return()=>(t===void 0&&(t=e()),t)}const Uo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Bb{constructor(){this.subscriptions=[]}add(t){return jb(this.subscriptions,t),()=>Pb(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let o=0;o<a;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ti=e=>e*1e3,Ci=e=>e/1e3;function LN(e,t){return t?e*(1e3/t):0}const F5=Vb(()=>window.ScrollTimeline!==void 0);class G5{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(a=>{if(F5()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{r.forEach((a,o)=>{a&&a(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class $5 extends G5{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function zb(e,t){return e?e[t]||e.default||e:void 0}const nv=2e4;function MN(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<nv;)t+=n,r=e.next(t);return t>=nv?1/0:t}function Ub(e){return typeof e=="function"}function UA(e,t){e.timeline=t,e.onfinish=null}const Hb=e=>Array.isArray(e)&&typeof e[0]=="number",q5={linearEasing:void 0};function K5(e,t){const n=Vb(e);return()=>{var r;return(r=q5[t])!==null&&r!==void 0?r:n()}}const nh=K5(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jN=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let o=0;o<a;o++)r+=e(Uo(0,a-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function PN(e){return!!(typeof e=="function"&&nh()||!e||typeof e=="string"&&(e in rv||nh())||Hb(e)||Array.isArray(e)&&e.every(PN))}const bc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bc([0,.65,.55,1]),circOut:bc([.55,0,1,.45]),backIn:bc([.31,.01,.66,-.59]),backOut:bc([.33,1.53,.69,.99])};function VN(e,t){if(e)return typeof e=="function"&&nh()?jN(e,t):Hb(e)?bc(e):Array.isArray(e)?e.map(n=>VN(n,t)||rv.easeOut):rv[e]}const rf=["read","resolveKeyframes","update","preRender","render","postRender"];function W5(e,t){let n=new Set,r=new Set,a=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(f.schedule(m),e()),m(u)}const f={schedule:(m,g=!1,y=!1)=>{const v=y&&a?n:r;return g&&l.add(m),v.has(m)||v.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,a){o=!0;return}a=!0,[n,r]=[r,n],n.forEach(d),n.clear(),a=!1,o&&(o=!1,f.process(m))}};return f}const Y5=40;function BN(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=rf.reduce((w,T)=>(w[T]=W5(o),w),{}),{read:u,resolveKeyframes:d,update:f,preRender:m,render:g,postRender:y}=l,b=()=>{const w=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(w-a.timestamp,Y5),1),a.timestamp=w,a.isProcessing=!0,u.process(a),d.process(a),f.process(a),m.process(a),g.process(a),y.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(b))},v=()=>{n=!0,r=!0,a.isProcessing||e(b)};return{schedule:rf.reduce((w,T)=>{const R=l[T];return w[T]=(D,N=!1,k=!1)=>(n||v(),R.schedule(D,N,k)),w},{}),cancel:w=>{for(let T=0;T<rf.length;T++)l[rf[T]].cancel(w)},state:a,steps:l}}const{schedule:xt,cancel:xa,state:cn,steps:Zg}=BN(typeof requestAnimationFrame<"u"?requestAnimationFrame:qn,!0),{schedule:Fb}=BN(queueMicrotask,!1);let Tf;function Z5(){Tf=void 0}const Gr={now:()=>(Tf===void 0&&Gr.set(cn.isProcessing||H5.useManualTiming?cn.timestamp:performance.now()),Tf),set:e=>{Tf=e,queueMicrotask(Z5)}},xr={x:!1,y:!1};function zN(){return xr.x||xr.y}function X5(e){return e==="x"||e==="y"?xr[e]?null:(xr[e]=!0,()=>{xr[e]=!1}):xr.x||xr.y?null:(xr.x=xr.y=!0,()=>{xr.x=xr.y=!1})}function Q5(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let a=document;const o=(r=void 0)!==null&&r!==void 0?r:a.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function UN(e,t){const n=Q5(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function HA(e){return!(e.pointerType==="touch"||zN())}function J5(e,t,n={}){const[r,a,o]=UN(e,n),l=u=>{if(!HA(u))return;const{target:d}=u,f=t(d,u);if(typeof f!="function"||!d)return;const m=g=>{HA(g)&&(f(g),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return r.forEach(u=>{u.addEventListener("pointerenter",l,a)}),o}function FA(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const HN=(e,t)=>t?e===t?!0:HN(e,t.parentElement):!1,Gb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,eG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tG(e){return eG.has(e.tagName)||e.tabIndex!==-1}const _c=new WeakSet;function GA(e){return t=>{t.key==="Enter"&&e(t)}}function Xg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nG=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=GA(()=>{if(_c.has(n))return;Xg(n,"down");const a=GA(()=>{Xg(n,"up")}),o=()=>Xg(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function $A(e){return Gb(e)&&!zN()}function rG(e,t,n={}){const[r,a,o]=UN(e,n),l=u=>{const d=u.currentTarget;if(!d||!$A(u)||_c.has(d))return;_c.add(d),FA(u,"set");const f=t(d,u),m=(b,v)=>{d.removeEventListener("pointerup",g),d.removeEventListener("pointercancel",y),FA(b,"release"),!(!$A(b)||!_c.has(d))&&(_c.delete(d),typeof f=="function"&&f(b,{success:v}))},g=b=>{(b.isTrusted?iG(b,d instanceof Element?d.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?m(b,!1):m(b,!(d instanceof Element)||HN(d,b.target))},y=b=>{m(b,!1)};d.addEventListener("pointerup",g,a),d.addEventListener("pointercancel",y,a),d.addEventListener("lostpointercapture",y,a)};return r.forEach(u=>{u=n.useGlobalTarget?window:u;let d=!1;u instanceof HTMLElement&&(d=!0,!tG(u)&&u.getAttribute("tabindex")===null&&(u.tabIndex=0)),u.addEventListener("pointerdown",l,a),d&&u.addEventListener("focus",f=>nG(f,a),a)}),o}function iG(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const qA=30,aG=e=>!isNaN(parseFloat(e));class sG{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const o=Gr.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Gr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aG(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Bb);const r=this.events[t].add(n);return t==="change"?()=>{r(),xt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Gr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qA)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,qA);return LN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xc(e,t){return new sG(e,t)}const $b=E.createContext({strict:!1}),KA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ho={};for(const e in KA)Ho[e]={isEnabled:t=>KA[e].some(n=>!!t[n])};function iv(e){for(const t in e)Ho[t]={...Ho[t],...e[t]}}function oG({children:e,features:t,strict:n=!1}){const[,r]=E.useState(!Qg(t)),a=E.useRef(void 0);if(!Qg(t)){const{renderer:o,...l}=t;a.current=o,iv(l)}return E.useEffect(()=>{Qg(t)&&t().then(({renderer:o,...l})=>{iv(l),a.current=o,r(!0)})},[]),_.jsx($b.Provider,{value:{renderer:a.current,strict:n},children:e})}function Qg(e){return typeof e=="function"}const lG=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function rh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lG.has(e)}let FN=e=>!rh(e);function cG(e){e&&(FN=t=>t.startsWith("on")?!rh(t):e(t))}try{cG(require("@emotion/is-prop-valid").default)}catch{}function uG(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(FN(a)||n===!0&&rh(a)||!t&&!rh(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function dG(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const Kh=E.createContext({});function Wh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qc(e){return typeof e=="string"||Array.isArray(e)}const qb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kb=["initial",...qb];function Yh(e){return Wh(e.animate)||Kb.some(t=>Qc(e[t]))}function GN(e){return!!(Yh(e)||e.variants)}function fG(e,t){if(Yh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Qc(n)?n:void 0,animate:Qc(r)?r:void 0}}return e.inherit!==!1?t:{}}function hG(e){const{initial:t,animate:n}=fG(e,E.useContext(Kh));return E.useMemo(()=>({initial:t,animate:n}),[WA(t),WA(n)])}function WA(e){return Array.isArray(e)?e.join(" "):e}const mG=Symbol.for("motionComponentSymbol");function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pG(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):So(n)&&(n.current=r))},[t])}const Wb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gG="framerAppearId",$N="data-"+Wb(gG),qN=E.createContext({});function yG(e,t,n,r,a){var o,l;const{visualElement:u}=E.useContext(Kh),d=E.useContext($b),f=E.useContext(Mb),m=E.useContext(DN).reducedMotion,g=E.useRef(null);r=r||d.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:u,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m}));const y=g.current,b=E.useContext(qN);y&&!y.projection&&a&&(y.type==="html"||y.type==="svg")&&vG(g.current,n,a,b);const v=E.useRef(!1);E.useInsertionEffect(()=>{y&&v.current&&y.update(n,f)});const S=n[$N],A=E.useRef(!!S&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,S))&&((l=window.MotionHasOptimisedAnimation)===null||l===void 0?void 0:l.call(window,S)));return z5(()=>{y&&(v.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),Fb.render(y.render),A.current&&y.animationState&&y.animationState.animateChanges())}),E.useEffect(()=>{y&&(!A.current&&y.animationState&&y.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,S)}),A.current=!1))}),y}function vG(e,t,n,r){const{layoutId:a,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:KN(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:!!l||u&&So(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:d,layoutRoot:f})}function KN(e){if(e)return e.options.allowProjection!==!1?e.projection:KN(e.parent)}function bG({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){var o,l;e&&iv(e);function u(f,m){let g;const y={...E.useContext(DN),...f,layoutId:_G(f)},{isStatic:b}=y,v=hG(f),S=r(f,b);if(!b&&Lb){xG();const A=EG(y);g=A.MeasureLayout,v.visualElement=yG(a,S,y,t,A.ProjectionNode)}return _.jsxs(Kh.Provider,{value:v,children:[g&&v.visualElement?_.jsx(g,{visualElement:v.visualElement,...y}):null,n(a,f,pG(S,v.visualElement,m),S,b,v.visualElement)]})}u.displayName=`motion.${typeof a=="string"?a:`create(${(l=(o=a.displayName)!==null&&o!==void 0?o:a.name)!==null&&l!==void 0?l:""})`}`;const d=E.forwardRef(u);return d[mG]=a,d}function _G({layoutId:e}){const t=E.useContext(kN).id;return t&&e!==void 0?t+"-"+e:e}function xG(e,t){E.useContext($b).strict}function EG(e){const{drag:t,layout:n}=Ho;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const WN=e=>t=>typeof t=="string"&&t.startsWith(e),Yb=WN("--"),SG=WN("var(--"),Zb=e=>SG(e)?AG.test(e.split("/*")[0].trim()):!1,AG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Jc={};function wG(e){for(const t in e)Jc[t]=e[t],Yb(t)&&(Jc[t].isCSSVariable=!0)}const rl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cs=new Set(rl);function YN(e,{layout:t,layoutId:n}){return Cs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Jc[e]||e==="opacity")}const gn=e=>!!(e&&e.getVelocity),ZN=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Di=(e,t,n)=>n>t?t:n<e?e:n,il={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},eu={...il,transform:e=>Di(0,1,e)},af={...il,default:1},Cu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),da=Cu("deg"),$r=Cu("%"),Be=Cu("px"),TG=Cu("vh"),CG=Cu("vw"),YA={...$r,parse:e=>$r.parse(e)/100,transform:e=>$r.transform(e*100)},RG={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,radius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,backgroundPositionX:Be,backgroundPositionY:Be},NG={rotate:da,rotateX:da,rotateY:da,rotateZ:da,scale:af,scaleX:af,scaleY:af,scaleZ:af,skew:da,skewX:da,skewY:da,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:eu,originX:YA,originY:YA,originZ:Be},ZA={...il,transform:Math.round},Xb={...RG,...NG,zIndex:ZA,size:Be,fillOpacity:eu,strokeOpacity:eu,numOctaves:ZA},OG={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kG=rl.length;function DG(e,t,n){let r="",a=!0;for(let o=0;o<kG;o++){const l=rl[o],u=e[l];if(u===void 0)continue;let d=!0;if(typeof u=="number"?d=u===(l.startsWith("scale")?1:0):d=parseFloat(u)===0,!d||n){const f=ZN(u,Xb[l]);if(!d){a=!1;const m=OG[l]||l;r+=`${m}(${f}) `}n&&(t[l]=f)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function Qb(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let l=!1,u=!1;for(const d in t){const f=t[d];if(Cs.has(d)){l=!0;continue}else if(Yb(d)){a[d]=f;continue}else{const m=ZN(f,Xb[d]);d.startsWith("origin")?(u=!0,o[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=DG(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:m=0}=o;r.transformOrigin=`${d} ${f} ${m}`}}const Jb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function XN(e,t,n){for(const r in t)!gn(t[r])&&!YN(r,n)&&(e[r]=t[r])}function IG({transformTemplate:e},t){return E.useMemo(()=>{const n=Jb();return Qb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function LG(e,t){const n=e.style||{},r={};return XN(r,n,e),Object.assign(r,IG(e,t)),r}function MG(e,t){const n={},r=LG(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const jG=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function e0(e){return typeof e!="string"||e.includes("-")?!1:!!(jG.indexOf(e)>-1||/[A-Z]/u.test(e))}const PG={offset:"stroke-dashoffset",array:"stroke-dasharray"},VG={offset:"strokeDashoffset",array:"strokeDasharray"};function BG(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?PG:VG;e[o.offset]=Be.transform(-r);const l=Be.transform(t),u=Be.transform(n);e[o.array]=`${l} ${u}`}function XA(e,t,n){return typeof e=="string"?e:Be.transform(t+n*e)}function zG(e,t,n){const r=XA(t,e.x,e.width),a=XA(n,e.y,e.height);return`${r} ${a}`}function t0(e,{attrX:t,attrY:n,attrScale:r,originX:a,originY:o,pathLength:l,pathSpacing:u=1,pathOffset:d=0,...f},m,g){if(Qb(e,f,g),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:b,dimensions:v}=e;y.transform&&(v&&(b.transform=y.transform),delete y.transform),v&&(a!==void 0||o!==void 0||b.transform)&&(b.transformOrigin=zG(v,a!==void 0?a:.5,o!==void 0?o:.5)),t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),r!==void 0&&(y.scale=r),l!==void 0&&BG(y,l,u,d,!1)}const QN=()=>({...Jb(),attrs:{}}),n0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function UG(e,t,n,r){const a=E.useMemo(()=>{const o=QN();return t0(o,t,n0(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};XN(o,e.style,e),a.style={...o,...a.style}}return a}function HG(e=!1){return(n,r,a,{latestValues:o},l)=>{const d=(e0(n)?UG:MG)(r,o,l,n),f=uG(r,typeof n=="string",e),m=n!==E.Fragment?{...f,...d,ref:a}:{},{children:g}=r,y=E.useMemo(()=>gn(g)?g.get():g,[g]);return E.createElement(n,{...m,children:y})}}function QA(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function r0(e,t,n,r){if(typeof t=="function"){const[a,o]=QA(r);t=t(n!==void 0?n:e.custom,a,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,o]=QA(r);t=t(n!==void 0?n:e.custom,a,o)}return t}const av=e=>Array.isArray(e),FG=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),GG=e=>av(e)?e[e.length-1]||0:e;function Cf(e){const t=gn(e)?e.get():e;return FG(t)?t.toValue():t}function $G({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,a,o){const l={latestValues:qG(r,a,o,e),renderState:t()};return n&&(l.onMount=u=>n({props:r,current:u,...l}),l.onUpdate=u=>n(u)),l}const JN=e=>(t,n)=>{const r=E.useContext(Kh),a=E.useContext(Mb),o=()=>$G(e,t,r,a);return n?o():B5(o)};function qG(e,t,n,r){const a={},o=r(e,{});for(const y in o)a[y]=Cf(o[y]);let{initial:l,animate:u}=e;const d=Yh(e),f=GN(e);t&&f&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const g=m?u:l;if(g&&typeof g!="boolean"&&!Wh(g)){const y=Array.isArray(g)?g:[g];for(let b=0;b<y.length;b++){const v=r0(e,y[b]);if(v){const{transitionEnd:S,transition:A,...w}=v;for(const T in w){let R=w[T];if(Array.isArray(R)){const D=m?R.length-1:0;R=R[D]}R!==null&&(a[T]=R)}for(const T in S)a[T]=S[T]}}}return a}function i0(e,t,n){var r;const{style:a}=e,o={};for(const l in a)(gn(a[l])||t.style&&gn(t.style[l])||YN(l,e)||((r=n==null?void 0:n.getValue(l))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[l]=a[l]);return o}const KG={useVisualState:JN({scrapeMotionValuesFromProps:i0,createRenderState:Jb})};function eO(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function tO(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const nO=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function rO(e,t,n,r){tO(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(nO.has(a)?a:Wb(a),t.attrs[a])}function iO(e,t,n){const r=i0(e,t,n);for(const a in e)if(gn(e[a])||gn(t[a])){const o=rl.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[o]=e[a]}return r}const JA=["x","y","width","height","cx","cy","r"],WG={useVisualState:JN({scrapeMotionValuesFromProps:iO,createRenderState:QN,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:a})=>{if(!n)return;let o=!!e.drag;if(!o){for(const u in a)if(Cs.has(u)){o=!0;break}}if(!o)return;let l=!t;if(t)for(let u=0;u<JA.length;u++){const d=JA[u];e[d]!==t[d]&&(l=!0)}l&&xt.read(()=>{eO(n,r),xt.render(()=>{t0(r,a,n0(n.tagName),e.transformTemplate),rO(n,r)})})}})};function YG(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const l={...e0(r)?WG:KG,preloadedFeatures:e,useRender:HG(a),createVisualElement:t,Component:r};return bG(l)}}function tu(e,t,n){const r=e.getProps();return r0(r,t,n!==void 0?n:r.custom,e)}const aO=new Set(["width","height","top","left","right","bottom",...rl]);function ZG(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xc(n))}function XG(e,t){const n=tu(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const l in o){const u=GG(o[l]);ZG(e,l,u)}}function QG(e){return!!(gn(e)&&e.add)}function sv(e,t){const n=e.getValue("willChange");if(QG(n))return n.add(t)}function sO(e){return e.props[$N]}const oO=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,JG=1e-7,e$=12;function t$(e,t,n,r,a){let o,l,u=0;do l=t+(n-t)/2,o=oO(l,r,a)-e,o>0?n=l:t=l;while(Math.abs(o)>JG&&++u<e$);return l}function Ru(e,t,n,r){if(e===t&&n===r)return qn;const a=o=>t$(o,0,1,e,n);return o=>o===0||o===1?o:oO(a(o),t,r)}const lO=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cO=e=>t=>1-e(1-t),uO=Ru(.33,1.53,.69,.99),a0=cO(uO),dO=lO(a0),fO=e=>(e*=2)<1?.5*a0(e):.5*(2-Math.pow(2,-10*(e-1))),s0=e=>1-Math.sin(Math.acos(e)),hO=cO(s0),mO=lO(s0),pO=e=>/^0[^.\s]+$/u.test(e);function n$(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pO(e):!0}const Tc=e=>Math.round(e*1e5)/1e5,o0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function r$(e){return e==null}const i$=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,l0=(e,t)=>n=>!!(typeof n=="string"&&i$.test(n)&&n.startsWith(e)||t&&!r$(n)&&Object.prototype.hasOwnProperty.call(n,t)),gO=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,o,l,u]=r.match(o0);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},a$=e=>Di(0,255,e),Jg={...il,transform:e=>Math.round(a$(e))},cs={test:l0("rgb","red"),parse:gO("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jg.transform(e)+", "+Jg.transform(t)+", "+Jg.transform(n)+", "+Tc(eu.transform(r))+")"};function s$(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const ov={test:l0("#"),parse:s$,transform:cs.transform},Ao={test:l0("hsl","hue"),parse:gO("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$r.transform(Tc(t))+", "+$r.transform(Tc(n))+", "+Tc(eu.transform(r))+")"},pn={test:e=>cs.test(e)||ov.test(e)||Ao.test(e),parse:e=>cs.test(e)?cs.parse(e):Ao.test(e)?Ao.parse(e):ov.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cs.transform(e):Ao.transform(e)},o$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function l$(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(o0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(o$))===null||n===void 0?void 0:n.length)||0)>0}const yO="number",vO="color",c$="var",u$="var(",ew="${}",d$=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const u=t.replace(d$,d=>(pn.test(d)?(r.color.push(o),a.push(vO),n.push(pn.parse(d))):d.startsWith(u$)?(r.var.push(o),a.push(c$),n.push(d)):(r.number.push(o),a.push(yO),n.push(parseFloat(d))),++o,ew)).split(ew);return{values:n,split:u,indexes:r,types:a}}function bO(e){return nu(e).values}function _O(e){const{split:t,types:n}=nu(e),r=t.length;return a=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],a[l]!==void 0){const u=n[l];u===yO?o+=Tc(a[l]):u===vO?o+=pn.transform(a[l]):o+=a[l]}return o}}const f$=e=>typeof e=="number"?0:e;function h$(e){const t=bO(e);return _O(e)(t.map(f$))}const Ea={test:l$,parse:bO,createTransformer:_O,getAnimatableNone:h$},m$=new Set(["brightness","contrast","saturate","opacity"]);function p$(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(o0)||[];if(!r)return e;const a=n.replace(r,"");let o=m$.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const g$=/\b([a-z-]*)\(.*?\)/gu,lv={...Ea,getAnimatableNone:e=>{const t=e.match(g$);return t?t.map(p$).join(" "):e}},y$={...Xb,color:pn,backgroundColor:pn,outlineColor:pn,fill:pn,stroke:pn,borderColor:pn,borderTopColor:pn,borderRightColor:pn,borderBottomColor:pn,borderLeftColor:pn,filter:lv,WebkitFilter:lv},xO=e=>y$[e];function EO(e,t){let n=xO(e);return n!==lv&&(n=Ea),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const v$=new Set(["auto","none","0"]);function b$(e,t,n){let r=0,a;for(;r<e.length&&!a;){const o=e[r];typeof o=="string"&&!v$.has(o)&&nu(o).values.length&&(a=e[r]),r++}if(a&&n)for(const o of t)e[o]=EO(n,a)}const us=e=>e*180/Math.PI,cv=e=>{const t=us(Math.atan2(e[1],e[0]));return uv(t)},_$={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cv,rotateZ:cv,skewX:e=>us(Math.atan(e[1])),skewY:e=>us(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},uv=e=>(e=e%360,e<0&&(e+=360),e),tw=cv,nw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),x$={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nw,scaleY:rw,scale:e=>(nw(e)+rw(e))/2,rotateX:e=>uv(us(Math.atan2(e[6],e[5]))),rotateY:e=>uv(us(Math.atan2(-e[2],e[0]))),rotateZ:tw,rotate:tw,skewX:e=>us(Math.atan(e[4])),skewY:e=>us(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function iw(e){return e.includes("scale")?1:0}function dv(e,t){if(!e||e==="none")return iw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=x$,a=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_$,a=u}if(!a)return iw(t);const o=r[t],l=a[1].split(",").map(S$);return typeof o=="function"?o(l):l[o]}const E$=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return dv(n,t)};function S$(e){return parseFloat(e.trim())}const aw=e=>e===il||e===Be,A$=new Set(["x","y","z"]),w$=rl.filter(e=>!A$.has(e));function T$(e){const t=[];return w$.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>dv(t,"x"),y:(e,{transform:t})=>dv(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const ms=new Set;let fv=!1,hv=!1;function SO(){if(hv){const e=Array.from(ms).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=T$(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([o,l])=>{var u;(u=r.getValue(o))===null||u===void 0||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}hv=!1,fv=!1,ms.forEach(e=>e.complete()),ms.clear()}function AO(){ms.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hv=!0)})}function C$(){AO(),SO()}class c0{constructor(t,n,r,a,o,l=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=o,this.isAsync=l}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ms.add(this),fv||(fv=!0,xt.read(AO),xt.resolveKeyframes(SO))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const l=a==null?void 0:a.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(r&&n){const d=r.readValue(n,u);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=u),a&&l===void 0&&a.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ms.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ms.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const wO=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),R$=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function N$(e){const t=R$.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function TO(e,t,n=1){const[r,a]=N$(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return wO(l)?parseFloat(l):l}return Zb(a)?TO(a,t,n+1):a}const CO=e=>t=>t.test(e),O$={test:e=>e==="auto",parse:e=>e},RO=[il,Be,$r,da,CG,TG,O$],sw=e=>RO.find(CO(e));class NO extends c0{constructor(t,n,r,a,o){super(t,n,r,a,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),Zb(f))){const m=TO(f,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!aO.has(r)||t.length!==2)return;const[a,o]=t,l=sw(a),u=sw(o);if(l!==u)if(aw(l)&&aw(u))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)n$(t[a])&&r.push(a);r.length&&b$(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Fo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:a}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const l=a.length-1,u=a[l];a[l]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([d,f])=>{n.getValue(d).set(f)}),this.resolveNoneKeyframes()}}const ow=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ea.test(e)||e==="0")&&!e.startsWith("url("));function k$(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function D$(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=ow(a,t),u=ow(o,t);return!l||!u?!1:k$(e)||(n==="spring"||Ub(n))&&r}const I$=e=>e!==null;function Zh(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(I$),o=t&&n!=="loop"&&t%2===1?0:a.length-1;return!o||r===void 0?a[o]:r}const L$=40;class OO{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:l="loop",...u}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Gr.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:o,repeatType:l,...u},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>L$?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&C$(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Gr.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:o,delay:l,onComplete:u,onUpdate:d,isGenerator:f}=this.options;if(!f&&!D$(t,r,a,o))if(l)this.options.duration=0;else{d&&d(Zh(t,this.options,n)),u&&u(),this.resolveFinishedPromise();return}const m=this.initPlayback(t,n);m!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...m},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ct=(e,t,n)=>e+(t-e)*n;function ey(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function M$({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,o=0,l=0;if(!t)a=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;a=ey(d,u,e+1/3),o=ey(d,u,e),l=ey(d,u,e-1/3)}return{red:Math.round(a*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function ih(e,t){return n=>n>0?t:e}const ty=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},j$=[ov,cs,Ao],P$=e=>j$.find(t=>t.test(e));function lw(e){const t=P$(e);if(!t)return!1;let n=t.parse(e);return t===Ao&&(n=M$(n)),n}const cw=(e,t)=>{const n=lw(e),r=lw(t);if(!n||!r)return ih(e,t);const a={...n};return o=>(a.red=ty(n.red,r.red,o),a.green=ty(n.green,r.green,o),a.blue=ty(n.blue,r.blue,o),a.alpha=Ct(n.alpha,r.alpha,o),cs.transform(a))},V$=(e,t)=>n=>t(e(n)),Nu=(...e)=>e.reduce(V$),mv=new Set(["none","hidden"]);function B$(e,t){return mv.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function z$(e,t){return n=>Ct(e,t,n)}function u0(e){return typeof e=="number"?z$:typeof e=="string"?Zb(e)?ih:pn.test(e)?cw:F$:Array.isArray(e)?kO:typeof e=="object"?pn.test(e)?cw:U$:ih}function kO(e,t){const n=[...e],r=n.length,a=e.map((o,l)=>u0(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=a[l](o);return n}}function U$(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=u0(e[a])(e[a],t[a]));return a=>{for(const o in r)n[o]=r[o](a);return n}}function H$(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],u=e.indexes[l][a[l]],d=(n=e.values[u])!==null&&n!==void 0?n:0;r[o]=d,a[l]++}return r}const F$=(e,t)=>{const n=Ea.createTransformer(t),r=nu(e),a=nu(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?mv.has(e)&&!a.values.length||mv.has(t)&&!r.values.length?B$(e,t):Nu(kO(H$(r,a),a.values),n):ih(e,t)};function DO(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ct(e,t,n):u0(e)(e,t)}const G$=5;function IO(e,t,n){const r=Math.max(t-G$,0);return LN(n-e(r),t-r)}const It={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},uw=.001;function $$({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let a,o,l=1-t;l=Di(It.minDamping,It.maxDamping,l),e=Di(It.minDuration,It.maxDuration,Ci(e)),l<1?(a=f=>{const m=f*l,g=m*e,y=m-n,b=pv(f,l),v=Math.exp(-g);return uw-y/b*v},o=f=>{const g=f*l*e,y=g*n+n,b=Math.pow(l,2)*Math.pow(f,2)*e,v=Math.exp(-g),S=pv(Math.pow(f,2),l);return(-a(f)+uw>0?-1:1)*((y-b)*v)/S}):(a=f=>{const m=Math.exp(-f*e),g=(f-n)*e+1;return-.001+m*g},o=f=>{const m=Math.exp(-f*e),g=(n-f)*(e*e);return m*g});const u=5/e,d=K$(a,o,u);if(e=Ti(e),isNaN(d))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const f=Math.pow(d,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const q$=12;function K$(e,t,n){let r=n;for(let a=1;a<q$;a++)r=r-e(r)/t(r);return r}function pv(e,t){return e*Math.sqrt(1-t*t)}const W$=["duration","bounce"],Y$=["stiffness","damping","mass"];function dw(e,t){return t.some(n=>e[n]!==void 0)}function Z$(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!dw(e,Y$)&&dw(e,W$))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,o=2*Di(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:It.mass,stiffness:a,damping:o}}else{const n=$$(e);t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function LO(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:d,damping:f,mass:m,duration:g,velocity:y,isResolvedFromDuration:b}=Z$({...n,velocity:-Ci(n.velocity||0)}),v=y||0,S=f/(2*Math.sqrt(d*m)),A=l-o,w=Ci(Math.sqrt(d/m)),T=Math.abs(A)<5;r||(r=T?It.restSpeed.granular:It.restSpeed.default),a||(a=T?It.restDelta.granular:It.restDelta.default);let R;if(S<1){const N=pv(w,S);R=k=>{const I=Math.exp(-S*w*k);return l-I*((v+S*w*A)/N*Math.sin(N*k)+A*Math.cos(N*k))}}else if(S===1)R=N=>l-Math.exp(-w*N)*(A+(v+w*A)*N);else{const N=w*Math.sqrt(S*S-1);R=k=>{const I=Math.exp(-S*w*k),P=Math.min(N*k,300);return l-I*((v+S*w*A)*Math.sinh(P)+N*A*Math.cosh(P))/N}}const D={calculatedDuration:b&&g||null,next:N=>{const k=R(N);if(b)u.done=N>=g;else{let I=0;S<1&&(I=N===0?Ti(v):IO(R,N,k));const P=Math.abs(I)<=r,V=Math.abs(l-k)<=a;u.done=P&&V}return u.value=u.done?l:k,u},toString:()=>{const N=Math.min(MN(D),nv),k=jN(I=>D.next(N*I).value,N,30);return N+"ms "+k}};return D}function fw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:d,restDelta:f=.5,restSpeed:m}){const g=e[0],y={done:!1,value:g},b=P=>u!==void 0&&P<u||d!==void 0&&P>d,v=P=>u===void 0?d:d===void 0||Math.abs(u-P)<Math.abs(d-P)?u:d;let S=n*t;const A=g+S,w=l===void 0?A:l(A);w!==A&&(S=w-g);const T=P=>-S*Math.exp(-P/r),R=P=>w+T(P),D=P=>{const V=T(P),H=R(P);y.done=Math.abs(V)<=f,y.value=y.done?w:H};let N,k;const I=P=>{b(y.value)&&(N=P,k=LO({keyframes:[y.value,v(y.value)],velocity:IO(R,P,y.value),damping:a,stiffness:o,restDelta:f,restSpeed:m}))};return I(0),{calculatedDuration:null,next:P=>{let V=!1;return!k&&N===void 0&&(V=!0,D(P),I(P)),N!==void 0&&P>=N?k.next(P-N):(!V&&D(P),y)}}}const X$=Ru(.42,0,1,1),Q$=Ru(0,0,.58,1),MO=Ru(.42,0,.58,1),J$=e=>Array.isArray(e)&&typeof e[0]!="number",e6={linear:qn,easeIn:X$,easeInOut:MO,easeOut:Q$,circIn:s0,circInOut:mO,circOut:hO,backIn:a0,backInOut:dO,backOut:uO,anticipate:fO},hw=e=>{if(Hb(e)){IN(e.length===4);const[t,n,r,a]=e;return Ru(t,n,r,a)}else if(typeof e=="string")return e6[e];return e};function t6(e,t,n){const r=[],a=n||DO,o=e.length-1;for(let l=0;l<o;l++){let u=a(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||qn:t;u=Nu(d,u)}r.push(u)}return r}function n6(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(IN(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=t6(t,r,a),d=u.length,f=m=>{if(l&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const y=Uo(e[g],e[g+1],m);return u[g](y)};return n?m=>f(Di(e[0],e[o-1],m)):f}function r6(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Uo(0,t,r);e.push(Ct(n,1,a))}}function i6(e){const t=[0];return r6(t,e.length-1),t}function a6(e,t){return e.map(n=>n*t)}function s6(e,t){return e.map(()=>t||MO).splice(0,e.length-1)}function ah({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=J$(r)?r.map(hw):hw(r),o={done:!1,value:t[0]},l=a6(n&&n.length===t.length?n:i6(t),e),u=n6(l,t,{ease:Array.isArray(a)?a:s6(t,a)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const o6=e=>{const t=({timestamp:n})=>e(n);return{start:()=>xt.update(t,!0),stop:()=>xa(t),now:()=>cn.isProcessing?cn.timestamp:Gr.now()}},l6={decay:fw,inertia:fw,tween:ah,keyframes:ah,spring:LO},c6=e=>e/100;class d0 extends OO{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:d}=this.options;d&&d()};const{name:n,motionValue:r,element:a,keyframes:o}=this.options,l=(a==null?void 0:a.KeyframeResolver)||c0,u=(d,f)=>this.onKeyframesResolved(d,f);this.resolver=new l(o,u,n,r,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:o,velocity:l=0}=this.options,u=Ub(n)?n:l6[n]||ah;let d,f;u!==ah&&typeof t[0]!="number"&&(d=Nu(c6,DO(t[0],t[1])),t=[0,100]);const m=u({...this.options,keyframes:t});o==="mirror"&&(f=u({...this.options,keyframes:[...t].reverse(),velocity:-l})),m.calculatedDuration===null&&(m.calculatedDuration=MN(m));const{calculatedDuration:g}=m,y=g+a,b=y*(r+1)-a;return{generator:m,mirroredGenerator:f,mapPercentToKeyframes:d,calculatedDuration:g,resolvedDuration:y,totalDuration:b}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:a,generator:o,mirroredGenerator:l,mapPercentToKeyframes:u,keyframes:d,calculatedDuration:f,totalDuration:m,resolvedDuration:g}=r;if(this.startTime===null)return o.next(0);const{delay:y,repeat:b,repeatType:v,repeatDelay:S,onUpdate:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-m/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const w=this.currentTime-y*(this.speed>=0?1:-1),T=this.speed>=0?w<0:w>m;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=m);let R=this.currentTime,D=o;if(b){const P=Math.min(this.currentTime,m)/g;let V=Math.floor(P),H=P%1;!H&&P>=1&&(H=1),H===1&&V--,V=Math.min(V,b+1),!!(V%2)&&(v==="reverse"?(H=1-H,S&&(H-=S/g)):v==="mirror"&&(D=l)),R=Di(0,1,H)*g}const N=T?{done:!1,value:d[0]}:D.next(R);u&&(N.value=u(N.value));let{done:k}=N;!T&&f!==null&&(k=this.speed>=0?this.currentTime>=m:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return I&&a!==void 0&&(N.value=Zh(d,this.options,a)),A&&A(N.value),I&&this.finish(),N}get duration(){const{resolved:t}=this;return t?Ci(t.calculatedDuration):0}get time(){return Ci(this.currentTime)}set time(t){t=Ti(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ci(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=o6,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const u6=new Set(["opacity","clipPath","filter","transform"]);function d6(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:l="loop",ease:u="easeInOut",times:d}={}){const f={[t]:n};d&&(f.offset=d);const m=VN(u,a);return Array.isArray(m)&&(f.easing=m),e.animate(f,{delay:r,duration:a,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"})}const f6=Vb(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sh=10,h6=2e4;function m6(e){return Ub(e.type)||e.type==="spring"||!PN(e.ease)}function p6(e,t){const n=new d0({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let o=0;for(;!r.done&&o<h6;)r=n.sample(o),a.push(r.value),o+=sh;return{times:void 0,keyframes:a,duration:o-sh,ease:"linear"}}const jO={anticipate:fO,backInOut:dO,circInOut:mO};function g6(e){return e in jO}class mw extends OO{constructor(t){super(t);const{name:n,motionValue:r,element:a,keyframes:o}=this.options;this.resolver=new NO(o,(l,u)=>this.onKeyframesResolved(l,u),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:a,ease:o,type:l,motionValue:u,name:d,startTime:f}=this.options;if(!u.owner||!u.owner.current)return!1;if(typeof o=="string"&&nh()&&g6(o)&&(o=jO[o]),m6(this.options)){const{onComplete:g,onUpdate:y,motionValue:b,element:v,...S}=this.options,A=p6(t,S);t=A.keyframes,t.length===1&&(t[1]=t[0]),r=A.duration,a=A.times,o=A.ease,l="keyframes"}const m=d6(u.owner.current,d,t,{...this.options,duration:r,times:a,ease:o});return m.startTime=f??this.calcStartTime(),this.pendingTimeline?(UA(m,this.pendingTimeline),this.pendingTimeline=void 0):m.onfinish=()=>{const{onComplete:g}=this.options;u.set(Zh(t,this.options,n)),g&&g(),this.cancel(),this.resolveFinishedPromise()},{animation:m,duration:r,times:a,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ci(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ci(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ti(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return qn;const{animation:r}=n;UA(r,t)}return qn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:a,type:o,ease:l,times:u}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:f,onUpdate:m,onComplete:g,element:y,...b}=this.options,v=new d0({...b,keyframes:r,duration:a,type:o,ease:l,times:u,isGenerator:!0}),S=Ti(this.time);f.setWithVelocity(v.sample(S-sh).value,v.sample(S).value,sh)}const{onStop:d}=this.options;d&&d(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:a,repeatType:o,damping:l,type:u}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:f}=n.owner.getProps();return f6()&&r&&u6.has(r)&&!d&&!f&&!a&&o!=="mirror"&&l!==0&&u!=="inertia"}}const y6={type:"spring",stiffness:500,damping:25,restSpeed:10},v6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),b6={type:"keyframes",duration:.8},_6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},x6=(e,{keyframes:t})=>t.length>2?b6:Cs.has(e)?e.startsWith("scale")?v6(t[1]):y6:_6;function E6({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:o,repeatType:l,repeatDelay:u,from:d,elapsed:f,...m}){return!!Object.keys(m).length}const f0=(e,t,n,r={},a,o)=>l=>{const u=zb(r,e)||{},d=u.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Ti(d);let m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:y=>{t.set(y),u.onUpdate&&u.onUpdate(y)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:a};E6(u)||(m={...m,...x6(e,m)}),m.duration&&(m.duration=Ti(m.duration)),m.repeatDelay&&(m.repeatDelay=Ti(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(g=!0)),m.allowFlatten=!u.type&&!u.ease,g&&!o&&t.get()!==void 0){const y=Zh(m.keyframes,u);if(y!==void 0)return xt.update(()=>{m.onUpdate(y),m.onComplete()}),new $5([])}return!o&&mw.supports(m)?new mw(m):new d0(m)};function S6({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function PO(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var o;let{transition:l=e.getDefaultTransition(),transitionEnd:u,...d}=t;r&&(l=r);const f=[],m=a&&e.animationState&&e.animationState.getState()[a];for(const g in d){const y=e.getValue(g,(o=e.latestValues[g])!==null&&o!==void 0?o:null),b=d[g];if(b===void 0||m&&S6(m,g))continue;const v={delay:n,...zb(l||{},g)};let S=!1;if(window.MotionHandoffAnimation){const w=sO(e);if(w){const T=window.MotionHandoffAnimation(w,g,xt);T!==null&&(v.startTime=T,S=!0)}}sv(e,g),y.start(f0(g,y,b,e.shouldReduceMotion&&aO.has(g)?{type:!1}:v,e,S));const A=y.animation;A&&f.push(A)}return u&&Promise.all(f).then(()=>{xt.update(()=>{u&&XG(e,u)})}),f}function gv(e,t,n={}){var r;const a=tu(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(o=n.transitionOverride);const l=a?()=>Promise.all(PO(e,a,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:g,staggerDirection:y}=o;return A6(e,t,m+f,g,y,n)}:()=>Promise.resolve(),{when:d}=o;if(d){const[f,m]=d==="beforeChildren"?[l,u]:[u,l];return f().then(()=>m())}else return Promise.all([l(),u(n.delay)])}function A6(e,t,n=0,r=0,a=1,o){const l=[],u=(e.variantChildren.size-1)*r,d=a===1?(f=0)=>f*r:(f=0)=>u-f*r;return Array.from(e.variantChildren).sort(w6).forEach((f,m)=>{f.notify("AnimationStart",t),l.push(gv(f,t,{...o,delay:n+d(m)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function w6(e,t){return e.sortNodePosition(t)}function T6(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(o=>gv(e,o,n));r=Promise.all(a)}else if(typeof t=="string")r=gv(e,t,n);else{const a=typeof t=="function"?tu(e,t,n.custom):t;r=Promise.all(PO(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function VO(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const C6=Kb.length;function BO(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?BO(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<C6;n++){const r=Kb[n],a=e.props[r];(Qc(a)||a===!1)&&(t[r]=a)}return t}const R6=[...qb].reverse(),N6=qb.length;function O6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>T6(e,n,r)))}function k6(e){let t=O6(e),n=pw(),r=!0;const a=d=>(f,m)=>{var g;const y=tu(e,m,d==="exit"?(g=e.presenceContext)===null||g===void 0?void 0:g.custom:void 0);if(y){const{transition:b,transitionEnd:v,...S}=y;f={...f,...S,...v}}return f};function o(d){t=d(e)}function l(d){const{props:f}=e,m=BO(e.parent)||{},g=[],y=new Set;let b={},v=1/0;for(let A=0;A<N6;A++){const w=R6[A],T=n[w],R=f[w]!==void 0?f[w]:m[w],D=Qc(R),N=w===d?T.isActive:null;N===!1&&(v=A);let k=R===m[w]&&R!==f[w]&&D;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),T.protectedKeys={...b},!T.isActive&&N===null||!R&&!T.prevProp||Wh(R)||typeof R=="boolean")continue;const I=D6(T.prevProp,R);let P=I||w===d&&T.isActive&&!k&&D||A>v&&D,V=!1;const H=Array.isArray(R)?R:[R];let fe=H.reduce(a(w),{});N===!1&&(fe={});const{prevResolvedValues:te={}}=T,ue={...te,...fe},Y=ne=>{P=!0,y.has(ne)&&(V=!0,y.delete(ne)),T.needsAnimating[ne]=!0;const ee=e.getValue(ne);ee&&(ee.liveStyle=!1)};for(const ne in ue){const ee=fe[ne],ve=te[ne];if(b.hasOwnProperty(ne))continue;let j=!1;av(ee)&&av(ve)?j=!VO(ee,ve):j=ee!==ve,j?ee!=null?Y(ne):y.add(ne):ee!==void 0&&y.has(ne)?Y(ne):T.protectedKeys[ne]=!0}T.prevProp=R,T.prevResolvedValues=fe,T.isActive&&(b={...b,...fe}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(k&&I)||V)&&g.push(...H.map(ne=>({animation:ne,options:{type:w}})))}if(y.size){const A={};if(typeof f.initial!="boolean"){const w=tu(e,Array.isArray(f.initial)?f.initial[0]:f.initial);w&&w.transition&&(A.transition=w.transition)}y.forEach(w=>{const T=e.getBaseTarget(w),R=e.getValue(w);R&&(R.liveStyle=!0),A[w]=T??null}),g.push({animation:A})}let S=!!g.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(g):Promise.resolve()}function u(d,f){var m;if(n[d].isActive===f)return Promise.resolve();(m=e.variantChildren)===null||m===void 0||m.forEach(y=>{var b;return(b=y.animationState)===null||b===void 0?void 0:b.setActive(d,f)}),n[d].isActive=f;const g=l(d);for(const y in n)n[y].protectedKeys={};return g}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=pw(),r=!0}}}function D6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!VO(t,e):!1}function rs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pw(){return{animate:rs(!0),whileInView:rs(),whileHover:rs(),whileTap:rs(),whileDrag:rs(),whileFocus:rs(),exit:rs()}}class Oa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class I6 extends Oa{constructor(t){super(t),t.animationState||(t.animationState=k6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let L6=0;class M6 extends Oa{constructor(){super(...arguments),this.id=L6++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const zO={animation:{Feature:I6},exit:{Feature:M6}};function ru(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ou(e){return{point:{x:e.pageX,y:e.pageY}}}const j6=e=>t=>Gb(t)&&e(t,Ou(t));function Cc(e,t,n,r){return ru(e,t,j6(n),r)}function UO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function P6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function V6(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const HO=1e-4,B6=1-HO,z6=1+HO,FO=.01,U6=0-FO,H6=0+FO;function Sn(e){return e.max-e.min}function F6(e,t,n){return Math.abs(e-t)<=n}function gw(e,t,n,r=.5){e.origin=r,e.originPoint=Ct(t.min,t.max,e.origin),e.scale=Sn(n)/Sn(t),e.translate=Ct(n.min,n.max,e.origin)-e.originPoint,(e.scale>=B6&&e.scale<=z6||isNaN(e.scale))&&(e.scale=1),(e.translate>=U6&&e.translate<=H6||isNaN(e.translate))&&(e.translate=0)}function Rc(e,t,n,r){gw(e.x,t.x,n.x,r?r.originX:void 0),gw(e.y,t.y,n.y,r?r.originY:void 0)}function yw(e,t,n){e.min=n.min+t.min,e.max=e.min+Sn(t)}function G6(e,t,n){yw(e.x,t.x,n.x),yw(e.y,t.y,n.y)}function vw(e,t,n){e.min=t.min-n.min,e.max=e.min+Sn(t)}function Nc(e,t,n){vw(e.x,t.x,n.x),vw(e.y,t.y,n.y)}const bw=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:bw(),y:bw()}),_w=()=>({min:0,max:0}),Pt=()=>({x:_w(),y:_w()});function lr(e){return[e("x"),e("y")]}function ny(e){return e===void 0||e===1}function yv({scale:e,scaleX:t,scaleY:n}){return!ny(e)||!ny(t)||!ny(n)}function is(e){return yv(e)||GO(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function GO(e){return xw(e.x)||xw(e.y)}function xw(e){return e&&e!=="0%"}function oh(e,t,n){const r=e-n,a=t*r;return n+a}function Ew(e,t,n,r,a){return a!==void 0&&(e=oh(e,a,r)),oh(e,n,r)+t}function vv(e,t=0,n=1,r,a){e.min=Ew(e.min,t,n,r,a),e.max=Ew(e.max,t,n,r,a)}function $O(e,{x:t,y:n}){vv(e.x,t.translate,t.scale,t.originPoint),vv(e.y,n.translate,n.scale,n.originPoint)}const Sw=.999999999999,Aw=1.0000000000001;function $6(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let o,l;for(let u=0;u<a;u++){o=n[u],l=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Co(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,$O(e,l)),r&&is(o.latestValues)&&Co(e,o.latestValues))}t.x<Aw&&t.x>Sw&&(t.x=1),t.y<Aw&&t.y>Sw&&(t.y=1)}function To(e,t){e.min=e.min+t,e.max=e.max+t}function ww(e,t,n,r,a=.5){const o=Ct(e.min,e.max,a);vv(e,t,n,o,r)}function Co(e,t){ww(e.x,t.x,t.scaleX,t.scale,t.originX),ww(e.y,t.y,t.scaleY,t.scale,t.originY)}function qO(e,t){return UO(V6(e.getBoundingClientRect(),t))}function q6(e,t,n){const r=qO(e,n),{scroll:a}=t;return a&&(To(r.x,a.offset.x),To(r.y,a.offset.y)),r}const KO=({current:e})=>e?e.ownerDocument.defaultView:null,Tw=(e,t)=>Math.abs(e-t);function K6(e,t){const n=Tw(e.x,t.x),r=Tw(e.y,t.y);return Math.sqrt(n**2+r**2)}class WO{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=iy(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,b=K6(g.offset,{x:0,y:0})>=3;if(!y&&!b)return;const{point:v}=g,{timestamp:S}=cn;this.history.push({...v,timestamp:S});const{onStart:A,onMove:w}=this.handlers;y||(A&&A(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,g)},this.handlePointerMove=(g,y)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=ry(y,this.transformPagePoint),xt.update(this.updatePoint,!0)},this.handlePointerUp=(g,y)=>{this.end();const{onEnd:b,onSessionEnd:v,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=iy(g.type==="pointercancel"?this.lastMoveEventInfo:ry(y,this.transformPagePoint),this.history);this.startEvent&&b&&b(g,A),v&&v(g,A)},!Gb(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const l=Ou(t),u=ry(l,this.transformPagePoint),{point:d}=u,{timestamp:f}=cn;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,iy(u,this.history)),this.removeListeners=Nu(Cc(this.contextWindow,"pointermove",this.handlePointerMove),Cc(this.contextWindow,"pointerup",this.handlePointerUp),Cc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),xa(this.updatePoint)}}function ry(e,t){return t?{point:t(e.point)}:e}function Cw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function iy({point:e},t){return{point:e,delta:Cw(e,YO(t)),offset:Cw(e,W6(t)),velocity:Y6(t,.1)}}function W6(e){return e[0]}function YO(e){return e[e.length-1]}function Y6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=YO(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ti(t)));)n--;if(!r)return{x:0,y:0};const o=Ci(a.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Z6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ct(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ct(n,e,r.max):Math.min(e,n)),e}function Rw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function X6(e,{top:t,left:n,bottom:r,right:a}){return{x:Rw(e.x,n,a),y:Rw(e.y,t,r)}}function Nw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Q6(e,t){return{x:Nw(e.x,t.x),y:Nw(e.y,t.y)}}function J6(e,t){let n=.5;const r=Sn(e),a=Sn(t);return a>r?n=Uo(t.min,t.max-r,e.min):r>a&&(n=Uo(e.min,e.max-a,t.min)),Di(0,1,n)}function e8(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const bv=.35;function t8(e=bv){return e===!1?e=0:e===!0&&(e=bv),{x:Ow(e,"left","right"),y:Ow(e,"top","bottom")}}function Ow(e,t,n){return{min:kw(e,t),max:kw(e,n)}}function kw(e,t){return typeof e=="number"?e:e[t]||0}const n8=new WeakMap;class r8{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=m=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ou(m).point)},o=(m,g)=>{const{drag:y,dragPropagation:b,onDragStart:v}=this.getProps();if(y&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=X5(y),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),lr(A=>{let w=this.getAxisMotionValue(A).get()||0;if($r.test(w)){const{projection:T}=this.visualElement;if(T&&T.layout){const R=T.layout.layoutBox[A];R&&(w=Sn(R)*(parseFloat(w)/100))}}this.originPoint[A]=w}),v&&xt.postRender(()=>v(m,g)),sv(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},l=(m,g)=>{const{dragPropagation:y,dragDirectionLock:b,onDirectionLock:v,onDrag:S}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:A}=g;if(b&&this.currentDirection===null){this.currentDirection=i8(A),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",g.point,A),this.updateAxis("y",g.point,A),this.visualElement.render(),S&&S(m,g)},u=(m,g)=>this.stop(m,g),d=()=>lr(m=>{var g;return this.getAnimationState(m)==="paused"&&((g=this.getAxisMotionValue(m).animation)===null||g===void 0?void 0:g.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new WO(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:KO(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&xt.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!sf(t,a,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=Z6(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&So(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=X6(a.layoutBox,n):this.constraints=!1,this.elastic=t8(r),o!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&lr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=e8(a.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!So(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const o=q6(r,a.root,this.visualElement.getTransformPagePoint());let l=Q6(a.layout.layoutBox,o);if(n){const u=n(P6(l));this.hasMutatedConstraints=!!u,u&&(l=UO(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},f=lr(m=>{if(!sf(m,n,this.currentDirection))return;let g=d&&d[m]||{};l&&(g={min:0,max:0});const y=a?200:1e6,b=a?40:1e7,v={type:"inertia",velocity:r?t[m]:0,bounceStiffness:y,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...g};return this.startAxisValueAnimation(m,v)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sv(this.visualElement,t),r.start(f0(t,r,0,n,this.visualElement,!1))}stopAnimation(){lr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){lr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){lr(n=>{const{drag:r}=this.getProps();if(!sf(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,o=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:u}=a.layout.layoutBox[n];o.set(t[n]-Ct(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!So(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};lr(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();a[l]=J6({min:d,max:d},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),lr(l=>{if(!sf(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];u.set(Ct(d,f,a[l]))})}addListeners(){if(!this.visualElement.current)return;n8.set(this.visualElement,this);const t=this.visualElement.current,n=Cc(t,"pointerdown",d=>{const{drag:f,dragListener:m=!0}=this.getProps();f&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();So(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,o=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),xt.read(r);const l=ru(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&(lr(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=d[m].translate,g.set(g.get()+d[m].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:o=!1,dragElastic:l=bv,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function sf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function i8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class a8 extends Oa{constructor(t){super(t),this.removeGroupControls=qn,this.removeListeners=qn,this.controls=new r8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Dw=e=>(t,n)=>{e&&xt.postRender(()=>e(t,n))};class s8 extends Oa{constructor(){super(...arguments),this.removePointerDownListener=qn}onPointerDown(t){this.session=new WO(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:KO(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:Dw(t),onStart:Dw(n),onMove:r,onEnd:(o,l)=>{delete this.session,a&&xt.postRender(()=>a(o,l))}}}mount(){this.removePointerDownListener=Cc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Rf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Iw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const n=Iw(e,t.target.x),r=Iw(e,t.target.y);return`${n}% ${r}%`}},o8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Ea.parse(e);if(a.length>5)return r;const o=Ea.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const f=Ct(u,d,.5);return typeof a[2+l]=="number"&&(a[2+l]/=f),typeof a[3+l]=="number"&&(a[3+l]/=f),o(a)}};class l8 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:o}=t;wG(c8),o&&(n.group&&n.group.add(o),r&&r.register&&a&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Rf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:o}=this.props,l=r.projection;return l&&(l.isPresent=o,a||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||xt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Fb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ZO(e){const[t,n]=U5(),r=E.useContext(kN);return _.jsx(l8,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(qN),isPresent:t,safeToRemove:n})}const c8={borderRadius:{...fc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fc,borderTopRightRadius:fc,borderBottomLeftRadius:fc,borderBottomRightRadius:fc,boxShadow:o8};function u8(e,t,n){const r=gn(e)?e:Xc(e);return r.start(f0("",r,t,n)),r.animation}function d8(e){return e instanceof SVGElement&&e.tagName!=="svg"}const f8=(e,t)=>e.depth-t.depth;class h8{constructor(){this.children=[],this.isDirty=!1}add(t){jb(this.children,t),this.isDirty=!0}remove(t){Pb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(f8),this.isDirty=!1,this.children.forEach(t)}}function m8(e,t){const n=Gr.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(xa(r),e(o-t))};return xt.read(r,!0),()=>xa(r)}const XO=["TopLeft","TopRight","BottomLeft","BottomRight"],p8=XO.length,Lw=e=>typeof e=="string"?parseFloat(e):e,Mw=e=>typeof e=="number"||Be.test(e);function g8(e,t,n,r,a,o){a?(e.opacity=Ct(0,n.opacity!==void 0?n.opacity:1,y8(r)),e.opacityExit=Ct(t.opacity!==void 0?t.opacity:1,0,v8(r))):o&&(e.opacity=Ct(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<p8;l++){const u=`border${XO[l]}Radius`;let d=jw(t,u),f=jw(n,u);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||Mw(d)===Mw(f)?(e[u]=Math.max(Ct(Lw(d),Lw(f),r),0),($r.test(f)||$r.test(d))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=Ct(t.rotate||0,n.rotate||0,r))}function jw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const y8=QO(0,.5,hO),v8=QO(.5,.95,qn);function QO(e,t,n){return r=>r<e?0:r>t?1:n(Uo(e,t,r))}function Pw(e,t){e.min=t.min,e.max=t.max}function sr(e,t){Pw(e.x,t.x),Pw(e.y,t.y)}function Vw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Bw(e,t,n,r,a){return e-=t,e=oh(e,1/n,r),a!==void 0&&(e=oh(e,1/a,r)),e}function b8(e,t=0,n=1,r=.5,a,o=e,l=e){if($r.test(t)&&(t=parseFloat(t),t=Ct(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=Ct(o.min,o.max,r);e===o&&(u-=t),e.min=Bw(e.min,t,n,u,a),e.max=Bw(e.max,t,n,u,a)}function zw(e,t,[n,r,a],o,l){b8(e,t[n],t[r],t[a],t.scale,o,l)}const _8=["x","scaleX","originX"],x8=["y","scaleY","originY"];function Uw(e,t,n,r){zw(e.x,t,_8,n?n.x:void 0,r?r.x:void 0),zw(e.y,t,x8,n?n.y:void 0,r?r.y:void 0)}function Hw(e){return e.translate===0&&e.scale===1}function JO(e){return Hw(e.x)&&Hw(e.y)}function Fw(e,t){return e.min===t.min&&e.max===t.max}function E8(e,t){return Fw(e.x,t.x)&&Fw(e.y,t.y)}function Gw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ek(e,t){return Gw(e.x,t.x)&&Gw(e.y,t.y)}function $w(e){return Sn(e.x)/Sn(e.y)}function qw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class S8{constructor(){this.members=[]}add(t){jb(this.members,t),t.scheduleRender()}remove(t){if(Pb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const o=this.members[a];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function A8(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((a||o||l)&&(r=`translate3d(${a}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:g,rotateY:y,skewX:b,skewY:v}=n;f&&(r=`perspective(${f}px) ${r}`),m&&(r+=`rotate(${m}deg) `),g&&(r+=`rotateX(${g}deg) `),y&&(r+=`rotateY(${y}deg) `),b&&(r+=`skewX(${b}deg) `),v&&(r+=`skewY(${v}deg) `)}const u=e.x.scale*t.x,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const ay=["","X","Y","Z"],w8={visibility:"hidden"},Kw=1e3;let T8=0;function sy(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function tk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=sO(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",xt,!(a||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&tk(r)}function nk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(l={},u=t==null?void 0:t()){this.id=T8++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(N8),this.nodes.forEach(L8),this.nodes.forEach(M8),this.nodes.forEach(O8)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new h8)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Bb),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=d8(l),this.instance=l;const{layoutId:d,layout:f,visualElement:m}=this.options;if(m&&!m.current&&m.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(f||d)&&(this.isLayoutDirty=!0),e){let g;const y=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,g&&g(),g=m8(y,250),Rf.hasAnimatedSinceResize&&(Rf.hasAnimatedSinceResize=!1,this.nodes.forEach(Yw))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||f)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:y,hasRelativeLayoutChanged:b,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||m.getDefaultTransition()||z8,{onLayoutAnimationStart:A,onLayoutAnimationComplete:w}=m.getProps(),T=!this.targetLayout||!ek(this.targetLayout,v),R=!y&&b;if(this.options.layoutRoot||this.resumeFrom||R||y&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(g,R);const D={...zb(S,"layout"),onPlay:A,onComplete:w};(m.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D)}else y||Yw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,xa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(j8),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&tk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ww);return}this.isUpdating||this.nodes.forEach(D8),this.isUpdating=!1,this.nodes.forEach(I8),this.nodes.forEach(C8),this.nodes.forEach(R8),this.clearAllSnapshots();const u=Gr.now();cn.delta=Di(0,1e3/60,u-cn.timestamp),cn.timestamp=u,cn.isProcessing=!0,Zg.update.process(cn),Zg.preRender.process(cn),Zg.render.process(cn),cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(k8),this.sharedNodes.forEach(P8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Sn(this.snapshot.measuredBox.x)&&!Sn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!a)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!JO(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;l&&(u||is(this.latestValues)||m)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),U8(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:u}=this.options;if(!u)return Pt();const d=u.measureViewportBox();if(!(((l=this.scroll)===null||l===void 0?void 0:l.wasRoot)||this.path.some(H8))){const{scroll:m}=this.root;m&&(To(d.x,m.offset.x),To(d.y,m.offset.y))}return d}removeElementScroll(l){var u;const d=Pt();if(sr(d,l),!((u=this.scroll)===null||u===void 0)&&u.wasRoot)return d;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:g,options:y}=m;m!==this.root&&g&&y.layoutScroll&&(g.wasRoot&&sr(d,l),To(d.x,g.offset.x),To(d.y,g.offset.y))}return d}applyTransform(l,u=!1){const d=Pt();sr(d,l);for(let f=0;f<this.path.length;f++){const m=this.path[f];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Co(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),is(m.latestValues)&&Co(d,m.latestValues)}return is(this.latestValues)&&Co(d,this.latestValues),d}removeTransform(l){const u=Pt();sr(u,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!is(f.latestValues))continue;yv(f.latestValues)&&f.updateSnapshot();const m=Pt(),g=f.measurePageBox();sr(m,g),Uw(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,m)}return is(this.latestValues)&&Uw(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:y}=this.options;if(!(!this.layout||!(g||y))){if(this.resolvedRelativeTargetAt=cn.timestamp,!this.targetDelta&&!this.relativeTarget){const b=this.getClosestProjectingParent();b&&b.layout&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pt(),this.relativeTargetOrigin=Pt(),Nc(this.relativeTargetOrigin,this.layout.layoutBox,b.layout.layoutBox),sr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pt(),this.targetWithTransforms=Pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),G6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sr(this.target,this.layout.layoutBox),$O(this.target,this.targetDelta)):sr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const b=this.getClosestProjectingParent();b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pt(),this.relativeTargetOrigin=Pt(),Nc(this.relativeTargetOrigin,this.target,b.target),sr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||yv(this.parent.latestValues)||GO(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const u=this.getLead(),d=!!this.resumingFrom||this!==u;let f=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===cn.timestamp&&(f=!1),f)return;const{layout:m,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||g))return;sr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,b=this.treeScale.y;$6(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Pt());const{target:v}=u;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vw(this.prevProjectionDelta.x,this.projectionDelta.x),Vw(this.prevProjectionDelta.y,this.projectionDelta.y)),Rc(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==b||!qw(this.projectionDelta.x,this.prevProjectionDelta.x)||!qw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)===null||u===void 0||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wo(),this.projectionDelta=wo(),this.projectionDeltaWithTransform=wo()}setAnimationOrigin(l,u=!1){const d=this.snapshot,f=d?d.latestValues:{},m={...this.latestValues},g=wo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const y=Pt(),b=d?d.source:void 0,v=this.layout?this.layout.source:void 0,S=b!==v,A=this.getStack(),w=!A||A.members.length<=1,T=!!(S&&!w&&this.options.crossfade===!0&&!this.path.some(B8));this.animationProgress=0;let R;this.mixTargetDelta=D=>{const N=D/1e3;Zw(g.x,l.x,N),Zw(g.y,l.y,N),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nc(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),V8(this.relativeTarget,this.relativeTargetOrigin,y,N),R&&E8(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Pt()),sr(R,this.relativeTarget)),S&&(this.animationValues=m,g8(m,f,this.latestValues,N,T,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xt.update(()=>{Rf.hasAnimatedSinceResize=!0,this.currentAnimation=u8(0,Kw,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Kw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:f,latestValues:m}=l;if(!(!u||!d||!f)){if(this!==l&&this.layout&&f&&rk(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||Pt();const g=Sn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+g;const y=Sn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+y}sr(u,d),Co(u,m),Rc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new S8),this.sharedNodes.get(l).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const f=this.getStack();f&&f.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const f={};d.z&&sy("z",l,f,this.animationValues);for(let m=0;m<ay.length;m++)sy(`rotate${ay[m]}`,l,f,this.animationValues),sy(`skew${ay[m]}`,l,f,this.animationValues);l.render();for(const m in f)l.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);l.scheduleRender()}getProjectionStyles(l){var u,d;if(!this.instance||this.isSVG)return;if(!this.isVisible)return w8;const f={visibility:""},m=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=Cf(l==null?void 0:l.pointerEvents)||"",f.transform=m?m(this.latestValues,""):"none",f;const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){const S={};return this.options.layoutId&&(S.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,S.pointerEvents=Cf(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!is(this.latestValues)&&(S.transform=m?m({},""):"none",this.hasProjected=!1),S}const y=g.animationValues||g.latestValues;this.applyTransformsToTarget(),f.transform=A8(this.projectionDeltaWithTransform,this.treeScale,y),m&&(f.transform=m(y,f.transform));const{x:b,y:v}=this.projectionDelta;f.transformOrigin=`${b.origin*100}% ${v.origin*100}% 0`,g.animationValues?f.opacity=g===this?(d=(u=y.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:f.opacity=g===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const S in Jc){if(y[S]===void 0)continue;const{correct:A,applyTo:w,isCSSVariable:T}=Jc[S],R=f.transform==="none"?y[S]:A(y[S],g);if(w){const D=w.length;for(let N=0;N<D;N++)f[w[N]]=R}else T?this.options.visualElement.renderState.vars[S]=R:f[S]=R}return this.options.layoutId&&(f.pointerEvents=g===this?Cf(l==null?void 0:l.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(Ww),this.root.sharedNodes.clear()}}}function C8(e){e.updateLayout()}function R8(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:o}=e.options,l=n.source!==e.layout.source;o==="size"?lr(g=>{const y=l?n.measuredBox[g]:n.layoutBox[g],b=Sn(y);y.min=r[g].min,y.max=y.min+b}):rk(o,n.layoutBox,r)&&lr(g=>{const y=l?n.measuredBox[g]:n.layoutBox[g],b=Sn(r[g]);y.max=y.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+b)});const u=wo();Rc(u,r,n.layoutBox);const d=wo();l?Rc(d,e.applyTransform(a,!0),n.measuredBox):Rc(d,r,n.layoutBox);const f=!JO(u);let m=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:y,layout:b}=g;if(y&&b){const v=Pt();Nc(v,n.layoutBox,y.layoutBox);const S=Pt();Nc(S,r,b.layoutBox),ek(v,S)||(m=!0),g.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=v,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:d,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function N8(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function O8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function k8(e){e.clearSnapshot()}function Ww(e){e.clearMeasurements()}function D8(e){e.isLayoutDirty=!1}function I8(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Yw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function L8(e){e.resolveTargetDelta()}function M8(e){e.calcProjection()}function j8(e){e.resetSkewAndRotation()}function P8(e){e.removeLeadSnapshot()}function Zw(e,t,n){e.translate=Ct(t.translate,0,n),e.scale=Ct(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xw(e,t,n,r){e.min=Ct(t.min,n.min,r),e.max=Ct(t.max,n.max,r)}function V8(e,t,n,r){Xw(e.x,t.x,n.x,r),Xw(e.y,t.y,n.y,r)}function B8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const z8={duration:.45,ease:[.4,0,.1,1]},Qw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Jw=Qw("applewebkit/")&&!Qw("chrome/")?Math.round:qn;function eT(e){e.min=Jw(e.min),e.max=Jw(e.max)}function U8(e){eT(e.x),eT(e.y)}function rk(e,t,n){return e==="position"||e==="preserve-aspect"&&!F6($w(t),$w(n),.2)}function H8(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const F8=nk({attachResizeListener:(e,t)=>ru(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oy={current:void 0},ik=nk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oy.current){const e=new F8({});e.mount(window),e.setOptions({layoutScroll:!0}),oy.current=e}return oy.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),G8={pan:{Feature:s8},drag:{Feature:a8,ProjectionNode:ik,MeasureLayout:ZO}};function tT(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,o=r[a];o&&xt.postRender(()=>o(t,Ou(t)))}class $8 extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=J5(t,(n,r)=>(tT(this.node,r,"Start"),a=>tT(this.node,a,"End"))))}unmount(){}}class q8 extends Oa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nu(ru(this.node.current,"focus",()=>this.onFocus()),ru(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function nT(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),o=r[a];o&&xt.postRender(()=>o(t,Ou(t)))}class K8 extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=rG(t,(n,r)=>(nT(this.node,r,"Start"),(a,{success:o})=>nT(this.node,a,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _v=new WeakMap,ly=new WeakMap,W8=e=>{const t=_v.get(e.target);t&&t(e)},Y8=e=>{e.forEach(W8)};function Z8({root:e,...t}){const n=e||document;ly.has(n)||ly.set(n,{});const r=ly.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(Y8,{root:e,...t})),r[a]}function X8(e,t,n){const r=Z8(t);return _v.set(e,n),r.observe(e),()=>{_v.delete(e),r.unobserve(e)}}const Q8={some:0,all:1};class J8 extends Oa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:Q8[a]},u=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),y=f?m:g;y&&y(d)};return X8(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(e9(t,n))&&this.startObserver()}unmount(){}}function e9({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ak={inView:{Feature:J8},tap:{Feature:K8},focus:{Feature:q8},hover:{Feature:$8}},t9={layout:{ProjectionNode:ik,MeasureLayout:ZO}},xv={current:null},sk={current:!1};function n9(){if(sk.current=!0,!!Lb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xv.current=e.matches;e.addListener(t),t()}else xv.current=!1}const r9=[...RO,pn,Ea],i9=e=>r9.find(CO(e)),a9=new WeakMap;function s9(e,t,n){for(const r in t){const a=t[r],o=n[r];if(gn(a))e.addValue(r,a);else if(gn(o))e.addValue(r,Xc(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(a):l.hasAnimated||l.set(a)}else{const l=e.getStaticValue(r);e.addValue(r,Xc(l!==void 0?l:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const rT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class o9{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=c0,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=Gr.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,xt.render(this.render,!1,!0))};const{latestValues:d,renderState:f,onUpdate:m}=l;this.onUpdate=m,this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Yh(n),this.isVariantNode=GN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const b in y){const v=y[b];d[b]!==void 0&&gn(v)&&v.set(d[b],!1)}}mount(t){this.current=t,a9.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),sk.current||n9(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xv.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),xa(this.notifyUpdate),xa(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Cs.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&xt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),o(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ho){const n=Ho[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<rT.length;r++){const a=rT[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const o="on"+a,l=t[o];l&&(this.propEventSubscriptions[a]=this.on(a,l))}this.prevMotionValues=s9(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Xc(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(wO(a)||pO(a))?a=parseFloat(a):!i9(a)&&Ea.test(n)&&(a=EO(t,n)),this.setBaseTarget(t,gn(a)?a.get():a)),gn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const l=r0(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);l&&(a=l[t])}if(r&&a!==void 0)return a;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!gn(o)?o:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bb),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ok extends o9{constructor(){super(...arguments),this.KeyframeResolver=NO}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;gn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function l9(e){return window.getComputedStyle(e)}class c9 extends ok{constructor(){super(...arguments),this.type="html",this.renderInstance=tO}readValueFromInstance(t,n){if(Cs.has(n))return E$(t,n);{const r=l9(t),a=(Yb(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qO(t,n)}build(t,n,r){Qb(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return i0(t,n,r)}}class u9 extends ok{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eO(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Cs.has(n)){const r=xO(n);return r&&r.default||0}return n=nO.has(n)?n:Wb(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return iO(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&xt.postRender(this.updateDimensions)}build(t,n,r){t0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){rO(t,n,r,a)}mount(t){this.isSVGTag=n0(t.tagName),super.mount(t)}}const lk=(e,t)=>e0(e)?new u9(t):new c9(t,{allowProjection:e!==E.Fragment}),d9=YG({...zO,...ak,...G8,...t9},lk),ck=dG(d9),f9={renderer:lk,...zO,...ak},uk=e=>{const[t,n]=E.useState(e);return E.useEffect(()=>{n(e??window.document.body)},[e]),t};function h9(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:m9}=$e;function dk(e){const t=m9();return n=>{const r=e(n);return h9(t.current,r)?t.current:t.current=r}}const fk=e=>{const{disableScroll:t=!1,element:n,key:r="unnamed_blocker"}=e??{},{isElementScrollBlocked:a,addBlockage:o,removeBlockage:l}=az(dk(f=>({isElementScrollBlocked:f.isElementScrollBlocked,addBlockage:f.addBlockage,removeBlockage:f.removeBlockage}))),u=uk(n);return E.useEffect(()=>{const f=n??window.document.body;t?o(r,f):l(r,f)},[o,t,n,r,l]),{isScrollBlocked:u?a(u):!1}},p9=mr("flex text-text flex-col backdrop-blur",{variants:{roundedSize:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},transparency:{none:"bg-card",sm:"bg-card/90",md:"bg-card/70",lg:"bg-card/40",xl:"bg-card/20",full:""},padding:{none:"p-0",sm:"p-1",md:"p-2",lg:"p-3",xl:"p-4"},separator:{without:"",x:"divide-x divide-dashed divide-text/20",y:"divide-y divide-dashed divide-text/20",both:"divide-x divide-y divide-dashed divide-text/20"},border:{none:"",with:"border-[1.5px]"},borderColor:{primary:"border-primary",secondary:"border-secondary",neutral:"border-neutral",text:"border-text ",error:"border-error",warning:"border-warning",success:"border-success"},background:{none:"bg-inherit",hoverable:"!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur",with:""},gap:{none:"gap-0",sm:"gap-1",md:"gap-3",lg:"gap-5",xl:"gap-8","2xl":"gap-10"}},defaultVariants:{roundedSize:"md",border:"none",borderColor:"text",transparency:"md",padding:"none",separator:"without",gap:"none"}}),ei=({children:e,roundedSize:t,padding:n,transparency:r,separator:a,className:o,border:l,borderColor:u,background:d,...f})=>_.jsx("div",{className:Te(p9({roundedSize:t,transparency:r,padding:n,separator:a,border:typeof l=="boolean"?l?"with":"none":void 0,background:d,borderColor:u,className:o})),...f,children:e}),h0="relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8",g9="after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:hover:cursor-pointer after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100",y9=({className:e,...t})=>_.jsx("h1",{className:Te("mt-5 text-2xl font-bold",e),...t}),v9=({className:e,...t})=>_.jsx("h2",{className:Te("mt-16 mb-2 text-2xl font-bold",h0,e),...t}),b9=({className:e,...t})=>_.jsx("h3",{className:Te("mt-5 mb-2 text-xl font-bold",h0,e),...t}),_9=({className:e,...t})=>_.jsx("h4",{className:Te("mt-3 text-lg font-bold",h0,e),...t}),x9=e=>String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase(),E9=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},S9=(e,t)=>{const n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,a=window.getComputedStyle(e,":after"),o=n+parseInt(a.getPropertyValue("left"),10),l=o+parseInt(a.width,10),u=r+parseInt(a.getPropertyValue("top"),10),d=u+parseInt(a.height,10),f=t.clientX,m=t.clientY;return f>=o&&f<=l&&m>=u&&m<=d},m0=({H:e,children:t,className:n,isClickable:r,...a})=>{const o=typeof t=="string"?x9(t):void 0,l=u=>{const{id:d}=u.currentTarget;if(S9(u.currentTarget,u)&&typeof d=="string"){const g=`${window.location.href.split("#")[0]}#${d}`;navigator.clipboard.writeText(g),E9(d)}};return _.jsx(e,{id:o,onClick:r?l:void 0,"aria-label":r?`Click to scroll to section ${o} and copy the link to the clipboard`:void 0,className:Te(r&&g9,n),...a,children:t})},A9=({isClickable:e,...t})=>_.jsx(y9,{...t}),w9=({isClickable:e=!1,...t})=>_.jsx(m0,{H:v9,isClickable:e,...t}),p0=({isClickable:e=!1,...t})=>_.jsx(m0,{H:b9,isClickable:e,...t}),T9=({isClickable:e=!1,...t})=>_.jsx(m0,{H:_9,isClickable:e,...t}),C9=mr("cursor-default overflow-auto py-3 shadow-sm justify-center",{variants:{size:{sm:"h-auto max-h-[30vh] w-[95vw] max-w-xl",md:"h-auto max-h-[50vh] w-[95vw] max-w-xl",lg:"h-auto max-h-[70vh] w-[95vw] max-w-2xl",xl:"h-auto max-h-[95vh] w-[95vw] max-w-6xl",unset:"h-auto max-h-[95vh] w-[95vw]"}},defaultVariants:{size:"unset"}}),R9=ck.create(ei),hk=({children:e,isOpen:t,container:n,disableScroll:r=!1,onClose:a,hasCloseButton:o=!1,title:l,size:u="md",className:d,...f})=>{const m=uk(n);if(fk({key:"modal",disableScroll:t&&r}),!m)return _.jsx(_.Fragment,{});const g=typeof l=="string";return ws.createPortal(_.jsx(ck.div,{className:"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur",animate:t?"visible":"invisible",variants:{visible:{opacity:1,visibility:"visible",transition:{duration:.1,when:"beforeChildren"}},invisible:{opacity:0,visibility:"hidden",transition:{duration:.1,when:"afterChildren"}}},onClick:y=>{y.stopPropagation(),a==null||a()},"aria-hidden":!t,children:_.jsx("div",{className:"flex justify-center p-4",children:_.jsxs(R9,{onClick:y=>y.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:C9({size:u,className:d}),role:"dialog","aria-modal":!0,roundedSize:"2xl",...f,children:[_.jsxs("div",{className:Te("cursor-default px-4",o&&g?"flex items-center justify-center":o?"flex items-center justify-end":g?"items-center":"hidden"),children:[g&&_.jsx(p0,{className:"ml-4 flex items-center justify-center text-lg font-bold",children:l}),o&&_.jsx(gt,{variant:"hoverable",color:"text",label:"Close modal",className:"ml-auto",onClick:y=>{y.stopPropagation(),a==null||a()},Icon:Ts,size:"icon-md"})]}),_.jsx("div",{className:"flex flex-1 flex-col items-center overflow-auto",children:e})]})})}),m)},N9=mr("gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline","invisible-link":"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0",button:"rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50","button-outlined":"rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",hoverable:"block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5"},color:{primary:"text-primary",secondary:"text-secondary",destructive:"text-destructive",neutral:"text-neutral",light:"text-white",dark:"text-neutral-800",text:"text-text","text-inverse":"text-text-opposite",error:"text-error",success:"text-success",custom:""},underlined:{default:"",true:"underline",false:"no-underline"}},defaultVariants:{variant:"default",color:"primary",underlined:"default"}}),O9=({href:e,isExternalLink:t})=>{const n=typeof e=="string"&&e.trim()!=="";return t===!0||typeof t>"u"&&n&&/^https?:\/\//.test(e)},g0=e=>{const{variant:t="default",color:n="primary",children:r,label:a,className:o,isActive:l,underlined:u,locale:d,isExternalLink:f,href:m,...g}=e,{internationalization:y}=rt,b=O9(e),v=typeof r=="string",S=b?"noopener noreferrer nofollow":void 0,A=b?"_blank":"_self",w=d?d===y.defaultLocale?"x-default":d:void 0,T=d&&m&&!b?nj(m,d):m;return _.jsxs("a",{href:T,hrefLang:w,"aria-label":a,rel:S,target:A,"aria-current":l?"page":void 0,className:Te(N9({variant:t,color:n,underlined:u,className:o})),...g,children:[t==="button"?_.jsx("span",{children:r}):r,b&&v&&_.jsx(UV,{className:"ml-2 inline-block size-4"})]})},mk={key:"breadcrumb",content:{linkLabel:me({en:"Go to",fr:"Aller à",es:"Ir a","en-GB":"Go to",de:"Gehe zu",ja:"に移動",ko:"로 이동",zh:"转到",it:"Vai a",pt:"Ir para",hi:"कर जाएं",ar:"اذهب إلى",ru:"Перейти на"})}},k9=({href:e,lang:t,children:n,onClick:r,color:a,position:o,locale:l,...u})=>{const{linkLabel:d}=rn(mk);return _.jsxs(_.Fragment,{children:[_.jsx(g0,{href:e,locale:l,color:a,onClick:r,itemProp:"item",itemScope:!0,itemType:"https://schema.org/WebPage",...u,label:`${d} ${n}`,itemID:e,children:_.jsx("span",{itemProp:"name",children:n})}),_.jsx("meta",{itemProp:"position",content:o.toString()})]})},D9=({children:e,onClick:t,color:n,position:r,...a})=>{const{linkLabel:o}=rn(mk);return _.jsxs(_.Fragment,{children:[_.jsx(gt,{onClick:t,variant:"link",label:`${o} ${e}`,color:n,itemProp:"item",...a,children:_.jsx("span",{itemProp:"name",children:e})}),_.jsx("meta",{itemProp:"position",content:r.toString()})]})},I9=({children:e,position:t,...n})=>_.jsxs("span",{itemProp:"item",children:[_.jsx("span",{itemProp:"name",...n,children:e}),_.jsx("meta",{itemProp:"position",content:t.toString()})]}),L9=({links:e,className:t,color:n="text",locale:r,elementType:a="page",...o})=>_.jsx("nav",{"aria-label":"breadcrumb",children:_.jsx("ol",{className:Te("flex flex-row flex-wrap items-center gap-2 text-sm",t),itemScope:!0,itemType:"http://schema.org/BreadcrumbList",...o,children:e.map((l,u)=>{const d=u===e.length-1,f=typeof l=="object"&&typeof l.href=="string",m=typeof l=="object"&&typeof l.onClick=="function",y=u===e.length-1?a:void 0,b=l.text??l;let v=_.jsx(I9,{position:u+1,"aria-current":y,children:b},b);f?v=_.jsx(k9,{href:l.href,color:n,position:u+1,locale:r,"aria-current":y,children:b},b):m&&(v=_.jsx(D9,{onClick:l.onClick,color:n,position:u+1,"aria-current":y,children:b},b));const S=_.jsx("li",{itemProp:"itemListElement",itemScope:!0,itemType:"https://schema.org/ListItem",children:v},b);return d?S:_.jsxs(E.Fragment,{children:[S,_.jsx(jf,{size:10})]},b)})})}),M9={key:"save-dictionary-details",content:{deleteButton:{text:me({en:"Delete dictionary","en-GB":"Delete dictionary",fr:"Supprimer le dictionnaire",es:"Eliminar diccionario",de:"Wörterbuch löschen",ja:"辞書を削除",ko:"사전 삭제",zh:"删除字典",it:"Elimina dizionario",pt:"Excluir dicionário",hi:"शब्दकोश हटाएं",ar:"حذف القاموس",ru:"Удалить словарь"}),label:me({en:"Click to delete dictionary","en-GB":"Click to delete dictionary",fr:"Cliquez pour supprimer le dictionnaire",es:"Haga clic para eliminar el diccionario",de:"Klicken Sie, um das Wörterbuch zu löschen",ja:"辞書を削除するにはクリックしてください",ko:"사전을 삭제하려면 클릭하세요",zh:"单击以删除字典",it:"Fai clic per eliminare il dizionario",pt:"Clique para excluir o dicionário",hi:"शब्दकोश हटाने के लिए क्लिक करें",ar:"انقر لحذف القاموس",ru:"Нажмите, чтобы удалить словарь"})},resetButton:{text:me({en:"Reset all changes","en-GB":"Reset all changes",fr:"Réinitialiser toutes les modifications",es:"Restablecer todas las modificaciones",de:"Alle Änderungen zurücksetzen",ja:"すべての変更をリセット",ko:"모든 변경 사항 초기화",zh:"重置所有更改",it:"Reimposta tutte le modifiche",pt:"Redefinir todas as alterações",hi:"सभी परिवर्तनों को रीसेट करें",ar:"إعادة تعيين جميع التغييرات",ru:"Сбросить все изменения"}),label:me({en:"Click to reset all the changes","en-GB":"Click to reset all the changes",fr:"Cliquez pour réinitialiser toutes les modifications",es:"Haga clic para restablecer todas las modificaciones",de:"Klicken Sie, um alle Änderungen zurückzusetzen",ja:"すべての変更をリセットするにはクリックしてください",ko:"모든 변경 사항을 초기화하려면 클릭하세요",zh:"单击以重置所有更改",it:"Fai clic per ripristinare tutte le modifiche",pt:"Clique para redefinir todas as alterações",hi:"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें",ar:"انقر لإعادة تعيين جميع التغييرات",ru:"Нажмите, чтобы сбросить все изменения"})},saveButton:{text:me({en:"Save changes","en-GB":"Save changes",fr:"Enregistrer les modifications",es:"Guardar cambios",de:"Änderungen speichern",ja:"変更を保存",ko:"변경 사항 저장",zh:"保存更改",it:"Salva le modifiche",pt:"Salvar alterações",hi:"परिवर्तनों को सहेजें",ar:"احفظ التغييرات",ru:"Сохранить изменения"}),label:me({en:"Click to save changes","en-GB":"Click to save changes",fr:"Cliquez pour enregistrer les modifications",es:"Haga clic para guardar cambios",de:"Klicken Sie, um Änderungen zu speichern",ja:"変更を保存するにはクリックしてください",ko:"변경 사항을 저장하려면 클릭하세요",zh:"单击保存更改",it:"Fai clic per salvare le modifiche",pt:"Clique para salvar alterações",hi:"परिवर्तनों को सहेजने के लिए क्लिक करें",ar:"انقر لحفظ التغييرات",ru:"Нажмите, чтобы сохранить изменения"})},publishButton:{text:me({en:"Publish dictionary","en-GB":"Publish dictionary",fr:"Publier dictionnaire",es:"Publicar diccionario",de:"Wörterbuch veröffentlichen",ja:"辞書を公開",ko:"사전을 게시합니다",zh:"发布字典",it:"Pubblica dizionario",pt:"Publicar dicionário",hi:"शब्दकोश प्रकाशित करें",ar:"نشر القاموس",ru:"Опубликовать словарь"}),label:me({en:"Click to publish dictionary","en-GB":"Click to publish dictionary",fr:"Cliquez pour publier dictionnaire",es:"Haga clic para publicar diccionario",de:"Klicken Sie, um das Wörterbuch zu veröffentlichen",ja:"辞書を公開するにはクリックしてください",ko:"사전을 게시하려면 클릭하세요",zh:"单击以发布字典",it:"Fai clic per pubblicare il dizionario",pt:"Clique para publicar dicionário",hi:"शब्दकोश प्रकाशित करने के लिए क्लिक करें",ar:"انقر لنشر القاموس",ru:"Нажмите, чтобы опубликовать словарь"})},downloadButton:{text:me({en:"Download","en-GB":"Download",fr:"Télécharger",es:"Descargar",de:"Herunterladen",ja:"ダウンロード",ko:"다운로드",zh:"下载",it:"Scarica",pt:"Baixar",hi:"डाउनलोड",ar:"تنزيل",ru:"Скачать"}),label:me({en:"Click to download","en-GB":"Click to download",fr:"Cliquez pour télécharger",es:"Haga clic para descargar",de:"Klicken Sie, um herunterzuladen",ja:"ダウンロードするにはクリックしてください",ko:"다운로드를 클릭하세요",zh:"单击下载",it:"Fai clic per scaricare",pt:"Clique para baixar",hi:"डाउनलोड करने के लिए क्लिक करें",ar:"انقر لتنزيل",ru:"Нажмите, чтобы скачать"})},confirmation:{title:me({en:"Confirmation","en-GB":"Confirmation",fr:"Confirmation",es:"Confirmation",de:"Confirmation",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmação",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтверждение"}),message:me({en:"This will overwrite the existing dictionary. Are you sure you want to continue?","en-GB":"This will overwrite the existing dictionary. Are you sure you want to continue?",fr:"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?",es:"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?",de:"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?",ja:"既存の辞書を上書きします。続行しますか?",ko:"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?",zh:"这将覆盖现有的字典。你确定要继续吗?",it:"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?",pt:"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?",hi:"यह मौजूदा शब्दकोश को ओवरराइट करने जारी है। आप क्या आप जारी रखना चाहते हैं?",ar:"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟",ru:"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?"}),differentFormatMessage:me({en:"The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.","en-GB":"The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.",fr:"Le dictionnaire est dans un format différent, il sera transformé en un fichier JSON. Êtes-vous sûr de vouloir continuer ? Cela remplacera le dictionnaire existant.",es:"El diccionario está en un formato diferente, se transformará en un archivo JSON. ¿Estás seguro de que quieres continuar? Esto sobrescribirá el diccionario existente.",de:"Das Wörterbuch ist in einem anderen Format, es wird in eine JSON-Datei umgewandelt. Sind Sie sicher, dass Sie fortfahren möchten? Dies wird das existierende Wörterbuch überschreiben.",ja:"辞書は異なる形式です。JSONファイルに変換されます。続行しますか?既存の辞書を上書きします。",ko:"사전은 다른 형식입니다. JSON 파일로 변환됩니다. 계속하시겠습니까? 이는 기존 사전을 덮어 쓸 것입니다.",zh:"字典是在不同格式中,它将转换为JSON文件。你确定要继续吗?这将覆盖现有的字典。",it:"Il dizionario è in un formato diverso, verrà trasformato in un file JSON. Sei sicuro di voler continuare? Questo sovrascriverà il dizionario esistente.",pt:"O dicionário está em um formato diferente, ele será transformado em um arquivo JSON. Você tem certeza de que deseja continuar? Isso sobrescreverá o dicionário existente."}),confirmButton:{text:me({en:"Confirm","en-GB":"Confirm",fr:"Confirmer",es:"Confirmar",de:"Bestätigen",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmar",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтвердить"}),label:me({en:"Click to confirm","en-GB":"Click to confirm",fr:"Cliquez pour confirmer",es:"Haga clic para confirmar",de:"Klicken Sie, um zu bestätigen",ja:"確認するにはクリックしてください",ko:"확인을 클릭하세요",zh:"单击确认",it:"Fai clic per confermare",pt:"Clique para confirmar",hi:"पुष्टि करने के लिए क्लिक करें",ar:"انقر لتأكيد",ru:"Нажмите, чтобы подтвердить"})},cancelButton:{text:me({en:"Cancel","en-GB":"Cancel",fr:"Annuler",es:"Cancelar",de:"Abbrechen",ja:"キャンセル",ko:"취소",zh:"取消",it:"Annulla",pt:"Cancelar",hi:"रद्द करें",ar:"إلغاء",ru:"Отмена"}),label:me({en:"Click to cancel","en-GB":"Click to cancel",fr:"Cliquez pour annuler",es:"Haga clic para cancelar",de:"Klicken Sie, um abzubrechen",ja:"キャンセルするにはクリックしてください",ko:"취소를 클릭하세요",zh:"单击取消",it:"Fai clic per annullare",pt:"Clique para cancelar",hi:"रद्द करने के लिए क्लिक करें",ar:"انقر لإلغاء",ru:"Нажмите, чтобы отменить"})}}}},pk=({dictionary:e,mode:t,className:n,onDelete:r,...a})=>{var J;const[o,l]=E.useState(!1),{setLocaleDictionary:u}=Fv(),{deleteDictionary:d,isLoading:f}=R2(),{writeDictionary:m,isLoading:g}=I2(),{pushDictionaries:y,isLoading:b}=C2(),v=g||b,S=t.includes("local")&&((J=e.filePath)==null?void 0:J.endsWith(".json")),{editedContent:A,restoreEditedContent:w}=wn(),{deleteButton:T,resetButton:R,saveButton:D,publishButton:N,downloadButton:k,confirmation:I}=rn(M9),{isAuthenticated:P}=yu(),V=A==null?void 0:A[e.key],H=V&&JSON.stringify(V)!==JSON.stringify(e),fe=typeof(e==null?void 0:e._id)<"u",te=async()=>{if(!(A!=null&&A[e.key]))return;const U={...e,...A==null?void 0:A[e.key]};await m(U).then(()=>{u(A==null?void 0:A[e.key]),w(e.key)})},ue=async()=>{if(!(A!=null&&A[e.key]))return;const U={...e,...A==null?void 0:A[e.key]};await y([U]).then(ne=>{ne&&(u(A==null?void 0:A[e.key]),w(e.key))})},Y=async()=>{e._id&&await d(e._id.toString()).then(U=>{U&&(r==null||r())})};return _.jsxs(_.Fragment,{children:[_.jsx(hk,{isOpen:o,title:I.title.value,size:"md",children:_.jsxs("form",{className:"size-full px-3",children:[S?_.jsx("p",{className:"text-neutral py-4 text-sm",children:I.message}):_.jsx("p",{className:"text-neutral py-4 text-sm",children:I.differentFormatMessage}),_.jsxs("div",{className:"mt-12 flex justify-end gap-2 max-md:flex-col",children:[_.jsx(Qe.Button,{label:I.cancelButton.label.value,disabled:!H||v,color:"text",className:"max-md:w-full",variant:"outline",onClick:()=>l(!1),children:I.cancelButton.text}),_.jsx(Qe.Button,{label:I.confirmButton.label.value,disabled:!H||v,Icon:VS,color:"text",className:"max-md:w-full",isLoading:b,onClick:te,children:I.confirmButton.text})]})]})}),_.jsxs("form",{className:Te("flex justify-end gap-2 max-md:flex-col",n),...a,children:[t.includes("remote")&&fe&&r&&P&&_.jsx(Qe.Button,{label:T.label.value,Icon:Ch,color:"error",variant:"outline",className:"max-md:w-full",isLoading:f,onClick:Y,children:T.text}),H&&_.jsx(Qe.Button,{label:R.label.value,disabled:!H,Icon:JV,variant:"outline",color:"text",className:"max-md:w-full",onClick:()=>w(e.key),children:R.text}),t.includes("local")&&_.jsx(Qe.Button,{label:k.label.value,disabled:!H||v,Icon:BV,color:"text",variant:P?"outline":"default",className:"max-md:w-full",isLoading:g,onClick:()=>l(!0),children:k.text}),t.includes("remote")&&P&&!fe&&_.jsx(Qe.Button,{label:N.label.value,disabled:v,Icon:AV,color:"text",className:"max-md:w-full",isLoading:b,onClick:ue,children:N.text}),t.includes("remote")&&P&&fe&&H&&_.jsx(Qe.Button,{label:D.label.value,disabled:!H||v,Icon:VS,color:"text",className:"max-md:w-full",isLoading:b,onClick:ue,children:D.text})]})]})},gk=({level:e,title:t,description:n,children:r,rightParam:a,isSelected:o,...l})=>_.jsx("div",{className:Te("rounded-md p-2 transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",e===2&&"hover:bg-card/30",e>=3&&"",o===!0&&"bg-card/40"),...l,children:_.jsx(Y1,{isOpen:o,label:t,header:_.jsxs("div",{className:"flex w-full",children:[_.jsxs("div",{className:"flex w-full items-center justify-between",children:[_.jsx("span",{className:Te(e===0&&"text-2xl",e===1&&"text-xl",e===2&&"text-lg",e>=3&&"text-base"),children:t}),a&&_.jsx("div",{className:"flex w-auto items-center justify-between p-3",children:a})]}),n&&_.jsx("p",{className:"text-card pl-3 text-sm",children:n})]}),children:r})}),yk=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:a,onFocusKeyPath:o,renderSection:l})=>{const u=r??Ur(n,e);if(u&&typeof u!="string")return _.jsx(_.Fragment,{children:"Error loading section - Edited content Incoherence with the original content format"});const d=e.length,f=String(u??t);return _.jsx("span",{role:"button",tabIndex:0,className:Te("w-full rounded-md p-2 text-left transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",d===2&&"hover:bg-card/30",d>=3&&""),onClick:m=>{m.stopPropagation(),o(e)},children:typeof l=="function"?l(f):_.jsx(FC,{"aria-label":"Editable field",defaultValue:f,onSave:m=>a({keyPath:e,newValue:m}),onCancel:()=>null})})},j9=e=>{const{keyPath:t,section:n}=e,{addEditedContent:r}=wn(),a=Ur(e.editedContent,t),o=n[q.File],{content:l}=n,u=[...t,{type:q.File}];return _.jsxs("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:[_.jsxs("span",{className:"text-neutral text-sm",children:[o," "]}),_.jsx(yk,{...e,keyPath:u,section:l,editedContentValue:a==null?void 0:a.content,onContentChange:d=>{console.log("lll",{subSection:o,file:{...n,content:d.newValue},keyPath:t,newKeyPath:u}),r(e.dictionary.key,{...n,content:d.newValue},t)}})]})},P9=e=>{const{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:a=[]}=e;return n.map((o,l)=>{const u={key:l,type:q.Array},d=[...t,u];return _.jsx(gk,{level:t.length,title:`${l}`,description:"",isSelected:fu(d,a),onClick:f=>{f.stopPropagation(),r(d)},children:_.jsx(ka,{...e,keyPath:d,section:o})},JSON.stringify(o))})},V9=e=>{const{keyPath:t,section:n}=e;return _.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!y0.includes(r)).map(r=>{const a={type:q.Condition,key:r},o=[...t,a],l=n[q.Condition][r];return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(ka,{...e,key:r,keyPath:o,section:l})]})})})},B9=e=>{const{keyPath:t,section:n}=e;return _.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!y0.includes(r)).map(r=>{const a={type:q.Enumeration,key:r},o=[...t,a],l=n[q.Enumeration][r];return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(ka,{...e,key:r,keyPath:o,section:l})]})})})},z9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:q.Insertion}],a=n[q.Insertion];return _.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:_.jsx(ka,{...e,keyPath:r,section:a})})},U9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:q.Markdown}],a=n[q.Markdown];return _.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:_.jsx(ka,{...e,keyPath:r,section:a})})},H9=e=>{const{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:a}=e;return Object.keys(n).filter(o=>!y0.includes(o)).map(o=>{const l={key:o,type:q.Object},u=[...t,l];return _.jsx(gk,{level:t.length,title:o,description:"",isSelected:fu(u,r),onClick:d=>{d.stopPropagation(),a(u)},children:_.jsx(ka,{...e,keyPath:u,section:n[o]})},o)})},F9=e=>{const{keyPath:t,section:n,locale:r}=e,a={type:q.Translation,key:r},o=[...t,a],l=n.translation[r];return _.jsx(ka,{...e,keyPath:o,section:l})},y0=["filePath","id","nodeType"],ka=e=>{const n=Ur(e.editedContent,e.keyPath)??e.section,r=qo(n);if(typeof n=="object")return r===q.ReactNode?_.jsx("span",{className:"text-neutral text-xs",children:"React node not editable"}):r===q.Nested?_.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:"[Nested] Dictionary"}):r===q.Markdown?_.jsx(U9,{...e,section:n}):r===q.Translation?_.jsx(F9,{...e,section:n}):r===q.Enumeration?_.jsx(B9,{...e,section:n}):r===q.Condition?_.jsx(V9,{...e,section:n}):r===q.Insertion?_.jsx(z9,{...e,section:n}):r===q.Array?_.jsx(P9,{...e,section:n}):r===q.File?_.jsx(j9,{...e,section:n}):_.jsx(H9,{...e,section:n});if(typeof n=="string")return _.jsx(yk,{...e,section:n})},G9=({dictionary:e,mode:t,onDelete:n,...r})=>{var m;const{editedContent:a,addEditedContent:o}=wn(),{focusedContent:l,setFocusedContentKeyPath:u,setFocusedContent:d}=Sa(),f=l==null?void 0:l.keyPath;return _.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2",children:[_.jsx("div",{children:E.createElement(ka,{...r,keyPath:[],dictionary:e,key:JSON.stringify(((a==null?void 0:a[e.key])??e).content),editedContent:(m=a==null?void 0:a[e.key])==null?void 0:m.content,focusedKeyPath:f,section:e.content,onContentChange:g=>{o(e.key,g.newValue,g.keyPath)},onFocusKeyPath:u})}),_.jsx(pk,{dictionary:e,mode:t,className:"mb-4 flex-col",onDelete:()=>{d(null),n==null||n()}})]})};function Ii(e){return Array.isArray?Array.isArray(e):_k(e)==="[object Array]"}function $9(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function q9(e){return e==null?"":$9(e)}function zr(e){return typeof e=="string"}function vk(e){return typeof e=="number"}function K9(e){return e===!0||e===!1||W9(e)&&_k(e)=="[object Boolean]"}function bk(e){return typeof e=="object"}function W9(e){return bk(e)&&e!==null}function Fn(e){return e!=null}function cy(e){return!e.trim().length}function _k(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Y9="Incorrect 'index' type",Z9=e=>`Invalid value for key ${e}`,X9=e=>`Pattern length exceeds max of ${e}.`,Q9=e=>`Missing ${e} property in key`,J9=e=>`Property 'weight' in key '${e}' must be a positive integer`,iT=Object.prototype.hasOwnProperty;class e7{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let a=xk(r);this._keys.push(a),this._keyMap[a.id]=a,n+=a.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xk(e){let t=null,n=null,r=null,a=1,o=null;if(zr(e)||Ii(e))r=e,t=aT(e),n=Ev(e);else{if(!iT.call(e,"name"))throw new Error(Q9("name"));const l=e.name;if(r=l,iT.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(J9(l));t=aT(l),n=Ev(l),o=e.getFn}return{path:t,id:n,weight:a,src:r,getFn:o}}function aT(e){return Ii(e)?e:e.split(".")}function Ev(e){return Ii(e)?e.join("."):e}function t7(e,t){let n=[],r=!1;const a=(o,l,u)=>{if(Fn(o))if(!l[u])n.push(o);else{let d=l[u];const f=o[d];if(!Fn(f))return;if(u===l.length-1&&(zr(f)||vk(f)||K9(f)))n.push(q9(f));else if(Ii(f)){r=!0;for(let m=0,g=f.length;m<g;m+=1)a(f[m],l,u+1)}else l.length&&a(f,l,u+1)}};return a(e,zr(t)?t.split("."):t,0),r?n:n[0]}const n7={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},r7={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},i7={location:0,threshold:.6,distance:100},a7={useExtendedSearch:!1,getFn:t7,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Fe={...r7,...n7,...i7,...a7};const s7=/[^ ]+/g;function o7(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(a){const o=a.match(s7).length;if(n.has(o))return n.get(o);const l=1/Math.pow(o,.5*e),u=parseFloat(Math.round(l*r)/r);return n.set(o,u),u},clear(){n.clear()}}}class v0{constructor({getFn:t=Fe.getFn,fieldNormWeight:n=Fe.fieldNormWeight}={}){this.norm=o7(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,zr(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();zr(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Fn(t)||cy(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((a,o)=>{let l=a.getFn?a.getFn(t):this.getFn(t,a.path);if(Fn(l)){if(Ii(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:f,value:m}=d.pop();if(Fn(m))if(zr(m)&&!cy(m)){let g={v:m,i:f,n:this.norm.get(m)};u.push(g)}else Ii(m)&&m.forEach((g,y)=>{d.push({nestedArrIndex:y,value:g})})}r.$[o]=u}else if(zr(l)&&!cy(l)){let u={v:l,n:this.norm.get(l)};r.$[o]=u}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ek(e,t,{getFn:n=Fe.getFn,fieldNormWeight:r=Fe.fieldNormWeight}={}){const a=new v0({getFn:n,fieldNormWeight:r});return a.setKeys(e.map(xk)),a.setSources(t),a.create(),a}function l7(e,{getFn:t=Fe.getFn,fieldNormWeight:n=Fe.fieldNormWeight}={}){const{keys:r,records:a}=e,o=new v0({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(a),o}function of(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:a=Fe.distance,ignoreLocation:o=Fe.ignoreLocation}={}){const l=t/e.length;if(o)return l;const u=Math.abs(r-n);return a?l+u/a:u?1:l}function c7(e=[],t=Fe.minMatchCharLength){let n=[],r=-1,a=-1,o=0;for(let l=e.length;o<l;o+=1){let u=e[o];u&&r===-1?r=o:!u&&r!==-1&&(a=o-1,a-r+1>=t&&n.push([r,a]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}const ss=32;function u7(e,t,n,{location:r=Fe.location,distance:a=Fe.distance,threshold:o=Fe.threshold,findAllMatches:l=Fe.findAllMatches,minMatchCharLength:u=Fe.minMatchCharLength,includeMatches:d=Fe.includeMatches,ignoreLocation:f=Fe.ignoreLocation}={}){if(t.length>ss)throw new Error(X9(ss));const m=t.length,g=e.length,y=Math.max(0,Math.min(r,g));let b=o,v=y;const S=u>1||d,A=S?Array(g):[];let w;for(;(w=e.indexOf(t,v))>-1;){let I=of(t,{currentLocation:w,expectedLocation:y,distance:a,ignoreLocation:f});if(b=Math.min(I,b),v=w+m,S){let P=0;for(;P<m;)A[w+P]=1,P+=1}}v=-1;let T=[],R=1,D=m+g;const N=1<<m-1;for(let I=0;I<m;I+=1){let P=0,V=D;for(;P<V;)of(t,{errors:I,currentLocation:y+V,expectedLocation:y,distance:a,ignoreLocation:f})<=b?P=V:D=V,V=Math.floor((D-P)/2+P);D=V;let H=Math.max(1,y-V+1),fe=l?g:Math.min(y+V,g)+m,te=Array(fe+2);te[fe+1]=(1<<I)-1;for(let Y=fe;Y>=H;Y-=1){let J=Y-1,U=n[e.charAt(J)];if(S&&(A[J]=+!!U),te[Y]=(te[Y+1]<<1|1)&U,I&&(te[Y]|=(T[Y+1]|T[Y])<<1|1|T[Y+1]),te[Y]&N&&(R=of(t,{errors:I,currentLocation:J,expectedLocation:y,distance:a,ignoreLocation:f}),R<=b)){if(b=R,v=J,v<=y)break;H=Math.max(1,2*y-v)}}if(of(t,{errors:I+1,currentLocation:y,expectedLocation:y,distance:a,ignoreLocation:f})>b)break;T=te}const k={isMatch:v>=0,score:Math.max(.001,R)};if(S){const I=c7(A,u);I.length?d&&(k.indices=I):k.isMatch=!1}return k}function d7(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const a=e.charAt(n);t[a]=(t[a]||0)|1<<r-n-1}return t}const lh=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class Sk{constructor(t,{location:n=Fe.location,threshold:r=Fe.threshold,distance:a=Fe.distance,includeMatches:o=Fe.includeMatches,findAllMatches:l=Fe.findAllMatches,minMatchCharLength:u=Fe.minMatchCharLength,isCaseSensitive:d=Fe.isCaseSensitive,ignoreDiacritics:f=Fe.ignoreDiacritics,ignoreLocation:m=Fe.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:a,includeMatches:o,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m},t=d?t:t.toLowerCase(),t=f?lh(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const g=(b,v)=>{this.chunks.push({pattern:b,alphabet:d7(b),startIndex:v})},y=this.pattern.length;if(y>ss){let b=0;const v=y%ss,S=y-v;for(;b<S;)g(this.pattern.substr(b,ss),b),b+=ss;if(v){const A=y-ss;g(this.pattern.substr(A),A)}}else g(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=r?lh(t):t,this.pattern===t){let S={isMatch:!0,score:0};return a&&(S.indices=[[0,t.length-1]]),S}const{location:o,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,ignoreLocation:m}=this.options;let g=[],y=0,b=!1;this.chunks.forEach(({pattern:S,alphabet:A,startIndex:w})=>{const{isMatch:T,score:R,indices:D}=u7(t,S,A,{location:o+w,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,includeMatches:a,ignoreLocation:m});T&&(b=!0),y+=R,T&&D&&(g=[...g,...D])});let v={isMatch:b,score:b?y/this.chunks.length:1};return b&&a&&(v.indices=g),v}}class Da{constructor(t){this.pattern=t}static isMultiMatch(t){return sT(t,this.multiRegex)}static isSingleMatch(t){return sT(t,this.singleRegex)}search(){}}function sT(e,t){const n=e.match(t);return n?n[1]:null}class f7 extends Da{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class h7 extends Da{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class m7 extends Da{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class p7 extends Da{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class g7 extends Da{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class y7 extends Da{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Ak extends Da{constructor(t,{location:n=Fe.location,threshold:r=Fe.threshold,distance:a=Fe.distance,includeMatches:o=Fe.includeMatches,findAllMatches:l=Fe.findAllMatches,minMatchCharLength:u=Fe.minMatchCharLength,isCaseSensitive:d=Fe.isCaseSensitive,ignoreDiacritics:f=Fe.ignoreDiacritics,ignoreLocation:m=Fe.ignoreLocation}={}){super(t),this._bitapSearch=new Sk(t,{location:n,threshold:r,distance:a,includeMatches:o,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class wk extends Da{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const a=[],o=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+o,a.push([r,n-1]);const l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}const Sv=[f7,wk,m7,p7,y7,g7,h7,Ak],oT=Sv.length,v7=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,b7="|";function _7(e,t={}){return e.split(b7).map(n=>{let r=n.trim().split(v7).filter(o=>o&&!!o.trim()),a=[];for(let o=0,l=r.length;o<l;o+=1){const u=r[o];let d=!1,f=-1;for(;!d&&++f<oT;){const m=Sv[f];let g=m.isMultiMatch(u);g&&(a.push(new m(g,t)),d=!0)}if(!d)for(f=-1;++f<oT;){const m=Sv[f];let g=m.isSingleMatch(u);if(g){a.push(new m(g,t));break}}}return a})}const x7=new Set([Ak.type,wk.type]);class E7{constructor(t,{isCaseSensitive:n=Fe.isCaseSensitive,ignoreDiacritics:r=Fe.ignoreDiacritics,includeMatches:a=Fe.includeMatches,minMatchCharLength:o=Fe.minMatchCharLength,ignoreLocation:l=Fe.ignoreLocation,findAllMatches:u=Fe.findAllMatches,location:d=Fe.location,threshold:f=Fe.threshold,distance:m=Fe.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a,minMatchCharLength:o,findAllMatches:u,ignoreLocation:l,location:d,threshold:f,distance:m},t=n?t:t.toLowerCase(),t=r?lh(t):t,this.pattern=t,this.query=_7(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:a,ignoreDiacritics:o}=this.options;t=a?t:t.toLowerCase(),t=o?lh(t):t;let l=0,u=[],d=0;for(let f=0,m=n.length;f<m;f+=1){const g=n[f];u.length=0,l=0;for(let y=0,b=g.length;y<b;y+=1){const v=g[y],{isMatch:S,indices:A,score:w}=v.search(t);if(S){if(l+=1,d+=w,r){const T=v.constructor.type;x7.has(T)?u=[...u,...A]:u.push(A)}}else{d=0,l=0,u.length=0;break}}if(l){let y={isMatch:!0,score:d/l};return r&&(y.indices=u),y}}return{isMatch:!1,score:1}}}const Av=[];function S7(...e){Av.push(...e)}function wv(e,t){for(let n=0,r=Av.length;n<r;n+=1){let a=Av[n];if(a.condition(e,t))return new a(e,t)}return new Sk(e,t)}const ch={AND:"$and",OR:"$or"},Tv={PATH:"$path",PATTERN:"$val"},Cv=e=>!!(e[ch.AND]||e[ch.OR]),A7=e=>!!e[Tv.PATH],w7=e=>!Ii(e)&&bk(e)&&!Cv(e),lT=e=>({[ch.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Tk(e,t,{auto:n=!0}={}){const r=a=>{let o=Object.keys(a);const l=A7(a);if(!l&&o.length>1&&!Cv(a))return r(lT(a));if(w7(a)){const d=l?a[Tv.PATH]:o[0],f=l?a[Tv.PATTERN]:a[d];if(!zr(f))throw new Error(Z9(d));const m={keyId:Ev(d),pattern:f};return n&&(m.searcher=wv(f,t)),m}let u={children:[],operator:o[0]};return o.forEach(d=>{const f=a[d];Ii(f)&&f.forEach(m=>{u.children.push(r(m))})}),u};return Cv(e)||(e=lT(e)),r(e)}function T7(e,{ignoreFieldNorm:t=Fe.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:a,norm:o,score:l})=>{const u=a?a.weight:null;r*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(t?1:o))}),n.score=r})}function C7(e,t){const n=e.matches;t.matches=[],Fn(n)&&n.forEach(r=>{if(!Fn(r.indices)||!r.indices.length)return;const{indices:a,value:o}=r;let l={indices:a,value:o};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),t.matches.push(l)})}function R7(e,t){t.score=e.score}function N7(e,t,{includeMatches:n=Fe.includeMatches,includeScore:r=Fe.includeScore}={}){const a=[];return n&&a.push(C7),r&&a.push(R7),e.map(o=>{const{idx:l}=o,u={item:t[l],refIndex:l};return a.length&&a.forEach(d=>{d(o,u)}),u})}class al{constructor(t,n={},r){this.options={...Fe,...n},this.options.useExtendedSearch,this._keyStore=new e7(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof v0))throw new Error(Y9);this._myIndex=n||Ek(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Fn(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,a=this._docs.length;r<a;r+=1){const o=this._docs[r];t(o,r)&&(this.removeAt(r),r-=1,a-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:r,includeScore:a,shouldSort:o,sortFn:l,ignoreFieldNorm:u}=this.options;let d=zr(t)?zr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return T7(d,{ignoreFieldNorm:u}),o&&d.sort(l),vk(n)&&n>-1&&(d=d.slice(0,n)),N7(d,this._docs,{includeMatches:r,includeScore:a})}_searchStringList(t){const n=wv(t,this.options),{records:r}=this._myIndex,a=[];return r.forEach(({v:o,i:l,n:u})=>{if(!Fn(o))return;const{isMatch:d,score:f,indices:m}=n.searchIn(o);d&&a.push({item:o,idx:l,matches:[{score:f,value:o,norm:u,indices:m}]})}),a}_searchLogical(t){const n=Tk(t,this.options),r=(u,d,f)=>{if(!u.children){const{keyId:g,searcher:y}=u,b=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(d,g),searcher:y});return b&&b.length?[{idx:f,item:d,matches:b}]:[]}const m=[];for(let g=0,y=u.children.length;g<y;g+=1){const b=u.children[g],v=r(b,d,f);if(v.length)m.push(...v);else if(u.operator===ch.AND)return[]}return m},a=this._myIndex.records,o={},l=[];return a.forEach(({$:u,i:d})=>{if(Fn(u)){let f=r(n,u,d);f.length&&(o[d]||(o[d]={idx:d,item:u,matches:[]},l.push(o[d])),f.forEach(({matches:m})=>{o[d].matches.push(...m)}))}}),l}_searchObjectList(t){const n=wv(t,this.options),{keys:r,records:a}=this._myIndex,o=[];return a.forEach(({$:l,i:u})=>{if(!Fn(l))return;let d=[];r.forEach((f,m)=>{d.push(...this._findMatches({key:f,value:l[m],searcher:n}))}),d.length&&o.push({idx:u,item:l,matches:d})}),o}_findMatches({key:t,value:n,searcher:r}){if(!Fn(n))return[];let a=[];if(Ii(n))n.forEach(({v:o,i:l,n:u})=>{if(!Fn(o))return;const{isMatch:d,score:f,indices:m}=r.searchIn(o);d&&a.push({score:f,key:t,value:o,idx:l,norm:u,indices:m})});else{const{v:o,n:l}=n,{isMatch:u,score:d,indices:f}=r.searchIn(o);u&&a.push({score:d,key:t,value:o,norm:l,indices:f})}return a}}al.version="7.1.0";al.createIndex=Ek;al.parseIndex=l7;al.config=Fe;al.parseQuery=Tk;S7(E7);const O7=e=>{switch(e){case"sm":return 640;case"md":return 768;case"lg":return 1024;case"xl":return 1280;case"2xl":return 1536;default:return e}},k7=()=>{var t;if(typeof window>"u")return;const e=(t=window.navigator)==null?void 0:t.userAgent;if(!(typeof e>"u"))return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},D7=()=>{var r;if(typeof window>"u")return;const e=(r=window.navigator)==null?void 0:r.userAgent,t=/Safari\/\d/i.test(e)&&!/Chrome|CriOS|FxiOS|Edg|OPR/i.test(e),n=/Macintosh|iP(?:hone|ad|od)/.test(e);return t&&n},I7=e=>{if(!(typeof window>"u"))return((window==null?void 0:window.innerWidth)??0)<=e},cT=(e="md")=>{const t=O7(e),n=k7(),r=I7(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n}},L7=(e="md")=>{const[t,n]=E.useState(cT(e));return E.useEffect(()=>{const r=()=>{n(cT(e))};return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[e]),t},Oc=({children:e,className:t,identifier:n,...r})=>_.jsx("div",{className:Te("group/dropdown relative flex",t),"aria-label":`DropDown ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),M7=({children:e,identifier:t,className:n,...r})=>_.jsx("button",{className:Te("w-full cursor-pointer",n),"aria-label":`Open panel ${t}`,onClick:a=>{D7()&&a.currentTarget.focus({preventScroll:!0})},onBlur:a=>a.currentTarget.blur(),...r,children:e}),j7=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:a="start",identifier:o,className:l,...u})=>_.jsx("div",{className:Te("absolute top-[calc(100%+0.5rem)] z-[1000] min-w-full",a==="start"&&"left-0",a==="end"&&"right-0",l),"aria-hidden":t,role:"region","aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,children:_.jsx(W1,{isHidden:t,className:Te("overflow-x-visible",t!==!1?"invisible":"visible",n&&"group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]",r&&"group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]"),...u,children:e})});Oc.Trigger=M7;Oc.Panel=j7;const P7={key:"locale-switcher-content",content:{localeSwitcherLabel:me({en:"Language switcher","en-GB":"Language switcher",fr:"Changer de langue",es:"Cambiar idioma",de:"Sprachwechsler",ja:"言語スイッチャー",ko:"언어 스위치",zh:"语言切换器",it:"Cambia lingua",pt:"Mudar idioma",hi:"भाषा स्विचर",ar:"مبدل اللغة",ru:"Переключатель языка"}),languageListLabel:me({en:"Language list","en-GB":"Language list",fr:"Liste des langues",es:"Lista de idiomas",de:"Sprachliste",ja:"言語リスト",ko:"언어 목록",zh:"语言列表",it:"Elenco lingue",pt:"Lista de idiomas",hi:"भाषा सूची",ar:"قائمة اللغات",ru:"Список языков"}),switchTo:me({en:"Switch to",fr:"Passer à",es:"Cambiar a","en-GB":"Switch to",de:"Wechseln Sie zu",ja:"に切り替える",ko:"전환",zh:"切换到",it:"Passa a",pt:"Mudar para",hi:"स्विच करें",ar:"التبديل إلى",ru:"Переключиться на"}),searchInput:{text:me({en:"Search Locale","en-GB":"Search Locale",fr:"Rechercher la locale",es:"Buscar idioma",de:"Sprache durchsuchen",ja:"ロケールを検索",ko:"언어 검색",zh:"搜索语言",it:"Cerca lingua",pt:"Pesquisar idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"}),placeholder:me({en:"Search a locale","en-GB":"Search a locale",fr:"Rechercher une locale",es:"Buscar un idioma",de:"Sprache suchen",ja:"ロケールを検索",ko:"언어 검색",zh:"搜索语言",it:"Cerca una lingua",pt:"Pesquisar um idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"}),ariaLabel:me({en:"Language search","en-GB":"Language search",fr:"Recherche de langue",es:"Búsqueda de idioma",de:"Sprachsuche",ja:"言語検索",ko:"언어 검색",zh:"语言搜索",it:"Ricerca lingua",pt:"Pesquisa de idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"})},seeAllLocalesSwitch:{true:me({en:"See all locales","en-GB":"See all locales",fr:"Voir toutes les langues",es:"Ver todos los idiomas",de:"Alle Sprachen anzeigen",ja:"すべての言語を表示",ko:"모든 언어 보기",zh:"查看所有语言",it:"Vedi tutte le lingue",pt:"Ver todos os idiomas",hi:"सभी भाषाओं को देखें",ar:"عرض جميع اللغات",ru:"Показать все языки"}),false:me({en:"See only selected locales","en-GB":"See only selected locales",fr:"Voir seulement les langues sélectionnées",es:"Ver solo los idiomas seleccionados",de:"Nur ausgewählte Sprachen anzeigen",ja:"選択された言語のみを表示",ko:"선택한 언어만 보기",zh:"仅查看选定的语言",it:"Vedi solo le lingue selezionate",pt:"Ver apenas os idiomas selecionados",hi:"केवल चुने गए भाषाओं को देखें",ar:"عرض اللغات المحددة فقط",ru:"Показать только выбранные языки"})}}},kc=(e,t)=>{const[n,r]=E.useState(()=>{if(t!==void 0){const l=typeof t=="function"?t():t;if(typeof window>"u")return l;const u=localStorage==null?void 0:localStorage.getItem(e);if(u)try{return JSON.parse(u)}catch(d){console.error(d)}return l}});E.useEffect(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);if(l&&n===void 0)try{r(JSON.parse(l))}catch(u){console.error(u)}else t!==void 0&&n===void 0&&r(t)},[e,n]);const a=E.useCallback(l=>{r(u=>{const d=typeof l=="function"?l(u):l;return localStorage==null||localStorage.setItem(e,JSON.stringify(d)),d})},[e,r]),o=E.useCallback(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);l&&r(JSON.parse(l))},[e,r]);return E.useMemo(()=>[n,a,o],[n,a,o])},Ck=E.createContext({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),Rk=()=>E.useContext(Ck),V7=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{const{locale:r}=Kv(),[a,o]=kc("locale-content-selector-selected-locales",t??[r]);return _.jsx(Ck,{value:{availableLocales:e,selectedLocales:a,setSelectedLocales:o},children:n})},uy="locale-switcher-content",B7=({panelProps:e,isMultilingual:t=!0})=>{const{switchTo:n,searchInput:r,localeSwitcherLabel:a,languageListLabel:o,seeAllLocalesSwitch:l}=rn(P7),u=E.useRef(null),{locale:d}=Kv(),{availableLocales:f,selectedLocales:m,setSelectedLocales:g}=Rk(),y=E.useMemo(()=>f.map(N=>{const k=yf(N,B.ENGLISH),I=yf(N,d),P=yf(N);return{locale:N,englishName:k,currentLocaleName:I,ownLocaleName:P}}),[f,d]),[b,v]=E.useState(y),[S,A]=kc("locale-content-selector-see-all-locales",!1),w=E.useMemo(()=>{const N={keys:[{name:"ownLocaleName",weight:.4},{name:"englishName",weight:.2},{name:"currentLocaleName",weight:.2},{name:"locale",weight:.2}],threshold:.02};return new al(y,N)},[y]),T=E.useCallback(N=>{if(N){const k=w.search(N).map(I=>I.item);v(k)}else v(y)},[w,y]),R=N=>{t?m.includes(N)?m.length>1&&g(k=>k.filter(I=>I!==N)):g(k=>[...k,N]):g([N])},D=N=>{A(N),g(N?f:[d])};return _.jsx("div",{className:"border-text text-text rounded-xl border transition-colors","aria-label":a.value,children:_.jsxs(Oc,{identifier:uy,children:[_.jsx(Oc.Trigger,{identifier:uy,children:_.jsxs("div",{className:"flex w-full items-center justify-between",children:[_.jsx("div",{className:"px-2 py-1",children:_.jsx(KV,{size:18})}),_.jsx(YV,{className:"self-center",size:18})]})}),_.jsx(Oc.Panel,{identifier:uy,isOverable:!0,isFocusable:!0,className:"left-auto right-0",...e,children:_.jsxs(ei,{className:"max-h-[80vh] min-w-28",separator:"y",role:"listbox",transparency:"sm",border:!0,roundedSize:"2xl",borderColor:"text","aria-label":o.value,children:[t&&_.jsx("div",{className:"m-auto p-2",children:_.jsx(wu,{defaultValue:!1,onChange:D,color:"text",size:"sm",className:"!w-60",choices:[{content:l.true.value,value:!0},{content:l.false.value,value:!1}]})}),!(t&&S)&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"p-3",children:_.jsx(Jo,{type:"search","aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:N=>T(N.target.value),ref:u})}),_.jsx("ol",{className:"divide-text/20 divide-y divide-dashed overflow-y-auto p-1",children:b.map(({locale:N,currentLocaleName:k,ownLocaleName:I})=>_.jsx("li",{className:"px-1.5 py-1",children:_.jsx(gt,{onClick:()=>R(N),label:`${n} ${k}`,disabled:!(f??f).includes(N),isActive:m.includes(N),variant:"hoverable",color:"text",isFullWidth:!0,textAlign:"left",size:"sm",children:_.jsxs("div",{className:"flex flex-row items-center justify-between gap-3 px-2 py-1",children:[t&&_.jsx("div",{className:"w-4",children:m.includes(N)&&_.jsx(Zo,{className:"size-full"})}),_.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1",children:[_.jsxs("div",{className:"flex flex-col text-nowrap",children:[_.jsx("span",{dir:JM(N),lang:N,children:I}),_.jsx("span",{className:"text-neutral text-xs",children:k})]}),_.jsx("span",{className:"text-neutral text-sm",children:N.toUpperCase()})]})]})})},N))})]})]})})]})})},z7=(e,t,n)=>{const r={...e};for(const a of Object.keys(e))a===t?(r[n]=e[t],delete r[t]):r[a]=e[a];return r},Rv=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...o})=>{const[l,u]=E.useState(e),[d,f]=E.useState(0),m=l!==e,g=()=>{u(e),f(S=>S+1)},y=()=>{t(l)},b=S=>{u(S.currentTarget.value)};E.useEffect(()=>{u(e)},[e]);const v=(r==null?void 0:r(l))??!0;return _.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[_.jsx(Jo,{onChange:b,"aria-label":"value",variant:"invisible",className:"size-full",defaultValue:e,...o},d),(m||a)&&_.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[m&&_.jsxs(_.Fragment,{children:[_.jsx(gt,{Icon:Zo,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!v,onClick:y}),_.jsx(gt,{Icon:Ts,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:g})]}),a]})]},String(e))},U7=(e,t)=>{const[n,r]=E.useState(e);return E.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>clearTimeout(a)},[e,t]),n},H7=({isActive:e=!0,suggestion:t,...n})=>{const r=String(n.value??n.defaultValue??""),{autocomplete:a}=D2(),o=Zr(),[l,u]=E.useState(!1),[d,f]=E.useState(r),[m,g]=E.useState(""),y=U7(d,200);E.useEffect(()=>{typeof n.value>"u"||f(r)},[n.value,n.defaultValue]),E.useEffect(()=>{if(!e||!l)return;const v=async()=>{var S;try{const A=await a({text:y,openAiApiKey:o.editor.openAiApiKey,model:o.editor.openAiApiModel,temperature:o.editor.openAiApiTemperature}),w=((S=A==null?void 0:A.data)==null?void 0:S.autocompletion)??"";if(w.startsWith(y)){const T=w.slice(y.length);return g(T)}return g(w)}catch(A){console.error("Autocomplete error:",A)}};y.length>3?(g(""),v()):g("")},[y,e]);const b=()=>{f(v=>v+m),g("")};return _.jsxs("div",{className:"relative w-full",children:[_.jsxs("div",{className:"pointer-events-none absolute inset-0 whitespace-pre-wrap break-words px-1 py-3 text-base leading-[1.45rem] md:py-1 md:text-sm md:leading-[1.23rem]","aria-hidden":"true",children:[_.jsx("span",{className:"align-text-top text-transparent",children:d}),(m||t)&&_.jsx("span",{className:"text-neutral ml-3 align-text-top",children:t??m})]}),_.jsx(mb,{...n,value:d,onChange:v=>{var S;u(!0),f(v.target.value),(S=n.onChange)==null||S.call(n,v)},onKeyDown:v=>{var S;v.key==="Tab"&&m&&(v.preventDefault(),b()),(S=n.onKeyDown)==null||S.call(n,v)}})]})},F7=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...o})=>{const{isAuthenticated:l}=P2(),[u,d]=E.useState(e),[f,m]=E.useState(0),g=u!==e,y=()=>{d(e),m(A=>A+1)},b=()=>{t(u)},v=A=>d(A.currentTarget.value??"");E.useEffect(()=>{d(e)},[e]);const S=(r==null?void 0:r(u))??!0;return _.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[_.jsx(H7,{onChange:v,variant:"invisible",className:"size-full",defaultValue:e,isActive:l,...o},f),(g||a)&&_.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[g&&_.jsxs(_.Fragment,{children:[_.jsx(gt,{Icon:Zo,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!S,onClick:b}),_.jsx(gt,{Icon:Ts,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:y})]}),a]})]},e)};function os(){return os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},os.apply(this,arguments)}const G7=["children","options"],ze={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var uT;(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(uT||(uT={}));const dT=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),fT={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},$7=["style","script"],q7=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,K7=/mailto:/i,W7=/\n{2,}$/,Nk=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Y7=/^ *> ?/gm,Z7=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,X7=/^ {2,}\n/,Q7=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Ok=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,kk=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,J7=/^(`+)((?:\\`|[^`])+)\1/,eq=/^(?:\n *)*\n/,tq=/\r\n?/g,nq=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,rq=/^\[\^([^\]]+)]/,iq=/\f/g,aq=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,sq=/^\s*?\[(x|\s)\]/,Dk=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ik=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Lk=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Nv=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,oq=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Mk=/^<!--[\s\S]*?(?:-->)/,lq=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Ov=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,cq=/^\{.*\}$/,uq=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,dq=/^<([^ >]+@[^ >]+)>/,fq=/^<([^ >]+:\/[^ >]+)>/,hq=/-([a-z])?/gi,jk=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,mq=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,pq=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,gq=/^\[([^\]]*)\] ?\[([^\]]*)\]/,yq=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,vq=/\t/g,bq=/(^ *\||\| *$)/g,_q=/^ *:-+: *$/,xq=/^ *:-+ *$/,Eq=/^ *-+: *$/,Xh="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",Sq=new RegExp(`^([*_])\\1${Xh}\\1\\1(?!\\1)`),Aq=new RegExp(`^([*_])${Xh}\\1(?!\\1)`),wq=new RegExp(`^(==)${Xh}\\1`),Tq=new RegExp(`^(~~)${Xh}\\1`),Cq=/^\\([^0-9A-Za-z\s])/,dy=/\\([^0-9A-Za-z\s])/g,Rq=/^([\s\S](?:(?! |[0-9]\.)[^*_~\-\n<`\\\[!])*)/,Nq=/^\n+/,Oq=/^([ \t]*)/,kq=/\\([^\\])/g,Dq=/(?:^|\n)( *)$/,b0="(?:\\d+\\.)",_0="(?:[*+-])";function Pk(e){return"( *)("+(e===1?b0:_0)+") +"}const Vk=Pk(1),Bk=Pk(2);function zk(e){return new RegExp("^"+(e===1?Vk:Bk))}const Iq=zk(1),Lq=zk(2);function Uk(e){return new RegExp("^"+(e===1?Vk:Bk)+"[^\\n]*(?:\\n(?!\\1"+(e===1?b0:_0)+" )[^\\n]*)*(\\n|$)","gm")}const Mq=Uk(1),jq=Uk(2);function Hk(e){const t=e===1?b0:_0;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Fk=Hk(1),Gk=Hk(2);function hT(e,t){const n=t===1,r=n?Fk:Gk,a=n?Mq:jq,o=n?Iq:Lq;return{match:Go(function(l,u){const d=Dq.exec(u.prevCapture);return d&&(u.list||!u.inline&&!u.simple)?r.exec(l=d[1]+l):null}),order:1,parse(l,u,d){const f=n?+l[2]:void 0,m=l[0].replace(W7,`
263
- `).match(a);let g=!1;return{items:m.map(function(y,b){const v=o.exec(y)[0].length,S=new RegExp("^ {1,"+v+"}","gm"),A=y.replace(S,"").replace(o,""),w=b===m.length-1,T=A.indexOf(`
264
-
265
- `)!==-1||w&&g;g=T;const R=d.inline,D=d.list;let N;d.list=!0,T?(d.inline=!1,N=iu(A)+`
266
-
267
- `):(d.inline=!0,N=iu(A));const k=u(N,d);return d.inline=R,d.list=D,k}),ordered:n,start:f}},render:(l,u,d)=>e(l.ordered?"ol":"ul",{key:d.key,start:l.type===ze.orderedList?l.start:void 0},l.items.map(function(f,m){return e("li",{key:m},u(f,d))}))}}const Pq=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Vq=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,$k=[Nk,Ok,kk,Dk,Lk,Ik,jk,Fk,Gk],Bq=[...$k,/^[^\n]+(?: \n|\n{2,})/,Nv,Mk,Ov];function iu(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function hc(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function zq(e){return Eq.test(e)?"right":_q.test(e)?"center":xq.test(e)?"left":null}function mT(e,t,n,r){const a=n.inTable;n.inTable=!0;let o=[[]],l="";function u(){if(!l)return;const d=o[o.length-1];d.push.apply(d,t(l,n)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,f,m)=>{d.trim()==="|"&&(u(),r)?f!==0&&f!==m.length-1&&o.push([]):l+=d}),u(),n.inTable=a,o}function Uq(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(bq,"").split("|").map(zq):[],a=e[3]?function(l,u,d){return l.trim().split(`
268
- `).map(function(f){return mT(f,u,d,!0)})}(e[3],t,n):[],o=mT(e[1],t,n,!!a.length);return n.inline=!1,a.length?{align:r,cells:a,header:o,type:ze.table}:{children:o,type:ze.paragraph}}function pT(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Go(e){return e.inline=1,e}function la(e){return Go(function(t,n){return n.inline?e.exec(t):null})}function ca(e){return Go(function(t,n){return n.inline||n.simple?e.exec(t):null})}function _i(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function mc(e){return Go(function(t){return e.exec(t)})}function Hq(e,t){if(t.inline||t.simple)return null;let n="";e.split(`
269
- `).every(a=>(a+=`
270
- `,!$k.some(o=>o.test(a))&&(n+=a,!!a.trim())));const r=iu(n);return r==""?null:[n,,r]}function Fq(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch{return null}return e}function gT(e){return e.replace(kq,"$1")}function Nf(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!0,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=a,o}function Gq(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!1,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=a,o}function $q(e,t,n){const r=n.inline||!1;n.inline=!1;const a=e(t,n);return n.inline=r,a}const fy=(e,t,n)=>({children:Nf(t,e[2],n)});function hy(){return{}}function my(){return null}function qq(...e){return e.filter(Boolean).join(" ")}function py(e,t,n){let r=e;const a=t.split(".");for(;a.length&&(r=r[a[0]],r!==void 0);)a.shift();return r||n}function Kq(e="",t={}){function n(y,b,...v){const S=py(t.overrides,`${y}.props`,{});return t.createElement(function(A,w){const T=py(w,A);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:py(w,`${A}.component`,A):A}(y,t.overrides),os({},b,S,{className:qq(b==null?void 0:b.className,S.className)||void 0}),...v)}function r(y){y=y.replace(aq,"");let b=!1;t.forceInline?b=!0:t.forceBlock||(b=yq.test(y)===!1);const v=f(d(b?y:`${iu(y).replace(Nq,"")}
271
-
272
- `,{inline:b}));for(;typeof v[v.length-1]=="string"&&!v[v.length-1].trim();)v.pop();if(t.wrapper===null)return v;const S=t.wrapper||(b?"span":"div");let A;if(v.length>1||t.forceWrapper)A=v;else{if(v.length===1)return A=v[0],typeof A=="string"?n("span",{key:"outer"},A):A;A=null}return t.createElement(S,{key:"outer"},A)}function a(y,b){const v=b.match(q7);return v?v.reduce(function(S,A){const w=A.indexOf("=");if(w!==-1){const T=function(k){return k.indexOf("-")!==-1&&k.match(lq)===null&&(k=k.replace(hq,function(I,P){return P.toUpperCase()})),k}(A.slice(0,w)).trim(),R=function(k){const I=k[0];return(I==='"'||I==="'")&&k.length>=2&&k[k.length-1]===I?k.slice(1,-1):k}(A.slice(w+1).trim()),D=dT[T]||T;if(D==="ref")return S;const N=S[D]=function(k,I,P,V){return I==="style"?P.split(/;\s?/).reduce(function(H,fe){const te=fe.slice(0,fe.indexOf(":"));return H[te.trim().replace(/(-[a-z])/g,ue=>ue[1].toUpperCase())]=fe.slice(te.length+1).trim(),H},{}):I==="href"||I==="src"?V(P,k,I):(P.match(cq)&&(P=P.slice(1,P.length-1)),P==="true"||P!=="false"&&P)}(y,T,R,t.sanitizer);typeof N=="string"&&(Nv.test(N)||Ov.test(N))&&(S[D]=r(N.trim()))}else A!=="style"&&(S[dT[A]||A]=!0);return S},{}):null}t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||Fq,t.slugify=t.slugify||hc,t.namedCodesToUnicode=t.namedCodesToUnicode?os({},fT,t.namedCodesToUnicode):fT,t.createElement=t.createElement||E.createElement;const o=[],l={},u={[ze.blockQuote]:{match:_i(Nk),order:1,parse(y,b,v){const[,S,A]=y[0].replace(Y7,"").match(Z7);return{alert:S,children:b(A,v)}},render(y,b,v){const S={key:v.key};return y.alert&&(S.className="markdown-alert-"+t.slugify(y.alert.toLowerCase(),hc),y.children.unshift({attrs:{},children:[{type:ze.text,text:y.alert}],noInnerParse:!0,type:ze.htmlBlock,tag:"header"})),n("blockquote",S,b(y.children,v))}},[ze.breakLine]:{match:mc(X7),order:1,parse:hy,render:(y,b,v)=>n("br",{key:v.key})},[ze.breakThematic]:{match:_i(Q7),order:1,parse:hy,render:(y,b,v)=>n("hr",{key:v.key})},[ze.codeBlock]:{match:_i(kk),order:0,parse:y=>({lang:void 0,text:iu(y[0].replace(/^ {4}/gm,"")).replace(dy,"$1")}),render:(y,b,v)=>n("pre",{key:v.key},n("code",os({},y.attrs,{className:y.lang?`lang-${y.lang}`:""}),y.text))},[ze.codeFenced]:{match:_i(Ok),order:0,parse:y=>({attrs:a("code",y[3]||""),lang:y[2]||void 0,text:y[4].replace(dy,"$1"),type:ze.codeBlock})},[ze.codeInline]:{match:ca(J7),order:3,parse:y=>({text:y[2].replace(dy,"$1")}),render:(y,b,v)=>n("code",{key:v.key},y.text)},[ze.footnote]:{match:_i(nq),order:0,parse:y=>(o.push({footnote:y[2],identifier:y[1]}),{}),render:my},[ze.footnoteReference]:{match:la(rq),order:1,parse:y=>({target:`#${t.slugify(y[1],hc)}`,text:y[1]}),render:(y,b,v)=>n("a",{key:v.key,href:t.sanitizer(y.target,"a","href")},n("sup",{key:v.key},y.text))},[ze.gfmTask]:{match:la(sq),order:1,parse:y=>({completed:y[1].toLowerCase()==="x"}),render:(y,b,v)=>n("input",{checked:y.completed,key:v.key,readOnly:!0,type:"checkbox"})},[ze.heading]:{match:_i(t.enforceAtxHeadings?Ik:Dk),order:1,parse:(y,b,v)=>({children:Nf(b,y[2],v),id:t.slugify(y[2],hc),level:y[1].length}),render:(y,b,v)=>n(`h${y.level}`,{id:y.id,key:v.key},b(y.children,v))},[ze.headingSetext]:{match:_i(Lk),order:0,parse:(y,b,v)=>({children:Nf(b,y[1],v),level:y[2]==="="?1:2,type:ze.heading})},[ze.htmlBlock]:{match:mc(Nv),order:1,parse(y,b,v){const[,S]=y[3].match(Oq),A=new RegExp(`^${S}`,"gm"),w=y[3].replace(A,""),T=(R=w,Bq.some(P=>P.test(R))?$q:Nf);var R;const D=y[1].toLowerCase(),N=$7.indexOf(D)!==-1,k=(N?D:y[1]).trim(),I={attrs:a(k,y[2]),noInnerParse:N,tag:k};return v.inAnchor=v.inAnchor||D==="a",N?I.text=y[3]:I.children=T(b,w,v),v.inAnchor=!1,I},render:(y,b,v)=>n(y.tag,os({key:v.key},y.attrs),y.text||(y.children?b(y.children,v):""))},[ze.htmlSelfClosing]:{match:mc(Ov),order:1,parse(y){const b=y[1].trim();return{attrs:a(b,y[2]||""),tag:b}},render:(y,b,v)=>n(y.tag,os({},y.attrs,{key:v.key}))},[ze.htmlComment]:{match:mc(Mk),order:1,parse:()=>({}),render:my},[ze.image]:{match:ca(Vq),order:1,parse:y=>({alt:y[1],target:gT(y[2]),title:y[3]}),render:(y,b,v)=>n("img",{key:v.key,alt:y.alt||void 0,title:y.title||void 0,src:t.sanitizer(y.target,"img","src")})},[ze.link]:{match:la(Pq),order:3,parse:(y,b,v)=>({children:Gq(b,y[1],v),target:gT(y[2]),title:y[3]}),render:(y,b,v)=>n("a",{key:v.key,href:t.sanitizer(y.target,"a","href"),title:y.title},b(y.children,v))},[ze.linkAngleBraceStyleDetector]:{match:la(fq),order:0,parse:y=>({children:[{text:y[1],type:ze.text}],target:y[1],type:ze.link})},[ze.linkBareUrlDetector]:{match:Go((y,b)=>b.inAnchor||t.disableAutoLink?null:la(uq)(y,b)),order:0,parse:y=>({children:[{text:y[1],type:ze.text}],target:y[1],title:void 0,type:ze.link})},[ze.linkMailtoDetector]:{match:la(dq),order:0,parse(y){let b=y[1],v=y[1];return K7.test(v)||(v="mailto:"+v),{children:[{text:b.replace("mailto:",""),type:ze.text}],target:v,type:ze.link}}},[ze.orderedList]:hT(n,1),[ze.unorderedList]:hT(n,2),[ze.newlineCoalescer]:{match:_i(eq),order:3,parse:hy,render:()=>`
273
- `},[ze.paragraph]:{match:Go(Hq),order:3,parse:fy,render:(y,b,v)=>n("p",{key:v.key},b(y.children,v))},[ze.ref]:{match:la(mq),order:0,parse:y=>(l[y[1]]={target:y[2],title:y[4]},{}),render:my},[ze.refImage]:{match:ca(pq),order:0,parse:y=>({alt:y[1]||void 0,ref:y[2]}),render:(y,b,v)=>l[y.ref]?n("img",{key:v.key,alt:y.alt,src:t.sanitizer(l[y.ref].target,"img","src"),title:l[y.ref].title}):null},[ze.refLink]:{match:la(gq),order:0,parse:(y,b,v)=>({children:b(y[1],v),fallbackChildren:y[0],ref:y[2]}),render:(y,b,v)=>l[y.ref]?n("a",{key:v.key,href:t.sanitizer(l[y.ref].target,"a","href"),title:l[y.ref].title},b(y.children,v)):n("span",{key:v.key},y.fallbackChildren)},[ze.table]:{match:_i(jk),order:1,parse:Uq,render(y,b,v){const S=y;return n("table",{key:v.key},n("thead",null,n("tr",null,S.header.map(function(A,w){return n("th",{key:w,style:pT(S,w)},b(A,v))}))),n("tbody",null,S.cells.map(function(A,w){return n("tr",{key:w},A.map(function(T,R){return n("td",{key:R,style:pT(S,R)},b(T,v))}))})))}},[ze.text]:{match:mc(Rq),order:4,parse:y=>({text:y[0].replace(oq,(b,v)=>t.namedCodesToUnicode[v]?t.namedCodesToUnicode[v]:b)}),render:y=>y.text},[ze.textBolded]:{match:ca(Sq),order:2,parse:(y,b,v)=>({children:b(y[2],v)}),render:(y,b,v)=>n("strong",{key:v.key},b(y.children,v))},[ze.textEmphasized]:{match:ca(Aq),order:3,parse:(y,b,v)=>({children:b(y[2],v)}),render:(y,b,v)=>n("em",{key:v.key},b(y.children,v))},[ze.textEscaped]:{match:ca(Cq),order:1,parse:y=>({text:y[1],type:ze.text})},[ze.textMarked]:{match:ca(wq),order:3,parse:fy,render:(y,b,v)=>n("mark",{key:v.key},b(y.children,v))},[ze.textStrikethroughed]:{match:ca(Tq),order:3,parse:fy,render:(y,b,v)=>n("del",{key:v.key},b(y.children,v))}};t.disableParsingRawHTML===!0&&(delete u[ze.htmlBlock],delete u[ze.htmlSelfClosing]);const d=function(y){let b=Object.keys(y);function v(S,A){let w,T,R=[],D="",N="";for(A.prevCapture=A.prevCapture||"";S;){let k=0;for(;k<b.length;){if(D=b[k],w=y[D],A.inline&&!w.match.inline){k++;continue}const I=w.match(S,A);if(I){N=I[0],A.prevCapture+=N,S=S.substring(N.length),T=w.parse(I,v,A),T.type==null&&(T.type=D),R.push(T);break}k++}}return A.prevCapture="",R}return b.sort(function(S,A){let w=y[S].order,T=y[A].order;return w!==T?w-T:S<A?-1:1}),function(S,A){return v(function(w){return w.replace(tq,`
274
- `).replace(iq,"").replace(vq," ")}(S),A)}}(u),f=(m=function(y,b){return function(v,S,A){const w=y[v.type].render;return b?b(()=>w(v,S,A),v,S,A):w(v,S,A)}}(u,t.renderRule),function y(b,v={}){if(Array.isArray(b)){const S=v.key,A=[];let w=!1;for(let T=0;T<b.length;T++){v.key=T;const R=y(b[T],v),D=typeof R=="string";D&&w?A[A.length-1]+=R:R!==null&&A.push(R),w=D}return v.key=S,A}return m(b,y,v)});var m;const g=r(e);return o.length?n("div",null,g,n("footer",{key:"footer"},o.map(function(y){return n("div",{id:t.slugify(y.identifier,hc),key:y.identifier},y.identifier,f(d(y.footnote,{inline:!0})))}))):g}const Wq=e=>{let{children:t="",options:n}=e,r=function(a,o){if(a==null)return{};var l,u,d={},f=Object.keys(a);for(u=0;u<f.length;u++)o.indexOf(l=f[u])>=0||(d[l]=a[l]);return d}(e,G7);return E.cloneElement(Kq(t,n),r)},Yq=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},Zq=()=>{const[e,t]=E.useState(),n=()=>{t(window.location.hash.slice(1))};return E.useEffect(()=>(t(window.location.hash.slice(1)),window.addEventListener("hashchange",n,{passive:!0}),()=>window.removeEventListener("hashchange",n)),[]),E.useEffect(()=>{e&&Yq(e)},[e]),null},Xq=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function Qq(e,t,n){const r=[];for(const a of e){if(n==="v3"){const u=a.children.flatMap((d,f)=>{if(d.type!=="element")return d;const m=d.children[0];if(m.type!=="text")return d;const g=f===a.children.length-1;if(!vT(m.value,g))return d;const b=m.value.split(/(\s+\/\/)/);if(b.length<=1)return d;let v=[b[0]];for(let S=1;S<b.length;S+=2)v.push(b[S]+(b[S+1]||""));return v=v.filter(Boolean),v.length<=1?d:v.map(S=>({...d,children:[{type:"text",value:S}]}))});u.length!==a.children.length&&(a.children=u)}const o=a.children;let l=o.length-1;n==="v1"?l=0:t&&(l=o.length-2);for(let u=Math.max(l,0);u<o.length;u++){const d=o[u];if(d.type!=="element")continue;const f=d.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const m=u===o.length-1,g=vT(f.value,m);if(g)if(t&&!m&&u!==0){const y=yT(o[u-1],"{")&&yT(o[u+1],"}");r.push({info:g,line:a,token:d,isLineCommentOnly:o.length===3&&d.children.length===1,isJsxStyle:y})}else r.push({info:g,line:a,token:d,isLineCommentOnly:o.length===1&&d.children.length===1,isJsxStyle:!1})}}return r}function yT(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function vT(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const a=e.length-n.length-r;for(const[o,l]of Xq){if(l&&!t)continue;const u=o.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(a):void 0]}}function Jq(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function qk(e,t,n,r){return r==null&&(r="v3"),{name:e,code(a){const o=a.children.filter(f=>f.type==="element"),l=[];a.data??(a.data={});const u=a.data;u._shiki_notation??(u._shiki_notation=Qq(o,["jsx","tsx"].includes(this.options.lang),r));const d=u._shiki_notation;for(const f of d){if(f.info[1].length===0)continue;let m=o.indexOf(f.line);f.isLineCommentOnly&&r!=="v1"&&m++;let g=!1;if(f.info[1]=f.info[1].replace(t,(...b)=>n.call(this,b,f.line,f.token,o,m)?(g=!0,""):b[0]),!g)continue;r==="v1"&&(f.info[1]=Jq(f.info[1]));const y=f.info[1].trim().length===0;if(y&&(f.info[1]=""),y&&f.isLineCommentOnly)l.push(f.line);else if(y&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(y)f.line.children.splice(f.line.children.indexOf(f.token),1);else{const b=f.token.children[0];b.type==="text"&&(b.value=f.info.join(""))}}for(const f of l){const m=a.children.indexOf(f),g=a.children[m+1];let y=1;(g==null?void 0:g.type)==="text"&&(g==null?void 0:g.value)===`
275
- `&&(y=2),a.children.splice(m,y)}}}}function eK(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const a=r.split("-").map(o=>Number.parseInt(o,10));return a.length===1?[a[0]]:Array.from({length:a[1]-a[0]+1},(o,l)=>l+a[0])}):null}const lf=Symbol("highlighted-lines");function tK(e={}){const{className:t="highlighted"}=e;return{name:"@shikijs/transformers:meta-highlight",line(n,r){var l;if(!((l=this.options.meta)!=null&&l.__raw))return;const a=this.meta;return a[lf]??(a[lf]=eK(this.options.meta.__raw)),(a[lf]??[]).includes(r)&&this.addClassToHast(n,t),n}}}function nK(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(n=>n[1].replace(/\\(.)/g,"$1")):[]}function rK(e={}){const{className:t="highlighted-word"}=e;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(n,r){var o;if(!((o=this.options.meta)!=null&&o.__raw))return;const a=nK(this.options.meta.__raw);r.decorations||(r.decorations=[]);for(const l of a){const u=iK(n,l);for(const d of u)r.decorations.push({start:d,end:d+l.length,properties:{class:t}})}}}}function iK(e,t){const n=[];let r=0;for(;;){const a=e.indexOf(t,r);if(a===-1||a>=e.length||a<r)break;n.push(a),r=a+t.length}return n}function aK(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function x0(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0}=e;return qk(t,new RegExp(`\\s*\\[!code (${Object.keys(n).map(aK).join("|")})(:\\d+)?\\]`),function([a,o,l=":1"],u,d,f,m){const g=Number.parseInt(l.slice(1),10);for(let y=m;y<Math.min(m+g,f.length);y++)this.addClassToHast(f[y],n[o]);return r&&this.addClassToHast(this.pre,r),!0},e.matchAlgorithm)}function sK(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff"}=e;return x0({classMap:{"++":t,"--":n},classActivePre:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function oK(e={}){const{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:n="has-highlighted"}=e;return x0({classMap:t,classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function lK(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted"}=e;return x0({classMap:{highlight:t,hl:t},classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function cK(e,t,n,r){const a=Kk(e);let o=a.indexOf(n);for(;o!==-1;)uK.call(this,e.children,t,o,n.length,r),o=a.indexOf(n,o+1)}function Kk(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(Kk).join(""):""}function uK(e,t,n,r,a){let o=0;for(let l=0;l<e.length;l++){const u=e[l];if(u.type!=="element"||u.tagName!=="span"||u===t)continue;const d=u.children[0];if(d.type==="text"){if(dK([o,o+d.value.length-1],[n,n+r])){const f=Math.max(0,n-o),m=r-Math.max(0,o-n);if(m===0)continue;const g=fK(u,d,f,m);this.addClassToHast(g[1],a);const y=g.filter(Boolean);e.splice(l,1,...y),l+=y.length-1}o+=d.value.length}}}function dK(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function fK(e,t,n,r){const a=t.value,o=l=>hK(e,{children:[{type:"text",value:l}]});return[n>0?o(a.slice(0,n)):void 0,o(a.slice(n,n+r)),n+r<a.length?o(a.slice(n+r)):void 0]}function hK(e,t){return{...e,properties:{...e.properties},...t}}function mK(e={}){const{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return qk("@shikijs/transformers:notation-highlight-word",/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,function([r,a,o],l,u,d,f){const m=o?Number.parseInt(o.slice(1),10):d.length;a=a.replace(/\\(.)/g,"$1");for(let g=f;g<Math.min(f+m,d.length);g++)cK.call(this,d[g],u,a,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}const pK="modulepreload",gK=function(e){return"/"+e},bT={},L=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=l(n.map(f=>{if(f=gK(f),f in bT)return;bT[f]=!0;const m=f.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":pK,m||(y.as="script"),y.crossOrigin="",y.href=f,d&&y.setAttribute("nonce",d),document.head.appendChild(y),m)return new Promise((b,v)=>{y.addEventListener("load",b),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};let nn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function yK(e){return E0(e)}function E0(e){return Array.isArray(e)?vK(e):e instanceof RegExp?e:typeof e=="object"?bK(e):e}function vK(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=E0(e[n]);return t}function bK(e){let t={};for(let n in e)t[n]=E0(e[n]);return t}function Wk(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Yk(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Yk(e.substring(0,e.length-1)):e.substr(~t+1)}var gy=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,cf=class{static hasCaptures(e){return e===null?!1:(gy.lastIndex=0,gy.test(e))}static replaceCaptures(e,t,n){return e.replace(gy,(r,a,o,l)=>{let u=n[parseInt(a||o,10)];if(u){let d=t.substring(u.start,u.end);for(;d[0]===".";)d=d.substring(1);switch(l){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return r})}};function Zk(e,t){return e<t?-1:e>t?1:0}function Xk(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let o=Zk(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function _T(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Qk(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Jk=class{constructor(e){le(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},uh=class{constructor(e,t,n){le(this,"_cachedMatchRoot",new Jk(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(EK(e),t)}static createFromParsedTheme(e,t){return AK(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>_K(e.parent,a.parentScopes));return r?new eD(r.fontStyle,r.foreground,r.background):null}},yy=class Of{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Of(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Of(n,t[r]);return n}push(t){return new Of(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function _K(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!xK(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function xK(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var eD=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function EK(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let l=t[a];if(!l.settings)continue;let u;if(typeof l.scope=="string"){let g=l.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),u=g.split(",")}else Array.isArray(l.scope)?u=l.scope:u=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let g=l.settings.fontStyle.split(" ");for(let y=0,b=g.length;y<b;y++)switch(g[y]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let f=null;typeof l.settings.foreground=="string"&&_T(l.settings.foreground)&&(f=l.settings.foreground);let m=null;typeof l.settings.background=="string"&&_T(l.settings.background)&&(m=l.settings.background);for(let g=0,y=u.length;g<y;g++){let v=u[g].trim().split(" "),S=v[v.length-1],A=null;v.length>1&&(A=v.slice(0,v.length-1),A.reverse()),n[r++]=new SK(S,A,a,d,f,m)}}return n}var SK=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},Ai=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Ai||{});function AK(e,t){e.sort((d,f)=>{let m=Zk(d.scope,f.scope);return m!==0||(m=Xk(d.parentScopes,f.parentScopes),m!==0)?m:d.index-f.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(r=d.foreground),d.background!==null&&(a=d.background)}let o=new wK(t),l=new eD(n,o.getId(r),o.getId(a)),u=new CK(new kv(0,null,-1,0,0),[]);for(let d=0,f=e.length;d<f;d++){let m=e[d];u.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new uh(o,l,u)}var wK=class{constructor(e){le(this,"_isFrozen");le(this,"_lastColorId");le(this,"_id2color");le(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},TK=Object.freeze([]),kv=class tD{constructor(t,n,r,a,o){le(this,"scopeDepth");le(this,"parentScopes");le(this,"fontStyle");le(this,"foreground");le(this,"background");this.scopeDepth=t,this.parentScopes=n||TK,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new tD(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},CK=class Dv{constructor(t,n=[],r={}){le(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){const o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Dv._cmpBySpecificity),n}insert(t,n,r,a,o,l){if(n===""){this._doInsertHere(t,r,a,o,l);return}let u=n.indexOf("."),d,f;u===-1?(d=n,f=""):(d=n.substring(0,u),f=n.substring(u+1));let m;this._children.hasOwnProperty(d)?m=this._children[d]:(m=new Dv(this._mainRule.clone(),kv.cloneArr(this._rulesWithParentScopes)),this._children[d]=m),m.insert(t+1,f,r,a,o,l)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let d=this._rulesWithParentScopes[l];if(Xk(d.parentScopes,n)===0){d.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new kv(t,n,r,a,o))}},$o=class or{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=or.getLanguageId(t),r=or.getTokenType(t),a=or.getFontStyle(t),o=or.getForeground(t),l=or.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,o,l,u){let d=or.getLanguageId(t),f=or.getTokenType(t),m=or.containsBalancedBrackets(t)?1:0,g=or.getFontStyle(t),y=or.getForeground(t),b=or.getBackground(t);return n!==0&&(d=n),r!==8&&(f=r),a!==null&&(m=a?1:0),o!==-1&&(g=o),l!==0&&(y=l),u!==0&&(b=u),(d<<0|f<<8|m<<10|g<<11|y<<15|b<<24)>>>0}};function dh(e,t){const n=[],r=RK(e);let a=r.next();for(;a!==null;){let d=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let f=l();if(n.push({matcher:f,priority:d}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();const d=o();return f=>!!d&&!d(f)}if(a==="("){a=r.next();const d=u();return a===")"&&(a=r.next()),d}if(xT(a)){const d=[];do d.push(a),a=r.next();while(xT(a));return f=>t(d,f)}return null}function l(){const d=[];let f=o();for(;f;)d.push(f),f=o();return m=>d.every(g=>g(m))}function u(){const d=[];let f=l();for(;f&&(d.push(f),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");f=l()}return m=>d.some(g=>g(m))}}function xT(e){return!!e&&!!e.match(/[\w\.:]+/)}function RK(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function nD(e){typeof e.dispose=="function"&&e.dispose()}var au=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},NK=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},OK=class{constructor(){le(this,"_references",[]);le(this,"_seenReferenceKeys",new Set);le(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},kK=class{constructor(e,t){le(this,"seenFullScopeRequests",new Set);le(this,"seenPartialScopeRequests",new Set);le(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new au(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new OK;for(const n of e)DK(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof au){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function DK(e,t,n,r){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof au?kf({baseGrammar:o,selfGrammar:a},r):Iv(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);const l=n.injections(e.scopeName);if(l)for(const u of l)r.add(new au(u))}function Iv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];fh([r],t,n)}}function kf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&fh(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&fh(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function fh(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?Wk({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&fh(r.patterns,{...t,repository:a},n);const o=r.include;if(!o)continue;const l=rD(o);switch(l.kind){case 0:kf({...t,selfGrammar:t.baseGrammar},n);break;case 1:kf(t,n);break;case 2:Iv(l.ruleName,{...t,repository:a},n);break;case 3:case 4:const u=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const d={baseGrammar:t.baseGrammar,selfGrammar:u,repository:a};l.kind===4?Iv(l.ruleName,d,n):kf(d,n)}else l.kind===4?n.add(new NK(l.scopeName,l.ruleName)):n.add(new au(l.scopeName));break}}}var IK=class{constructor(){le(this,"kind",0)}},LK=class{constructor(){le(this,"kind",1)}},MK=class{constructor(e){le(this,"kind",2);this.ruleName=e}},jK=class{constructor(e){le(this,"kind",3);this.scopeName=e}},PK=class{constructor(e,t){le(this,"kind",4);this.scopeName=e,this.ruleName=t}};function rD(e){if(e==="$base")return new IK;if(e==="$self")return new LK;const t=e.indexOf("#");if(t===-1)return new jK(e);if(t===0)return new MK(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new PK(n,r)}}var VK=/\\(\d+)/,ET=/\\(\d+)/g,BK=-1,iD=-2;var ku=class{constructor(e,t,n,r){le(this,"$location");le(this,"id");le(this,"_nameIsCapturing");le(this,"_name");le(this,"_contentNameIsCapturing");le(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=cf.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=cf.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Yk(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:cf.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:cf.replaceCaptures(this._contentName,e,t)}},zK=class extends ku{constructor(t,n,r,a,o){super(t,n,r,a);le(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,a){throw new Error("Not supported!")}},UK=class extends ku{constructor(t,n,r,a,o){super(t,n,r,null);le(this,"_match");le(this,"captures");le(this,"_cachedCompiledPatterns");this._match=new su(a,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ou,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ST=class extends ku{constructor(t,n,r,a,o){super(t,n,r,a);le(this,"hasMissingPatterns");le(this,"patterns");le(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ou,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Lv=class extends ku{constructor(t,n,r,a,o,l,u,d,f,m){super(t,n,r,a);le(this,"_begin");le(this,"beginCaptures");le(this,"_end");le(this,"endHasBackReferences");le(this,"endCaptures");le(this,"applyEndPatternLast");le(this,"hasMissingPatterns");le(this,"patterns");le(this,"_cachedCompiledPatterns");this._begin=new su(o,this.id),this.beginCaptures=l,this._end=new su(u||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=f||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,a)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ou;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},hh=class extends ku{constructor(t,n,r,a,o,l,u,d,f){super(t,n,r,a);le(this,"_begin");le(this,"beginCaptures");le(this,"whileCaptures");le(this,"_while");le(this,"whileHasBackReferences");le(this,"hasMissingPatterns");le(this,"patterns");le(this,"_cachedCompiledPatterns");le(this,"_cachedCompiledWhilePatterns");this._begin=new su(o,this.id),this.beginCaptures=l,this.whileCaptures=d,this._while=new su(u,iD),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ou;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,a){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,a)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ou,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},aD=class hn{static createCaptureRule(t,n,r,a,o){return t.registerRule(l=>new zK(n,l,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new UK(t.$vscodeTextmateLocation,t.id,t.name,t.match,hn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Wk({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new ST(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,hn._compilePatterns(o,n,r))}return t.while?new hh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,hn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,hn._compileCaptures(t.whileCaptures||t.captures,n,r),hn._compilePatterns(t.patterns,n,r)):new Lv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,hn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,hn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,hn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);u>o&&(o=u)}for(let l=0;l<=o;l++)a[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);let d=0;t[l].patterns&&(d=hn.getCompiledRuleId(t[l],n,r)),a[u]=hn.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let o=0,l=t.length;o<l;o++){const u=t[o];let d=-1;if(u.include){const f=rD(u.include);switch(f.kind){case 0:case 1:d=hn.getCompiledRuleId(r[u.include],n,r);break;case 2:let m=r[f.ruleName];m&&(d=hn.getCompiledRuleId(m,n,r));break;case 3:case 4:const g=f.scopeName,y=f.kind===4?f.ruleName:null,b=n.getExternalGrammar(g,r);if(b)if(y){let v=b.repository[y];v&&(d=hn.getCompiledRuleId(v,n,b.repository))}else d=hn.getCompiledRuleId(b.repository.$self,n,b.repository);break}}else d=hn.getCompiledRuleId(u,n,r);if(d!==-1){const f=n.getRule(d);let m=!1;if((f instanceof ST||f instanceof Lv||f instanceof hh)&&f.hasMissingPatterns&&f.patterns.length===0&&(m=!0),m)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},su=class sD{constructor(t,n){le(this,"source");le(this,"ruleId");le(this,"hasAnchor");le(this,"hasBackReferences");le(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let a=0,o=[],l=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(o.push(t.substring(a,u)),o.push("$(?!\\n)(?<!\\n)"),a=u+2):(f==="A"||f==="G")&&(l=!0),u++}this.hasAnchor=l,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=VK.test(this.source):this.hasBackReferences=!1}clone(){return new sD(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return ET.lastIndex=0,this.source.replace(ET,(a,o)=>Qk(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],o,l,u,d;for(o=0,l=this.source.length;o<l;o++)u=this.source.charAt(o),t[o]=u,n[o]=u,r[o]=u,a[o]=u,u==="\\"&&o+1<l&&(d=this.source.charAt(o+1),d==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",a[o+1]="A"):d==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",a[o+1]="G"):(t[o+1]=d,n[o+1]=d,r[o+1]=d,a[o+1]=d),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ou=class{constructor(){le(this,"_items");le(this,"_hasAnchors");le(this,"_cached");le(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new AT(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new AT(e,r,this._items.map(a=>a.ruleId))}},AT=class{constructor(e,t,n){le(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
276
- `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},vy=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Si,HK=(Si=class{constructor(t,n){le(this,"_defaultAttributes");le(this,"_embeddedLanguagesMatcher");le(this,"_getBasicScopeAttributes",new Jk(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new vy(n,r)}));this._defaultAttributes=new vy(t,8),this._embeddedLanguagesMatcher=new FK(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Si._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Si.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},le(Si,"_NULL_SCOPE_METADATA",new vy(0,0)),le(Si,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Si),FK=class{constructor(e){le(this,"values");le(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Qk(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},wT=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function oD(e,t,n,r,a,o,l,u){const d=t.content.length;let f=!1,m=-1;if(l){const b=GK(e,t,n,r,a,o);a=b.stack,r=b.linePos,n=b.isFirstLine,m=b.anchorPosition}const g=Date.now();for(;!f;){if(u!==0&&Date.now()-g>u)return new wT(a,!0);y()}return new wT(a,!1);function y(){const b=$K(e,t,n,r,a,m);if(!b){o.produce(a,d),f=!0;return}const v=b.captureIndices,S=b.matchedRuleId,A=v&&v.length>0?v[0].end>r:!1;if(S===BK){const w=a.getRule(e);o.produce(a,v[0].start),a=a.withContentNameScopesList(a.nameScopesList),xc(e,t,n,a,o,w.endCaptures,v),o.produce(a,v[0].end);const T=a;if(a=a.parent,m=T.getAnchorPos(),!A&&T.getEnterPos()===r){a=T,o.produce(a,d),f=!0;return}}else{const w=e.getRule(S);o.produce(a,v[0].start);const T=a,R=w.getName(t.content,v),D=a.contentNameScopesList.pushAttributed(R,e);if(a=a.push(S,r,m,v[0].end===d,null,D,D),w instanceof Lv){const N=w;xc(e,t,n,a,o,N.beginCaptures,v),o.produce(a,v[0].end),m=v[0].end;const k=N.getContentName(t.content,v),I=D.pushAttributed(k,e);if(a=a.withContentNameScopesList(I),N.endHasBackReferences&&(a=a.withEndRule(N.getEndWithResolvedBackReferences(t.content,v))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(w instanceof hh){const N=w;xc(e,t,n,a,o,N.beginCaptures,v),o.produce(a,v[0].end),m=v[0].end;const k=N.getContentName(t.content,v),I=D.pushAttributed(k,e);if(a=a.withContentNameScopesList(I),N.whileHasBackReferences&&(a=a.withEndRule(N.getWhileWithResolvedBackReferences(t.content,v))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(xc(e,t,n,a,o,w.captures,v),o.produce(a,v[0].end),a=a.pop(),!A){a=a.safePop(),o.produce(a,d),f=!0;return}}v[0].end>r&&(r=v[0].end,n=!1)}}function GK(e,t,n,r,a,o){let l=a.beginRuleCapturedEOL?0:-1;const u=[];for(let d=a;d;d=d.pop()){const f=d.getRule(e);f instanceof hh&&u.push({rule:f,stack:d})}for(let d=u.pop();d;d=u.pop()){const{ruleScanner:f,findOptions:m}=WK(d.rule,e,d.stack.endRule,n,r===l),g=f.findNextMatchSync(t,r,m);if(g){if(g.ruleId!==iD){a=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(o.produce(d.stack,g.captureIndices[0].start),xc(e,t,n,d.stack,o,d.rule.whileCaptures,g.captureIndices),o.produce(d.stack,g.captureIndices[0].end),l=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{a=d.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function $K(e,t,n,r,a,o){const l=qK(e,t,n,r,a,o),u=e.getInjections();if(u.length===0)return l;const d=KK(u,e,t,n,r,a,o);if(!d)return l;if(!l)return d;const f=l.captureIndices[0].start,m=d.captureIndices[0].start;return m<f||d.priorityMatch&&m===f?d:l}function qK(e,t,n,r,a,o){const l=a.getRule(e),{ruleScanner:u,findOptions:d}=lD(l,e,a.endRule,n,r===o),f=u.findNextMatchSync(t,r,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function KK(e,t,n,r,a,o,l){let u=Number.MAX_VALUE,d=null,f,m=0;const g=o.contentNameScopesList.getScopeNames();for(let y=0,b=e.length;y<b;y++){const v=e[y];if(!v.matcher(g))continue;const S=t.getRule(v.ruleId),{ruleScanner:A,findOptions:w}=lD(S,t,null,r,a===l),T=A.findNextMatchSync(n,a,w);if(!T)continue;const R=T.captureIndices[0].start;if(!(R>=u)&&(u=R,d=T.captureIndices,f=T.ruleId,m=v.priority,u===a))break}return d?{priorityMatch:m===-1,captureIndices:d,matchedRuleId:f}:null}function lD(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function WK(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function xc(e,t,n,r,a,o,l){if(o.length===0)return;const u=t.content,d=Math.min(o.length,l.length),f=[],m=l[0].end;for(let g=0;g<d;g++){const y=o[g];if(y===null)continue;const b=l[g];if(b.length===0)continue;if(b.start>m)break;for(;f.length>0&&f[f.length-1].endPos<=b.start;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?a.produceFromScopes(f[f.length-1].scopes,b.start):a.produce(r,b.start),y.retokenizeCapturedWithRuleId){const S=y.getName(u,l),A=r.contentNameScopesList.pushAttributed(S,e),w=y.getContentName(u,l),T=A.pushAttributed(w,e),R=r.push(y.retokenizeCapturedWithRuleId,b.start,-1,!1,null,A,T),D=e.createOnigString(u.substring(0,b.end));oD(e,D,n&&b.start===0,b.start,R,a,!1,0),nD(D);continue}const v=y.getName(u,l);if(v!==null){const A=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(v,e);f.push(new YK(A,b.end))}}for(;f.length>0;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var YK=class{constructor(e,t){le(this,"scopes");le(this,"endPos");this.scopes=e,this.endPos=t}};function ZK(e,t,n,r,a,o,l,u){return new QK(e,t,n,r,a,o,l,u)}function TT(e,t,n,r,a){const o=dh(t,mh),l=aD.getCompiledRuleId(n,r,a.repository);for(const u of o)e.push({debugSelector:t,matcher:u.matcher,ruleId:l,grammar:a,priority:u.priority})}function mh(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(XK(t[a],r))return n=a+1,!0;return!1})}function XK(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var QK=class{constructor(e,t,n,r,a,o,l,u){le(this,"_rootId");le(this,"_lastRuleId");le(this,"_ruleId2desc");le(this,"_includedGrammars");le(this,"_grammarRepository");le(this,"_grammar");le(this,"_injections");le(this,"_basicScopeAttributesProvider");le(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new HK(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=CT(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const f=dh(d,mh);for(const m of f)this._tokenTypeMatchers.push({matcher:m.matcher,type:a[d]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const a=r.injections;if(a)for(let l in a)TT(t,l,a[l],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const u=this.getExternalGrammar(l);if(u){const d=u.injectionSelector;d&&TT(t,d,u,this,u)}})}return t.sort((a,o)=>a.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=CT(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=aD.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===Mv.NULL){a=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),g=$o.set(0,f.languageId,f.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),y=this.getRule(this._rootId).getName(null,null);let b;y?b=Dc.createRootAndLookUpScopeName(y,g,this):b=Dc.createRoot("unknown",g),t=new Mv(null,this._rootId,-1,-1,!1,null,b,b)}else a=!1,t.reset();e=e+`
277
- `;const o=this.createOnigString(e),l=o.content.length,u=new eW(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=oD(this,o,a,0,t,u,!0,r);return nD(o),{lineLength:l,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function CT(e,t){return e=yK(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Dc=class Mr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=(t==null?void 0:t.scopePath)??null;for(const o of n)a=yy.push(a,o.scopeNames),r=new Mr(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Mr(null,new yy(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),o=new yy(null,t),l=r.themeProvider.themeMatch(o),u=Mr.mergeAttributes(n,a,l);return new Mr(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Mr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,o=0,l=0;return r!==null&&(a=r.fontStyle,o=r.foregroundId,l=r.backgroundId),$o.set(t,n.languageId,n.tokenType,null,a,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Mr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const o of r)a=Mr._pushAttributed(a,o,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),u=Mr.mergeAttributes(t.tokenAttributes,a,l);return new Mr(t,o,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var a;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((a=r.parent)==null?void 0:a.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},ur,Mv=(ur=class{constructor(t,n,r,a,o,l,u,d){le(this,"_stackElementBrand");le(this,"_enterPos");le(this,"_anchorPos");le(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=u,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}equals(t){return t===null?!1:ur._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Dc.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ur._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,l,u){return new ur(this,t,n,r,a,o,l,u)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,a;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(a=this.contentNameScopesList)==null?void 0:a.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ur(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Dc.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ur(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Dc.fromExtension(r,n.contentNameScopesList))}},le(ur,"NULL",new ur(null,0,0,0,!1,null,null,null)),ur),JK=class{constructor(e,t){le(this,"balancedBracketScopes");le(this,"unbalancedBracketScopes");le(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):dh(n,mh).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>dh(n,mh).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eW=class{constructor(e,t,n,r){le(this,"_emitBinaryTokens");le(this,"_lineText");le(this,"_tokens");le(this,"_binaryTokens");le(this,"_lastTokenEndIndex");le(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let a=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(l)&&(a=$o.set(a,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(a=$o.set(a,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},tW=class{constructor(e,t){le(this,"_grammars",new Map);le(this,"_rawGrammars",new Map);le(this,"_injectionGrammars",new Map);le(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,ZK(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},nW=class{constructor(t){le(this,"_options");le(this,"_syncRegistry");le(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new tW(uh.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(uh.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new JK(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,o){const l=new kK(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(u=>this._loadSingleGrammar(u.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,a,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,a=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,a)}_grammarForScopeName(t,n=0,r=null,a=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,o)}},jv=Mv.NULL;const rW=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Du{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Du.prototype.normal={};Du.prototype.property={};Du.prototype.space=void 0;function cD(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Du(n,r,t)}function Pv(e){return e.toLowerCase()}class kn{constructor(t,n){this.attribute=n,this.property=t}}kn.prototype.attribute="";kn.prototype.booleanish=!1;kn.prototype.boolean=!1;kn.prototype.commaOrSpaceSeparated=!1;kn.prototype.commaSeparated=!1;kn.prototype.defined=!1;kn.prototype.mustUseProperty=!1;kn.prototype.number=!1;kn.prototype.overloadedBoolean=!1;kn.prototype.property="";kn.prototype.spaceSeparated=!1;kn.prototype.space=void 0;let iW=0;const We=Rs(),Ft=Rs(),uD=Rs(),be=Rs(),_t=Rs(),Io=Rs(),zn=Rs();function Rs(){return 2**++iW}const Vv=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ft,commaOrSpaceSeparated:zn,commaSeparated:Io,number:be,overloadedBoolean:uD,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),by=Object.keys(Vv);class S0 extends kn{constructor(t,n,r,a){let o=-1;if(super(t,n),RT(this,"space",a),typeof r=="number")for(;++o<by.length;){const l=by[o];RT(this,by[o],(r&Vv[l])===Vv[l])}}}S0.prototype.defined=!0;function RT(e,t,n){n&&(e[t]=n)}function sl(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new S0(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Pv(r)]=r,n[Pv(o.attribute)]=r}return new Du(t,n,e.space)}const dD=sl({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:_t,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:be,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:_t,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Ft,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fD(e,t){return t in e?e[t]:t}function hD(e,t){return fD(e,t.toLowerCase())}const aW=sl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Io,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:_t,autoFocus:We,autoPlay:We,blocking:_t,capture:null,charSet:null,checked:We,cite:null,className:_t,cols:be,colSpan:null,content:null,contentEditable:Ft,controls:We,controlsList:_t,coords:be|Io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:uD,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:_t,height:be,hidden:We,high:be,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:_t,itemRef:_t,itemScope:We,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:be,pattern:null,ping:_t,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:_t,required:We,reversed:We,rows:be,rowSpan:be,sandbox:_t,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ft,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:hD}),sW=sl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:zn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:_t,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Io,g2:Io,glyphName:Io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fD}),mD=sl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),pD=sl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hD}),gD=sl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),oW=/[A-Z]/g,NT=/-[a-z]/g,lW=/^data[-\w.:]+$/i;function cW(e,t){const n=Pv(t);let r=t,a=kn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(NT,dW);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!NT.test(o)){let l=o.replace(oW,uW);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=S0}return new a(r,t)}function uW(e){return"-"+e.toLowerCase()}function dW(e){return e.charAt(1).toUpperCase()}const fW=cD([dD,aW,mD,pD,gD],"html"),yD=cD([dD,sW,mD,pD,gD],"svg"),OT={}.hasOwnProperty;function hW(e,t){const n=t||{};function r(a,...o){let l=r.invalid;const u=r.handlers;if(a&&OT.call(a,e)){const d=String(a[e]);l=OT.call(u,d)?u[d]:r.unknown}if(l)return l.call(this,a,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const mW=/["&'<>`]/g,pW=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gW=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,yW=/[|\\{}()[\]^$+*?.]/g,kT=new WeakMap;function vW(e,t){if(e=e.replace(t.subset?bW(t.subset):mW,r),t.subset||t.escapeOnly)return e;return e.replace(pW,n).replace(gW,r);function n(a,o,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(a,o,l){return t.format(a.charCodeAt(0),l.charCodeAt(o+1),t)}}function bW(e){let t=kT.get(e);return t||(t=_W(e),kT.set(e,t)),t}function _W(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(yW,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const xW=/[\dA-Fa-f]/;function EW(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!xW.test(String.fromCharCode(t))?r:r+";"}const SW=/\d/;function AW(e,t,n){const r="&#"+String(e);return n&&t&&!SW.test(String.fromCharCode(t))?r:r+";"}const wW=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],_y={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},TW=["cent","copy","divide","gt","lt","not","para","times"],vD={}.hasOwnProperty,Bv={};let uf;for(uf in _y)vD.call(_y,uf)&&(Bv[_y[uf]]=uf);const CW=/[^\dA-Za-z]/;function RW(e,t,n,r){const a=String.fromCharCode(e);if(vD.call(Bv,a)){const o=Bv[a],l="&"+o;return n&&wW.includes(o)&&!TW.includes(o)&&(!r||t&&t!==61&&CW.test(String.fromCharCode(t)))?l:l+";"}return""}function NW(e,t,n){let r=EW(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=RW(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const o=AW(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function Lo(e,t){return vW(e,Object.assign({format:NW},t))}const OW=/^>|^->|<!--|-->|--!>|<!-$/g,kW=[">"],DW=["<",">"];function IW(e,t,n,r){return r.settings.bogusComments?"<?"+Lo(e.value,Object.assign({},r.settings.characterReferences,{subset:kW}))+">":"<!--"+e.value.replace(OW,a)+"-->";function a(o){return Lo(o,Object.assign({},r.settings.characterReferences,{subset:DW}))}}function LW(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function DT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function MW(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function jW(e){return e.join(" ").trim()}const PW=/[ \t\n\f\r]/g;function A0(e){return typeof e=="object"?e.type==="text"?IT(e.value):!1:IT(e)}function IT(e){return e.replace(PW,"")===""}const Wt=_D(1),bD=_D(-1),VW=[];function _D(e){return t;function t(n,r,a){const o=n?n.children:VW;let l=(r||0)+e,u=o[l];if(!a)for(;u&&A0(u);)l+=e,u=o[l];return u}}const BW={}.hasOwnProperty;function xD(e){return t;function t(n,r,a){return BW.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const w0=xD({body:UW,caption:xy,colgroup:xy,dd:$W,dt:GW,head:xy,html:zW,li:FW,optgroup:qW,option:KW,p:HW,rp:LT,rt:LT,tbody:YW,td:MT,tfoot:ZW,th:MT,thead:WW,tr:XW});function xy(e,t,n){const r=Wt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&A0(r.value.charAt(0)))}function zW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function UW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function HW(e,t,n){const r=Wt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function FW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function GW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function $W(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function LT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function qW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function KW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function WW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function YW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ZW(e,t,n){return!Wt(n,t)}function XW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function MT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const QW=xD({body:tY,colgroup:nY,head:eY,html:JW,tbody:rY});function JW(e){const t=Wt(e,-1);return!t||t.type!=="comment"}function eY(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function tY(e){const t=Wt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&A0(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function nY(e,t,n){const r=bD(n,t),a=Wt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&w0(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function rY(e,t,n){const r=bD(n,t),a=Wt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&w0(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const df={name:[[`
278
- \f\r &/=>`.split(""),`
279
- \f\r "&'/=>\``.split("")],[`\0
280
- \f\r "&'/<=>`.split(""),`\0
281
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
282
- \f\r &>`.split(""),`\0
283
- \f\r "&'<=>\``.split("")],[`\0
284
- \f\r "&'<=>\``.split(""),`\0
285
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function iY(e,t,n,r){const a=r.schema,o=a.space==="svg"?!1:r.settings.omitOptionalTags;let l=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let d;a.space==="html"&&e.tagName==="svg"&&(r.schema=yD);const f=aY(r,e.properties),m=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,m&&(l=!1),(f||!o||!QW(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),l&&(a.space==="svg"||r.settings.closeSelfClosing)&&(d=f.charAt(f.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(m),!l&&(!o||!w0(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function aY(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const o=sY(e,a,t[a]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function sY(e,t,n){const r=cW(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,u;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const d=Lo(r.attribute,Object.assign({},e.settings.characterReferences,{subset:df.name[a][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?MW:jW)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(u=Lo(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:df.unquoted[a][o]}))),u!==n&&(e.settings.quoteSmart&&DT(n,l)>DT(n,e.alternative)&&(l=e.alternative),u=l+Lo(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?df.single:df.double)[a][o],attribute:!0}))+l),d+(u&&"="+u))}const oY=["<","&"];function ED(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Lo(e.value,Object.assign({},r.settings.characterReferences,{subset:oY}))}function lY(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ED(e,t,n,r)}function cY(e,t,n,r){return r.all(e)}const uY=hW("type",{invalid:dY,unknown:fY,handlers:{comment:IW,doctype:LW,element:iY,raw:lY,root:cY,text:ED}});function dY(e){throw new Error("Expected node, not `"+e+"`")}function fY(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const hY={},mY={},pY=[];function gY(e,t){const n=t||hY,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:yY,all:vY,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||rW,characterReferences:n.characterReferences||mY,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yD:fW,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function yY(e,t,n){return uY(e,t,n,this)}function vY(e){const t=[],n=e&&e.children||pY;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function ph(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[a]=o:a===r&&Object.assign(n,o);return n}function ds(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function bY(e){return Array.isArray(e)?e:[e]}async function SD(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function T0(e){return!e||["plaintext","txt","text","plain"].includes(e)}function AD(e){return e==="ansi"||T0(e)}function C0(e){return e==="none"}function wD(e){return C0(e)}function TD(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const a of n)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function Qh(e,t=!1){var o;const n=e.split(/(\r?\n)/g);let r=0;const a=[];for(let l=0;l<n.length;l+=2){const u=t?n[l]+(n[l+1]||""):n[l];a.push([u,r]),r+=n[l].length,r+=((o=n[l+1])==null?void 0:o.length)||0}return a}function _Y(e){const t=Qh(e,!0).map(([a])=>a);function n(a){if(a===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=a,l=0;for(const u of t){if(o<u.length)break;o-=u.length,l++}return{line:l,character:o}}function r(a,o){let l=0;for(let u=0;u<a;u++)l+=t[u].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}function xY(e,t,n){const r=new Set;for(const o of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(o[1]);for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(o[1]);for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(o[1]);if(!n)return Array.from(r);const a=n.getBundledLanguages();return Array.from(r).filter(o=>o&&a[o])}function EY(e,t){let n=0;const r=[];for(const a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function SY(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,a)=>r-a);return n.length?e.map(r=>r.flatMap(a=>{const o=n.filter(l=>a.offset<l&&l<a.offset+a.content.length).map(l=>l-a.offset).sort((l,u)=>l-u);return o.length?EY(a,o):a})):e}function AY(e,t,n,r){const a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(d=>CD(e.variants[d])),l=new Set(o.flatMap(d=>Object.keys(d))),u={};return o.forEach((d,f)=>{for(const m of l){const g=d[m]||"inherit";if(f===0&&r)u[m]=g;else{const y=m==="color"?"":m==="background-color"?"-bg":`-${m}`,b=n+t[f]+(m==="color"?"":y);u[b]=g}}}),a.htmlStyle=u,a}function CD(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&Ai.Italic&&(t["font-style"]="italic"),e.fontStyle&Ai.Bold&&(t["font-weight"]="bold"),e.fontStyle&Ai.Underline&&(t["text-decoration"]="underline")),t}function wY(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const RD=new WeakMap;function Jh(e,t){RD.set(e,t)}function lu(e){return RD.get(e)}class ol{constructor(...t){le(this,"_stacks",{});le(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new ol(Object.fromEntries(bY(n).map(r=>[r,jv])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return TY(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function TY(e){const t=[],n=new Set;function r(a){var l;if(n.has(a))return;n.add(a);const o=(l=a==null?void 0:a.nameScopesList)==null?void 0:l.scopeName;o&&t.push(o),a.parent&&r(a.parent)}return r(e),t}function CY(e,t){if(!(e instanceof ol))throw new nn("Invalid grammar state");return e.getInternalStack(t)}function RY(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new nn(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...a.indexToPos(l),offset:l}}else{const u=a.lines[l.line];if(u===void 0)throw new nn(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${a.lines.length}`);if(l.character<0||l.character>u.length)throw new nn(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${u.length}`);return{...l,offset:a.posToIndex(l.line,l.character)}}};const a=_Y(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));NY(o),e.set(n.meta,{decorations:o,converter:a,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var l;if(!((l=this.options.decorations)!=null&&l.length))return;const a=t(this).decorations.flatMap(u=>[u.start.offset,u.end.offset]);return SY(n,a)},code(n){var m;if(!((m=this.options.decorations)!=null&&m.length))return;const r=t(this),a=Array.from(n.children).filter(g=>g.type==="element"&&g.tagName==="span");if(a.length!==r.converter.lines.length)throw new nn(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(g,y,b,v){const S=a[g];let A="",w=-1,T=-1;if(y===0&&(w=0),b===0&&(T=0),b===Number.POSITIVE_INFINITY&&(T=S.children.length),w===-1||T===-1)for(let D=0;D<S.children.length;D++)A+=ND(S.children[D]),w===-1&&A.length===y&&(w=D+1),T===-1&&A.length===b&&(T=D+1);if(w===-1)throw new nn(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(T===-1)throw new nn(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const R=S.children.slice(w,T);if(!v.alwaysWrap&&R.length===S.children.length)u(S,v,"line");else if(!v.alwaysWrap&&R.length===1&&R[0].type==="element")u(R[0],v,"token");else{const D={type:"element",tagName:"span",properties:{},children:R};u(D,v,"wrapper"),S.children.splice(w,R.length,D)}}function l(g,y){a[g]=u(a[g],y,"line")}function u(g,y,b){var A;const v=y.properties||{},S=y.transform||(w=>w);return g.tagName=y.tagName||"span",g.properties={...g.properties,...v,class:g.properties.class},(A=y.properties)!=null&&A.class&&TD(g,y.properties.class),g=S(g,b)||g,g}const d=[],f=r.decorations.sort((g,y)=>y.start.offset-g.start.offset||g.end.offset-y.end.offset);for(const g of f){const{start:y,end:b}=g;if(y.line===b.line)o(y.line,y.character,b.character,g);else if(y.line<b.line){o(y.line,y.character,Number.POSITIVE_INFINITY,g);for(let v=y.line+1;v<b.line;v++)d.unshift(()=>l(v,g));o(b.line,0,b.character,g)}}d.forEach(g=>g())}}}function NY(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new nn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],o=n.start.offset<=a.start.offset&&a.start.offset<n.end.offset,l=n.start.offset<a.end.offset&&a.end.offset<=n.end.offset,u=a.start.offset<=n.start.offset&&n.start.offset<a.end.offset,d=a.start.offset<n.end.offset&&n.end.offset<=a.end.offset;if(o||l||u||d){if(o&&l||u&&d)continue;throw new nn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function ND(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(ND).join(""):""}const OY=[RY()];function gh(e){return[...e.transformers||[],...OY]}var fs=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ey={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function kY(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function jT(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function DY(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Ey[r]&&t.push({type:"setDecoration",value:Ey[r]});else if(r<=29){const a=Ey[r-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:fs[r-30]}});else if(r===38){const a=jT(e);a&&t.push({type:"setForegroundColor",value:a})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:fs[r-40]}});else if(r===48){const a=jT(e);a&&t.push({type:"setBackgroundColor",value:a})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:fs[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:fs[r-100+8]}})}return t}function IY(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let o=0;do{const l=kY(r,o),u=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(u.length>0&&a.push({value:u,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=DY(l.sequence);for(const f of d)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of d)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=l.position}while(o<r.length);return a}}}var LY={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function MY(e=LY){function t(u){return e[u]}function n(u){return`#${u.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(){if(r)return r;r=[];for(let f=0;f<fs.length;f++)r.push(t(fs[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let m=0;m<6;m++)for(let g=0;g<6;g++)r.push(n([u[f],u[m],u[g]]));let d=8;for(let f=0;f<24;f++,d+=10)r.push(n([d,d,d]));return r}function o(u){return a()[u]}function l(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return o(u.index)}}return{value:l}}function jY(e,t,n){const r=ph(e,n),a=Qh(t),o=MY(Object.fromEntries(fs.map(u=>{var d;return[u,(d=e.colors)==null?void 0:d[`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`]]}))),l=IY();return a.map(u=>l.parse(u[0]).map(d=>{let f,m;d.decorations.has("reverse")?(f=d.background?o.value(d.background):e.bg,m=d.foreground?o.value(d.foreground):e.fg):(f=d.foreground?o.value(d.foreground):e.fg,m=d.background?o.value(d.background):void 0),f=ds(f,r),m=ds(m,r),d.decorations.has("dim")&&(f=PY(f));let g=Ai.None;return d.decorations.has("bold")&&(g|=Ai.Bold),d.decorations.has("italic")&&(g|=Ai.Italic),d.decorations.has("underline")&&(g|=Ai.Underline),{content:d.value,offset:u[1],color:f,bgColor:m,fontStyle:g}}))}function PY(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function R0(e,t,n={}){const{lang:r="text",theme:a=e.getLoadedThemes()[0]}=n;if(T0(r)||C0(a))return Qh(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:o,colorMap:l}=e.setTheme(a);if(r==="ansi")return jY(o,t,n);const u=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==u.name)throw new nn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new nn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return BY(t,u,o,l,n)}function VY(...e){if(e.length===2)return lu(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(T0(a)||C0(o))throw new nn("Plain language does not have grammar state");if(a==="ansi")throw new nn("ANSI language does not have grammar state");const{theme:l,colorMap:u}=t.setTheme(o),d=t.getLanguage(a);return new ol(yh(n,d,l,u,r).stateStack,d.name,l.name)}function BY(e,t,n,r,a){const o=yh(e,t,n,r,a),l=new ol(yh(e,t,n,r,a).stateStack,t.name,n.name);return Jh(o.tokens,l),o.tokens}function yh(e,t,n,r,a){const o=ph(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:u=500}=a,d=Qh(e);let f=a.grammarState?CY(a.grammarState,n.name)??jv:a.grammarContextCode!=null?yh(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:jv,m=[];const g=[];for(let y=0,b=d.length;y<b;y++){const[v,S]=d[y];if(v===""){m=[],g.push([]);continue}if(l>0&&v.length>=l){m=[],g.push([{content:v,offset:S,color:"",fontStyle:0}]);continue}let A,w,T;a.includeExplanation&&(A=t.tokenizeLine(v,f,u),w=A.tokens,T=0);const R=t.tokenizeLine2(v,f,u),D=R.tokens.length/2;for(let N=0;N<D;N++){const k=R.tokens[2*N],I=N+1<D?R.tokens[2*N+2]:v.length;if(k===I)continue;const P=R.tokens[2*N+1],V=ds(r[$o.getForeground(P)],o),H=$o.getFontStyle(P),fe={content:v.substring(k,I),offset:S+k,color:V,fontStyle:H};if(a.includeExplanation){const te=[];if(a.includeExplanation!=="scopeName")for(const Y of n.settings){let J;switch(typeof Y.scope){case"string":J=Y.scope.split(/,/).map(U=>U.trim());break;case"object":J=Y.scope;break;default:continue}te.push({settings:Y,selectors:J.map(U=>U.split(/ /))})}fe.explanation=[];let ue=0;for(;k+ue<I;){const Y=w[T],J=v.substring(Y.startIndex,Y.endIndex);ue+=J.length,fe.explanation.push({content:J,scopes:a.includeExplanation==="scopeName"?zY(Y.scopes):UY(te,Y.scopes)}),T+=1}}m.push(fe)}g.push(m),m=[],f=R.ruleStack}return{tokens:g,stateStack:f}}function zY(e){return e.map(t=>({scopeName:t}))}function UY(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const o=t[r];n[r]={scopeName:o,themeMatches:FY(e,o,t.slice(0,r))}}return n}function PT(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function HY(e,t,n){if(!PT(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)PT(e[r],n[a])&&(r-=1),a-=1;return r===-1}function FY(e,t,n){const r=[];for(const{selectors:a,settings:o}of e)for(const l of a)if(HY(l,t,n)){r.push(o);break}return r}function OD(e,t,n){const r=Object.entries(n.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),a=r.map(d=>{const f=R0(e,t,{...n,theme:d.theme}),m=lu(f),g=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:f,state:m,theme:g}}),o=GY(...a.map(d=>d.tokens)),l=o[0].map((d,f)=>d.map((m,g)=>{const y={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(y.explanation=m.explanation),o.forEach((b,v)=>{const{content:S,explanation:A,offset:w,...T}=b[f][g];y.variants[r[v].color]=T}),y})),u=a[0].state?new ol(Object.fromEntries(a.map(d=>{var f;return[d.theme,(f=d.state)==null?void 0:f.getInternalStack(d.theme)]})),a[0].state.lang):void 0;return u&&Jh(l,u),l}function GY(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(d=>d[r]),o=t.map(()=>[]);t.forEach((d,f)=>d.push(o[f]));const l=a.map(()=>0),u=a.map(d=>d[0]);for(;u.every(d=>d);){const d=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const m=u[f];m.content.length===d?(o[f].push(m),l[f]+=1,u[f]=a[f][l[f]]):(o[f].push({...m,content:m.content.slice(0,d)}),u[f]={...m,content:m.content.slice(d),offset:m.offset+d})}}}return t}function vh(e,t,n){let r,a,o,l,u,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:m="--shiki-"}=n,g=Object.entries(n.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,w)=>A.color===f?-1:w.color===f?1:0);if(g.length===0)throw new nn("`themes` option must not be empty");const y=OD(e,t,n);if(d=lu(y),f&&!g.find(A=>A.color===f))throw new nn(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=g.map(A=>e.getTheme(A.theme)),v=g.map(A=>A.color);o=y.map(A=>A.map(w=>AY(w,v,m,f))),d&&Jh(o,d);const S=g.map(A=>ph(A.theme,n));a=g.map((A,w)=>(w===0&&f?"":`${m+A.color}:`)+(ds(b[w].fg,S[w])||"inherit")).join(";"),r=g.map((A,w)=>(w===0&&f?"":`${m+A.color}-bg:`)+(ds(b[w].bg,S[w])||"inherit")).join(";"),l=`shiki-themes ${b.map(A=>A.name).join(" ")}`,u=f?void 0:[a,r].join(";")}else if("theme"in n){const f=ph(n.theme,n);o=R0(e,t,n);const m=e.getTheme(n.theme);r=ds(m.bg,f),a=ds(m.fg,f),l=m.name,d=lu(o)}else throw new nn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:r,themeName:l,rootStyle:u,grammarState:d}}function bh(e,t,n,r={meta:{},options:n,codeToHast:(a,o)=>bh(e,a,o),codeToTokens:(a,o)=>vh(e,a,o)}){var b,v;let a=t;for(const S of gh(n))a=((b=S.preprocess)==null?void 0:b.call(r,a,n))||a;let{tokens:o,fg:l,bg:u,themeName:d,rootStyle:f,grammarState:m}=vh(e,a,n);const{mergeWhitespaces:g=!0}=n;g===!0?o=qY(o):g==="never"&&(o=KY(o));const y={...r,get source(){return a}};for(const S of gh(n))o=((v=S.tokens)==null?void 0:v.call(y,o))||o;return $Y(o,{...n,fg:l,bg:u,themeName:d,rootStyle:f},y,m)}function $Y(e,t,n,r=lu(e)){var v,S,A;const a=gh(t),o=[],l={type:"root",children:[]},{structure:u="classic",tabindex:d="0"}=t;let f={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...d!==!1&&d!=null?{tabindex:d.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([w])=>!w.startsWith("_")))},children:[]},m={type:"element",tagName:"code",properties:{},children:o};const g=[],y={...n,structure:u,addClassToHast:TD,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return f},get code(){return m},get lines(){return g}};if(e.forEach((w,T)=>{var N,k;T&&(u==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
286
- `}));let R={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const I of w){let P={type:"element",tagName:"span",properties:{...I.htmlAttrs},children:[{type:"text",value:I.content}]};const V=wY(I.htmlStyle||CD(I));V&&(P.properties.style=V);for(const H of a)P=((N=H==null?void 0:H.span)==null?void 0:N.call(y,P,T+1,D,R,I))||P;u==="inline"?l.children.push(P):u==="classic"&&R.children.push(P),D+=I.content.length}if(u==="classic"){for(const I of a)R=((k=I==null?void 0:I.line)==null?void 0:k.call(y,R,T+1))||R;g.push(R),o.push(R)}}),u==="classic"){for(const w of a)m=((v=w==null?void 0:w.code)==null?void 0:v.call(y,m))||m;f.children.push(m);for(const w of a)f=((S=w==null?void 0:w.pre)==null?void 0:S.call(y,f))||f;l.children.push(f)}let b=l;for(const w of a)b=((A=w==null?void 0:w.root)==null?void 0:A.call(y,b))||b;return r&&Jh(b,r),b}function qY(e){return e.map(t=>{const n=[];let r="",a=0;return t.forEach((o,l)=>{const d=!(o.fontStyle&&o.fontStyle&Ai.Underline);d&&o.content.match(/^\s+$/)&&t[l+1]?(a||(a=o.offset),r+=o.content):r?(d?n.push({...o,offset:a,content:r+o.content}):n.push({content:r,offset:a},o),a=0,r=""):n.push(o)}),n})}function KY(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,a,o,l]=r;if(!a&&!l)return n;const u=[{...n,offset:n.offset+a.length,content:o}];return a&&u.unshift({content:a,offset:n.offset}),l&&u.push({content:l,offset:n.offset+a.length+o.length}),u}))}const WY=gY;function YY(e,t,n){var o;const r={meta:{},options:n,codeToHast:(l,u)=>bh(e,l,u),codeToTokens:(l,u)=>vh(e,l,u)};let a=WY(bh(e,t,n,r));for(const l of gh(n))a=((o=l.postprocess)==null?void 0:o.call(r,a,n))||a;return a}const VT={light:"#333333",dark:"#bbbbbb"},BT={light:"#fffffe",dark:"#1e1e1e"},zT="__shiki_resolved";function N0(e){var u,d,f,m,g;if(e!=null&&e[zT])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const y=t.settings?t.settings.find(b=>!b.name&&!b.scope):void 0;(u=y==null?void 0:y.settings)!=null&&u.foreground&&(r=y.settings.foreground),(d=y==null?void 0:y.settings)!=null&&d.background&&(n=y.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((m=t==null?void 0:t.colors)!=null&&m["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?VT.light:VT.dark),n||(n=t.type==="light"?BT.light:BT.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const o=new Map;function l(y){var v;if(o.has(y))return o.get(y);a+=1;const b=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return(v=t.colorReplacements)!=null&&v[`#${b}`]?l(y):(o.set(y,b),b)}t.settings=t.settings.map(y=>{var A,w;const b=((A=y.settings)==null?void 0:A.foreground)&&!y.settings.foreground.startsWith("#"),v=((w=y.settings)==null?void 0:w.background)&&!y.settings.background.startsWith("#");if(!b&&!v)return y;const S={...y,settings:{...y.settings}};if(b){const T=l(y.settings.foreground);t.colorReplacements[T]=y.settings.foreground,S.settings.foreground=T}if(v){const T=l(y.settings.background);t.colorReplacements[T]=y.settings.background,S.settings.background=T}return S});for(const y of Object.keys(t.colors||{}))if((y==="editor.foreground"||y==="editor.background"||y.startsWith("terminal.ansi"))&&!((g=t.colors[y])!=null&&g.startsWith("#"))){const b=l(t.colors[y]);t.colorReplacements[b]=t.colors[y],t.colors[y]=b}return Object.defineProperty(t,zT,{enumerable:!1,writable:!1,value:!0}),t}async function kD(e){return Array.from(new Set((await Promise.all(e.filter(t=>!AD(t)).map(async t=>await SD(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function DD(e){return(await Promise.all(e.map(async n=>wD(n)?null:N0(await SD(n))))).filter(n=>!!n)}let ZY=3;function XY(e,t=3){t>ZY||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Ro=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class QY extends nW{constructor(n,r,a,o={}){super(n);le(this,"_resolvedThemes",new Map);le(this,"_resolvedGrammars",new Map);le(this,"_langMap",new Map);le(this,"_langGraph",new Map);le(this,"_textmateThemeCache",new WeakMap);le(this,"_loadedThemesCache",null);le(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=a,this._alias=o,this._themes.map(l=>this.loadTheme(l)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=N0(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=uh.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new Ro(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var l,u,d,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(m=>{var g;return(g=m.embeddedLangsLazy)==null?void 0:g.includes(n.name)}));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,a);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(m=>{this._alias[m]=n.name}),this._loadedLanguagesCache=null,r.size)for(const m of r)this._resolvedGrammars.delete(m.name),this._loadedLanguagesCache=null,(u=(l=this._syncRegistry)==null?void 0:l._injectionGrammars)==null||u.delete(m.scopeName),(f=(d=this._syncRegistry)==null?void 0:d._grammars)==null||f.delete(m.scopeName),this.loadLanguage(this._langMap.get(m.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),a=r.filter(([o,l])=>!l);if(a.length){const o=r.filter(([l,u])=>{var d;return u&&((d=u.embeddedLangs)==null?void 0:d.some(f=>a.map(([m])=>m).includes(f)))}).filter(l=>!a.includes(l));throw new Ro(`Missing languages ${a.map(([l])=>`\`${l}\``).join(", ")}, required by ${o.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[o,l]of r)this._resolver.addLanguage(l);for(const[o,l]of r)this.loadLanguage(l)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){if(this._langMap.set(n.name,n),this._langGraph.set(n.name,n),n.embeddedLangs)for(const r of n.embeddedLangs)this._langGraph.set(r,this._langMap.get(r))}}class JY{constructor(t,n){le(this,"_langs",new Map);le(this,"_scopeToLang",new Map);le(this,"_injections",new Map);le(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let a=1;a<=n.length;a++){const o=n.slice(0,a).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let pc=0;function eZ(e){pc+=1,e.warnings!==!1&&pc>=10&&pc%10===0&&console.warn(`[Shiki] ${pc} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ro("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(N0),a=new JY(e.engine,n),o=new QY(a,r,n,e.langAlias);let l;function u(T){A();const R=o.getGrammar(typeof T=="string"?T:T.name);if(!R)throw new Ro(`Language \`${T}\` not found, you may need to load it first`);return R}function d(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const R=o.getTheme(T);if(!R)throw new Ro(`Theme \`${T}\` not found, you may need to load it first`);return R}function f(T){A();const R=d(T);l!==T&&(o.setTheme(R),l=T);const D=o.getColorMap();return{theme:R,colorMap:D}}function m(){return A(),o.getLoadedThemes()}function g(){return A(),o.getLoadedLanguages()}function y(...T){A(),o.loadLanguages(T.flat(1))}async function b(...T){return y(await kD(T))}function v(...T){A();for(const R of T.flat(1))o.loadTheme(R)}async function S(...T){return A(),v(await DD(T))}function A(){if(t)throw new Ro("Shiki instance has been disposed")}function w(){t||(t=!0,o.dispose(),pc-=1)}return{setTheme:f,getTheme:d,getLanguage:u,getLoadedThemes:m,getLoadedLanguages:g,loadLanguage:b,loadLanguageSync:y,loadTheme:S,loadThemeSync:v,dispose:w,[Symbol.dispose]:w}}async function tZ(e){e.engine||XY("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([DD(e.themes||[]),kD(e.langs||[]),e.engine]);return eZ({...e,themes:t,langs:n,engine:r})}async function nZ(e){const t=await tZ(e);return{getLastGrammarState:(...n)=>VY(t,...n),codeToTokensBase:(n,r)=>R0(t,n,r),codeToTokensWithThemes:(n,r)=>OD(t,n,r),codeToTokens:(n,r)=>vh(t,n,r),codeToHast:(n,r)=>bh(t,n,r),codeToHtml:(n,r)=>YY(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function rZ(e){const t=e.langs,n=e.themes,r=e.engine;async function a(o){function l(g){if(typeof g=="string"){if(AD(g))return[];const y=t[g];if(!y)throw new nn(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}function u(g){if(wD(g))return"none";if(typeof g=="string"){const y=n[g];if(!y)throw new nn(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}const d=(o.themes??[]).map(g=>u(g)),f=(o.langs??[]).map(g=>l(g)),m=await nZ({engine:o.engine??r(),...o,themes:d,langs:f});return{...m,loadLanguage(...g){return m.loadLanguage(...g.map(l))},loadTheme(...g){return m.loadTheme(...g.map(u))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}function iZ(e){let t;async function n(r={}){if(t){const a=await t;return await Promise.all([a.loadTheme(...r.themes||[]),a.loadLanguage(...r.langs||[])]),a}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}function aZ(e,t){const n=iZ(e);async function r(a,o){var d;const l=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),u=await((d=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:d.call(t,a,o.lang,l));return u&&await l.loadLanguage(...u),l}return{getSingletonHighlighter(a){return n(a)},async codeToHtml(a,o){return(await r(a,o)).codeToHtml(a,o)},async codeToHast(a,o){return(await r(a,o)).codeToHast(a,o)},async codeToTokens(a,o){return(await r(a,o)).codeToTokens(a,o)},async codeToTokensBase(a,o){return(await r(a,o)).codeToTokensBase(a,o)},async codeToTokensWithThemes(a,o){return(await r(a,o)).codeToTokensWithThemes(a,o)},async getLastGrammarState(a,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(a,o)}}}const ID=[{id:"abap",name:"ABAP",import:()=>L(()=>import("./abap-CuzaboPy.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>L(()=>import("./actionscript-3-BWZb6ht_.js"),[])},{id:"ada",name:"Ada",import:()=>L(()=>import("./ada-lbGJHcqN.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>L(()=>import("./angular-html-DMNHImpm.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>L(()=>import("./angular-ts-eB8LWD2C.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>L(()=>import("./apache-ClrZ-IwE.js"),[])},{id:"apex",name:"Apex",import:()=>L(()=>import("./apex-DHEJMXht.js"),[])},{id:"apl",name:"APL",import:()=>L(()=>import("./apl-DSpMDkz7.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>L(()=>import("./applescript-d8h0XnfP.js"),[])},{id:"ara",name:"Ara",import:()=>L(()=>import("./ara-D11-aFNM.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>L(()=>import("./asciidoc-BPN7z6_Y.js"),[])},{id:"asm",name:"Assembly",import:()=>L(()=>import("./asm-B-o3LjfJ.js"),[])},{id:"astro",name:"Astro",import:()=>L(()=>import("./astro-BEfdsCb3.js"),__vite__mapDeps([10,9,2,11,3,12]))},{id:"awk",name:"AWK",import:()=>L(()=>import("./awk-DFufGi5b.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>L(()=>import("./ballerina-DCKmv_4D.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>L(()=>import("./bat-9J6oqHce.js"),[])},{id:"beancount",name:"Beancount",import:()=>L(()=>import("./beancount-CJ6EEQ2V.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>L(()=>import("./berry-CufD37jc.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>L(()=>import("./bibtex-B5xtV7zU.js"),[])},{id:"bicep",name:"Bicep",import:()=>L(()=>import("./bicep-B-_DnH9T.js"),[])},{id:"blade",name:"Blade",import:()=>L(()=>import("./blade-jtwiscur.js"),__vite__mapDeps([13,14,1,2,3,7,8,15,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>L(()=>import("./bsl-BXaZRMg3.js"),__vite__mapDeps([16,17]))},{id:"c",name:"C",import:()=>L(()=>import("./c-Du_P13ro.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>L(()=>import("./cadence-BhCOhF7G.js"),[])},{id:"cairo",name:"Cairo",import:()=>L(()=>import("./cairo-DbSVSKxu.js"),__vite__mapDeps([18,19]))},{id:"clarity",name:"Clarity",import:()=>L(()=>import("./clarity-D72Djq1u.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>L(()=>import("./clojure-I1vGaenB.js"),[])},{id:"cmake",name:"CMake",import:()=>L(()=>import("./cmake-C07pmjNf.js"),[])},{id:"cobol",name:"COBOL",import:()=>L(()=>import("./cobol-DLiQ7VlT.js"),__vite__mapDeps([20,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>L(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>L(()=>import("./codeql-TbzFAQVx.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>L(()=>import("./coffee-CN9rYqj2.js"),__vite__mapDeps([21,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>L(()=>import("./common-lisp-0v_W_vIl.js"),[])},{id:"coq",name:"Coq",import:()=>L(()=>import("./coq-DqPPCFWZ.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>L(()=>import("./cpp-D6jLj3ac.js"),__vite__mapDeps([22,23,24,25,15]))},{id:"crystal",name:"Crystal",import:()=>L(()=>import("./crystal-CSXto_ug.js"),__vite__mapDeps([26,1,2,3,15,25,27]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>L(()=>import("./csharp-t9jp2bdZ.js"),[])},{id:"css",name:"CSS",import:()=>L(()=>import("./css-6ydISZ1j.js"),[])},{id:"csv",name:"CSV",import:()=>L(()=>import("./csv-fuZLfV_i.js"),[])},{id:"cue",name:"CUE",import:()=>L(()=>import("./cue-DZa-IHfU.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>L(()=>import("./cypher-B8QFFMEI.js"),[])},{id:"d",name:"D",import:()=>L(()=>import("./d-BWEIE2mf.js"),[])},{id:"dart",name:"Dart",import:()=>L(()=>import("./dart-Bc9cAHms.js"),[])},{id:"dax",name:"DAX",import:()=>L(()=>import("./dax-B4O06LmT.js"),[])},{id:"desktop",name:"Desktop",import:()=>L(()=>import("./desktop-C480DKyb.js"),[])},{id:"diff",name:"Diff",import:()=>L(()=>import("./diff-7a-uGD01.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>L(()=>import("./docker-BcOcwvcX.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>L(()=>import("./dotenv-RqsQB2BX.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>L(()=>import("./dream-maker-CwZzURTK.js"),[])},{id:"edge",name:"Edge",import:()=>L(()=>import("./edge-7WOHoDwQ.js"),__vite__mapDeps([28,11,1,2,3,14]))},{id:"elixir",name:"Elixir",import:()=>L(()=>import("./elixir-C8UL7p8J.js"),__vite__mapDeps([29,1,2,3]))},{id:"elm",name:"Elm",import:()=>L(()=>import("./elm-BVJIbDWr.js"),__vite__mapDeps([30,24,25]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>L(()=>import("./emacs-lisp-BGJzjoMF.js"),[])},{id:"erb",name:"ERB",import:()=>L(()=>import("./erb-2bVwkg7V.js"),__vite__mapDeps([31,1,2,3,32,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>L(()=>import("./erlang-Buh6fjeB.js"),[])},{id:"fennel",name:"Fennel",import:()=>L(()=>import("./fennel-BN5cw1dr.js"),[])},{id:"fish",name:"Fish",import:()=>L(()=>import("./fish-BIU4F8Lx.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>L(()=>import("./fluent-DPdCYVuL.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>L(()=>import("./fortran-fixed-form-DMTTIQFJ.js"),__vite__mapDeps([39,40]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>L(()=>import("./fortran-free-form-FZM7PgI4.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>L(()=>import("./fsharp-B93pd7q9.js"),__vite__mapDeps([41,42]))},{id:"gdresource",name:"GDResource",import:()=>L(()=>import("./gdresource-I9Onfmy0.js"),__vite__mapDeps([43,44,45]))},{id:"gdscript",name:"GDScript",import:()=>L(()=>import("./gdscript-E0a2itvD.js"),[])},{id:"gdshader",name:"GDShader",import:()=>L(()=>import("./gdshader-C8KBts9d.js"),[])},{id:"genie",name:"Genie",import:()=>L(()=>import("./genie-CZ1jFyQ7.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>L(()=>import("./gherkin-B-23jXpc.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>L(()=>import("./git-commit-COHn4upB.js"),__vite__mapDeps([46,47]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>L(()=>import("./git-rebase-D7M3XCeK.js"),__vite__mapDeps([48,27]))},{id:"gleam",name:"Gleam",import:()=>L(()=>import("./gleam-CFlCaHJ1.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>L(()=>import("./glimmer-js-DTuRZoQB.js"),__vite__mapDeps([49,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>L(()=>import("./glimmer-ts-BGh34NOZ.js"),__vite__mapDeps([50,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>L(()=>import("./glsl-D6Vaizag.js"),__vite__mapDeps([24,25]))},{id:"gnuplot",name:"Gnuplot",import:()=>L(()=>import("./gnuplot-DwPOQrla.js"),[])},{id:"go",name:"Go",import:()=>L(()=>import("./go-DSI44sMb.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>L(()=>import("./graphql-CzqHVaah.js"),__vite__mapDeps([34,2,11,35,36]))},{id:"groovy",name:"Groovy",import:()=>L(()=>import("./groovy-DnUZ9V9w.js"),[])},{id:"hack",name:"Hack",import:()=>L(()=>import("./hack-BfoaVUmQ.js"),__vite__mapDeps([51,1,2,3,15]))},{id:"haml",name:"Ruby Haml",import:()=>L(()=>import("./haml-BjHfNtf2.js"),__vite__mapDeps([33,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>L(()=>import("./handlebars-DN1vFC8Y.js"),__vite__mapDeps([52,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>L(()=>import("./haskell-C97r5ta3.js"),[])},{id:"haxe",name:"Haxe",import:()=>L(()=>import("./haxe-BVnfiMDc.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>L(()=>import("./hcl-BRpPFe2i.js"),[])},{id:"hjson",name:"Hjson",import:()=>L(()=>import("./hjson-Bgmt9vRU.js"),[])},{id:"hlsl",name:"HLSL",import:()=>L(()=>import("./hlsl-DgLWmsUM.js"),[])},{id:"html",name:"HTML",import:()=>L(()=>import("./html-DQt1crSz.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>L(()=>import("./html-derivative-OoyioBIu.js"),__vite__mapDeps([14,1,2,3]))},{id:"http",name:"HTTP",import:()=>L(()=>import("./http-B1MEeU_C.js"),__vite__mapDeps([53,27,9,7,8,34,2,11,35,36]))},{id:"hxml",name:"HXML",import:()=>L(()=>import("./hxml-BYnPWQ3Z.js"),__vite__mapDeps([54,55]))},{id:"hy",name:"Hy",import:()=>L(()=>import("./hy--6ePOT02.js"),[])},{id:"imba",name:"Imba",import:()=>L(()=>import("./imba-ZOHZ3W7h.js"),[])},{id:"ini",name:"INI",aliases:["properties"],import:()=>L(()=>import("./ini-m1-xr6K8.js"),[])},{id:"java",name:"Java",import:()=>L(()=>import("./java-DzEvymKG.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>L(()=>import("./javascript-DFxyEsuO.js"),[])},{id:"jinja",name:"Jinja",import:()=>L(()=>import("./jinja-CbuI_e8q.js"),__vite__mapDeps([56,1,2,3]))},{id:"jison",name:"Jison",import:()=>L(()=>import("./jison-BThBLrI1.js"),__vite__mapDeps([57,2]))},{id:"json",name:"JSON",import:()=>L(()=>import("./json-BLmTiKMJ.js"),[])},{id:"json5",name:"JSON5",import:()=>L(()=>import("./json5-C5z8RDkF.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>L(()=>import("./jsonc-CuA0FkKk.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>L(()=>import("./jsonl-CBcFDUab.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>L(()=>import("./jsonnet-CCBwdCM5.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>L(()=>import("./jssm-BtZDPN4U.js"),[])},{id:"jsx",name:"JSX",import:()=>L(()=>import("./jsx-Dog42FfX.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>L(()=>import("./julia-QW6AWql5.js"),__vite__mapDeps([58,22,23,24,25,15,19,2,59]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>L(()=>import("./kotlin-MsGODAH1.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>L(()=>import("./kusto-BEWisg9D.js"),[])},{id:"latex",name:"LaTeX",import:()=>L(()=>import("./latex-D6g4IvIb.js"),__vite__mapDeps([60,61,59]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>L(()=>import("./lean-Bsgk112v.js"),[])},{id:"less",name:"Less",import:()=>L(()=>import("./less-CL8eqPyx.js"),[])},{id:"liquid",name:"Liquid",import:()=>L(()=>import("./liquid-DwnqW0Hw.js"),__vite__mapDeps([62,1,2,3,9]))},{id:"llvm",name:"LLVM IR",import:()=>L(()=>import("./llvm-CQsJUk-H.js"),[])},{id:"log",name:"Log file",import:()=>L(()=>import("./log-DnFCEHlQ.js"),[])},{id:"logo",name:"Logo",import:()=>L(()=>import("./logo-CkBIg-lq.js"),[])},{id:"lua",name:"Lua",import:()=>L(()=>import("./lua-DgKrCl_t.js"),__vite__mapDeps([37,25]))},{id:"luau",name:"Luau",import:()=>L(()=>import("./luau-CqbnzJ-x.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>L(()=>import("./make-CSWLD5xG.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>L(()=>import("./markdown-CfdnVo6U.js"),[])},{id:"marko",name:"Marko",import:()=>L(()=>import("./marko-Ddcey6ql.js"),__vite__mapDeps([63,3,64,5,2]))},{id:"matlab",name:"MATLAB",import:()=>L(()=>import("./matlab-LZB065En.js"),[])},{id:"mdc",name:"MDC",import:()=>L(()=>import("./mdc-BSBcOUr9.js"),__vite__mapDeps([65,42,38,14,1,2,3]))},{id:"mdx",name:"MDX",import:()=>L(()=>import("./mdx-B_I5quxp.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>L(()=>import("./mermaid-CXyZL9PL.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>L(()=>import("./mipsasm-BwEeJ4dY.js"),[])},{id:"mojo",name:"Mojo",import:()=>L(()=>import("./mojo-DHZoLXvC.js"),[])},{id:"move",name:"Move",import:()=>L(()=>import("./move-_bK4LppZ.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>L(()=>import("./narrat-CElRTuuq.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>L(()=>import("./nextflow--CXHmARm.js"),[])},{id:"nginx",name:"Nginx",import:()=>L(()=>import("./nginx-C1Yc5-eE.js"),__vite__mapDeps([66,37,25]))},{id:"nim",name:"Nim",import:()=>L(()=>import("./nim-CuWg7p6V.js"),__vite__mapDeps([67,25,1,2,3,7,8,24,42]))},{id:"nix",name:"Nix",import:()=>L(()=>import("./nix-C-iLU9M_.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>L(()=>import("./nushell-BsWK4Erq.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>L(()=>import("./objective-c-JQgEzMhr.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>L(()=>import("./objective-cpp-CAZ1NrJr.js"),[])},{id:"ocaml",name:"OCaml",import:()=>L(()=>import("./ocaml-CANNzmGA.js"),[])},{id:"pascal",name:"Pascal",import:()=>L(()=>import("./pascal-CUU_xxmv.js"),[])},{id:"perl",name:"Perl",import:()=>L(()=>import("./perl-Bcivc5lk.js"),__vite__mapDeps([68,1,2,3,7,8,15]))},{id:"php",name:"PHP",import:()=>L(()=>import("./php-XhOgcbHd.js"),__vite__mapDeps([69,1,2,3,7,8,15,9]))},{id:"plsql",name:"PL/SQL",import:()=>L(()=>import("./plsql-Csx-KgEj.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>L(()=>import("./po-CZKeM8oa.js"),[])},{id:"polar",name:"Polar",import:()=>L(()=>import("./polar-C9vCuADp.js"),[])},{id:"postcss",name:"PostCSS",import:()=>L(()=>import("./postcss-BgR6IBVD.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>L(()=>import("./powerquery-BZR5jcz4.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>L(()=>import("./powershell-Q0c5v3Fs.js"),[])},{id:"prisma",name:"Prisma",import:()=>L(()=>import("./prisma-yac1gHcz.js"),[])},{id:"prolog",name:"Prolog",import:()=>L(()=>import("./prolog-S2snRG_L.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>L(()=>import("./proto-B2asqJ_e.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>L(()=>import("./pug-Ud6KBVuk.js"),__vite__mapDeps([70,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>L(()=>import("./puppet-qBI2rw6w.js"),[])},{id:"purescript",name:"PureScript",import:()=>L(()=>import("./purescript-CYAc_BdW.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>L(()=>import("./python-N_fYzn4k.js"),[])},{id:"qml",name:"QML",import:()=>L(()=>import("./qml-BdV_SRG6.js"),__vite__mapDeps([71,2]))},{id:"qmldir",name:"QML Directory",import:()=>L(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>L(()=>import("./qss-xAjwRsjP.js"),[])},{id:"r",name:"R",import:()=>L(()=>import("./r-15AZnl_Y.js"),[])},{id:"racket",name:"Racket",import:()=>L(()=>import("./racket-DfaBuPIG.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>L(()=>import("./raku-DARByBhS.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>L(()=>import("./razor-R9tSNI_9.js"),__vite__mapDeps([72,1,2,3,73]))},{id:"reg",name:"Windows Registry Script",import:()=>L(()=>import("./reg-eiUPDiaM.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>L(()=>import("./regexp-we84whta.js"),[])},{id:"rel",name:"Rel",import:()=>L(()=>import("./rel-CLLaPSAr.js"),[])},{id:"riscv",name:"RISC-V",import:()=>L(()=>import("./riscv-BOXXFo5k.js"),[])},{id:"rst",name:"reStructuredText",import:()=>L(()=>import("./rst-C0h9YO46.js"),__vite__mapDeps([74,14,1,2,3,22,23,24,25,15,19,27,38,75,32,33,7,8,34,11,35,36,37]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>L(()=>import("./ruby-Cwn6T5Qb.js"),__vite__mapDeps([32,1,2,3,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>L(()=>import("./rust-A6NUYkDQ.js"),[])},{id:"sas",name:"SAS",import:()=>L(()=>import("./sas-Yvy-jB3G.js"),__vite__mapDeps([76,15]))},{id:"sass",name:"Sass",import:()=>L(()=>import("./sass-DxKx6i08.js"),[])},{id:"scala",name:"Scala",import:()=>L(()=>import("./scala-urTpdRWL.js"),[])},{id:"scheme",name:"Scheme",import:()=>L(()=>import("./scheme-DfDtJdlR.js"),[])},{id:"scss",name:"SCSS",import:()=>L(()=>import("./scss-DkCoLJBz.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>L(()=>import("./sdbl-Cflpv1WG.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>L(()=>import("./shaderlab-DprXpeCX.js"),__vite__mapDeps([77,78]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>L(()=>import("./shellscript-Cs-zf8G1.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>L(()=>import("./shellsession-C_x4i0EA.js"),__vite__mapDeps([79,27]))},{id:"smalltalk",name:"Smalltalk",import:()=>L(()=>import("./smalltalk-CvaLaq0K.js"),[])},{id:"solidity",name:"Solidity",import:()=>L(()=>import("./solidity-BWEW8IEt.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>L(()=>import("./soy-CV61xlNT.js"),__vite__mapDeps([80,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>L(()=>import("./sparql-Ccgs8XSw.js"),__vite__mapDeps([81,82]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>L(()=>import("./splunk-RtPzT0sk.js"),[])},{id:"sql",name:"SQL",import:()=>L(()=>import("./sql-D8pCRXw6.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>L(()=>import("./ssh-config-BhVUZvoY.js"),[])},{id:"stata",name:"Stata",import:()=>L(()=>import("./stata-nt34lD2m.js"),__vite__mapDeps([83,15]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>L(()=>import("./stylus-q-cGTZ-j.js"),[])},{id:"svelte",name:"Svelte",import:()=>L(()=>import("./svelte-Ue2gIPbO.js"),__vite__mapDeps([84,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>L(()=>import("./swift-zJDMamB5.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>L(()=>import("./system-verilog-6Pjza-7V.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>L(()=>import("./systemd-BzvtnNXz.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>L(()=>import("./talonscript-B5KooqzE.js"),[])},{id:"tasl",name:"Tasl",import:()=>L(()=>import("./tasl-actOPUJz.js"),[])},{id:"tcl",name:"Tcl",import:()=>L(()=>import("./tcl-BX3nBwNA.js"),[])},{id:"templ",name:"Templ",import:()=>L(()=>import("./templ-CJFw_bmP.js"),__vite__mapDeps([85,86,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>L(()=>import("./terraform-BWjU2UX-.js"),[])},{id:"tex",name:"TeX",import:()=>L(()=>import("./tex-C7L-Ug2D.js"),__vite__mapDeps([61,59]))},{id:"toml",name:"TOML",import:()=>L(()=>import("./toml-x-gNw4Ca.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>L(()=>import("./ts-tags-B_RTbvdJ.js"),__vite__mapDeps([87,11,3,2,24,25,1,15,7,8]))},{id:"tsv",name:"TSV",import:()=>L(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>L(()=>import("./tsx-CHbqLUsD.js"),[])},{id:"turtle",name:"Turtle",import:()=>L(()=>import("./turtle-imGXYByQ.js"),[])},{id:"twig",name:"Twig",import:()=>L(()=>import("./twig-DxolMe-m.js"),__vite__mapDeps([88,3,2,5,69,1,7,8,15,9,19,32,33,34,11,35,36,22,23,24,25,27,37,38]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>L(()=>import("./typescript-6msxI5qU.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>L(()=>import("./typespec-5ugHtu89.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>L(()=>import("./typst-DGKQAwST.js"),[])},{id:"v",name:"V",import:()=>L(()=>import("./v-2Dvll9y_.js"),[])},{id:"vala",name:"Vala",import:()=>L(()=>import("./vala-DhIY81xx.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>L(()=>import("./vb-D4bKSGYI.js"),[])},{id:"verilog",name:"Verilog",import:()=>L(()=>import("./verilog-DmSgp3mE.js"),[])},{id:"vhdl",name:"VHDL",import:()=>L(()=>import("./vhdl-DCjSv28y.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>L(()=>import("./viml-DMG7XCk5.js"),[])},{id:"vue",name:"Vue",import:()=>L(()=>import("./vue-BebZw_gy.js"),__vite__mapDeps([89,1,2,3,11,9,14]))},{id:"vue-html",name:"Vue HTML",import:()=>L(()=>import("./vue-html-B9Bqf25R.js"),__vite__mapDeps([90,89,1,2,3,11,9,14]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>L(()=>import("./vyper-D68BUWwe.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>L(()=>import("./wasm-CJJW67X8.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>L(()=>import("./wenyan-BXqZv6Dq.js"),[])},{id:"wgsl",name:"WGSL",import:()=>L(()=>import("./wgsl-Do8n-e3P.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>L(()=>import("./wikitext-CQSnJ68I.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>L(()=>import("./wit-dyhQlKC1.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>L(()=>import("./wolfram-EuqmgloR.js"),[])},{id:"xml",name:"XML",import:()=>L(()=>import("./xml-iIRqcNou.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>L(()=>import("./xsl-BqXt74Hp.js"),__vite__mapDeps([91,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>L(()=>import("./yaml-DeMLtiT4.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>L(()=>import("./zenscript-BbLEZwDK.js"),[])},{id:"zig",name:"Zig",import:()=>L(()=>import("./zig-DFp_trfT.js"),[])}],sZ=Object.fromEntries(ID.map(e=>[e.id,e.import])),oZ=Object.fromEntries(ID.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),lZ={...sZ,...oZ},cZ=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>L(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>L(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>L(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>L(()=>import("./catppuccin-frappe-BtitwTYg.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>L(()=>import("./catppuccin-latte-CW_h_59B.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>L(()=>import("./catppuccin-macchiato-CXeUe8zM.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>L(()=>import("./catppuccin-mocha-Cj87Vp-p.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>L(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>L(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>L(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>L(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>L(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>L(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>L(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>L(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>L(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>L(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>L(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>L(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>L(()=>import("./gruvbox-dark-hard-BNFkGX63.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>L(()=>import("./gruvbox-dark-medium-fPwOVgKi.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>L(()=>import("./gruvbox-dark-soft-rn_0Wvg-.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>L(()=>import("./gruvbox-light-hard-DPpLE3g-.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>L(()=>import("./gruvbox-light-medium-BBkKoO69.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>L(()=>import("./gruvbox-light-soft-Ism0zgIY.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>L(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>L(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>L(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>L(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>L(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>L(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>L(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>L(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>L(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>L(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>L(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>L(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>L(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>L(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>L(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>L(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>L(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>L(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>L(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>L(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>L(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>L(()=>import("./rose-pine-BZeqa82Q.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>L(()=>import("./rose-pine-dawn-Dr8AihTi.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>L(()=>import("./rose-pine-moon-Bo9_Wbqy.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>L(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>L(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>L(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>L(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>L(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>L(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>L(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>L(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>L(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>L(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>L(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],uZ=Object.fromEntries(cZ.map(e=>[e.id,e.import]));class O0 extends Error{constructor(t){super(t),this.name="ShikiError"}}function dZ(){return 2147483648}function fZ(){return typeof performance<"u"?performance.now():Date.now()}const hZ=(e,t)=>e+(t-e%t)%t;async function mZ(e){let t,n;const r={};function a(b){n=b,r.HEAPU8=new Uint8Array(b),r.HEAPU32=new Uint32Array(b)}function o(b,v,S){r.HEAPU8.copyWithin(b,v,v+S)}function l(b){try{return t.grow(b-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function u(b){const v=r.HEAPU8.length;b=b>>>0;const S=dZ();if(b>S)return!1;for(let A=1;A<=4;A*=2){let w=v*(1+.2/A);w=Math.min(w,b+100663296);const T=Math.min(S,hZ(Math.max(b,w),65536));if(l(T))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(b,v,S=1024){const A=v+S;let w=v;for(;b[w]&&!(w>=A);)++w;if(w-v>16&&b.buffer&&d)return d.decode(b.subarray(v,w));let T="";for(;v<w;){let R=b[v++];if(!(R&128)){T+=String.fromCharCode(R);continue}const D=b[v++]&63;if((R&224)===192){T+=String.fromCharCode((R&31)<<6|D);continue}const N=b[v++]&63;if((R&240)===224?R=(R&15)<<12|D<<6|N:R=(R&7)<<18|D<<12|N<<6|b[v++]&63,R<65536)T+=String.fromCharCode(R);else{const k=R-65536;T+=String.fromCharCode(55296|k>>10,56320|k&1023)}}return T}function m(b,v){return b?f(r.HEAPU8,b,v):""}const g={emscripten_get_now:fZ,emscripten_memcpy_big:o,emscripten_resize_heap:u,fd_write:()=>0};async function y(){const v=await e({env:g,wasi_snapshot_preview1:g});t=v.memory,a(t.buffer),Object.assign(r,v),r.UTF8ToString=m}return await y(),r}var pZ=Object.defineProperty,gZ=(e,t,n)=>t in e?pZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kt=(e,t,n)=>gZ(e,typeof t!="symbol"?t+"":t,n);let tn=null;function yZ(e){throw new O0(e.UTF8ToString(e.getLastOnigError()))}class em{constructor(t){Kt(this,"utf16Length"),Kt(this,"utf8Length"),Kt(this,"utf16Value"),Kt(this,"utf8Value"),Kt(this,"utf16OffsetToUtf8"),Kt(this,"utf8OffsetToUtf16");const n=t.length,r=em._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);const l=a?new Uint32Array(r+1):null;a&&(l[r]=n);const u=new Uint8Array(r);let d=0;for(let f=0;f<n;f++){const m=t.charCodeAt(f);let g=m,y=!1;if(m>=55296&&m<=56319&&f+1<n){const b=t.charCodeAt(f+1);b>=56320&&b<=57343&&(g=(m-55296<<10)+65536|b-56320,y=!0)}a&&(o[f]=d,y&&(o[f+1]=d),g<=127?l[d+0]=f:g<=2047?(l[d+0]=f,l[d+1]=f):g<=65535?(l[d+0]=f,l[d+1]=f,l[d+2]=f):(l[d+0]=f,l[d+1]=f,l[d+2]=f,l[d+3]=f)),g<=127?u[d++]=g:g<=2047?(u[d++]=192|(g&1984)>>>6,u[d++]=128|(g&63)>>>0):g<=65535?(u[d++]=224|(g&61440)>>>12,u[d++]=128|(g&4032)>>>6,u[d++]=128|(g&63)>>>0):(u[d++]=240|(g&1835008)>>>18,u[d++]=128|(g&258048)>>>12,u[d++]=128|(g&4032)>>>6,u[d++]=128|(g&63)>>>0),y&&f++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=u,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){const o=t.charCodeAt(r);let l=o,u=!1;if(o>=55296&&o<=56319&&r+1<a){const d=t.charCodeAt(r+1);d>=56320&&d<=57343&&(l=(o-55296<<10)+65536|d-56320,u=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,u&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const tm=class jr{constructor(t){if(Kt(this,"id",++jr.LAST_ID),Kt(this,"_onigBinding"),Kt(this,"content"),Kt(this,"utf16Length"),Kt(this,"utf8Length"),Kt(this,"utf16OffsetToUtf8"),Kt(this,"utf8OffsetToUtf16"),Kt(this,"ptr"),!tn)throw new O0("Must invoke loadWasm first.");this._onigBinding=tn,this.content=t;const n=new em(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!jr._sharedPtrInUse?(jr._sharedPtr||(jr._sharedPtr=tn.omalloc(1e4)),jr._sharedPtrInUse=!0,tn.HEAPU8.set(n.utf8Value,jr._sharedPtr),this.ptr=jr._sharedPtr):this.ptr=n.createString(tn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===jr._sharedPtr?jr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Kt(tm,"LAST_ID",0);Kt(tm,"_sharedPtr",0);Kt(tm,"_sharedPtrInUse",!1);let LD=tm;class vZ{constructor(t){if(Kt(this,"_onigBinding"),Kt(this,"_ptr"),!tn)throw new O0("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,d=t.length;u<d;u++){const f=new em(t[u]);n[u]=f.createString(tn),r[u]=f.utf8Length}const a=tn.omalloc(4*t.length);tn.HEAPU32.set(n,a/4);const o=tn.omalloc(4*t.length);tn.HEAPU32.set(r,o/4);const l=tn.createOnigScanner(a,o,t.length);for(let u=0,d=t.length;u<d;u++)tn.ofree(n[u]);tn.ofree(o),tn.ofree(a),l===0&&yZ(tn),this._onigBinding=tn,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new LD(t);const o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(l===0)return null;const u=o.HEAPU32;let d=l/4;const f=u[d++],m=u[d++],g=[];for(let y=0;y<m;y++){const b=t.convertUtf8OffsetToUtf16(u[d++]),v=t.convertUtf8OffsetToUtf16(u[d++]);g[y]={start:b,end:v,length:v-b}}return{index:f,captureIndices:g}}}function bZ(e){return typeof e.instantiator=="function"}function _Z(e){return typeof e.default=="function"}function xZ(e){return typeof e.data<"u"}function EZ(e){return typeof Response<"u"&&e instanceof Response}function SZ(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ff;function AZ(e){if(ff)return ff;async function t(){tn=await mZ(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),bZ(r)?r=await r.instantiator(n):_Z(r)?r=await r.default(n):(xZ(r)&&(r=r.data),EZ(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await wZ(r)(n):r=await TZ(r)(n):SZ(r)?r=await Sy(r)(n):r instanceof WebAssembly.Module?r=await Sy(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Sy(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ff=t(),ff}function Sy(e){return t=>WebAssembly.instantiate(e,t)}function wZ(e){return t=>WebAssembly.instantiateStreaming(e,t)}function TZ(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function CZ(e){return e&&await AZ(e),{createScanner(t){return new vZ(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new LD(t)}}}const RZ=rZ({langs:lZ,themes:uZ,engine:()=>CZ(L(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:NZ}=aZ(RZ,{guessEmbeddedLanguages:xY}),OZ=({children:e})=>_.jsx("div",{children:_.jsx("pre",{children:_.jsx("code",{children:e.split(`
287
- `).map((t,n)=>_.jsx("span",{className:"line block w-full",children:t},n))})})}),kZ=({children:e,lang:t,isDarkMode:n,onChange:r,...a})=>{const[o,l]=E.useState(null),u=E.useMemo(()=>({lang:t,theme:n?"github-dark":"github-light",transformers:[sK(),lK(),mK(),oK(),tK(),rK()]}),[t,n]);return E.useEffect(()=>{NZ(e,u).then(d=>l(d)).catch(d=>console.error(d))},[u,e]),o?_.jsx("div",{dangerouslySetInnerHTML:{__html:o},...a,style:{backgroundColor:"transparent"}}):_.jsx(OZ,{children:e})},DZ=({className:e,onChange:t,isEditable:n,...r})=>_.jsx(kZ,{className:Te("flex w-full",e),contentEditable:n,onInput:a=>t==null?void 0:t(a.currentTarget.textContent??""),...r}),MD=E.createContext({packageManager:"npm",setPackageManager:()=>{},codeFormat:"typescript",setCodeFormat:()=>{},contentDeclarationFormat:"typescript",setContentDeclarationFormat:()=>{}}),nm=()=>E.useContext(MD),IZ=({children:e})=>{const[t,n]=kc("packageManager","npm"),[r,a]=kc("codeFormat","typescript"),[o,l]=kc("contentDeclarationFormat","typescript");return _.jsx(MD,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:a,contentDeclarationFormat:o,setContentDeclarationFormat:l},children:e})},LZ=({children:e,...t})=>{const{packageManager:n,codeFormat:r,contentDeclarationFormat:a}=nm(),o=typeof t.packageManager>"u",l=n===t.packageManager,u=typeof t.codeFormat>"u",d=r===t.codeFormat,f=typeof t.contentDeclarationFormat>"u",m=a===t.contentDeclarationFormat;return(o||l)&&(u||d)&&(f||m)?e:_.jsx(_.Fragment,{})},MZ=()=>{const{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=nm();return _.jsxs(je,{value:e,onValueChange:r=>{t(r),n(r)},children:[_.jsx(je.Trigger,{children:_.jsx(je.Value,{placeholder:"Code Format"})}),_.jsxs(je.Content,{children:[_.jsx(je.Item,{value:"typescript",children:"TypeScript"}),_.jsx(je.Item,{value:"esm",children:"ESM"}),_.jsx(je.Item,{value:"commonjs",children:"CommonJS"})]})]})},jZ=()=>{const{contentDeclarationFormat:e,setContentDeclarationFormat:t}=nm();return _.jsxs(je,{value:e,onValueChange:t,children:[_.jsx(je.Trigger,{children:_.jsx(je.Value,{placeholder:"Dictionary Format"})}),_.jsxs(je.Content,{children:[_.jsx(je.Item,{value:"typescript",children:"TypeScript"}),_.jsx(je.Item,{value:"commonjs",children:"CommonJS"}),_.jsx(je.Item,{value:"esm",children:"ESM"}),_.jsx(je.Item,{value:"json",children:"JSON"})]})]})},PZ={key:"copy-button",content:{label:me({en:"Copy content",fr:"Copier le contenu",es:"Copiar contenido","en-GB":"Copy content",de:"Inhalt kopieren",ja:"コンテンツをコピー",ko:"콘텐츠 복사",zh:"复制内容",it:"Copia contenuto",pt:"Copiar conteúdo",hi:"सामग्री कॉपी करें",ar:"نسخ المحتوى",ru:"Копировать содержимое"})}},jD=({content:e})=>{const[t,n]=E.useState(!1),{label:r}=rn(PZ),a=async()=>{try{await navigator.clipboard.writeText(e),n(!0)}catch(o){console.error("Failed to copy text: ",o)}};return E.useEffect(()=>{const o=setTimeout(()=>{n(!1)},1e3);return()=>clearTimeout(o)},[t]),_.jsx(gt,{Icon:t?MV:PV,onClick:a,variant:"hoverable",color:"text",label:r.value,size:"icon-sm"})},VZ=()=>{const{packageManager:e,setPackageManager:t}=nm();return _.jsxs(je,{value:e,onValueChange:t,children:[_.jsx(je.Trigger,{children:_.jsx(je.Value,{placeholder:"Package Manager"})}),_.jsxs(je.Content,{children:[_.jsx(je.Item,{value:"npm",children:"npm"}),_.jsx(je.Item,{value:"pnpm",children:"pnpm"}),_.jsx(je.Item,{value:"yarn",children:"yarn"})]})]})},BZ=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:a=!0,className:o,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:f,...m})=>{const g=e.endsWith(`
288
- `)?e.slice(0,-1):e,y=u||d||f;return _.jsx(LZ,{packageManager:u,codeFormat:d,contentDeclarationFormat:f,children:_.jsxs(ei,{className:Te("relative text-sm leading-6",a&&"with-line-number ml-0",o),transparency:"lg",...m,children:[r&&_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"bg-card/50 text-neutral grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl py-1.5 pl-4 pr-12 text-xs",children:[_.jsx("span",{className:"truncate",children:l??t}),_.jsxs("div",{className:"flex items-center gap-2",children:[u&&_.jsx(VZ,{}),d&&_.jsx(MZ,{}),f&&_.jsx(jZ,{})]})]}),_.jsx("div",{className:"sticky top-28",children:_.jsx("div",{className:Te("absolute bottom-0 right-2 flex h-7 items-center",y&&"h-11"),children:_.jsx(jD,{content:g})})})]}),_.jsx("div",{className:"grid size-full grid-cols-[0px] overflow-auto p-3",children:_.jsx(DZ,{lang:t,isDarkMode:n,children:g})})]})})},zZ=({children:e,isDarkMode:t,locale:n,options:r})=>{const{overrides:a,...o}=r??{};return _.jsx(IZ,{children:_.jsx(Wq,{options:{overrides:{h1:l=>_.jsx(A9,{isClickable:!0,...l}),h2:l=>_.jsx(w9,{isClickable:!0,...l}),h3:l=>_.jsx(p0,{isClickable:!0,...l}),h4:l=>_.jsx(T9,{isClickable:!0,...l}),code:l=>{var u;return typeof l.className>"u"?_.jsx("strong",{className:"bg-card/60 rounded p-1 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur",children:l.children}):_.jsx(BZ,{isDarkMode:t,language:(u=l.className)==null?void 0:u.replace("lang-",""),...l})},blockquote:({className:l,...u})=>_.jsx("blockquote",{className:Te("border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5",l),...u}),ul:({className:l,...u})=>_.jsx("ul",{className:Te("mt-5 flex flex-col gap-3 pl-5",l),...u}),ol:({className:l,...u})=>_.jsx("ol",{className:Te("mt-5 flex flex-col gap-3 pl-5",l),...u}),li:({className:l,...u})=>_.jsx("li",{className:Te("list-disc",l),...u}),img:({className:l,...u})=>_.jsx("img",{...u,loading:"lazy",className:Te("max-w-full rounded-md",l),src:`${u.src}?raw=true`}),a:l=>{var u;return _.jsx(g0,{color:"neutral",isExternalLink:(u=l.href)==null?void 0:u.startsWith("http"),underlined:!0,locale:n,...l})},pre:l=>l.children,table:({className:l,...u})=>_.jsx("div",{className:"grid w-full max-w-full overflow-scroll rounded",children:_.jsx("table",{className:Te("max-w-full table-auto overflow-hidden text-left",l),...u})}),th:({className:l,...u})=>_.jsx("th",{className:Te("border-neutral bg-neutral/10 border-b p-4",l),...u}),tr:({className:l,...u})=>_.jsx("tr",{className:Te("hover:bg-neutral/10 hover:/10",l),...u}),td:({className:l,...u})=>_.jsx("td",{className:Te("border-b border-neutral-500/50 p-4",l),...u}),...a},wrapper:({className:l,...u})=>_.jsxs(_.Fragment,{children:[_.jsx(Zq,{}),_.jsx("div",{className:Te("flex flex-col gap-8 p-10",l),...u})]}),...o},children:e??""})})},UZ=e=>{let t,n;if(typeof e=="number"||!isNaN(Number(e)))t="=",n=e.toString();else if(typeof e=="string"){const a=["<=",">=","<",">","="].find(o=>e.startsWith(o));a&&(t=a,n=e.slice(a.length))}return{comparator:t,numberValue:n}},HZ=({value:e,onChange:t})=>{const{comparator:n,numberValue:r}=E.useMemo(()=>UZ(e),[e]),[a,o]=E.useState(n??null),[l,u]=E.useState(r??null);return E.useEffect(()=>{if(a&&l&&(a!==n||l!==r)){const d=`${a}${l}`;t(d)}},[a,n,r,l,t]),_.jsxs("div",{className:"flex gap-1",children:[_.jsxs(je,{onValueChange:o,defaultValue:n,children:[_.jsx(je.Trigger,{className:"w-20",children:_.jsx(je.Value,{placeholder:"Select a comparator"})}),_.jsxs(je.Content,{children:[_.jsx(je.Item,{value:"<",children:"<"}),_.jsx(je.Item,{value:"<=",children:"<="}),_.jsx(je.Item,{value:"=",children:"="}),_.jsx(je.Item,{value:">=",children:">="}),_.jsx(je.Item,{value:">",children:">"})]})]}),_.jsx(Jo,{type:"number","aria-label":"Quantity",defaultValue:l??void 0,onChange:d=>u(d.target.value),className:"min-w-4"})]})},rm={key:"navigation-view",content:{tsxNotEditable:me({en:"React node is not editable","en-GB":"React node is not editable",fr:"Node React non éditable",es:"Nodo React no editable",de:"React-Knoten ist nicht bearbeitbar",ja:"編集できないReactノードです",ko:"편집할 수 없는 React 노드입니다",zh:"不可编辑的 React 节点",it:"Node React non modificabile",pt:"Nó React não editável",hi:"सम्पादित न करने योग्य React नोड",ar:"عقدة React غير قابلة للتحرير",ru:"React-узел не редактируемый"}),goToField:{label:me({en:"Go to field","en-GB":"Go to field",fr:"Aller au champ",es:"Ir al campo",de:"Zum Feld gehen",ja:"フィールドに移動",ko:"필드로 이동",zh:"转到字段",it:"Vai al campo",pt:"Ir para o campo",hi:"फ़ील्ड पर जाएं",ar:"اذهب إلى الحقل",ru:"Перейти к полю"})},addNewElement:{label:me({en:"Click to add element","en-GB":"Click to add element",fr:"Cliquez pour ajouter un élément",es:"Haga clic para agregar un elemento",de:"Klicken Sie, um ein Element hinzuzufügen",ja:"要素を追加するにはクリック",ko:"요소를 추가하려면 클릭하세요",zh:"点击添加元素",it:"Clicca per aggiungere un elemento",pt:"Clique para adicionar um elemento",hi:"तत्व जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة عنصر",ru:"Нажмите, чтобы добавить элемент"}),text:me({en:"Add new element","en-GB":"Add new element",fr:"Ajouter un nouvel élément",es:"Agregar nuevo elemento",de:"Neues Element hinzufügen",ja:"新しい要素を追加",ko:"새 요소 추가",zh:"添加新元素",it:"Aggiungi nuovo elemento",pt:"Adicionar novo elemento",hi:"नया तत्व जोड़ें",ar:"أضف عنصرًا جديدًا",ru:"Добавить новый элемент"})},removeElement:{label:me({en:"Click to remove element","en-GB":"Click to remove element",fr:"Cliquez pour supprimer un élément",es:"Haga clic para eliminar un elemento",de:"Klicken Sie, um ein Element zu entfernen",ja:"要素を削除するにはクリック",ko:"요소를 제거하려면 클릭하세요",zh:"点击删除元素",it:"Clicca per rimuovere un elemento",pt:"Clique para remover um elemento",hi:"तत्व निकालने के लिए क्लिक करें",ar:"انقر لإزالة عنصر",ru:"Нажмите, чтобы удалить элемент"}),text:me({en:"Remove element","en-GB":"Remove element",fr:"Supprimer l’élément",es:"Eliminar elemento",de:"Element entfernen",ja:"要素を削除",ko:"요소 제거",zh:"删除元素",it:"Rimuovi elemento",pt:"Remover elemento",hi:"तत्व निकालें",ar:"إزالة عنصر",ru:"Удалить элемент"})},addNewEnumeration:{label:me({en:"Click to add enumeration","en-GB":"Click to add enumeration",fr:"Cliquez pour ajouter une énumération",es:"Haga clic para agregar una enumeración",de:"Klicken Sie, um eine Aufzählung hinzuzufügen",ja:"列挙を追加するにはクリック",ko:"열거를 추가하려면 클릭하세요",zh:"点击添加枚举",it:"Clicca per aggiungere un enumerazione",pt:"Clique para adicionar uma enumeração",hi:"सूची जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة تعداد",ru:"Нажмите, чтобы добавить перечисление"}),text:me({en:"Add new enumeration","en-GB":"Add new enumeration",fr:"Ajouter une nouvelle énumération",es:"Agregar nueva enumeración",de:"Neue Aufzählung hinzufügen",ja:"新しい列挙を追加",ko:"새 목록 추가",zh:"添加新枚举",it:"Aggiungi nuova enumerazione",pt:"Adicionar nova enumeração",hi:"नया सूची जोड़ें",ar:"أضف تعدادًا جديدًا",ru:"Добавить новое перечисление"})},removeEnumeration:{label:me({en:"Click to remove enumeration","en-GB":"Click to remove enumeration",fr:"Cliquez pour supprimer une énumération",es:"Haga clic para eliminar una enumeración",de:"Klicken Sie, um eine Aufzählung zu entfernen",ja:"列挙を削除するにはクリック",ko:"목록을 제거하려면 클릭하세요",zh:"点击删除枚举",it:"Clicca per rimuovere un'enumerazione",pt:"Clique para remover uma enumeração",hi:"सूची निकालने के लिए क्लिक करें",ar:"انقر لإزالة تعداد",ru:"Нажмите, чтобы удалить перечисление"}),text:me({en:"Remove enumeration","en-GB":"Remove enumeration",fr:"Supprimer l’énumération",es:"Eliminar enumeración",de:"Aufzählung entfernen",ja:"列挙を削除",ko:"목록 제거",zh:"删除枚举",it:"Rimuovi enumerazione",pt:"Remover enumeração",hi:"सूची निकालें",ar:"إزالة تعداد",ru:"Удалить перечисление"})},addNewCondition:{label:me({en:"Click to add condition","en-GB":"Click to add condition",fr:"Cliquez pour ajouter une condition",es:"Haga clic para agregar una condición",de:"Klicken Sie, um eine Bedingung hinzuzufügen",ja:"条件を追加するにはクリック",ko:"조건을 추가하려면 클릭하세요",zh:"点击添加条件",it:"Clicca per aggiungere una condizione",pt:"Clique para adicionar uma condição",hi:"शर्ते जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة شرط",ru:"Нажмите, чтобы добавить условие"}),text:me({en:"Add new condition","en-GB":"Add new condition",fr:"Ajouter une nouvelle condition",es:"Agregar nueva condición",de:"Neue Bedingung hinzufügen",ja:"新しい条件を追加",ko:"새 조건 추가",zh:"添加新条件",it:"Aggiungi nuova condizione",pt:"Adicionar nova condição",hi:"नया शर्ते जोड़ें",ar:"أضف شرطًا جديدًا",ru:"Добавить новое условие"})}}},FZ=({keyPath:e,dictionary:t,...n})=>{const{editedContent:r,addEditedContent:a}=wn(),o=Zr(),{auditContentDeclarationField:l,isLoading:u}=k2();return _.jsx(F7,{variant:"default",onContentChange:d=>a(t.key,d,e),additionalButtons:_.jsx(gt,{Icon:P1,label:"Audit",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",isLoading:u,onClick:()=>{l({fileContent:JSON.stringify({...t,...(r==null?void 0:r[t.key])??{}}),keyPath:e,locales:o.internationalization.locales??[],openAiApiKey:o.editor.openAiApiKey,model:o.editor.openAiApiModel,temperature:o.editor.openAiApiTemperature}).then(d=>{if(d!=null&&d.data)try{const f=d.data.fileContent;a(t.key,f,e)}catch(f){console.error(f)}})}}),...n})},GZ=({keyPath:e,dictionary:t,...n})=>{const{addEditedContent:r}=wn();return _.jsx(Rv,{variant:"default",onContentChange:a=>r(t.key,a,e),...n})},$Z=[{content:"False",value:!1},{content:"True",value:!0}],qZ=({dictionary:e,keyPath:t,...n})=>{const{addEditedContent:r}=wn();return _.jsx(wu,{choices:$Z,value:!0,onChange:a=>r(e.key,a,t),color:"text",size:"sm",...n})},KZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{locale:a,defaultLocale:o}=Kv(),{selectedLocales:l,availableLocales:u}=Rk(),d=e[q.Translation],f=Object.keys(d),g=u.length>l.length?l:[...new Set([...u,...f])],y=e[q.Translation];return _.jsx("table",{className:"w-full",children:_.jsx("tbody",{className:"flex w-full flex-col gap-2",children:g.map(b=>_.jsxs(E.Fragment,{children:[_.jsx("tr",{className:"mt-2 w-full p-2 text-xs",children:yf(b,a)}),_.jsx("tr",{children:_.jsx(Ns,{section:y[b]??dr(y[o]),keyPath:[...t,{type:q.Translation,key:b}],dictionary:n,renderSection:r})})]},b))})})},WZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=wn(),{addNewEnumeration:o,removeEnumeration:l}=rn(rm),u=e[q.Enumeration],d=Object.keys(u)[0];return _.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx("table",{className:"w-full",children:_.jsx("tbody",{className:"flex w-full flex-col gap-2",children:Object.keys(e[q.Enumeration]).map(f=>{const m=[...t,{type:q.Enumeration}];return _.jsxs(E.Fragment,{children:[_.jsx("tr",{className:"mt-2 w-full",children:_.jsx("div",{className:"flex flex-1",children:_.jsx(gt,{label:l.label.value,variant:"hoverable",color:"text",Icon:Ch,className:"ml-auto",onClick:()=>a(n.key,void 0,m),children:l.text})})}),_.jsx("tr",{className:"w-full p-2",children:_.jsx(HZ,{value:f,onChange:g=>{const y=e[q.Enumeration],b=z7(y,f,g),v={...e,[q.Enumeration]:b};a(n.key,v,t)}})}),_.jsx("tr",{className:"block w-full",children:_.jsx(k0,{section:u[f]??dr(u[d]),keyPath:m,dictionary:n,renderSection:r})})]},f)})})}),_.jsx(gt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>a(n.key,dr(u[d])??"",[...t,{type:q.Enumeration,key:"unknown"}]),Icon:Th,className:"m-2",children:o.text})]})},YZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const a=e[q.Condition];return _.jsx("table",{className:"w-full",children:_.jsx("tbody",{className:"flex w-full flex-col gap-2",children:["true","false","fallback"].map(o=>_.jsxs(E.Fragment,{children:[_.jsx("tr",{className:"mt-2 block w-full p-2 text-xs",children:String(o)},o),_.jsx("tr",{className:"block w-full",children:_.jsx(Ns,{section:a[o]??dr(a.true),keyPath:[...t,{type:q.Condition,key:o}],dictionary:n,renderSection:r})},o)]},o))})})},ZZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=wn(),{addNewElement:o,removeElement:l}=rn(rm);return _.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx("table",{className:"w-full",children:_.jsx("tbody",{className:"flex w-full flex-col gap-2",children:e.map((u,d)=>_.jsxs(E.Fragment,{children:[_.jsxs("tr",{className:"mt-2 flex w-full justify-between gap-2 p-2",children:[_.jsx("span",{className:"text-xs",children:String(d)}),_.jsx(gt,{label:l.label.value,variant:"hoverable",color:"neutral",className:"ml-auto",textAlign:"left",onClick:()=>{const f=[...t,{type:q.Array,key:e.length}];a(n.key,void 0,f)},Icon:Ch,children:l.text})]}),_.jsx("tr",{className:"block w-full",children:_.jsx(Ns,{section:u??dr(e[0]),keyPath:[...t,{type:q.Array,key:d}],dictionary:n,renderSection:r})})]},JSON.stringify(u)))})}),_.jsx(gt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>{const u=[...t,{type:q.Array,key:e.length}];a(n.key,dr(e[0])??"",u,!1)},Icon:Th,children:o.text})]})},XZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>_.jsx(_.Fragment,{children:_.jsx("table",{className:"w-full",children:_.jsx("tbody",{className:"flex flex-col gap-2",children:Object.keys(e).map(a=>{const o=[...t,{type:q.Object,key:a}],l=e,u=Object.keys(l)[0],d=l[a]??dr(l[u]);return _.jsxs(E.Fragment,{children:[_.jsx("tr",{className:"mt-2 p-2 text-xs",children:String(a)},JSON.stringify(d)),_.jsx("tr",{className:"block w-full",children:_.jsx(k0,{section:d,keyPath:o,dictionary:n,renderSection:r})},JSON.stringify(d))]},a)})})})}),QZ=({section:e,keyPath:t,dictionary:n,isDarkMode:r,onContentChange:a})=>{const[o,l]=E.useState(0),u=[{content:"Edit",value:0},{content:"Preview",value:1}],d=[...t,{type:q.Markdown}],f=e[q.Markdown];return _.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[_.jsx(wu,{choices:u,value:o,onChange:l,color:"text",size:"sm",className:"ml-auto"}),_.jsx(Ns,{section:f,keyPath:d,dictionary:n,renderSection:o===1?m=>_.jsx(zZ,{isDarkMode:r,children:m}):void 0,onContentChange:a})]})},JZ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:q.Insertion}],a=e[q.Insertion];return _.jsx("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:_.jsx(Ns,{section:a,keyPath:r,...n})})},eX=({section:e,keyPath:t,...n})=>{const r=[...t,{type:q.File}],a=e[q.File],{content:o}=e;return _.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[_.jsxs("span",{className:"text-neutral text-sm",children:[a," "]}),_.jsx(Ns,{section:o,keyPath:r,...n})]})},tX=({keyPath:e,dictionary:t,renderSection:n,section:r,...a})=>{const{addEditedContent:o}=wn(),l=r[q.Nested],u=[...e,{type:q.Nested}];return _.jsxs("div",{className:"w-full p-2",children:[_.jsx(Fy,{children:"Dictionary key"}),_.jsx(Rv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,dictionaryKey:String(d)},u)},children:l.dictionaryKey??""}),_.jsx(Fy,{children:"Path (optional)"}),_.jsx(Rv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,path:d!==""?d:void 0},u)},children:l.path??""})]})},k0=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:a})=>{const{tsxNotEditable:o}=rn(rm),l=qo(e);return l===q.ReactNode?_.jsxs(_.Fragment,{children:[_.jsx("span",{children:"[React Node]"}),_.jsx("span",{className:"text-neutral text-xs",children:o})]}):l===q.Nested?_.jsx(tX,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Translation?_.jsx(KZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Enumeration?_.jsx(WZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Condition?_.jsx(YZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Insertion?_.jsx(JZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Markdown?_.jsx(QZ,{dictionary:n,keyPath:t,section:e,isDarkMode:a}):l===q.File?_.jsx(eX,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Array?_.jsx(ZZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Object?_.jsx(XZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Number?_.jsx("div",{className:"w-full p-2",children:_.jsx(GZ,{dictionary:n,keyPath:t,type:"number","aria-label":"Edit field",children:e})}):l===q.Text?_.jsx("div",{className:"w-full p-2",children:typeof r=="function"?r(e):_.jsx(FZ,{variant:"default","aria-label":"Edit field",keyPath:t,dictionary:n,children:e})}):l===q.Boolean?_.jsx("div",{className:"w-full p-2",children:_.jsx(qZ,{dictionary:n,keyPath:t,value:e})}):_.jsxs("div",{className:"w-full p-2",children:["Error. Format not supported.",JSON.stringify(e,null,2),JSON.stringify(t,null,2),"NodeType : ",l]})},Ns=e=>_.jsx(ei,{border:!0,background:"none",className:"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky",roundedSize:"xl",children:_.jsx(k0,{...e})}),cu=e=>{const t=YT(e),n=qo(e);return t&&(n===q.ReactNode||n===q.File)?!0:t&&typeof t.nodeType=="string"?cu(t[t.nodeType]):typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"},nX=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r})=>{const a=[{text:t,onClick:()=>n([])},...e.map((o,l)=>{var u;return{onClick:()=>n(e.slice(0,l+1)),text:((u=o.key)==null?void 0:u.toString())??""}})];return _.jsx(L9,{links:a,locale:r,elementType:"location"})},Df=e=>String(e).replace(/([A-Z])/g," $1").toLowerCase().trim(),xo=({section:e,keyPath:t,dictionaryKey:n})=>{const{locales:r}=rt==null?void 0:rt.internationalization,a=Ur(e,t),{addEditedContent:o}=Ko(),{setFocusedContentKeyPath:l,focusedContent:u}=Sa(),{addNewElement:d,goToField:f}=rn(rm),m=qo(a),g=b=>{var v;return(((v=u==null?void 0:u.keyPath)==null?void 0:v.length)??0)>0&&fu(b,(u==null?void 0:u.keyPath)??[])},y=cu(a);if(!a)return _.jsx(_.Fragment,{});if(y)return _.jsx(gt,{label:f.label.value,variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(t),IconRight:jf,children:Df(t[t.length-1].key)});if(typeof a=="object"){if(m===q.ReactNode)return _.jsx(_.Fragment,{children:"React Node"});if(m===q.Translation)return _.jsx("div",{className:"flex flex-col justify-between gap-2",children:r.map(v=>{const S=[...t,{type:q.Translation,key:v}];return _.jsx(xo,{keyPath:S,section:e,dictionaryKey:n},v)})});if(m===q.Enumeration||m===q.Condition)return _.jsx("div",{className:"flex flex-col justify-between gap-2",children:Object.keys(a[m]).map(v=>{const S=[...t,{type:m,key:v}];return _.jsx(xo,{keyPath:S,section:e,dictionaryKey:n},v)})});if(m===q.Array)return _.jsxs("div",{className:"flex flex-col justify-between gap-2",children:[a.map((v,S)=>{const A=[...t,{type:q.Array,key:S}];return _.jsx(xo,{keyPath:A,section:e,dictionaryKey:n},JSON.stringify(A))}),_.jsx(gt,{label:d.label.value,variant:"hoverable",color:"neutral",textAlign:"left",onClick:()=>{const v=[...t,{type:q.Array,key:a.length}],S=a,A=dr(S[S.length-1])??"";o(n,A,v,!1),l(v)},Icon:Th,children:d.text})]});if(typeof a.nodeType=="string"){const v=[...t,{type:a.nodeType}];return _.jsx(xo,{keyPath:v,section:e,dictionaryKey:n})}const b=Object.keys(a);return _.jsx("div",{className:"flex w-full max-w-full flex-col justify-between gap-2",children:b.map(v=>{const S=[...t,{type:q.Object,key:v}],A=Ur(e,S);return cu(A)?_.jsx(gt,{label:`${f.label.value} ${v}`,isActive:g(S),variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(S),IconRight:jf,children:Df(v)},v):_.jsx(Y1,{label:`${f.label.value} ${v}`,isActive:g(S),onClick:()=>l(S),header:Df(v),children:_.jsx("div",{className:"mt-2 flex w-full max-w-full",children:_.jsx("div",{className:"flex-1 pl-10",children:_.jsx(xo,{keyPath:S,section:e,dictionaryKey:n})})})},v)})})}return _.jsxs(_.Fragment,{children:["Error loading section --",m,"--",JSON.stringify(a),"--",JSON.stringify(t)]})},rX=({dictionary:e,isDarkMode:t})=>{var y,b;const{content:n,key:r}=e,{editedContent:a}=wn(),{focusedContent:o,setFocusedContentKeyPath:l}=Sa(),u=o==null?void 0:o.keyPath,d=typeof((y=a==null?void 0:a[e.key])==null?void 0:y.content)>"u"?n:(b=a==null?void 0:a[r])==null?void 0:b.content,f=Ur(d,u??[]),m=cu(d),g=cu(f);return E.useEffect(()=>{var v;typeof f>"u"&&l(((v=o==null?void 0:o.keyPath)==null?void 0:v.slice(0,-1))??[])},[]),_.jsxs("div",{children:[_.jsxs("div",{className:"mb-6 flex items-center justify-between gap-2",children:[_.jsx(nX,{dictionaryKey:r,keyPath:u??[],onClickKeyPath:l}),_.jsx("div",{className:"flex items-center gap-2",children:_.jsx(B7,{})})]}),_.jsxs("div",{className:"flex gap-2 max-md:flex-col",children:[typeof d=="object"&&d&&!m&&Object.keys(d).length>0&&_.jsx(ei,{border:!0,background:"none",className:"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]",roundedSize:"xl",transparency:"sm",children:_.jsx(xo,{keyPath:[],section:d,dictionaryKey:r})}),(g||(u??[]).length>0)&&_.jsx(Ns,{keyPath:u??[],section:f,dictionary:e,isDarkMode:t})]})]})},iX={key:"dictionary-details",content:{titleInput:{label:me({en:"Title","en-GB":"Title",fr:"Titre",es:"Título",de:"Titel",ja:"タイトル",ko:"제목",zh:"标题",it:"Titolo",pt:"Título",hi:"शीर्षक",ar:"العنوان",ru:"Заголовок"}),description:me({en:"The title of your dictionary allows you to easily identify it","en-GB":"The title of your dictionary allows you to easily identify it",fr:"Le titre de votre dictionnaire permet de l'identifier facilement",es:"El título de su diccionario le permite identificar fácilmente",de:"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren",ja:"辞書のタイトルは、それを簡単に識別することができます",ko:"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다",zh:"字典的标题使您能够轻松识别它",it:"Il titolo del tuo dizionario ti consente di identificarlo facilmente",pt:"O título do seu dicionário permite que você o identifique facilmente",hi:"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है",ar:"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة",ru:"Название вашего словаря позволяет легко его идентифицировать"}),placeholder:me({en:"Enter the title of your dictionary","en-GB":"Enter the title of your dictionary",fr:"Entrez le titre de votre dictionnaire",es:"Ingrese el título de su diccionario",de:"Geben Sie den Titel Ihres Wörterbuchs ein",ja:"辞書のタイトルを入力してください",ko:"사전의 제목을 입력하세요",zh:"输入字典的标题",it:"Inserisci il titolo del tuo dizionario",pt:"Insira o título do seu dicionário",hi:"आपके शब्दकोश का शीर्षक दर्ज करें",ar:"أدخل عنوان القاموس الخاص بك",ru:"Введите название вашего словаря"})},keyInput:{label:me({en:"Key","en-GB":"Key",fr:"Clé",es:"Clave",de:"Schlüssel",ja:"キー",ko:"키",zh:"键",it:"Chiave",pt:"Chave",hi:"कुंजी",ar:"مفتاح",ru:"Ключ"}),description:me({en:"The key of your dictionary is used to identify it in the application","en-GB":"The key of your dictionary is used to identify it in the application",fr:"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application",es:"La clave de su diccionario se utiliza para identificarla en la aplicación",de:"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren",ja:"辞書のキーは、アプリケーション内でそれを識別するために使用されます",ko:"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다",zh:"字典的键用于在应用程序中识别它",it:"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione",pt:"A chave do seu dicionário é usada para identificá-lo no aplicativo",hi:"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है",ar:"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق",ru:"Ключ вашего словаря используется для его идентификации в приложении"}),placeholder:me({en:"Enter the key of your dictionary","en-GB":"Enter the key of your dictionary",fr:"Entrez la clé de votre dictionnaire",es:"Ingrese la clave de su diccionario",de:"Geben Sie den Schlüssel Ihres Wörterbuchs ein",ja:"辞書のキーを入力してください",ko:"사전의 키를 입력하세요",zh:"输入字典的键",it:"Inserisci la chiave del tuo dizionario",pt:"Insira a chave do seu dicionário",hi:"अपने शब्दकोश की कुंजी दर्ज करें",ar:"أدخل مفتاح القاموس الخاص بك",ru:"Введите ключ вашего словаря"})},descriptionInput:{label:me({en:"Description","en-GB":"Description",fr:"Description",es:"Descripción",de:"Beschreibung",ja:"説明",ko:"설명",zh:"描述",it:"Descrizione",pt:"Descrição",hi:"विवरण",ar:"الوصف",ru:"Описание"}),placeholder:me({en:"Enter the description of your dictionary","en-GB":"Enter the description of your dictionary",fr:"Entrez la description de votre dictionnaire",es:"Ingrese la descripción de su diccionario",de:"Geben Sie die Beschreibung Ihres Wörterbuchs ein",ja:"辞書の説明を入力してください",ko:"사전의 설명을 입력하세요",zh:"输入字典的描述",it:"Inserisci la descrizione del tuo dizionario",pt:"Insira a descrição do seu dicionário",hi:"अपने शब्दकोश का विवरण दर्ज करें",ar:"أدخل وصف القاموس الخاص بك",ru:"Введите описание вашего словаря"}),description:me({en:"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.","en-GB":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.",fr:"La description de votre dictionnaire permet d'identifier facilement l'utilisateur en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire.",es:"La descripción de su diccionario le permite identificar fácilmente el usuario utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario.",de:"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen.",ja:"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。",ko:"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다.",zh:"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。",it:"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario.",pt:"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário.",hi:"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।",ar:"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك.",ru:"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."})},projectInput:{label:me({en:"Projects","en-GB":"Projects",fr:"Projets",es:"Proyectos",de:"Projekte",ja:"プロジェクト",ko:"프로젝트",zh:"项目",it:"Progetti",pt:"Projetos",hi:"परियोजनाएँ",ar:"المشاريع",ru:"Проекты"}),description:me({en:"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","en-GB":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.",fr:"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.",es:"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.",de:"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.",ja:"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。",ko:"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.",zh:"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。",it:"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.",pt:"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.",hi:"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।",ar:"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.",ru:"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами."}),placeholder:me({en:"Select one or more projects to associate with your dictionary","en-GB":"Select one or more projects to associate with your dictionary",fr:"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire",es:"Seleccione uno o más proyectos para asociar con su diccionario",de:"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen",ja:"辞書に関連付けるプロジェクトを1つ以上選択してください",ko:"사전과 연결할 하나 이상의 프로젝트를 선택하세요",zh:"选择一个或多个项目以与您的字典关联",it:"Seleziona uno o più progetti da associare al tuo dizionario",pt:"Selecione um ou mais projetos para associar ao seu dicionário",hi:"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें",ar:"حدد مشروعًا أو أكثر لربطه بقاموسك",ru:"Выберите один или несколько проектов, чтобы связать их с вашим словарем"})},tagsSelect:{label:me({en:"Tags","en-GB":"Tags",fr:"Tags",es:"Etiquetas",de:"Tags",ja:"タグ",ko:"태그",zh:"标签",it:"Tag",pt:"Tags",hi:"टैग",ar:"الوسوم",ru:"Теги"}),description:me({en:"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","en-GB":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.",fr:"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.",es:"Un diccionario puede estar asociado con uno o más tags. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.",de:"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.",ja:"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。",ko:"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.",zh:"字典可以与一个或多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。",it:"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.",pt:"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes."}),placeholder:me({en:"Select the tags to associate with your dictionary","en-GB":"Select the tags to associate with your dictionary",fr:"Sélectionnez les tags à associer à votre dictionnaire",es:"Seleccione los tags para asociar con su diccionario",de:"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen",ja:"辞書に関連付けるタグを選択してください",ko:"사전과 연결할 태그를 선택하세요",zh:"选择与您的字典相关的标签",it:"Seleziona i tag da associare al tuo dizionario",pt:"Selecione os tags para associar ao seu dicionário",hi:"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें",ar:"حدد الوسوم التي تريد ربطها بقاموسك",ru:"Выберите теги, которые нужно связать с словарем"})},auditButton:{label:me({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"}),text:me({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"})}}},aX={key:"dictionary-detail-schema",content:{titleRequiredError:me({en:"Please enter a name for your organization.","en-GB":"Please enter a name for your organization.",fr:"Veuillez saisir un nom pour votre organisation.",es:"Por favor, ingrese un nombre para su organización.",de:"Bitte geben Sie einen Namen für Ihre Organisation ein.",ja:"あなたの組織の名前を入力してください。",ko:"조직 이름을 입력하세요.",zh:"请输入您组织的名称。",it:"Si prega di inserire un nome per la propria organizzazione.",pt:"Por favor, insira um nome para sua organização.",hi:"कृपया अपने संगठन का नाम दर्ज करें।",ar:"يرجى إدخال اسم منظمتك.",ru:"Пожалуйста, введите название вашей организации."}),titleInvalidTypeError:me({en:"The organization name must be a valid string.","en-GB":"The organization name must be a valid string.",fr:"Le nom de votre organisation doit être une chaîne valide.",es:"El nombre de su organización debe ser una cadena válida.",de:"Der Name der Organisation muss eine gültige Zeichenfolge sein.",ja:"組織名は有効な文字列である必要があります。",ko:"조직 이름은 유효한 문자열이어야 합니다.",zh:"组织名称必须是有效的字符串。",it:"Il nome dell'organizzazione deve essere una stringa valida.",pt:"O nome da organização deve ser uma string válida.",hi:"संगठन का नाम एक वैध स्ट्रिंग होना चाहिए।",ar:"يجب أن يكون اسم المنظمة سلسلة صحيحة.",ru:"Имя организации должно быть правильной строкой."}),titleMinLengthError:me({en:"The organization name must be at least 4 characters long.","en-GB":"The organization name must be at least 4 characters long.",fr:"Le nom de votre organisation doit comporter au moins 4 caractères.",es:"El nombre de su organización debe tener al menos 4 caracteres.",de:"Der Name der Organisation muss mindestens 4 Zeichen lang sein.",ja:"組織名は4文字以上でなければなりません。",ko:"조직 이름은 4자 이상이어야 합니다.",zh:"组织名称必须至少4个字符。",it:"Il nome dell'organizzazione deve essere lungo almeno 4 caratteri.",pt:"O nome da organização deve ter pelo menos 4 caracteres.",hi:"संगठन का नाम कम से कम 4 वर्ण का होना चाहिए।",ar:"يجب أن يكون اسم المنظمة مكونًا من 4 أحرف على الأقل.",ru:"Имя организации должно содержать не менее 4 символов."}),keyRequiredError:me({en:"Please enter a key for your organization.","en-GB":"Please enter a key for your organization.",fr:"Veuillez saisir une clé pour votre organisation.",es:"Por favor, ingrese una clave para su organización.",de:"Bitte geben Sie einen Schlüssel für Ihre Organisation ein.",ja:"あなたの組織のためにキーを入力してください。",ko:"조직에 대한 키를 입력하세요.",zh:"请输入您组织的键。",it:"Si prega di inserire una chiave per la propria organizzazione.",pt:"Por favor, insira uma chave para sua organização.",hi:"कृपया अपने संगठन के लिए एक कुंजी दर्ज करें।",ar:"يرجى إدخال مفتاح لمنظمتك.",ru:"Пожалуйста, введите ключ для вашей организации."}),keyInvalidTypeError:me({en:"The key must be a valid string.","en-GB":"The key must be a valid string.",fr:"La clé doit être une chaîne valide.",es:"La clave debe ser una cadena válida.",de:"Der Schlüssel muss eine gültige Zeichenfolge sein.",ja:"キーは有効な文字列である必要があります。",ko:"키는 유효한 문자열이어야 합니다.",zh:"关键字必须是有效的字符串。",it:"La chiave deve essere una stringa valida.",pt:"A chave deve ser uma string válida.",hi:"कुंजी एक वैध स्ट्रिंग होनी चाहिए।",ar:"يجب أن يكون المفتاح سلسلة صحيحة.",ru:"Ключ должен быть правильной строкой."}),keySpaceError:me({en:"The key cannot contain spaces or special characters.","en-GB":"The key cannot contain spaces or special characters.",fr:"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.",es:"La clave no puede contener espacios o caracteres especiales.",de:"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.",ja:"キーにはスペースや特殊文字を含めることはできません。",ko:"키에는 공백이나 특수 문자가 포함될 수 없습니다.",zh:"关键字不能包含空格或特殊字符。",it:"La chiave non può contenere spazi o caratteri speciali.",pt:"A chave não pode conter espaços ou caracteres especiais.",hi:"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।",ar:"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.",ru:"Ключ не может содержать пробелы или специальные символы."}),keyMinLengthError:me({en:"The key must be at least 4 characters long.","en-GB":"The key must be at least 4 characters long.",fr:"La clé doit comporter au moins 4 caractères.",es:"La clave debe tener al menos 4 caracteres.",de:"Der Schlüssel muss mindestens 4 Zeichen lang sein.",ja:"キーは4文字以上でなければなりません。",ko:"키는 4자 이상이어야 합니다.",zh:"键必须至少为4个字符。",it:"La chiave deve essere lunga almeno 4 caratteri.",pt:"A chave deve ter pelo menos 4 caracteres.",hi:"कुंजी में कम से कम 4 वर्ण होने चाहिए।",ar:"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.",ru:"Ключ должен содержать не менее 4 символов."}),descriptionRequiredError:me({en:"Please enter a description for your organization.","en-GB":"Please enter a description for your organization.",fr:"Veuillez saisir une description pour votre organisation.",es:"Por favor, ingrese una descripción para su organización.",de:"Bitte geben Sie eine Beschreibung für Ihre Organisation ein.",ja:"あなたの組織の説明を入力してください。",ko:"조직에 대한 설명을 입력하세요.",zh:"请输入您组织的描述。",it:"Si prega di inserire una descrizione per la propria organizzazione.",pt:"Por favor, insira uma descrição para sua organização.",hi:"कृपया अपने संगठन का विवरण दर्ज करें।",ar:"يرجى إدخال وصف لمنظمتك.",ru:"Пожалуйста, введите описание вашей организации."}),descriptionInvalidTypeError:me({en:"The description must be a valid string.","en-GB":"The description must be a valid string.",fr:"La description doit être une chaîne valide.",es:"La descripción debe ser una cadena válida.",de:"Die Beschreibung muss eine gültige Zeichenfolge sein.",ja:"説明は有効な文字列である必要があります。",ko:"설명은 유효한 문자열이어야 합니다.",zh:"描述必须是有效的字符串。",it:"La descrizione deve essere una stringa valida.",pt:"A descrição deve ser uma string válida.",hi:"विवरण एक वैध स्ट्रिंग होना चाहिए।",ar:"يجب أن يكون الوصف سلسلة صحيحة.",ru:"Описание должно быть правильной строкой."}),requiredErrorProjectId:me({en:"Please select a project","en-GB":"Please select a project",fr:"Veuillez sélectionner un projet",es:"Por favor, seleccione un proyecto",de:"Bitte wählen Sie ein Projekt aus",ja:"プロジェクトを選択してください",ko:"프로젝트를 선택하세요",zh:"请选择一个项目",it:"Si prega di selezionare un progetto",pt:"Por favor, selecione um projeto",hi:"कृपया एक प्रोजेक्ट चुनें",ar:"يرجى اختيار مشروع",ru:"Пожалуйста, выберите проект"}),invalidTypeErrorProjectId:me({en:"Please select a valid project","en-GB":"Please select a valid project",fr:"Veuillez sélectionner un projet valide",es:"Por favor, seleccione un proyecto válido",de:"Bitte wählen Sie ein gültiges Projekt aus",ja:"有効なプロジェクトを選択してください",ko:"유효한 프로젝트를 선택하세요",zh:"请选择有效的项目",it:"Si prega di selezionare un progetto valido",pt:"Por favor, selecione um projeto válido",hi:"कृपया एक वैध परियोजना चुनें",ar:"يرجى اختيار مشروع صالح",ru:"Пожалуйста, выберите действительный проект"}),invalidTypeErrorTags:me({en:"Please enter a valid tag","en-GB":"Please enter a valid tag",fr:"Veuillez saisir un tag valide",es:"Por favor, ingrese un tag válido",de:"Bitte geben Sie einen gültigen Tag ein",ja:"有効なタグを入力してください",ko:"유효한 태그를 입력하세요",zh:"请输入有效的标签",it:"Si prega di inserire un tag valido",pt:"Por favor, insira um tag válido",hi:"कृपया एक वैध टैग दर्ज करें",ar:"يرجى إدخال وسم صالح",ru:"Пожалуйста, введите действительный тег"})}},sX=e=>{const{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:l,keyMinLengthError:u,descriptionRequiredError:d,descriptionInvalidTypeError:f,requiredErrorProjectId:m,invalidTypeErrorProjectId:g,invalidTypeErrorTags:y}=rn(aX);return oa.object({title:oa.string({required_error:t.value,invalid_type_error:n.value}).refine(b=>b.length===0||b.length>=4,{message:r.value}).optional(),key:oa.string({required_error:a.value,invalid_type_error:o.value}).min(4,{message:u.value}).regex(/^[a-zA-Z0-9-_]+$/,{message:l.value}).default(""),description:oa.string({required_error:d.value,invalid_type_error:f.value}).optional(),projectIds:oa.array(oa.string({required_error:m.value,invalid_type_error:g.value})).default([e]),tags:oa.array(oa.string({invalid_type_error:y.value})).default([])})},oX=({dictionary:e})=>{var N,k;const{session:t}=yu(),{project:n}=t??{},{data:r,isLoading:a}=w2(),{data:o}=N2(),l=sX(String(n==null?void 0:n._id)),{form:u,isSubmitting:d}=lU(l,{defaultValues:e}),{editedContent:f,setEditedDictionary:m}=wn(),{titleInput:g,keyInput:y,descriptionInput:b,projectInput:v,tagsSelect:S,auditButton:A}=rn(iX),{auditContentDeclaration:w,isLoading:T}=O2(),R=f==null?void 0:f[e.key];E.useEffect(()=>{u.reset(e)},[e,u==null?void 0:u.reset]),E.useEffect(()=>{typeof R>"u"&&u.reset(e)},[R]);const D=async()=>{const I={...e,...R};await w({fileContent:JSON.stringify(I)}).then(P=>{if(P!=null&&P.data)try{const V=JSON.parse(P.data.fileContent);m(H=>({...H,...I,...V})),u.reset({...I,...V})}catch(V){console.error(V)}})};return _.jsx(ei,{background:"none",border:!0,roundedSize:"2xl",className:"w-full px-5 pb-3 pt-5",children:_.jsxs(Qe,{className:"flex w-full flex-col gap-8",...u,schema:l,onChange:I=>m(P=>({...P,...I})),children:[_.jsxs("div",{className:"flex w-full flex-1 gap-8 max-md:flex-col",children:[_.jsx(Qe.EditableFieldInput,{name:"key",label:y.label,placeholder:y.label.value,description:y.description,disabled:d,isRequired:!0,onSave:I=>{u.setValue("key",I),m(P=>({...e,...P??{},key:I}))}}),_.jsx(Qe.EditableFieldInput,{name:"title",label:g.label,placeholder:g.placeholder.value,description:g.description,disabled:d,onSave:I=>{u.setValue("title",I),m(P=>({...e,...P??{},title:I}))}})]}),_.jsx(Qe.EditableFieldTextArea,{name:"description",label:b.label,placeholder:b.placeholder.value,description:b.description,disabled:d,onSave:I=>{u.setValue("description",I),m(P=>({...e,...P??{},description:I}))}}),_.jsxs("div",{className:"flex size-full flex-1 gap-8 max-md:flex-col",children:[_.jsxs(Qe.MultiSelect,{name:"projectIds",label:v.label.value,description:v.description.value,onValueChange:I=>{const P=[I].flat();u.setValue("projectIds",P),m(V=>({...e,...V??{},projectIds:P}))},children:[_.jsx(mn.Trigger,{getBadgeValue:I=>{var P,V;return((V=(P=r==null?void 0:r.data)==null?void 0:P.find(H=>String(H._id)===I))==null?void 0:V.name)??I},children:_.jsx(mn.Input,{placeholder:v.placeholder.value})}),_.jsx(mn.Content,{children:_.jsx(jo,{isLoading:a,children:_.jsx(mn.List,{children:(N=r==null?void 0:r.data)==null?void 0:N.map(I=>_.jsx(mn.Item,{value:String(I._id),children:I.name},String(I._id)))})})})]}),_.jsxs(Qe.MultiSelect,{name:"tags",label:S.label.value,description:S.description.value,onValueChange:I=>{u.setValue("tags",[I].flat()),m(P=>({...e,...P??{},tags:[I].flat()}))},children:[_.jsx(mn.Trigger,{getBadgeValue:I=>{var P,V;return((V=(P=r==null?void 0:r.data)==null?void 0:P.find(H=>String(H._id)===I))==null?void 0:V.name)??I},children:_.jsx(mn.Input,{placeholder:S.placeholder.value})}),_.jsx(mn.Content,{children:_.jsx(jo,{isLoading:a,children:_.jsx(mn.List,{children:(k=o==null?void 0:o.data)==null?void 0:k.map(I=>_.jsx(mn.Item,{value:String(I.key),children:I.name??I.key},String(I.key)))})})})]})]}),_.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 max-md:flex-col",children:_.jsx(Qe.Button,{type:"button",label:A.label.value,Icon:P1,variant:"outline",color:"text",className:"max-md:w-full",onClick:D,disabled:d||T,isLoading:T,children:A.text})})]})})},lX={key:"dictionary-field-editor",content:{returnToDictionaryList:{label:me({en:"Return to dictionary list","en-GB":"Return to dictionary list",fr:"Retourner à la liste des dictionnaires",es:"Volver a la lista de diccionarios",de:"Zurück zur Wörterbuchliste",ja:"辞書リストに戻る",ko:"사전 목록으로 돌아가기",zh:"返回字典列表",it:"Torna all'elenco dei dizionari",pt:"Voltar à lista de dicionários",hi:"शब्दकोश सूची में वापस जाएं",ar:"العودة إلى قائمة المعاجم",ru:"Вернуться к списку словарей"}),text:me({en:"Dictionary list","en-GB":"Dictionary list",fr:"Liste des dictionnaires",es:"Lista de diccionarios",de:"Wörterbuchliste",ja:"辞書リスト",ko:"사전 목록",zh:"字典列表",it:"Elenco dei dizionari",pt:"Lista de dicionários",hi:"शब्दकोश सूची",ar:"قائمة المعاجم",ru:"Список словарей"})}}};function cX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(n),!0).forEach(function(r){cX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uX(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function dX(e,t){if(e==null)return{};var n=uX(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fX(e,t){return hX(e)||mX(e,t)||pX(e,t)||gX()}function hX(e){if(Array.isArray(e))return e}function mX(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=void 0;try{for(var l=e[Symbol.iterator](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(d){a=!0,o=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function pX(e,t){if(e){if(typeof e=="string")return FT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FT(e,t)}}function FT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
289
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(n),!0).forEach(function(r){yX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vX(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(a,o){return o(a)},r)}}function Ec(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function _h(e){return{}.toString.call(e).includes("Object")}function bX(e){return!Object.keys(e).length}function uu(e){return typeof e=="function"}function _X(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function xX(e,t){return _h(t)||ha("changeType"),Object.keys(t).some(function(n){return!_X(e,n)})&&ha("changeField"),t}function EX(e){uu(e)||ha("selectorType")}function SX(e){uu(e)||_h(e)||ha("handlerType"),_h(e)&&Object.values(e).some(function(t){return!uu(t)})&&ha("handlersType")}function AX(e){e||ha("initialIsRequired"),_h(e)||ha("initialType"),bX(e)&&ha("initialContent")}function wX(e,t){throw new Error(e[t]||e.default)}var TX={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ha=Ec(wX)(TX),hf={changes:xX,selector:EX,handler:SX,initial:AX};function CX(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hf.initial(e),hf.handler(t);var n={current:e},r=Ec(OX)(n,t),a=Ec(NX)(n),o=Ec(hf.changes)(e),l=Ec(RX)(n);function u(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return hf.selector(f),f(n.current)}function d(f){vX(r,a,o,l)(f)}return[u,d]}function RX(e,t){return uu(t)?t(e.current):t}function NX(e,t){return e.current=$T($T({},e.current),t),t}function OX(e,t,n){return uu(t)?t(e.current):Object.keys(n).forEach(function(r){var a;return(a=t[r])===null||a===void 0?void 0:a.call(t,e.current[r])}),n}var kX={create:CX},DX={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function IX(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function LX(e){return{}.toString.call(e).includes("Object")}function MX(e){return e||qT("configIsRequired"),LX(e)||qT("configType"),e.urls?(jX(),{paths:{vs:e.urls.monacoBase}}):e}function jX(){console.warn(PD.deprecation)}function PX(e,t){throw new Error(e[t]||e.default)}var PD={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
290
- You are using deprecated way of configuration.
291
-
292
- Instead of using
293
- monaco.config({ urls: { monacoBase: '...' } })
294
- use
295
- monaco.config({ paths: { vs: '...' } })
296
-
297
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
298
- `},qT=IX(PX)(PD),VX={config:MX},BX=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(a){return n.reduceRight(function(o,l){return l(o)},a)}};function VD(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],VD(e[n],t[n]))}),HT(HT({},e),t)}var zX={type:"cancelation",msg:"operation is manually canceled"};function Ay(e){var t=!1,n=new Promise(function(r,a){e.then(function(o){return t?a(zX):r(o)}),e.catch(a)});return n.cancel=function(){return t=!0},n}var UX=kX.create({config:DX,isInitialized:!1,resolve:null,reject:null,monaco:null}),BD=fX(UX,2),Iu=BD[0],im=BD[1];function HX(e){var t=VX.config(e),n=t.monaco,r=dX(t,["monaco"]);im(function(a){return{config:VD(a.config,r),monaco:n}})}function FX(){var e=Iu(function(t){var n=t.monaco,r=t.isInitialized,a=t.resolve;return{monaco:n,isInitialized:r,resolve:a}});if(!e.isInitialized){if(im({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Ay(wy);if(window.monaco&&window.monaco.editor)return zD(window.monaco),e.resolve(window.monaco),Ay(wy);BX(GX,qX)(KX)}return Ay(wy)}function GX(e){return document.body.appendChild(e)}function $X(e){var t=document.createElement("script");return e&&(t.src=e),t}function qX(e){var t=Iu(function(r){var a=r.config,o=r.reject;return{config:a,reject:o}}),n=$X("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function KX(){var e=Iu(function(n){var r=n.config,a=n.resolve,o=n.reject;return{config:r,resolve:a,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){zD(n),e.resolve(n)},function(n){e.reject(n)})}function zD(e){Iu().monaco||im({monaco:e})}function WX(){return Iu(function(e){var t=e.monaco;return t})}var wy=new Promise(function(e,t){return im({resolve:e,reject:t})}),UD={config:HX,init:FX,__getMonacoInstance:WX},YX={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Ty=YX,ZX={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},XX=ZX;function QX({children:e}){return $e.createElement("div",{style:XX.container},e)}var JX=QX,eQ=JX;function tQ({width:e,height:t,isEditorReady:n,loading:r,_ref:a,className:o,wrapperProps:l}){return $e.createElement("section",{style:{...Ty.wrapper,width:e,height:t},...l},!n&&$e.createElement(eQ,null,r),$e.createElement("div",{ref:a,style:{...Ty.fullWidth,...!n&&Ty.hide},className:o}))}var nQ=tQ,HD=E.memo(nQ);function rQ(e){E.useEffect(e,[])}var FD=rQ;function iQ(e,t,n=!0){let r=E.useRef(!0);E.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Un=iQ;function Ic(){}function No(e,t,n,r){return aQ(e,r)||sQ(e,t,n,r)}function aQ(e,t){return e.editor.getModel(GD(e,t))}function sQ(e,t,n,r){return e.editor.createModel(t,n,r?GD(e,r):void 0)}function GD(e,t){return e.Uri.parse(t)}function oQ({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:a,originalModelPath:o,modifiedModelPath:l,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:d=!1,theme:f="light",loading:m="Loading...",options:g={},height:y="100%",width:b="100%",className:v,wrapperProps:S={},beforeMount:A=Ic,onMount:w=Ic}){let[T,R]=E.useState(!1),[D,N]=E.useState(!0),k=E.useRef(null),I=E.useRef(null),P=E.useRef(null),V=E.useRef(w),H=E.useRef(A),fe=E.useRef(!1);FD(()=>{let J=UD.init();return J.then(U=>(I.current=U)&&N(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>k.current?Y():J.cancel()}),Un(()=>{if(k.current&&I.current){let J=k.current.getOriginalEditor(),U=No(I.current,e||"",r||n||"text",o||"");U!==J.getModel()&&J.setModel(U)}},[o],T),Un(()=>{if(k.current&&I.current){let J=k.current.getModifiedEditor(),U=No(I.current,t||"",a||n||"text",l||"");U!==J.getModel()&&J.setModel(U)}},[l],T),Un(()=>{let J=k.current.getModifiedEditor();J.getOption(I.current.editor.EditorOption.readOnly)?J.setValue(t||""):t!==J.getValue()&&(J.executeEdits("",[{range:J.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),J.pushUndoStop())},[t],T),Un(()=>{var J,U;(U=(J=k.current)==null?void 0:J.getModel())==null||U.original.setValue(e||"")},[e],T),Un(()=>{let{original:J,modified:U}=k.current.getModel();I.current.editor.setModelLanguage(J,r||n||"text"),I.current.editor.setModelLanguage(U,a||n||"text")},[n,r,a],T),Un(()=>{var J;(J=I.current)==null||J.editor.setTheme(f)},[f],T),Un(()=>{var J;(J=k.current)==null||J.updateOptions(g)},[g],T);let te=E.useCallback(()=>{var ne;if(!I.current)return;H.current(I.current);let J=No(I.current,e||"",r||n||"text",o||""),U=No(I.current,t||"",a||n||"text",l||"");(ne=k.current)==null||ne.setModel({original:J,modified:U})},[n,t,a,e,r,o,l]),ue=E.useCallback(()=>{var J;!fe.current&&P.current&&(k.current=I.current.editor.createDiffEditor(P.current,{automaticLayout:!0,...g}),te(),(J=I.current)==null||J.editor.setTheme(f),R(!0),fe.current=!0)},[g,f,te]);E.useEffect(()=>{T&&V.current(k.current,I.current)},[T]),E.useEffect(()=>{!D&&!T&&ue()},[D,T,ue]);function Y(){var U,ne,ee,ve;let J=(U=k.current)==null?void 0:U.getModel();u||((ne=J==null?void 0:J.original)==null||ne.dispose()),d||((ee=J==null?void 0:J.modified)==null||ee.dispose()),(ve=k.current)==null||ve.dispose()}return $e.createElement(HD,{width:b,height:y,isEditorReady:T,loading:m,_ref:P,className:v,wrapperProps:S})}var lQ=oQ;E.memo(lQ);function cQ(e){let t=E.useRef();return E.useEffect(()=>{t.current=e},[e]),t.current}var uQ=cQ,mf=new Map;function dQ({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:a,path:o,theme:l="light",line:u,loading:d="Loading...",options:f={},overrideServices:m={},saveViewState:g=!0,keepCurrentModel:y=!1,width:b="100%",height:v="100%",className:S,wrapperProps:A={},beforeMount:w=Ic,onMount:T=Ic,onChange:R,onValidate:D=Ic}){let[N,k]=E.useState(!1),[I,P]=E.useState(!0),V=E.useRef(null),H=E.useRef(null),fe=E.useRef(null),te=E.useRef(T),ue=E.useRef(w),Y=E.useRef(),J=E.useRef(r),U=uQ(o),ne=E.useRef(!1),ee=E.useRef(!1);FD(()=>{let W=UD.init();return W.then(F=>(V.current=F)&&P(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>H.current?j():W.cancel()}),Un(()=>{var F,ie,re,de;let W=No(V.current,e||r||"",t||a||"",o||n||"");W!==((F=H.current)==null?void 0:F.getModel())&&(g&&mf.set(U,(ie=H.current)==null?void 0:ie.saveViewState()),(re=H.current)==null||re.setModel(W),g&&((de=H.current)==null||de.restoreViewState(mf.get(o))))},[o],N),Un(()=>{var W;(W=H.current)==null||W.updateOptions(f)},[f],N),Un(()=>{!H.current||r===void 0||(H.current.getOption(V.current.editor.EditorOption.readOnly)?H.current.setValue(r):r!==H.current.getValue()&&(ee.current=!0,H.current.executeEdits("",[{range:H.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),H.current.pushUndoStop(),ee.current=!1))},[r],N),Un(()=>{var F,ie;let W=(F=H.current)==null?void 0:F.getModel();W&&a&&((ie=V.current)==null||ie.editor.setModelLanguage(W,a))},[a],N),Un(()=>{var W;u!==void 0&&((W=H.current)==null||W.revealLine(u))},[u],N),Un(()=>{var W;(W=V.current)==null||W.editor.setTheme(l)},[l],N);let ve=E.useCallback(()=>{var W;if(!(!fe.current||!V.current)&&!ne.current){ue.current(V.current);let F=o||n,ie=No(V.current,r||e||"",t||a||"",F||"");H.current=(W=V.current)==null?void 0:W.editor.create(fe.current,{model:ie,automaticLayout:!0,...f},m),g&&H.current.restoreViewState(mf.get(F)),V.current.editor.setTheme(l),u!==void 0&&H.current.revealLine(u),k(!0),ne.current=!0}},[e,t,n,r,a,o,f,m,g,l,u]);E.useEffect(()=>{N&&te.current(H.current,V.current)},[N]),E.useEffect(()=>{!I&&!N&&ve()},[I,N,ve]),J.current=r,E.useEffect(()=>{var W,F;N&&R&&((W=Y.current)==null||W.dispose(),Y.current=(F=H.current)==null?void 0:F.onDidChangeModelContent(ie=>{ee.current||R(H.current.getValue(),ie)}))},[N,R]),E.useEffect(()=>{if(N){let W=V.current.editor.onDidChangeMarkers(F=>{var re;let ie=(re=H.current.getModel())==null?void 0:re.uri;if(ie&&F.find(de=>de.path===ie.path)){let de=V.current.editor.getModelMarkers({resource:ie});D==null||D(de)}});return()=>{W==null||W.dispose()}}return()=>{}},[N,D]);function j(){var W,F;(W=Y.current)==null||W.dispose(),y?g&&mf.set(o,H.current.saveViewState()):(F=H.current.getModel())==null||F.dispose(),H.current.dispose()}return $e.createElement(HD,{width:b,height:v,isEditorReady:N,loading:d,_ref:fe,className:S,wrapperProps:A})}var fQ=dQ,hQ=E.memo(fQ);const mQ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:a=!0,isReadOnly:o=!1,onChange:l})=>{const u=E.useRef(null),d=E.useRef(null),[f,m]=E.useState({height:0,width:0}),g=E.useMemo(()=>n?"vs-dark-transparent":"hc-light-theme",[n]),y=(v,S)=>{var w;d.current=v;const A=(v.getContentHeight()??0)+25;S.editor.defineTheme("vs-dark-transparent",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.defineTheme("hc-light-theme",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.setTheme(g),S.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),S.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),m({height:A,width:((w=u.current)==null?void 0:w.clientWidth)??0})},b=r??e.split(`
299
- `).length>1;return _.jsxs("div",{className:Te("relative h-full w-full text-sm",r&&"ml-0"),children:[a&&_.jsx("div",{className:"sticky top-5 z-10",children:_.jsx("div",{className:Te("absolute bottom-0 right-2 flex h-7 items-center"),children:_.jsx(jD,{content:e})})}),_.jsx("div",{className:"z-0 grid size-full grid-cols-[0px] overflow-auto",ref:u,children:_.jsx(hQ,{...f,defaultLanguage:"typescript",language:t,loading:_.jsx(jo,{}),defaultValue:String(e).replace(/\n$/,""),onMount:y,onChange:l,options:{readOnly:o,cursorStyle:"line",minimap:{enabled:!1},scrollbar:{vertical:"hidden",verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:"off",quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:b?"on":"off"},theme:g,className:"my-2 rounded-md"})})]})},pQ=({dictionary:e,isDarkMode:t})=>{const{setEditedContent:n,editedContent:r}=wn(),a=l=>{try{return JSON.parse(l),!0}catch{return!1}},o=E.useMemo(()=>{var l;return((l=r==null?void 0:r[e.key])==null?void 0:l.content)??(e==null?void 0:e.content)??{}},[e]);return _.jsx(ei,{background:"none",border:!0,roundedSize:"xl",className:"w-full overflow-hidden p-3",children:_.jsx(mQ,{language:"json",onChange:l=>{a(l??"{}")&&n(e.key,JSON.parse(l??"{}"))},isDarkMode:t,children:JSON.stringify(o,null,2)})})},gQ={key:"node-type-selector",content:{triggerPlaceHolder:me({en:"Node type","en-GB":"Node type",fr:"Type du Nœud",es:"Tipo del nodo",de:"Knotentyp",ja:"ノードタイプ",ko:"노드 유형",zh:"节点类型",it:"Tipo di nodo",pt:"Tipo de nó",hi:"नोड प्रकार",ar:"نوع العقدة",ru:"Тип узла"}),multilingual:me({en:"Multilingual content","en-GB":"Multilingual content",fr:"Contenu Multilingue",es:"Contenido multilingüe",de:"Mehrsprachiger Inhalt",ja:"複数言語コンテンツ",ko:"다중 언어 콘텐츠",zh:"多语言内容",it:"Contenuto multilingue",pt:"Conteúdo multilíngue",hi:"बहुभाषी सामग्री",ar:"محتوى متعدد اللغات",ru:"Многоязычный контент"}),text:me({en:"Text","en-GB":"Text",fr:"Texte",es:"Texto",de:"Text",ja:"テキスト",ko:"텍스트",zh:"文本",it:"Testo",pt:"Texto",hi:"पाठ",ar:"نص",ru:"Текст"}),number:me({en:"Number","en-GB":"Number",fr:"Nombre",es:"Número",de:"Zahl",ja:"数字",ko:"숫자",zh:"数字",it:"Numero",pt:"Número",hi:"संख्या",ar:"رقم",ru:"Число"}),boolean:me({en:"Boolean","en-GB":"Boolean",fr:"Booléen",es:"Booleano",de:"Bool",ja:"ブール",ko:"불리언",zh:"布尔",it:"Booleano",pt:"Booleano",hi:"बूलियन",ar:"منطقي",ru:"Булево"}),node:me({en:"Object","en-GB":"Object",fr:"Objet",es:"Objeto",de:"Objekt",ja:"オブジェクト",ko:"객체",zh:"对象",it:"Oggetto",pt:"Objeto",hi:"ऑब्जेक्ट",ar:"كائن",ru:"Объект"}),array:me({en:"Array","en-GB":"Array",fr:"Tableau",es:"Arreglo",de:"Array",ja:"配列",ko:"배열",zh:"数组",it:"Array",pt:"Array",hi:"ऐरे",ar:"مصفوفة",ru:"Массив"}),enumeration:me({en:"Enumeration","en-GB":"Enumeration",fr:"Énumération",es:"Enumeración",de:"Enumeration",ja:"列挙",ko:"열거",zh:"枚举",it:"Enumerazione",pt:"Enumeração",hi:"गणना",ar:"تعداد",ru:"Перечисление"}),nest:me({en:"Nesting","en-GB":"Nesting",fr:"Imbriquation",es:"Anidación",de:"Vererbung",ja:"ネスト",ko:"중첩",zh:"嵌套",it:"Nidificazione",pt:"Nido",hi:"नेस्टेंस",ar:"مستوى",ru:"Вложенность",nl:"Nest"}),insertion:me({en:"Insertion","en-GB":"Insertion",fr:"Insertion",es:"Inserción",de:"Einfügung",ja:"挿入",ko:"삽입",zh:"插入",it:"Inserimento",pt:"Inserção",hi:"सम्मिलन",ar:"إدراج",ru:"Вставка"}),condition:me({en:"Condition","en-GB":"Condition",fr:"Condition",es:"Condición",de:"Bedingung",ja:"条件",ko:"조건",zh:"条件",it:"Condizione",pt:"Condição",hi:"शर्त्ता",ar:"شرط",ru:"Условие"}),file:me({en:"File","en-GB":"File",fr:"Fichier",es:"Archivo",de:"Datei",ja:"ファイル",ko:"파일",zh:"文件",it:"File",pt:"Arquivo",hi:"फ़ाइल",ar:"ملف",ru:"Файл"}),markdown:me({en:"Markdown","en-GB":"Markdown",fr:"Markdown",es:"Markdown",de:"Markdown",ja:"マークダウン",ko:"마크다운",zh:"Markdown",it:"Markdown",pt:"Markdown",hi:"मार्कडाउन",ar:"مارك داون",ru:"Markdown"}),reactNode:me({en:"React Node","en-GB":"React Node",fr:"Node React",es:"Nodo React",de:"React-Knoten",ja:"リアル・ノード",ko:"리액 노드",zh:"React 节点",it:"Nodo React",pt:"Nó React",hi:"रेड नोड",ar:"عقدة رياكت",ru:"Реакт узел"})}},pf=({section:e,onValueChange:t})=>{const{multilingual:n,text:r,number:a,boolean:o,node:l,array:u,enumeration:d,triggerPlaceHolder:f,nest:m,condition:g,markdown:y,insertion:b,reactNode:v,file:S}=rn(gQ),A=qo(e),[w,T]=E.useState(A),R=D=>{T(D),t(D)};return _.jsxs(je,{value:w,onValueChange:R,children:[_.jsx(je.Trigger,{children:_.jsx(je.Value,{placeholder:f})}),_.jsxs(je.Content,{children:[_.jsx(je.Item,{value:q.Translation,children:n}),_.jsx(je.Item,{value:q.Text,children:r}),_.jsx(je.Item,{value:q.Number,children:a}),_.jsx(je.Item,{value:q.Boolean,children:o}),_.jsx(je.Item,{value:q.Object,children:l}),_.jsx(je.Item,{value:q.Array,children:u}),_.jsx(je.Item,{value:q.Enumeration,children:d}),_.jsx(je.Item,{value:q.Insertion,children:b}),_.jsx(je.Item,{value:q.Markdown,children:y}),_.jsx(je.Item,{value:q.Nested,children:m}),_.jsx(je.Item,{value:q.Condition,children:g}),_.jsx(je.Item,{value:q.ReactNode,disabled:!0,children:v}),_.jsx(je.Item,{value:q.File,children:S})]})]})},$D={key:"editor-view",content:{titleInput:{placeholder:me({en:"Enter the key of your node","en-GB":"Enter the key of your node",fr:"Entrez la clé de votre nœud",es:"Ingrese la clave de su nodo",de:"Geben Sie den Schlüssel Ihres Knotens ein",ja:"ノードのキーを入力してください",ko:"노드의 키를 입력하세요",zh:"输入您节点的键",it:"Inserisci la chiave del tuo nodo",pt:"Insira a chave do seu nó",hi:"अपनी नोड की कुंजी दर्ज करें",ar:"أدخل مفتاح العقدة الخاص بك",ru:"Введите ключ вашего узла"})},deleteButton:{label:me({en:"Remove node from section","en-GB":"Remove node from section",fr:"Supprimer le nœud de la section",es:"Eliminar el nodo de la sección",de:"Knoten aus dem Abschnitt entfernen",ja:"セクションからノードを削除",ko:"섹션에서 노드를 제거",zh:"从部分中移除节点",it:"Rimuovi nodo dalla sezione",pt:"Remover nó da seção",hi:"सेक्शन से नोड हटाएं",ar:"إزالة العقدة من القسم",ru:"Удалить узел из секции"})},addNodeButton:{label:me({en:"Click to add a new node","en-GB":"Click to add a new node",fr:"Cliquez pour ajouter un nouveau nœud",es:"Haga clic para agregar un nuevo nodo",de:"Klicken, um einen neuen Knoten hinzuzufügen",ja:"新しいノードを追加するにはクリックしてください",ko:"새 노드를 추가하려면 클릭하세요",zh:"点击添加新节点",it:"Fai clic per aggiungere un nuovo nodo",pt:"Clique para adicionar um novo nó",hi:"नया नोड जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة عقدة جديدة",ru:"Нажмите, чтобы добавить новый узел"}),text:me({en:"Add a new node","en-GB":"Add a new node",fr:"Ajouter un nouveau nœud",es:"Agregar un nuevo nodo",de:"Neuen Knoten hinzufügen",ja:"新しいノードを追加",ko:"새 노드 추가",zh:"添加新节点",it:"Aggiungi un nuovo nodo",pt:"Adicionar um novo nó",hi:"नया नोड जोड़ें",ar:"إضافة عقدة جديدة",ru:"Добавить новый узел"})}}},zv=({section:e,dictionaryKey:t,keyPath:n,onNodeTypeChange:r})=>{var d;const a=((d=Zr())==null?void 0:d.internationalization.locales)??[],o=qo(e),l=YT(e),u=f=>{const m=sc(o,a,f);r(m)};if(o===q.Translation||o===q.Condition||o===q.Enumeration){const f=Object.keys(e[o])[0],m=[...n,{type:o,key:f}];return _.jsxs("div",{className:"flex w-full flex-col gap-1",children:[_.jsx(pf,{section:e,onValueChange:g=>r(sc(g,a))}),_.jsx(zv,{section:l,keyPath:m,dictionaryKey:t,onNodeTypeChange:u})]})}if(o===q.Array){const f=[...n,{type:o,key:0}];return _.jsxs("div",{className:"flex w-full flex-col gap-1",children:[_.jsx(pf,{section:e,onValueChange:m=>r(sc(m,a))}),_.jsx(zv,{section:l,keyPath:f,dictionaryKey:t,onNodeTypeChange:u})]})}return o===q.Object?_.jsxs(_.Fragment,{children:[_.jsx(pf,{section:e,onValueChange:f=>r(sc(f,a))}),_.jsx("div",{className:"ml-10 mt-6",children:_.jsx(vQ,{keyPath:n,section:e,dictionaryKey:t})})]}):_.jsx(pf,{section:e,onValueChange:f=>r(sc(f,a))})},D0=({sectionKey:e,section:t,keyPath:n,dictionaryKey:r})=>{const{focusedContent:a,setFocusedContentKeyPath:o}=Sa(),{renameEditedContent:l,addEditedContent:u}=Ko(),{titleInput:d,deleteButton:f}=rn($D),m=g=>{l(r,g,n);const y=n.slice(0,-1),b=n[n.length-1],v=[...y,{...b,key:g}];o(v)};return _.jsx(ei,{transparency:"xl",roundedSize:"xl",className:"w-full min-w-80 gap-2 overflow-auto px-5 py-2",border:!0,borderColor:"text",background:"none","aria-selected":fu(n,(a==null?void 0:a.keyPath)??[]),onClick:()=>o(n),children:_.jsxs("div",{className:"flex w-full flex-col items-start justify-between gap-3",children:[typeof e=="string"&&_.jsxs("div",{className:"w-full",children:[_.jsxs("div",{className:"flex w-full items-center justify-between gap-10",children:[_.jsx(HC,{name:"key","aria-label":"Key",placeholder:d.placeholder.value,defaultValue:e,onSave:g=>m(g),variant:"invisible"}),_.jsx(gt,{label:f.label.value,variant:"hoverable",size:"icon-sm",color:"text",className:"translate-x-2",Icon:Ch,onClick:()=>{u(r,void 0,n);const g=n.slice(0,-1);o(g)}})]}),_.jsxs("span",{className:"text-neutral ml-3 text-sm",children:["( ",Df(e)," )"]})]}),_.jsx(zv,{keyPath:n,dictionaryKey:r,section:t,onNodeTypeChange:g=>{u(r,g,n)}})]})})},yQ=({section:e,keyPath:t,dictionaryKey:n})=>{const{addNodeButton:r}=rn($D),{setFocusedContentKeyPath:a}=Gv(),{addEditedContent:o}=Ko();return!e||typeof e!="object"?_.jsx("div",{children:"Not an object"}):_.jsxs("div",{className:"flex flex-col gap-2 overflow-y-scroll",children:[_.jsx("ul",{className:"mr-auto flex flex-col gap-4",children:Object.keys(e).map(l=>_.jsx("li",{className:"flex w-full",children:_.jsx(D0,{sectionKey:l,section:e==null?void 0:e[l],keyPath:[...t,{type:q.Object,key:l}],dictionaryKey:n})},l))}),_.jsx(gt,{label:r.label.value,variant:"hoverable",size:"md",color:"text",Icon:Th,className:"flex-1",onClick:()=>{const u=[...t,{type:q.Object,key:"newKey"}];o(n,"",u),a(u)},children:r.text})]})},vQ=({section:e,keyPath:t,dictionaryKey:n})=>!e||typeof e!="object"||typeof e.nodeType=="string"?_.jsx(D0,{sectionKey:"content",section:e,keyPath:t,dictionaryKey:n}):_.jsx(yQ,{section:e,keyPath:t,dictionaryKey:n}),bQ=({dictionary:e})=>{var o,l;const{content:t,key:n}=e,{editedContent:r}=wn(),a=typeof((o=r==null?void 0:r[n])==null?void 0:o.content)>"u"?t:(l=r==null?void 0:r[n])==null?void 0:l.content;return _.jsx(D0,{section:a,keyPath:[],dictionaryKey:e.key})},_Q=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:a})=>{const o=Zr(),[l,u]=E.useState(1),{returnToDictionaryList:d}=rn(lX),{setFocusedContent:f}=Gv(),{setLocaleDictionaries:m}=Fv();return E.useEffect(()=>{f(g=>({...g??{},dictionaryKey:e.key})),m(g=>({...g,[e.key]:e}))},[]),_.jsx(V7,{availableLocales:(o==null?void 0:o.internationalization.locales)??[],children:_.jsxs("div",{className:"flex size-full flex-col gap-6 px-2",children:[_.jsx(gt,{onClick:t,variant:"hoverable",className:"z-10 ml-5 mr-auto",color:"text",Icon:EV,label:d.label.value,children:d.text}),_.jsx(wu,{defaultValue:l,onChange:g=>u(g),color:"text",size:"sm",className:"m-auto w-full max-w-xl",choices:[{content:"Details",value:0},{content:"Structure",value:2},{content:"Content",value:1},{content:"JSON",value:3}].filter(({value:g})=>!(!r.includes("remote")&&g===0))}),l===0&&_.jsx(oX,{dictionary:e}),l===2&&_.jsx(bQ,{dictionary:e}),l===1&&_.jsx(rX,{dictionary:e,isDarkMode:n}),l===3&&_.jsx(pQ,{dictionary:e,isDarkMode:n}),_.jsx(pk,{dictionary:e,mode:r,onDelete:()=>{f(null),a==null||a()}})]})})},xQ=({children:e,isHidden:t,minWidth:n=0,align:r="left",className:a,...o})=>_.jsx("div",{className:Te("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out",t?"":"grid-cols-[1fr]",a),"aria-hidden":t,...o,children:_.jsx("div",{style:{minWidth:`${n}px`},tabIndex:t!==!1?void 0:-1,className:Te(r==="right"&&"ml-auto"),children:e})}),EQ=e=>{const t=e.getBoundingClientRect(),n=t.top,r=t.bottom;if(n>=0&&r<=window.innerHeight){const o=t.left+t.width/2,l=t.top+10,u=document.elementFromPoint(o,l);return e===u||e.contains(u)}return!1},am=Q1((e,t)=>({drawers:{},open:n=>e(r=>({drawers:{...r.drawers,[n]:!0}})),close:n=>e(r=>({drawers:{...r.drawers,[n]:!1}})),isOpen:n=>t().drawers[n]??!1})),qD=({title:e,identifier:t,children:n,header:r,closeOnOutsideClick:a=!0,backButton:o,isOpen:l,onClose:u})=>{const{isMobile:d}=L7("md"),f=E.useRef(null),m=E.useRef(null),{close:g,open:y,isOpen:b}=am(dk(S=>({close:()=>S.close(t),open:()=>S.open(t),isOpen:S.isOpen(t)})));fk({disableScroll:b,key:t?`right_drawer_${t}`:"right_drawer"}),E.useEffect(()=>{const S=A=>{try{if(!f.current)return;const w=b&&a,T=A.target&&!f.current.contains(A.target),R=EQ(f.current);(w&&T&&R||!A.target)&&(g(),u==null||u())}catch{g(),u==null||u()}};return window.addEventListener("mousedown",S),()=>window.removeEventListener("mousedown",S)},[b,g,u,a,t]),E.useEffect(()=>{l!==void 0&&(l?y():(g(),u==null||u()))},[g,y,u,l,t]);const v=S=>{S.target===S.currentTarget&&d&&(g(),u==null||u())};return _.jsx("div",{className:"fixed right-0 top-0 z-50 flex h-full justify-end",children:_.jsx(xQ,{isHidden:!b,align:"right",children:_.jsxs(ei,{className:"text-text relative flex h-screen w-screen flex-col md:w-[400px]",ref:f,roundedSize:"none",children:[_.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[_.jsxs("div",{className:"flex justify-between gap-3",children:[_.jsx("div",{children:o&&_.jsx(gt,{variant:"hoverable",color:"text",label:o.text??"Go back",onClick:o.onBack,Icon:RV,children:o==null?void 0:o.text})}),_.jsx("div",{children:_.jsx(gt,{variant:"hoverable",color:"text",label:"Close",className:"ml-auto",onClick:g,Icon:Ts,size:"icon-md"})})]}),e&&_.jsx("h2",{className:"flex items-center justify-center text-lg font-bold",children:e}),r]}),_.jsx("div",{className:"flex h-full flex-col overflow-y-auto p-2",children:_.jsx("div",{className:"flex flex-1 flex-col",onClick:v,ref:m,children:n})})]})})})},SQ=()=>{const{toasts:e}=vC();return _.jsxs(c2.Provider,{children:[e.map(({id:t,title:n,description:r,action:a,...o})=>_.jsxs(f2,{...o,children:[_.jsxs("div",{className:"grid gap-1",children:[n&&_.jsx(m2,{children:n}),r&&_.jsx(p2,{children:r})]}),a,_.jsx(h2,{})]},t)),_.jsx(u2,{})]})},KD=(...e)=>{const{localeDictionaries:t}=i1(),{data:n,isWaitingData:r}=T2(...e),a=E.useMemo(()=>((n==null?void 0:n.data)??[]).reduce((l,u)=>(l[u.key]=u,l),{}),[n]),o=E.useMemo(()=>j2(a??{},t),[a,t]);return{online:a,locale:t,all:o,isLoading:r}},AQ=({children:e})=>_.jsx(oG,{features:f9,children:e}),wQ=({children:e})=>_.jsx(AQ,{children:_.jsxs(oz,{children:[_.jsx(SQ,{}),e]})}),TQ=({children:e})=>_.jsx(sV,{children:_.jsx(PP,{children:_.jsx(C1,{path:"*",element:e})})}),Uv="dictionaryList",WD={key:"dictionary-edition-drawer",content:{openDictionaryEditor:{label:me({en:"Click to open the dictionary in the editor",fr:"Cliquez pour ouvrir le dictionnaire dans l’éditeur",es:"Haga clic para abrir el diccionario en el editor",de:"Klicken Sie hier, um das Wörterbuch im Editor zu öffnen",ja:"エディターで辞書を開く",ko:"편집기에서 사전 열기",zh:"点击打开词典到编辑器",it:"Fai clic per aprire il dizionario nell’editor",pt:"Clique para abrir o dicionário no editor",hi:"एडिटर में शब्दकोश खोलने के लिए क्लिक करें",ar:"انقر لفتح قاموس في المحرر",ru:"Нажмите, чтобы открыть словарь в редакторе","en-GB":"Click to open the dictionary in the editor"})},backButtonText:me({en:"Dictionary list",fr:"Liste des dictionnaires",es:"Lista de diccionarios",de:"Wörterbuchliste",ja:"辞書リスト",ko:"사전 목록",zh:"词典列表",it:"Elenco di dizionari",pt:"Lista de dicionários",hi:"शब्दकोश सूची",ar:"قائمة القوامل",ru:"Список словарей","en-GB":"Dictionary list"}),modalTitle:me({en:"Edit dictionary",fr:"Modifier le dictionnaire",es:"Editar el diccionario",de:"Wörterbuch bearbeiten",ja:"辞書を編集",ko:"사전 편집",zh:"编辑词典",it:"Modifica dizionario",pt:"Editar dicionário",hi:"शब्दकोश संपादित करें",ar:"تحرير قاموس",ru:"Редактировать словарь","en-GB":"Edit dictionary"}),noDictionaryFocused:me({en:"No dictionary focused",fr:"Aucun dictionnaire sélectionné",es:"No hay diccionario enfocado",de:"Kein Wörterbuch ausgewählt",ja:"フォーカスされた辞書がありません",ko:"포커스가 있는 사전이 없습니다",zh:"没有聚焦的词典",it:"Nessun dizionario selezionato",pt:"Nenhum dicionário focalizado",hi:"कोई फोकस शब्दकोश नहीं है",ar:"لا يوجد قاموس مرتبط",ru:"Нет фокусированного словаря","en-GB":"No dictionary focused"})}},I0=e=>`dictionary_edition_${e}`,YD=e=>{const t=I0(e),{isOpen:n,open:r,close:a}=am(),{getEditedContentValue:o}=Ko(),{focusedContent:l,setFocusedContent:u}=Sa();return E.useEffect(()=>{var d;l&&(((d=l.keyPath)==null?void 0:d.length)??0)>0&&r(t)},[l,r,t]),{isOpen:n(t),focusedContent:l,getEditedContentValue:o,close:()=>{a(t),u(d=>d!=null&&d.dictionaryKey?{...d,keyPath:[]}:d)}}},CQ=({locale:e,identifier:t,handleOnBack:n,isDarkMode:r})=>{const{modalTitle:a,openDictionaryEditor:o}=rn(WD),[l,u]=E.useState(!1),{all:d}=KD(),{focusedContent:f}=YD(t),m=E.useCallback(()=>{u(!1),n()},[n]),g=f==null?void 0:f.dictionaryKey;if(!g)return _.jsx(_.Fragment,{children:"No dictionary focused"});const y=d[g];return y?_.jsxs(_.Fragment,{children:[_.jsx(hk,{isOpen:l,onClose:()=>u(!1),hasCloseButton:!0,title:a.value,size:"xl",transparency:"lg",children:_.jsx("div",{className:"size-full px-3 pt-5",children:_.jsx(_Q,{dictionary:y,onClickDictionaryList:m,isDarkMode:r,mode:["local","remote"],onDelete:()=>{u(!1),n()}})})}),_.jsxs("div",{className:"border-text/20 /20 mb-5 flex w-full border-b border-dashed px-3 pb-2",children:[_.jsx("h3",{className:"w-full text-center text-lg",children:y.title?y.title:y.key}),_.jsx(gt,{variant:"hoverable",color:"text",size:"icon-md",IconRight:j1,label:o.label.value,onClick:()=>u(!0)})]}),_.jsx(G9,{dictionary:y,locale:e,mode:["local","remote"]})]}):_.jsx(_.Fragment,{children:"No dictionary focused"})},RQ=({locale:e,dictionaryKey:t,isDarkMode:n})=>{const{backButtonText:r}=rn(WD),a=I0(t),{focusedContent:o,close:l}=YD(t),{openDictionaryListDrawer:u}=am(f=>({openDictionaryListDrawer:()=>f.open(Uv)})),d=()=>{l(),u()};return _.jsx(qD,{identifier:a,backButton:{onBack:d,text:r.value},onClose:l,children:o&&_.jsx(CQ,{focusedContent:o,locale:e,identifier:a,handleOnBack:d,isDarkMode:n})})},NQ=({locale:e,isDarkMode:t})=>{const{focusedContent:n}=Sa(),r=n==null?void 0:n.dictionaryKey;return r?_.jsx(RQ,{locale:e,dictionaryKey:r,isDarkMode:t}):_.jsx(_.Fragment,{})},OQ=()=>{const{all:e}=KD(),t=E.useMemo(()=>Object.keys(e),[e]),{close:n,open:r}=am(),{editedContent:a}=wn(),{setFocusedContent:o}=Sa(),l=d=>{n(Uv);const{filePath:f}=e[d];o({dictionaryKey:d,dictionaryPath:f}),r(I0(d))},u=E.useCallback(d=>Object.keys(a??{}).includes(d),[a]);return _.jsx(qD,{title:"Dictionary list",identifier:Uv,children:t.map(d=>_.jsx("div",{children:_.jsx(gt,{label:`Open dictionary editor ${d}`,onClick:()=>l(d),variant:"hoverable",color:"text",IconRight:jf,size:"md",isFullWidth:!0,children:u(d)?`✎ ${d}`:d})},d))})},kQ=({children:e})=>{const[t]=As(hr.INTLAYER_CURRENT_LOCALE,void 0,{receive:!0,emit:!1});return _.jsxs("div",{className:"bg-card relative size-full p-3",children:[e,_.jsx(NQ,{locale:t}),_.jsx(OQ,{})]})},DQ=()=>{const[e,t]=E.useState();return E.useEffect(()=>{fetch("/api/config").then(n=>n.json()).then(n=>t(n.data))},[]),e},IQ=({children:e,iframeRef:t})=>{const n=DQ(),r=n!=null&&n.editor.applicationURL?n==null?void 0:n.editor.applicationURL:"*",a=(n==null?void 0:n.editor.editorURL)??"*";return n?_.jsx(Tj,{postMessage:o=>{var l,u;window==null||window.postMessage(o,a),(u=(l=t.current)==null?void 0:l.contentWindow)==null||u.postMessage(o,r)},allowedOrigins:[r,a],mode:"editor",configuration:n,children:e}):_.jsx(jo,{})},LQ=()=>{const{editedContent:e,setEditedContentState:t}=wn(),n=()=>{const r=localStorage==null?void 0:localStorage.getItem("INTLAYER_EDITED_CONTENT_CHANGED");if(r)try{const a=JSON.parse(r);t(a)}catch(a){console.error(a)}};return E.useEffect(()=>{typeof e>"u"||localStorage==null||localStorage.setItem("INTLAYER_EDITED_CONTENT_CHANGED",JSON.stringify(e))},[e]),E.useEffect(()=>{typeof e<"u"||n()},[]),n},MQ=(...e)=>K1(Rh(e)),jQ={key:"no-application-url-view",content:{title:me({en:"Your project configuration do not includes application URL","en-GB":"Your project configuration do not includes application URL",fr:"Votre configuration de projet ne comprend pas l’URL de l’application",es:"Su configuración de proyecto no incluye la URL de la aplicación",de:"Ihre Projektkonfiguration enthält keine Anwendungs-URL",ja:"あなたのプロジェクト構成にはアプリケーション URL が含まれていません",ko:"당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.",zh:"您的项目配置未包含应用程序 URL",pt:"Sua configuração do projeto não inclui a URL do aplicativo",ru:"Ваша конфигурация проекта не включает URL-адрес приложения",ar:"تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق",hi:"आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है",it:"La configurazione del progetto non include l’URL dell’applicazione"}),description:me({en:"To use the editor, you need to add the URL of the application to access to the configuration file.","en-GB":"To use the editor, you need to add the URL of the application to access to the configuration file.",fr:"Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.",es:"Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.",de:"Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.",ja:"エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。",ko:"에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.",zh:"要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。",pt:"Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.",ru:"Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.",ar:"لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.",hi:"एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।",it:"Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione."}),documentationLink:{label:me({en:"Click to go to the editor documentation","en-GB":"Click to go to the editor documentation",fr:"Cliquez ici pour accéder à la documentation de l’éditeur",es:"Haga clic aquí para acceder a la documentación del editor",de:"Klicken Sie hier, um die Editor-Dokumentation zu besuchen",ja:"エディターのドキュメントに移動するには、ここをクリックしてください",ko:"에디터 문서로 이동하려면 여기를 클릭하십시오.",zh:"点击此处访问编辑器文档",pt:"Clique aqui para acessar a documentação do editor",ru:"Нажмите, чтобы перейти к документации редактора",ar:"انقر هنا للوصول إلى وثائق المحرر",hi:"एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?",it:"Fai clic qui per accedere alla documentazione dell’editor"}),text:me({en:"See how to configure the editor","en-GB":"See how to configure the editor",fr:"Voir comment configurer l’éditeur",de:"Siehe, wie man den Editor konfiguriert",ar:"انظر كيفية تكوين المحرر",hi:"एडिटर को काने के बारे में देखें",it:"Vedi come configurare l’editor",ja:"エディターの設定方法を見る",ru:"Смотрите, как настроить редактор",es:"Vea cómo configurar el editor",pt:"Veja como configurar o editor",ko:"에디터 설정 방법을 보십시오",zh:"查看如何配置编辑器"})}}},PQ=()=>{const{title:e,description:t,documentationLink:n}=rn(jQ);return _.jsxs("div",{className:"flex flex-col gap-6",children:[_.jsx(p0,{className:"mb-8",children:e}),_.jsx("strong",{className:"text-neutral block",children:t}),_.jsx(g0,{label:n.label.value,href:"https://intlayer.org/doc/concept/configuration#editor-configuration",color:"text",children:n.text})]})},VQ=({iframeRef:e,applicationPath:t})=>{const{editor:n}=Zr(),r=()=>a(n.enabled),a=xj();l1(r),LQ(),Rj();const[o,l]=E.useState(!1),[u]=Cj(void 0,{receive:!0,emit:!1});return E.useEffect(()=>{typeof u=="string"&&window.history.replaceState({},"",u)},[u]),n.applicationURL?_.jsxs("div",{className:"size-full overflow-hidden rounded-lg",children:[_.jsx(jo,{isLoading:o}),_.jsx("iframe",{src:`${n.applicationURL}${t}`,title:"Intlayer Application",className:MQ("size-full",o&&"hidden"),ref:e,onLoad:()=>{l(!1),r()}})]}):_.jsx("div",{className:"flex size-full items-center justify-center",children:_.jsx(ei,{className:"flex max-w-xl flex-col gap-4 p-6",children:_.jsx(PQ,{})})})},BQ=()=>{const e=E.useRef(null),t=Aa();return _.jsx(IQ,{iframeRef:e,children:_.jsx(Ij,{disableEditor:!0,children:_.jsx(kQ,{children:_.jsx(VQ,{iframeRef:e,applicationPath:t.pathname})})})})},zQ=()=>_.jsx(TQ,{children:_.jsx(wQ,{children:_.jsx(BQ,{})})});SM.createRoot(document.getElementById("root")).render(_.jsx(E.StrictMode,{children:_.jsx(zQ,{})}));